142 lines
3.6 KiB
Go
142 lines
3.6 KiB
Go
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"
|
|
|
|
"github.com/influxdata/mrfusion/models"
|
|
)
|
|
|
|
/*PutLayoutsIDOK Layout has been replaced and the new layout is returned.
|
|
|
|
swagger:response putLayoutsIdOK
|
|
*/
|
|
type PutLayoutsIDOK struct {
|
|
|
|
// In: body
|
|
Payload *models.Layout `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewPutLayoutsIDOK creates PutLayoutsIDOK with default headers values
|
|
func NewPutLayoutsIDOK() *PutLayoutsIDOK {
|
|
return &PutLayoutsIDOK{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the put layouts Id o k response
|
|
func (o *PutLayoutsIDOK) WithPayload(payload *models.Layout) *PutLayoutsIDOK {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the put layouts Id o k response
|
|
func (o *PutLayoutsIDOK) SetPayload(payload *models.Layout) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *PutLayoutsIDOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
rw.WriteHeader(200)
|
|
if o.Payload != nil {
|
|
if err := producer.Produce(rw, o.Payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|
|
|
|
/*PutLayoutsIDNotFound Happens when trying to access a non-existent layout.
|
|
|
|
swagger:response putLayoutsIdNotFound
|
|
*/
|
|
type PutLayoutsIDNotFound struct {
|
|
|
|
// In: body
|
|
Payload *models.Error `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewPutLayoutsIDNotFound creates PutLayoutsIDNotFound with default headers values
|
|
func NewPutLayoutsIDNotFound() *PutLayoutsIDNotFound {
|
|
return &PutLayoutsIDNotFound{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the put layouts Id not found response
|
|
func (o *PutLayoutsIDNotFound) WithPayload(payload *models.Error) *PutLayoutsIDNotFound {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the put layouts Id not found response
|
|
func (o *PutLayoutsIDNotFound) SetPayload(payload *models.Error) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *PutLayoutsIDNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
rw.WriteHeader(404)
|
|
if o.Payload != nil {
|
|
if err := producer.Produce(rw, o.Payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|
|
|
|
/*PutLayoutsIDDefault A processing or an unexpected error.
|
|
|
|
swagger:response putLayoutsIdDefault
|
|
*/
|
|
type PutLayoutsIDDefault struct {
|
|
_statusCode int
|
|
|
|
// In: body
|
|
Payload *models.Error `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewPutLayoutsIDDefault creates PutLayoutsIDDefault with default headers values
|
|
func NewPutLayoutsIDDefault(code int) *PutLayoutsIDDefault {
|
|
if code <= 0 {
|
|
code = 500
|
|
}
|
|
|
|
return &PutLayoutsIDDefault{
|
|
_statusCode: code,
|
|
}
|
|
}
|
|
|
|
// WithStatusCode adds the status to the put layouts ID default response
|
|
func (o *PutLayoutsIDDefault) WithStatusCode(code int) *PutLayoutsIDDefault {
|
|
o._statusCode = code
|
|
return o
|
|
}
|
|
|
|
// SetStatusCode sets the status to the put layouts ID default response
|
|
func (o *PutLayoutsIDDefault) SetStatusCode(code int) {
|
|
o._statusCode = code
|
|
}
|
|
|
|
// WithPayload adds the payload to the put layouts ID default response
|
|
func (o *PutLayoutsIDDefault) WithPayload(payload *models.Error) *PutLayoutsIDDefault {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the put layouts ID default response
|
|
func (o *PutLayoutsIDDefault) SetPayload(payload *models.Error) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *PutLayoutsIDDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
rw.WriteHeader(o._statusCode)
|
|
if o.Payload != nil {
|
|
if err := producer.Produce(rw, o.Payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|