// 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" "git.frostfs.info/TrueCloudLab/frostfs-rest-gw/gen/models" ) // DeleteObjectOKCode is the HTTP code returned for type DeleteObjectOK const DeleteObjectOKCode int = 200 /*DeleteObjectOK Successful deletion. swagger:response deleteObjectOK */ type DeleteObjectOK struct { /* */ AccessControlAllowOrigin string `json:"Access-Control-Allow-Origin"` /* In: Body */ Payload *models.SuccessResponse `json:"body,omitempty"` } // NewDeleteObjectOK creates DeleteObjectOK with default headers values func NewDeleteObjectOK() *DeleteObjectOK { return &DeleteObjectOK{} } // WithAccessControlAllowOrigin adds the accessControlAllowOrigin to the delete object o k response func (o *DeleteObjectOK) WithAccessControlAllowOrigin(accessControlAllowOrigin string) *DeleteObjectOK { o.AccessControlAllowOrigin = accessControlAllowOrigin return o } // SetAccessControlAllowOrigin sets the accessControlAllowOrigin to the delete object o k response func (o *DeleteObjectOK) SetAccessControlAllowOrigin(accessControlAllowOrigin string) { o.AccessControlAllowOrigin = accessControlAllowOrigin } // WithPayload adds the payload to the delete object o k response func (o *DeleteObjectOK) WithPayload(payload *models.SuccessResponse) *DeleteObjectOK { o.Payload = payload return o } // SetPayload sets the payload to the delete object o k response func (o *DeleteObjectOK) SetPayload(payload *models.SuccessResponse) { o.Payload = payload } // WriteResponse to the client func (o *DeleteObjectOK) 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 } } } // 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.ErrorResponse `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.ErrorResponse) *DeleteObjectBadRequest { o.Payload = payload return o } // SetPayload sets the payload to the delete object bad request response func (o *DeleteObjectBadRequest) SetPayload(payload *models.ErrorResponse) { o.Payload = payload } // WriteResponse to the client func (o *DeleteObjectBadRequest) 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 } } }