// 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" ) // FormBinaryBearerOKCode is the HTTP code returned for type FormBinaryBearerOK const FormBinaryBearerOKCode int = 200 /*FormBinaryBearerOK Base64 encoded stable binary marshaled bearer token. swagger:response formBinaryBearerOK */ type FormBinaryBearerOK struct { /* */ AccessControlAllowOrigin string `json:"Access-Control-Allow-Origin"` /* In: Body */ Payload *models.BinaryBearer `json:"body,omitempty"` } // NewFormBinaryBearerOK creates FormBinaryBearerOK with default headers values func NewFormBinaryBearerOK() *FormBinaryBearerOK { return &FormBinaryBearerOK{} } // WithAccessControlAllowOrigin adds the accessControlAllowOrigin to the form binary bearer o k response func (o *FormBinaryBearerOK) WithAccessControlAllowOrigin(accessControlAllowOrigin string) *FormBinaryBearerOK { o.AccessControlAllowOrigin = accessControlAllowOrigin return o } // SetAccessControlAllowOrigin sets the accessControlAllowOrigin to the form binary bearer o k response func (o *FormBinaryBearerOK) SetAccessControlAllowOrigin(accessControlAllowOrigin string) { o.AccessControlAllowOrigin = accessControlAllowOrigin } // WithPayload adds the payload to the form binary bearer o k response func (o *FormBinaryBearerOK) WithPayload(payload *models.BinaryBearer) *FormBinaryBearerOK { o.Payload = payload return o } // SetPayload sets the payload to the form binary bearer o k response func (o *FormBinaryBearerOK) SetPayload(payload *models.BinaryBearer) { o.Payload = payload } // WriteResponse to the client func (o *FormBinaryBearerOK) 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 } } } // FormBinaryBearerBadRequestCode is the HTTP code returned for type FormBinaryBearerBadRequest const FormBinaryBearerBadRequestCode int = 400 /*FormBinaryBearerBadRequest Bad request swagger:response formBinaryBearerBadRequest */ type FormBinaryBearerBadRequest struct { /* In: Body */ Payload *models.ErrorResponse `json:"body,omitempty"` } // NewFormBinaryBearerBadRequest creates FormBinaryBearerBadRequest with default headers values func NewFormBinaryBearerBadRequest() *FormBinaryBearerBadRequest { return &FormBinaryBearerBadRequest{} } // WithPayload adds the payload to the form binary bearer bad request response func (o *FormBinaryBearerBadRequest) WithPayload(payload *models.ErrorResponse) *FormBinaryBearerBadRequest { o.Payload = payload return o } // SetPayload sets the payload to the form binary bearer bad request response func (o *FormBinaryBearerBadRequest) SetPayload(payload *models.ErrorResponse) { o.Payload = payload } // WriteResponse to the client func (o *FormBinaryBearerBadRequest) 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 } } }