frostfs-rest-gw/gen/restapi/operations/put_container_e_acl_responses.go
Alex Vanin d2d88ba21b Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-13 09:47:55 +03:00

124 lines
3.6 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"
"git.frostfs.info/TrueCloudLab/frostfs-rest-gw/gen/models"
)
// PutContainerEACLOKCode is the HTTP code returned for type PutContainerEACLOK
const PutContainerEACLOKCode int = 200
/*PutContainerEACLOK Successful EACL updating.
swagger:response putContainerEAclOK
*/
type PutContainerEACLOK struct {
/*
*/
AccessControlAllowOrigin string `json:"Access-Control-Allow-Origin"`
/*
In: Body
*/
Payload *models.SuccessResponse `json:"body,omitempty"`
}
// NewPutContainerEACLOK creates PutContainerEACLOK with default headers values
func NewPutContainerEACLOK() *PutContainerEACLOK {
return &PutContainerEACLOK{}
}
// WithAccessControlAllowOrigin adds the accessControlAllowOrigin to the put container e Acl o k response
func (o *PutContainerEACLOK) WithAccessControlAllowOrigin(accessControlAllowOrigin string) *PutContainerEACLOK {
o.AccessControlAllowOrigin = accessControlAllowOrigin
return o
}
// SetAccessControlAllowOrigin sets the accessControlAllowOrigin to the put container e Acl o k response
func (o *PutContainerEACLOK) SetAccessControlAllowOrigin(accessControlAllowOrigin string) {
o.AccessControlAllowOrigin = accessControlAllowOrigin
}
// WithPayload adds the payload to the put container e Acl o k response
func (o *PutContainerEACLOK) WithPayload(payload *models.SuccessResponse) *PutContainerEACLOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the put container e Acl o k response
func (o *PutContainerEACLOK) SetPayload(payload *models.SuccessResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *PutContainerEACLOK) 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
}
}
}
// PutContainerEACLBadRequestCode is the HTTP code returned for type PutContainerEACLBadRequest
const PutContainerEACLBadRequestCode int = 400
/*PutContainerEACLBadRequest Bad request.
swagger:response putContainerEAclBadRequest
*/
type PutContainerEACLBadRequest struct {
/*
In: Body
*/
Payload *models.ErrorResponse `json:"body,omitempty"`
}
// NewPutContainerEACLBadRequest creates PutContainerEACLBadRequest with default headers values
func NewPutContainerEACLBadRequest() *PutContainerEACLBadRequest {
return &PutContainerEACLBadRequest{}
}
// WithPayload adds the payload to the put container e Acl bad request response
func (o *PutContainerEACLBadRequest) WithPayload(payload *models.ErrorResponse) *PutContainerEACLBadRequest {
o.Payload = payload
return o
}
// SetPayload sets the payload to the put container e Acl bad request response
func (o *PutContainerEACLBadRequest) SetPayload(payload *models.ErrorResponse) {
o.Payload = payload
}
// WriteResponse to the client
func (o *PutContainerEACLBadRequest) 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
}
}
}