src.dualinventive.com/go/companies-service/rest/server/operations/companies/get_companies_responses.go

191 lines
5.1 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package companies
// 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/companies-service/rest/models"
)
// GetCompaniesOKCode is the HTTP code returned for type GetCompaniesOK
const GetCompaniesOKCode int = 200
/*GetCompaniesOK successful operation
swagger:response getCompaniesOK
*/
type GetCompaniesOK struct {
/*
In: Body
*/
Payload *models.CompaniesList `json:"body,omitempty"`
}
// NewGetCompaniesOK creates GetCompaniesOK with default headers values
func NewGetCompaniesOK() *GetCompaniesOK {
return &GetCompaniesOK{}
}
// WithPayload adds the payload to the get companies o k response
func (o *GetCompaniesOK) WithPayload(payload *models.CompaniesList) *GetCompaniesOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get companies o k response
func (o *GetCompaniesOK) SetPayload(payload *models.CompaniesList) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetCompaniesOK) 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
}
}
}
// GetCompaniesUnauthorizedCode is the HTTP code returned for type GetCompaniesUnauthorized
const GetCompaniesUnauthorizedCode int = 401
/*GetCompaniesUnauthorized authentication failed
swagger:response getCompaniesUnauthorized
*/
type GetCompaniesUnauthorized struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewGetCompaniesUnauthorized creates GetCompaniesUnauthorized with default headers values
func NewGetCompaniesUnauthorized() *GetCompaniesUnauthorized {
return &GetCompaniesUnauthorized{}
}
// WithPayload adds the payload to the get companies unauthorized response
func (o *GetCompaniesUnauthorized) WithPayload(payload *models.ErrResponse) *GetCompaniesUnauthorized {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get companies unauthorized response
func (o *GetCompaniesUnauthorized) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetCompaniesUnauthorized) 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
}
}
}
// GetCompaniesNotFoundCode is the HTTP code returned for type GetCompaniesNotFound
const GetCompaniesNotFoundCode int = 404
/*GetCompaniesNotFound not found
swagger:response getCompaniesNotFound
*/
type GetCompaniesNotFound struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewGetCompaniesNotFound creates GetCompaniesNotFound with default headers values
func NewGetCompaniesNotFound() *GetCompaniesNotFound {
return &GetCompaniesNotFound{}
}
// WithPayload adds the payload to the get companies not found response
func (o *GetCompaniesNotFound) WithPayload(payload *models.ErrResponse) *GetCompaniesNotFound {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get companies not found response
func (o *GetCompaniesNotFound) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetCompaniesNotFound) 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
}
}
}
// GetCompaniesInternalServerErrorCode is the HTTP code returned for type GetCompaniesInternalServerError
const GetCompaniesInternalServerErrorCode int = 500
/*GetCompaniesInternalServerError internal server error
swagger:response getCompaniesInternalServerError
*/
type GetCompaniesInternalServerError struct {
/*
In: Body
*/
Payload *models.ErrResponse `json:"body,omitempty"`
}
// NewGetCompaniesInternalServerError creates GetCompaniesInternalServerError with default headers values
func NewGetCompaniesInternalServerError() *GetCompaniesInternalServerError {
return &GetCompaniesInternalServerError{}
}
// WithPayload adds the payload to the get companies internal server error response
func (o *GetCompaniesInternalServerError) WithPayload(payload *models.ErrResponse) *GetCompaniesInternalServerError {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get companies internal server error response
func (o *GetCompaniesInternalServerError) SetPayload(payload *models.ErrResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetCompaniesInternalServerError) 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
}
}
}