frostfs-rest-gw/gen/restapi/operations/get_object_info_responses.go
Denis Kirillov 066656ac48 [#1] Add route to get object info
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-04-29 10:20:37 +03:00

100 lines
2.5 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"
)
// GetObjectInfoOKCode is the HTTP code returned for type GetObjectInfoOK
const GetObjectInfoOKCode int = 200
/*GetObjectInfoOK Object info
swagger:response getObjectInfoOK
*/
type GetObjectInfoOK struct {
/*
In: Body
*/
Payload *models.ObjectInfo `json:"body,omitempty"`
}
// NewGetObjectInfoOK creates GetObjectInfoOK with default headers values
func NewGetObjectInfoOK() *GetObjectInfoOK {
return &GetObjectInfoOK{}
}
// WithPayload adds the payload to the get object info o k response
func (o *GetObjectInfoOK) WithPayload(payload *models.ObjectInfo) *GetObjectInfoOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get object info o k response
func (o *GetObjectInfoOK) SetPayload(payload *models.ObjectInfo) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetObjectInfoOK) 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
}
}
}
// GetObjectInfoBadRequestCode is the HTTP code returned for type GetObjectInfoBadRequest
const GetObjectInfoBadRequestCode int = 400
/*GetObjectInfoBadRequest Bad request
swagger:response getObjectInfoBadRequest
*/
type GetObjectInfoBadRequest struct {
/*
In: Body
*/
Payload models.Error `json:"body,omitempty"`
}
// NewGetObjectInfoBadRequest creates GetObjectInfoBadRequest with default headers values
func NewGetObjectInfoBadRequest() *GetObjectInfoBadRequest {
return &GetObjectInfoBadRequest{}
}
// WithPayload adds the payload to the get object info bad request response
func (o *GetObjectInfoBadRequest) WithPayload(payload models.Error) *GetObjectInfoBadRequest {
o.Payload = payload
return o
}
// SetPayload sets the payload to the get object info bad request response
func (o *GetObjectInfoBadRequest) SetPayload(payload models.Error) {
o.Payload = payload
}
// WriteResponse to the client
func (o *GetObjectInfoBadRequest) 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
}
}