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

224 lines
6.3 KiB
Go
Raw Normal View History

2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-01-19 16:58:40 +00:00
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
2021-01-08 17:40:28 +00:00
// 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"
2021-01-10 17:03:26 +00:00
"code.tnxs.net/taxnexus/lib/api/metrc-gw/metrc_gw_models"
2021-01-08 17:40:28 +00:00
)
// 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:
2021-02-09 16:56:57 +00:00
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
2021-01-08 17:40:28 +00:00
}
}
// NewDeleteRoomOK creates a DeleteRoomOK with default headers values
func NewDeleteRoomOK() *DeleteRoomOK {
return &DeleteRoomOK{}
}
2021-02-09 16:56:57 +00:00
/* DeleteRoomOK describes a response with status code 200, with default header values.
2021-01-08 17:40:28 +00:00
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{}
}
2021-02-09 16:56:57 +00:00
/* DeleteRoomUnauthorized describes a response with status code 401, with default header values.
2021-01-08 17:40:28 +00:00
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{}
}
2021-02-09 16:56:57 +00:00
/* DeleteRoomForbidden describes a response with status code 403, with default header values.
2021-01-08 17:40:28 +00:00
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{}
}
2021-02-09 16:56:57 +00:00
/* DeleteRoomNotFound describes a response with status code 404, with default header values.
2021-01-08 17:40:28 +00:00
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{}
}
2021-02-09 16:56:57 +00:00
/* DeleteRoomInternalServerError describes a response with status code 500, with default header values.
2021-01-08 17:40:28 +00:00
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
}