src.dualinventive.com/go/assets-service/rest/server/operations/assets/get_assets_responses.go

191 lines
4.9 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package assets
// 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"
models "src.dualinventive.com/go/assets-service/rest/models"
)
// GetAssetsOKCode is the HTTP code returned for type GetAssetsOK
const GetAssetsOKCode int = 200
/*GetAssetsOK successful operation
swagger:response getAssetsOK
*/
type GetAssetsOK struct {
/*
In: Body
*/
Payload *models.AssetsList `json:"body,omitempty"`
}
// NewGetAssetsOK creates GetAssetsOK with default headers values
func NewGetAssetsOK() *GetAssetsOK {
return &GetAssetsOK{}
}
// WithPayload adds the payload to the get assets o k response
func (o *GetAssetsOK) WithPayload(payload *models.AssetsList) *GetAssetsOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get assets o k response
func (o *GetAssetsOK) SetPayload(payload *models.AssetsList) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetAssetsOK) 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
}
}
}
// GetAssetsUnauthorizedCode is the HTTP code returned for type GetAssetsUnauthorized
const GetAssetsUnauthorizedCode int = 401
/*GetAssetsUnauthorized authentication failed
swagger:response getAssetsUnauthorized
*/
type GetAssetsUnauthorized struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewGetAssetsUnauthorized creates GetAssetsUnauthorized with default headers values
func NewGetAssetsUnauthorized() *GetAssetsUnauthorized {
return &GetAssetsUnauthorized{}
}
// WithPayload adds the payload to the get assets unauthorized response
func (o *GetAssetsUnauthorized) WithPayload(payload *models.ErrResponse) *GetAssetsUnauthorized {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get assets unauthorized response
func (o *GetAssetsUnauthorized) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetAssetsUnauthorized) 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
}
}
}
// GetAssetsNotFoundCode is the HTTP code returned for type GetAssetsNotFound
const GetAssetsNotFoundCode int = 404
/*GetAssetsNotFound not found
swagger:response getAssetsNotFound
*/
type GetAssetsNotFound struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewGetAssetsNotFound creates GetAssetsNotFound with default headers values
func NewGetAssetsNotFound() *GetAssetsNotFound {
return &GetAssetsNotFound{}
}
// WithPayload adds the payload to the get assets not found response
func (o *GetAssetsNotFound) WithPayload(payload *models.ErrResponse) *GetAssetsNotFound {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get assets not found response
func (o *GetAssetsNotFound) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetAssetsNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(404)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// GetAssetsInternalServerErrorCode is the HTTP code returned for type GetAssetsInternalServerError
const GetAssetsInternalServerErrorCode int = 500
/*GetAssetsInternalServerError internal server error
swagger:response getAssetsInternalServerError
*/
type GetAssetsInternalServerError struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewGetAssetsInternalServerError creates GetAssetsInternalServerError with default headers values
func NewGetAssetsInternalServerError() *GetAssetsInternalServerError {
return &GetAssetsInternalServerError{}
}
// WithPayload adds the payload to the get assets internal server error response
func (o *GetAssetsInternalServerError) WithPayload(payload *models.ErrResponse) *GetAssetsInternalServerError {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get assets internal server error response
func (o *GetAssetsInternalServerError) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetAssetsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(500)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}