81 lines
2.1 KiB
Go
81 lines
2.1 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"
|
||
|
)
|
||
|
|
||
|
// DeleteObjectNoContentCode is the HTTP code returned for type DeleteObjectNoContent
|
||
|
const DeleteObjectNoContentCode int = 204
|
||
|
|
||
|
/*DeleteObjectNoContent Successful deletion
|
||
|
|
||
|
swagger:response deleteObjectNoContent
|
||
|
*/
|
||
|
type DeleteObjectNoContent struct {
|
||
|
}
|
||
|
|
||
|
// NewDeleteObjectNoContent creates DeleteObjectNoContent with default headers values
|
||
|
func NewDeleteObjectNoContent() *DeleteObjectNoContent {
|
||
|
|
||
|
return &DeleteObjectNoContent{}
|
||
|
}
|
||
|
|
||
|
// WriteResponse to the client
|
||
|
func (o *DeleteObjectNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||
|
|
||
|
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
||
|
|
||
|
rw.WriteHeader(204)
|
||
|
}
|
||
|
|
||
|
// DeleteObjectBadRequestCode is the HTTP code returned for type DeleteObjectBadRequest
|
||
|
const DeleteObjectBadRequestCode int = 400
|
||
|
|
||
|
/*DeleteObjectBadRequest Bad request
|
||
|
|
||
|
swagger:response deleteObjectBadRequest
|
||
|
*/
|
||
|
type DeleteObjectBadRequest struct {
|
||
|
|
||
|
/*
|
||
|
In: Body
|
||
|
*/
|
||
|
Payload models.Error `json:"body,omitempty"`
|
||
|
}
|
||
|
|
||
|
// NewDeleteObjectBadRequest creates DeleteObjectBadRequest with default headers values
|
||
|
func NewDeleteObjectBadRequest() *DeleteObjectBadRequest {
|
||
|
|
||
|
return &DeleteObjectBadRequest{}
|
||
|
}
|
||
|
|
||
|
// WithPayload adds the payload to the delete object bad request response
|
||
|
func (o *DeleteObjectBadRequest) WithPayload(payload models.Error) *DeleteObjectBadRequest {
|
||
|
o.Payload = payload
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetPayload sets the payload to the delete object bad request response
|
||
|
func (o *DeleteObjectBadRequest) SetPayload(payload models.Error) {
|
||
|
o.Payload = payload
|
||
|
}
|
||
|
|
||
|
// WriteResponse to the client
|
||
|
func (o *DeleteObjectBadRequest) 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
|
||
|
}
|
||
|
}
|