2022-04-14 08:53:13 +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
|
|
|
// DeleteObjectOKCode is the HTTP code returned for type DeleteObjectOK
|
|
|
|
const DeleteObjectOKCode int = 200
|
2022-04-14 08:53:13 +00:00
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
/*DeleteObjectOK Successful deletion
|
2022-04-14 08:53:13 +00:00
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
swagger:response deleteObjectOK
|
2022-04-14 08:53:13 +00:00
|
|
|
*/
|
2022-07-07 09:29:51 +00:00
|
|
|
type DeleteObjectOK struct {
|
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
|
|
|
Payload *models.SuccessResponse `json:"body,omitempty"`
|
2022-04-14 08:53:13 +00:00
|
|
|
}
|
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
// NewDeleteObjectOK creates DeleteObjectOK with default headers values
|
|
|
|
func NewDeleteObjectOK() *DeleteObjectOK {
|
2022-04-14 08:53:13 +00:00
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
return &DeleteObjectOK{}
|
2022-04-14 08:53:13 +00:00
|
|
|
}
|
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
// WithPayload adds the payload to the delete object o k response
|
|
|
|
func (o *DeleteObjectOK) WithPayload(payload *models.SuccessResponse) *DeleteObjectOK {
|
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
2022-04-14 08:53:13 +00:00
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
// SetPayload sets the payload to the delete object o k response
|
|
|
|
func (o *DeleteObjectOK) SetPayload(payload *models.SuccessResponse) {
|
|
|
|
o.Payload = payload
|
|
|
|
}
|
2022-04-14 08:53:13 +00:00
|
|
|
|
2022-07-07 09:29:51 +00:00
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *DeleteObjectOK) 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
|
|
|
|
}
|
|
|
|
}
|
2022-04-14 08:53:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeleteObjectBadRequestCode is the HTTP code returned for type DeleteObjectBadRequest
|
|
|
|
const DeleteObjectBadRequestCode int = 400
|
|
|
|
|
|
|
|
/*DeleteObjectBadRequest Bad request
|
|
|
|
|
|
|
|
swagger:response deleteObjectBadRequest
|
|
|
|
*/
|
|
|
|
type DeleteObjectBadRequest struct {
|
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
2022-07-07 12:59:38 +00:00
|
|
|
Payload *models.ErrorResponse `json:"body,omitempty"`
|
2022-04-14 08:53:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewDeleteObjectBadRequest creates DeleteObjectBadRequest with default headers values
|
|
|
|
func NewDeleteObjectBadRequest() *DeleteObjectBadRequest {
|
|
|
|
|
|
|
|
return &DeleteObjectBadRequest{}
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithPayload adds the payload to the delete object bad request response
|
2022-07-07 12:59:38 +00:00
|
|
|
func (o *DeleteObjectBadRequest) WithPayload(payload *models.ErrorResponse) *DeleteObjectBadRequest {
|
2022-04-14 08:53:13 +00:00
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPayload sets the payload to the delete object bad request response
|
2022-07-07 12:59:38 +00:00
|
|
|
func (o *DeleteObjectBadRequest) SetPayload(payload *models.ErrorResponse) {
|
2022-04-14 08:53:13 +00:00
|
|
|
o.Payload = payload
|
|
|
|
}
|
|
|
|
|
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *DeleteObjectBadRequest) 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-14 08:53:13 +00:00
|
|
|
}
|
|
|
|
}
|