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"
|
|
|
|
|
|
|
|
"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
|
|
|
|
*/
|
2022-04-18 08:30:34 +00:00
|
|
|
Payload *models.Address `json:"body,omitempty"`
|
2022-04-11 09:35:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewPutObjectOK creates PutObjectOK with default headers values
|
|
|
|
func NewPutObjectOK() *PutObjectOK {
|
|
|
|
|
|
|
|
return &PutObjectOK{}
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithPayload adds the payload to the put object o k response
|
2022-04-18 08:30:34 +00:00
|
|
|
func (o *PutObjectOK) WithPayload(payload *models.Address) *PutObjectOK {
|
2022-04-11 09:35:06 +00:00
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPayload sets the payload to the put object o k response
|
2022-04-18 08:30:34 +00:00
|
|
|
func (o *PutObjectOK) SetPayload(payload *models.Address) {
|
2022-04-11 09:35:06 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|