2022-04-11 09:35:06 +00:00
|
|
|
// 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"
|
|
|
|
|
2022-12-15 10:03:54 +00:00
|
|
|
"github.com/TrueCloudLab/frostfs-rest-gw/gen/models"
|
2022-04-11 09:35:06 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// GetContainerOKCode is the HTTP code returned for type GetContainerOK
|
|
|
|
const GetContainerOKCode int = 200
|
|
|
|
|
2022-12-16 09:51:08 +00:00
|
|
|
/*GetContainerOK Container info.
|
2022-04-11 09:35:06 +00:00
|
|
|
|
|
|
|
swagger:response getContainerOK
|
|
|
|
*/
|
|
|
|
type GetContainerOK struct {
|
2022-08-05 19:09:19 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
*/
|
|
|
|
AccessControlAllowOrigin string `json:"Access-Control-Allow-Origin"`
|
2022-04-11 09:35:06 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
|
|
|
Payload *models.ContainerInfo `json:"body,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewGetContainerOK creates GetContainerOK with default headers values
|
|
|
|
func NewGetContainerOK() *GetContainerOK {
|
|
|
|
|
|
|
|
return &GetContainerOK{}
|
|
|
|
}
|
|
|
|
|
2022-08-05 19:09:19 +00:00
|
|
|
// 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
|
|
|
|
}
|
|
|
|
|
2022-04-11 09:35:06 +00:00
|
|
|
// 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) {
|
|
|
|
|
2022-08-05 19:09:19 +00:00
|
|
|
// response header Access-Control-Allow-Origin
|
|
|
|
|
|
|
|
accessControlAllowOrigin := o.AccessControlAllowOrigin
|
|
|
|
if accessControlAllowOrigin != "" {
|
|
|
|
rw.Header().Set("Access-Control-Allow-Origin", accessControlAllowOrigin)
|
|
|
|
}
|
|
|
|
|
2022-04-11 09:35:06 +00:00
|
|
|
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
|
|
|
|
|
2022-12-16 09:51:08 +00:00
|
|
|
/*GetContainerBadRequest Bad request.
|
2022-04-11 09:35:06 +00:00
|
|
|
|
|
|
|
swagger:response getContainerBadRequest
|
|
|
|
*/
|
|
|
|
type GetContainerBadRequest struct {
|
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
2022-07-07 12:59:38 +00:00
|
|
|
Payload *models.ErrorResponse `json:"body,omitempty"`
|
2022-04-11 09:35:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewGetContainerBadRequest creates GetContainerBadRequest with default headers values
|
|
|
|
func NewGetContainerBadRequest() *GetContainerBadRequest {
|
|
|
|
|
|
|
|
return &GetContainerBadRequest{}
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithPayload adds the payload to the get container bad request response
|
2022-07-07 12:59:38 +00:00
|
|
|
func (o *GetContainerBadRequest) WithPayload(payload *models.ErrorResponse) *GetContainerBadRequest {
|
2022-04-11 09:35:06 +00:00
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPayload sets the payload to the get container bad request response
|
2022-07-07 12:59:38 +00:00
|
|
|
func (o *GetContainerBadRequest) SetPayload(payload *models.ErrorResponse) {
|
2022-04-11 09:35:06 +00:00
|
|
|
o.Payload = payload
|
|
|
|
}
|
|
|
|
|
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *GetContainerBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
|
|
|
|
rw.WriteHeader(400)
|
2022-07-07 12:59:38 +00:00
|
|
|
if o.Payload != nil {
|
|
|
|
payload := o.Payload
|
|
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
|
|
panic(err) // let the recovery middleware deal with this
|
|
|
|
}
|
2022-04-11 09:35:06 +00:00
|
|
|
}
|
|
|
|
}
|