// Code generated by go-swagger; DO NOT EDIT.

package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"net/http"

	"github.com/go-openapi/runtime"

	"github.com/IBM/FfDL/restapi/api_v1/restmodels"
)

// ListModelsOKCode is the HTTP code returned for type ListModelsOK
const ListModelsOKCode int = 200

/*ListModelsOK List of deep learning models.

swagger:response listModelsOK
*/
type ListModelsOK struct {

	/*
	  In: Body
	*/
	Payload *restmodels.ModelList `json:"body,omitempty"`
}

// NewListModelsOK creates ListModelsOK with default headers values
func NewListModelsOK() *ListModelsOK {
	return &ListModelsOK{}
}

// WithPayload adds the payload to the list models o k response
func (o *ListModelsOK) WithPayload(payload *restmodels.ModelList) *ListModelsOK {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the list models o k response
func (o *ListModelsOK) SetPayload(payload *restmodels.ModelList) {
	o.Payload = payload
}

// WriteResponse to the client
func (o *ListModelsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {

	rw.WriteHeader(200)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err) // let the recovery middleware deal with this
		}
	}
}

// ListModelsUnauthorizedCode is the HTTP code returned for type ListModelsUnauthorized
const ListModelsUnauthorizedCode int = 401

/*ListModelsUnauthorized Unauthorized

swagger:response listModelsUnauthorized
*/
type ListModelsUnauthorized struct {

	/*
	  In: Body
	*/
	Payload *restmodels.Error `json:"body,omitempty"`
}

// NewListModelsUnauthorized creates ListModelsUnauthorized with default headers values
func NewListModelsUnauthorized() *ListModelsUnauthorized {
	return &ListModelsUnauthorized{}
}

// WithPayload adds the payload to the list models unauthorized response
func (o *ListModelsUnauthorized) WithPayload(payload *restmodels.Error) *ListModelsUnauthorized {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the list models unauthorized response
func (o *ListModelsUnauthorized) SetPayload(payload *restmodels.Error) {
	o.Payload = payload
}

// WriteResponse to the client
func (o *ListModelsUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {

	rw.WriteHeader(401)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err) // let the recovery middleware deal with this
		}
	}
}
