lib/api/metrc-gw/metrc_gw_client/rooms/delete_room_responses.go

224 lines
6.3 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package rooms
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/taxnexus/lib/api/metrc-gw/metrc_gw_models"
)
// DeleteRoomReader is a Reader for the DeleteRoom structure.
type DeleteRoomReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *DeleteRoomReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewDeleteRoomOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewDeleteRoomUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewDeleteRoomForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewDeleteRoomNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewDeleteRoomInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewDeleteRoomOK creates a DeleteRoomOK with default headers values
func NewDeleteRoomOK() *DeleteRoomOK {
return &DeleteRoomOK{}
}
/* DeleteRoomOK describes a response with status code 200, with default header values.
Rooms were successfully deleted
*/
type DeleteRoomOK struct {
Payload *metrc_gw_models.RoomResponse
}
func (o *DeleteRoomOK) Error() string {
return fmt.Sprintf("[DELETE /rooms][%d] deleteRoomOK %+v", 200, o.Payload)
}
func (o *DeleteRoomOK) GetPayload() *metrc_gw_models.RoomResponse {
return o.Payload
}
func (o *DeleteRoomOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(metrc_gw_models.RoomResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteRoomUnauthorized creates a DeleteRoomUnauthorized with default headers values
func NewDeleteRoomUnauthorized() *DeleteRoomUnauthorized {
return &DeleteRoomUnauthorized{}
}
/* DeleteRoomUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type DeleteRoomUnauthorized struct {
Payload *metrc_gw_models.Error
}
func (o *DeleteRoomUnauthorized) Error() string {
return fmt.Sprintf("[DELETE /rooms][%d] deleteRoomUnauthorized %+v", 401, o.Payload)
}
func (o *DeleteRoomUnauthorized) GetPayload() *metrc_gw_models.Error {
return o.Payload
}
func (o *DeleteRoomUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(metrc_gw_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteRoomForbidden creates a DeleteRoomForbidden with default headers values
func NewDeleteRoomForbidden() *DeleteRoomForbidden {
return &DeleteRoomForbidden{}
}
/* DeleteRoomForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type DeleteRoomForbidden struct {
Payload *metrc_gw_models.Error
}
func (o *DeleteRoomForbidden) Error() string {
return fmt.Sprintf("[DELETE /rooms][%d] deleteRoomForbidden %+v", 403, o.Payload)
}
func (o *DeleteRoomForbidden) GetPayload() *metrc_gw_models.Error {
return o.Payload
}
func (o *DeleteRoomForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(metrc_gw_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteRoomNotFound creates a DeleteRoomNotFound with default headers values
func NewDeleteRoomNotFound() *DeleteRoomNotFound {
return &DeleteRoomNotFound{}
}
/* DeleteRoomNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type DeleteRoomNotFound struct {
Payload *metrc_gw_models.Error
}
func (o *DeleteRoomNotFound) Error() string {
return fmt.Sprintf("[DELETE /rooms][%d] deleteRoomNotFound %+v", 404, o.Payload)
}
func (o *DeleteRoomNotFound) GetPayload() *metrc_gw_models.Error {
return o.Payload
}
func (o *DeleteRoomNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(metrc_gw_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteRoomInternalServerError creates a DeleteRoomInternalServerError with default headers values
func NewDeleteRoomInternalServerError() *DeleteRoomInternalServerError {
return &DeleteRoomInternalServerError{}
}
/* DeleteRoomInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type DeleteRoomInternalServerError struct {
Payload *metrc_gw_models.Error
}
func (o *DeleteRoomInternalServerError) Error() string {
return fmt.Sprintf("[DELETE /rooms][%d] deleteRoomInternalServerError %+v", 500, o.Payload)
}
func (o *DeleteRoomInternalServerError) GetPayload() *metrc_gw_models.Error {
return o.Payload
}
func (o *DeleteRoomInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(metrc_gw_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}