// Code generated by go-swagger; DO NOT EDIT.

// All Code Copyright(c) 2018-2020 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"

	"github.com/taxnexus/go/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("unknown error", response, response.Code())
	}
}

// NewDeleteRoomOK creates a DeleteRoomOK with default headers values
func NewDeleteRoomOK() *DeleteRoomOK {
	return &DeleteRoomOK{}
}

/*DeleteRoomOK handles this case 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 handles this case 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 handles this case 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 handles this case 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 handles this case 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
}
