2022-04-13 08:41:04 +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"
|
|
|
|
|
|
|
|
"github.com/nspcc-dev/neofs-rest-gw/gen/models"
|
|
|
|
)
|
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
// DeleteContainerOKCode is the HTTP code returned for type DeleteContainerOK
|
|
|
|
const DeleteContainerOKCode int = 200
|
2022-04-13 08:41:04 +00:00
|
|
|
|
2022-07-20 15:16:30 +00:00
|
|
|
/*DeleteContainerOK Successful deletion.
|
2022-04-13 08:41:04 +00:00
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
swagger:response deleteContainerOK
|
2022-04-13 08:41:04 +00:00
|
|
|
*/
|
2022-07-07 09:29:51 +00:00
|
|
|
type DeleteContainerOK struct {
|
2022-08-05 19:09:19 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
*/
|
|
|
|
AccessControlAllowOrigin string `json:"Access-Control-Allow-Origin"`
|
2022-07-07 09:29:51 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
|
|
|
Payload *models.SuccessResponse `json:"body,omitempty"`
|
2022-04-13 08:41:04 +00:00
|
|
|
}
|
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
// NewDeleteContainerOK creates DeleteContainerOK with default headers values
|
|
|
|
func NewDeleteContainerOK() *DeleteContainerOK {
|
2022-04-13 08:41:04 +00:00
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
return &DeleteContainerOK{}
|
2022-04-13 08:41:04 +00:00
|
|
|
}
|
|
|
|
|
2022-08-05 19:09:19 +00:00
|
|
|
// WithAccessControlAllowOrigin adds the accessControlAllowOrigin to the delete container o k response
|
|
|
|
func (o *DeleteContainerOK) WithAccessControlAllowOrigin(accessControlAllowOrigin string) *DeleteContainerOK {
|
|
|
|
o.AccessControlAllowOrigin = accessControlAllowOrigin
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetAccessControlAllowOrigin sets the accessControlAllowOrigin to the delete container o k response
|
|
|
|
func (o *DeleteContainerOK) SetAccessControlAllowOrigin(accessControlAllowOrigin string) {
|
|
|
|
o.AccessControlAllowOrigin = accessControlAllowOrigin
|
|
|
|
}
|
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
// WithPayload adds the payload to the delete container o k response
|
|
|
|
func (o *DeleteContainerOK) WithPayload(payload *models.SuccessResponse) *DeleteContainerOK {
|
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
2022-04-13 08:41:04 +00:00
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
// SetPayload sets the payload to the delete container o k response
|
|
|
|
func (o *DeleteContainerOK) SetPayload(payload *models.SuccessResponse) {
|
|
|
|
o.Payload = payload
|
|
|
|
}
|
2022-04-13 08:41:04 +00:00
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *DeleteContainerOK) 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-07-07 09:29:51 +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
|
|
|
|
}
|
|
|
|
}
|
2022-04-13 08:41:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeleteContainerBadRequestCode is the HTTP code returned for type DeleteContainerBadRequest
|
|
|
|
const DeleteContainerBadRequestCode int = 400
|
|
|
|
|
2022-07-20 15:16:30 +00:00
|
|
|
/*DeleteContainerBadRequest Bad request.
|
2022-04-13 08:41:04 +00:00
|
|
|
|
|
|
|
swagger:response deleteContainerBadRequest
|
|
|
|
*/
|
|
|
|
type DeleteContainerBadRequest struct {
|
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
2022-07-07 12:59:38 +00:00
|
|
|
Payload *models.ErrorResponse `json:"body,omitempty"`
|
2022-04-13 08:41:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewDeleteContainerBadRequest creates DeleteContainerBadRequest with default headers values
|
|
|
|
func NewDeleteContainerBadRequest() *DeleteContainerBadRequest {
|
|
|
|
|
|
|
|
return &DeleteContainerBadRequest{}
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithPayload adds the payload to the delete container bad request response
|
2022-07-07 12:59:38 +00:00
|
|
|
func (o *DeleteContainerBadRequest) WithPayload(payload *models.ErrorResponse) *DeleteContainerBadRequest {
|
2022-04-13 08:41:04 +00:00
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPayload sets the payload to the delete container bad request response
|
2022-07-07 12:59:38 +00:00
|
|
|
func (o *DeleteContainerBadRequest) SetPayload(payload *models.ErrorResponse) {
|
2022-04-13 08:41:04 +00:00
|
|
|
o.Payload = payload
|
|
|
|
}
|
|
|
|
|
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *DeleteContainerBadRequest) 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-13 08:41:04 +00:00
|
|
|
}
|
|
|
|
}
|