101 lines
2.4 KiB
Go
101 lines
2.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/nspcc-dev/neofs-rest-gw/gen/models"
|
||
|
)
|
||
|
|
||
|
// PutObjectOKCode is the HTTP code returned for type PutObjectOK
|
||
|
const PutObjectOKCode int = 200
|
||
|
|
||
|
/*PutObjectOK Address of uploaded objects
|
||
|
|
||
|
swagger:response putObjectOK
|
||
|
*/
|
||
|
type PutObjectOK struct {
|
||
|
|
||
|
/*
|
||
|
In: Body
|
||
|
*/
|
||
|
Payload *PutObjectOKBody `json:"body,omitempty"`
|
||
|
}
|
||
|
|
||
|
// NewPutObjectOK creates PutObjectOK with default headers values
|
||
|
func NewPutObjectOK() *PutObjectOK {
|
||
|
|
||
|
return &PutObjectOK{}
|
||
|
}
|
||
|
|
||
|
// WithPayload adds the payload to the put object o k response
|
||
|
func (o *PutObjectOK) WithPayload(payload *PutObjectOKBody) *PutObjectOK {
|
||
|
o.Payload = payload
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetPayload sets the payload to the put object o k response
|
||
|
func (o *PutObjectOK) SetPayload(payload *PutObjectOKBody) {
|
||
|
o.Payload = payload
|
||
|
}
|
||
|
|
||
|
// WriteResponse to the client
|
||
|
func (o *PutObjectOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||
|
|
||
|
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
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// PutObjectBadRequestCode is the HTTP code returned for type PutObjectBadRequest
|
||
|
const PutObjectBadRequestCode int = 400
|
||
|
|
||
|
/*PutObjectBadRequest Bad request
|
||
|
|
||
|
swagger:response putObjectBadRequest
|
||
|
*/
|
||
|
type PutObjectBadRequest struct {
|
||
|
|
||
|
/*
|
||
|
In: Body
|
||
|
*/
|
||
|
Payload models.Error `json:"body,omitempty"`
|
||
|
}
|
||
|
|
||
|
// NewPutObjectBadRequest creates PutObjectBadRequest with default headers values
|
||
|
func NewPutObjectBadRequest() *PutObjectBadRequest {
|
||
|
|
||
|
return &PutObjectBadRequest{}
|
||
|
}
|
||
|
|
||
|
// WithPayload adds the payload to the put object bad request response
|
||
|
func (o *PutObjectBadRequest) WithPayload(payload models.Error) *PutObjectBadRequest {
|
||
|
o.Payload = payload
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetPayload sets the payload to the put object bad request response
|
||
|
func (o *PutObjectBadRequest) SetPayload(payload models.Error) {
|
||
|
o.Payload = payload
|
||
|
}
|
||
|
|
||
|
// WriteResponse to the client
|
||
|
func (o *PutObjectBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||
|
|
||
|
rw.WriteHeader(400)
|
||
|
payload := o.Payload
|
||
|
if err := producer.Produce(rw, payload); err != nil {
|
||
|
panic(err) // let the recovery middleware deal with this
|
||
|
}
|
||
|
}
|