// 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 plants

// 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"
)

// GetPlantWasteMethodsReader is a Reader for the GetPlantWasteMethods structure.
type GetPlantWasteMethodsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetPlantWasteMethodsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetPlantWasteMethodsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewGetPlantWasteMethodsUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetPlantWasteMethodsForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetPlantWasteMethodsNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetPlantWasteMethodsInternalServerError()
		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())
	}
}

// NewGetPlantWasteMethodsOK creates a GetPlantWasteMethodsOK with default headers values
func NewGetPlantWasteMethodsOK() *GetPlantWasteMethodsOK {
	return &GetPlantWasteMethodsOK{}
}

/*GetPlantWasteMethodsOK handles this case with default header values.

Plant Waste Methods were successfully retrieved
*/
type GetPlantWasteMethodsOK struct {
	Payload *metrc_gw_models.PlantWasteMethodResponse
}

func (o *GetPlantWasteMethodsOK) Error() string {
	return fmt.Sprintf("[GET /plants/wastemethods][%d] getPlantWasteMethodsOK  %+v", 200, o.Payload)
}

func (o *GetPlantWasteMethodsOK) GetPayload() *metrc_gw_models.PlantWasteMethodResponse {
	return o.Payload
}

func (o *GetPlantWasteMethodsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(metrc_gw_models.PlantWasteMethodResponse)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetPlantWasteMethodsUnauthorized creates a GetPlantWasteMethodsUnauthorized with default headers values
func NewGetPlantWasteMethodsUnauthorized() *GetPlantWasteMethodsUnauthorized {
	return &GetPlantWasteMethodsUnauthorized{}
}

/*GetPlantWasteMethodsUnauthorized handles this case with default header values.

Access unauthorized, invalid API-KEY was used
*/
type GetPlantWasteMethodsUnauthorized struct {
	Payload *metrc_gw_models.Error
}

func (o *GetPlantWasteMethodsUnauthorized) Error() string {
	return fmt.Sprintf("[GET /plants/wastemethods][%d] getPlantWasteMethodsUnauthorized  %+v", 401, o.Payload)
}

func (o *GetPlantWasteMethodsUnauthorized) GetPayload() *metrc_gw_models.Error {
	return o.Payload
}

func (o *GetPlantWasteMethodsUnauthorized) 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
}

// NewGetPlantWasteMethodsForbidden creates a GetPlantWasteMethodsForbidden with default headers values
func NewGetPlantWasteMethodsForbidden() *GetPlantWasteMethodsForbidden {
	return &GetPlantWasteMethodsForbidden{}
}

/*GetPlantWasteMethodsForbidden handles this case with default header values.

Access forbidden, account lacks access
*/
type GetPlantWasteMethodsForbidden struct {
	Payload *metrc_gw_models.Error
}

func (o *GetPlantWasteMethodsForbidden) Error() string {
	return fmt.Sprintf("[GET /plants/wastemethods][%d] getPlantWasteMethodsForbidden  %+v", 403, o.Payload)
}

func (o *GetPlantWasteMethodsForbidden) GetPayload() *metrc_gw_models.Error {
	return o.Payload
}

func (o *GetPlantWasteMethodsForbidden) 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
}

// NewGetPlantWasteMethodsNotFound creates a GetPlantWasteMethodsNotFound with default headers values
func NewGetPlantWasteMethodsNotFound() *GetPlantWasteMethodsNotFound {
	return &GetPlantWasteMethodsNotFound{}
}

/*GetPlantWasteMethodsNotFound handles this case with default header values.

Resource was not found
*/
type GetPlantWasteMethodsNotFound struct {
	Payload *metrc_gw_models.Error
}

func (o *GetPlantWasteMethodsNotFound) Error() string {
	return fmt.Sprintf("[GET /plants/wastemethods][%d] getPlantWasteMethodsNotFound  %+v", 404, o.Payload)
}

func (o *GetPlantWasteMethodsNotFound) GetPayload() *metrc_gw_models.Error {
	return o.Payload
}

func (o *GetPlantWasteMethodsNotFound) 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
}

// NewGetPlantWasteMethodsInternalServerError creates a GetPlantWasteMethodsInternalServerError with default headers values
func NewGetPlantWasteMethodsInternalServerError() *GetPlantWasteMethodsInternalServerError {
	return &GetPlantWasteMethodsInternalServerError{}
}

/*GetPlantWasteMethodsInternalServerError handles this case with default header values.

Server Internal Error
*/
type GetPlantWasteMethodsInternalServerError struct {
	Payload *metrc_gw_models.Error
}

func (o *GetPlantWasteMethodsInternalServerError) Error() string {
	return fmt.Sprintf("[GET /plants/wastemethods][%d] getPlantWasteMethodsInternalServerError  %+v", 500, o.Payload)
}

func (o *GetPlantWasteMethodsInternalServerError) GetPayload() *metrc_gw_models.Error {
	return o.Payload
}

func (o *GetPlantWasteMethodsInternalServerError) 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
}
