chronograf/restapi/operations/get_responses.go

105 lines
2.3 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"
)
/*GetOK Returns the links to the top level endpoints.
swagger:response getOK
*/
type GetOK struct {
// In: body
Payload *models.Routes `json:"body,omitempty"`
}
// NewGetOK creates GetOK with default headers values
func NewGetOK() *GetOK {
return &GetOK{}
}
// WithPayload adds the payload to the get o k response
func (o *GetOK) WithPayload(payload *models.Routes) *GetOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get o k response
func (o *GetOK) SetPayload(payload *models.Routes) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetOK) 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
}
}
}
/*GetDefault Unexpected internal service error
swagger:response getDefault
*/
type GetDefault struct {
_statusCode int
// In: body
Payload *models.Error `json:"body,omitempty"`
}
// NewGetDefault creates GetDefault with default headers values
func NewGetDefault(code int) *GetDefault {
if code <= 0 {
code = 500
}
return &GetDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the get default response
func (o *GetDefault) WithStatusCode(code int) *GetDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the get default response
func (o *GetDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the get default response
func (o *GetDefault) WithPayload(payload *models.Error) *GetDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get default response
func (o *GetDefault) SetPayload(payload *models.Error) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetDefault) 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
}
}
}