// Code generated by go-swagger; DO NOT EDIT. package operations // 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" "gem-spaas-coding-challenge/models" ) // ProductionPlanOKCode is the HTTP code returned for type ProductionPlanOK const ProductionPlanOKCode int = 200 /*ProductionPlanOK returns optimal production plan swagger:response productionPlanOK */ type ProductionPlanOK struct { /* In: Body */ Payload []interface{} `json:"body,omitempty"` } // NewProductionPlanOK creates ProductionPlanOK with default headers values func NewProductionPlanOK() *ProductionPlanOK { return &ProductionPlanOK{} } // WithPayload adds the payload to the production plan o k response func (o *ProductionPlanOK) WithPayload(payload []interface{}) *ProductionPlanOK { o.Payload = payload return o } // SetPayload sets the payload to the production plan o k response func (o *ProductionPlanOK) SetPayload(payload []interface{}) { o.Payload = payload } // WriteResponse to the client func (o *ProductionPlanOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.WriteHeader(200) payload := o.Payload if payload == nil { // return empty array payload = make([]interface{}, 0, 50) } if err := producer.Produce(rw, payload); err != nil { panic(err) // let the recovery middleware deal with this } } /*ProductionPlanDefault generic error response swagger:response productionPlanDefault */ type ProductionPlanDefault struct { _statusCode int /* In: Body */ Payload *models.Error `json:"body,omitempty"` } // NewProductionPlanDefault creates ProductionPlanDefault with default headers values func NewProductionPlanDefault(code int) *ProductionPlanDefault { if code <= 0 { code = 500 } return &ProductionPlanDefault{ _statusCode: code, } } // WithStatusCode adds the status to the production plan default response func (o *ProductionPlanDefault) WithStatusCode(code int) *ProductionPlanDefault { o._statusCode = code return o } // SetStatusCode sets the status to the production plan default response func (o *ProductionPlanDefault) SetStatusCode(code int) { o._statusCode = code } // WithPayload adds the payload to the production plan default response func (o *ProductionPlanDefault) WithPayload(payload *models.Error) *ProductionPlanDefault { o.Payload = payload return o } // SetPayload sets the payload to the production plan default response func (o *ProductionPlanDefault) SetPayload(payload *models.Error) { o.Payload = payload } // WriteResponse to the client func (o *ProductionPlanDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.WriteHeader(o._statusCode) if o.Payload != nil { payload := o.Payload if err := producer.Produce(rw, payload); err != nil { panic(err) // let the recovery middleware deal with this } } }