You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
149 lines
3.8 KiB
149 lines
3.8 KiB
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package event_management
|
|
|
|
// 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/Cyclops-Labs/cyclops-4-hpc.git/services/eventsengine/models"
|
|
)
|
|
|
|
// GetStateOKCode is the HTTP code returned for type GetStateOK
|
|
const GetStateOKCode int = 200
|
|
|
|
/*GetStateOK Description of a successfully operation
|
|
|
|
swagger:response getStateOK
|
|
*/
|
|
type GetStateOK struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload []*models.State `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewGetStateOK creates GetStateOK with default headers values
|
|
func NewGetStateOK() *GetStateOK {
|
|
|
|
return &GetStateOK{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the get state o k response
|
|
func (o *GetStateOK) WithPayload(payload []*models.State) *GetStateOK {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the get state o k response
|
|
func (o *GetStateOK) SetPayload(payload []*models.State) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *GetStateOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
rw.WriteHeader(200)
|
|
payload := o.Payload
|
|
if payload == nil {
|
|
// return empty array
|
|
payload = make([]*models.State, 0, 50)
|
|
}
|
|
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
|
|
// GetStateNotFoundCode is the HTTP code returned for type GetStateNotFound
|
|
const GetStateNotFoundCode int = 404
|
|
|
|
/*GetStateNotFound Item not found in the system
|
|
|
|
swagger:response getStateNotFound
|
|
*/
|
|
type GetStateNotFound struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *models.ErrorResponse `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewGetStateNotFound creates GetStateNotFound with default headers values
|
|
func NewGetStateNotFound() *GetStateNotFound {
|
|
|
|
return &GetStateNotFound{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the get state not found response
|
|
func (o *GetStateNotFound) WithPayload(payload *models.ErrorResponse) *GetStateNotFound {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the get state not found response
|
|
func (o *GetStateNotFound) SetPayload(payload *models.ErrorResponse) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *GetStateNotFound) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// GetStateInternalServerErrorCode is the HTTP code returned for type GetStateInternalServerError
|
|
const GetStateInternalServerErrorCode int = 500
|
|
|
|
/*GetStateInternalServerError Something unexpected happend, error raised
|
|
|
|
swagger:response getStateInternalServerError
|
|
*/
|
|
type GetStateInternalServerError struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *models.ErrorResponse `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewGetStateInternalServerError creates GetStateInternalServerError with default headers values
|
|
func NewGetStateInternalServerError() *GetStateInternalServerError {
|
|
|
|
return &GetStateInternalServerError{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the get state internal server error response
|
|
func (o *GetStateInternalServerError) WithPayload(payload *models.ErrorResponse) *GetStateInternalServerError {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the get state internal server error response
|
|
func (o *GetStateInternalServerError) SetPayload(payload *models.ErrorResponse) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *GetStateInternalServerError) 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
|
|
}
|
|
}
|
|
}
|
|
|