126 lines
3.4 KiB
Go
126 lines
3.4 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
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/TrueCloudLab/frostfs-rest-gw/gen/models"
|
|
)
|
|
|
|
// GetContainerOKCode is the HTTP code returned for type GetContainerOK
|
|
const GetContainerOKCode int = 200
|
|
|
|
/*
|
|
GetContainerOK Container info.
|
|
|
|
swagger:response getContainerOK
|
|
*/
|
|
type GetContainerOK struct {
|
|
/*
|
|
|
|
*/
|
|
AccessControlAllowOrigin string `json:"Access-Control-Allow-Origin"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *models.ContainerInfo `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewGetContainerOK creates GetContainerOK with default headers values
|
|
func NewGetContainerOK() *GetContainerOK {
|
|
|
|
return &GetContainerOK{}
|
|
}
|
|
|
|
// WithAccessControlAllowOrigin adds the accessControlAllowOrigin to the get container o k response
|
|
func (o *GetContainerOK) WithAccessControlAllowOrigin(accessControlAllowOrigin string) *GetContainerOK {
|
|
o.AccessControlAllowOrigin = accessControlAllowOrigin
|
|
return o
|
|
}
|
|
|
|
// SetAccessControlAllowOrigin sets the accessControlAllowOrigin to the get container o k response
|
|
func (o *GetContainerOK) SetAccessControlAllowOrigin(accessControlAllowOrigin string) {
|
|
o.AccessControlAllowOrigin = accessControlAllowOrigin
|
|
}
|
|
|
|
// WithPayload adds the payload to the get container o k response
|
|
func (o *GetContainerOK) WithPayload(payload *models.ContainerInfo) *GetContainerOK {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the get container o k response
|
|
func (o *GetContainerOK) SetPayload(payload *models.ContainerInfo) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *GetContainerOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
// response header Access-Control-Allow-Origin
|
|
|
|
accessControlAllowOrigin := o.AccessControlAllowOrigin
|
|
if accessControlAllowOrigin != "" {
|
|
rw.Header().Set("Access-Control-Allow-Origin", accessControlAllowOrigin)
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
|
|
// GetContainerBadRequestCode is the HTTP code returned for type GetContainerBadRequest
|
|
const GetContainerBadRequestCode int = 400
|
|
|
|
/*
|
|
GetContainerBadRequest Bad request.
|
|
|
|
swagger:response getContainerBadRequest
|
|
*/
|
|
type GetContainerBadRequest struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *models.ErrorResponse `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewGetContainerBadRequest creates GetContainerBadRequest with default headers values
|
|
func NewGetContainerBadRequest() *GetContainerBadRequest {
|
|
|
|
return &GetContainerBadRequest{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the get container bad request response
|
|
func (o *GetContainerBadRequest) WithPayload(payload *models.ErrorResponse) *GetContainerBadRequest {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the get container bad request response
|
|
func (o *GetContainerBadRequest) SetPayload(payload *models.ErrorResponse) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *GetContainerBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
rw.WriteHeader(400)
|
|
if o.Payload != nil {
|
|
payload := o.Payload
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|