// 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" ) // GetObjectInfoOKCode is the HTTP code returned for type GetObjectInfoOK const GetObjectInfoOKCode int = 200 /*GetObjectInfoOK Object info swagger:response getObjectInfoOK */ type GetObjectInfoOK struct { /* */ AccessControlAllowOrigin string `json:"Access-Control-Allow-Origin"` /* In: Body */ Payload *models.ObjectInfo `json:"body,omitempty"` } // NewGetObjectInfoOK creates GetObjectInfoOK with default headers values func NewGetObjectInfoOK() *GetObjectInfoOK { return &GetObjectInfoOK{} } // WithAccessControlAllowOrigin adds the accessControlAllowOrigin to the get object info o k response func (o *GetObjectInfoOK) WithAccessControlAllowOrigin(accessControlAllowOrigin string) *GetObjectInfoOK { o.AccessControlAllowOrigin = accessControlAllowOrigin return o } // SetAccessControlAllowOrigin sets the accessControlAllowOrigin to the get object info o k response func (o *GetObjectInfoOK) SetAccessControlAllowOrigin(accessControlAllowOrigin string) { o.AccessControlAllowOrigin = accessControlAllowOrigin } // 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) { // 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 } } } // 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.ErrorResponse `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.ErrorResponse) *GetObjectInfoBadRequest { o.Payload = payload return o } // SetPayload sets the payload to the get object info bad request response func (o *GetObjectInfoBadRequest) SetPayload(payload *models.ErrorResponse) { o.Payload = payload } // WriteResponse to the client func (o *GetObjectInfoBadRequest) 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 } } }