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

// 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/sf-gate/sf_gate_models"
)

// GetTaxTypeAccountsReader is a Reader for the GetTaxTypeAccounts structure.
type GetTaxTypeAccountsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetTaxTypeAccountsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetTaxTypeAccountsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewGetTaxTypeAccountsUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetTaxTypeAccountsForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetTaxTypeAccountsNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewGetTaxTypeAccountsUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetTaxTypeAccountsInternalServerError()
		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())
	}
}

// NewGetTaxTypeAccountsOK creates a GetTaxTypeAccountsOK with default headers values
func NewGetTaxTypeAccountsOK() *GetTaxTypeAccountsOK {
	return &GetTaxTypeAccountsOK{}
}

/*GetTaxTypeAccountsOK handles this case with default header values.

An array of TaxTypeAccount objects
*/
type GetTaxTypeAccountsOK struct {
	Payload *sf_gate_models.TaxTypeAccountResponse
}

func (o *GetTaxTypeAccountsOK) Error() string {
	return fmt.Sprintf("[GET /taxtypeaccounts][%d] getTaxTypeAccountsOK  %+v", 200, o.Payload)
}

func (o *GetTaxTypeAccountsOK) GetPayload() *sf_gate_models.TaxTypeAccountResponse {
	return o.Payload
}

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

	o.Payload = new(sf_gate_models.TaxTypeAccountResponse)

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

	return nil
}

// NewGetTaxTypeAccountsUnauthorized creates a GetTaxTypeAccountsUnauthorized with default headers values
func NewGetTaxTypeAccountsUnauthorized() *GetTaxTypeAccountsUnauthorized {
	return &GetTaxTypeAccountsUnauthorized{}
}

/*GetTaxTypeAccountsUnauthorized handles this case with default header values.

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

func (o *GetTaxTypeAccountsUnauthorized) Error() string {
	return fmt.Sprintf("[GET /taxtypeaccounts][%d] getTaxTypeAccountsUnauthorized  %+v", 401, o.Payload)
}

func (o *GetTaxTypeAccountsUnauthorized) GetPayload() *sf_gate_models.Error {
	return o.Payload
}

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

	o.Payload = new(sf_gate_models.Error)

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

	return nil
}

// NewGetTaxTypeAccountsForbidden creates a GetTaxTypeAccountsForbidden with default headers values
func NewGetTaxTypeAccountsForbidden() *GetTaxTypeAccountsForbidden {
	return &GetTaxTypeAccountsForbidden{}
}

/*GetTaxTypeAccountsForbidden handles this case with default header values.

Access forbidden, account lacks access
*/
type GetTaxTypeAccountsForbidden struct {
	Payload *sf_gate_models.Error
}

func (o *GetTaxTypeAccountsForbidden) Error() string {
	return fmt.Sprintf("[GET /taxtypeaccounts][%d] getTaxTypeAccountsForbidden  %+v", 403, o.Payload)
}

func (o *GetTaxTypeAccountsForbidden) GetPayload() *sf_gate_models.Error {
	return o.Payload
}

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

	o.Payload = new(sf_gate_models.Error)

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

	return nil
}

// NewGetTaxTypeAccountsNotFound creates a GetTaxTypeAccountsNotFound with default headers values
func NewGetTaxTypeAccountsNotFound() *GetTaxTypeAccountsNotFound {
	return &GetTaxTypeAccountsNotFound{}
}

/*GetTaxTypeAccountsNotFound handles this case with default header values.

Resource was not found
*/
type GetTaxTypeAccountsNotFound struct {
	Payload *sf_gate_models.Error
}

func (o *GetTaxTypeAccountsNotFound) Error() string {
	return fmt.Sprintf("[GET /taxtypeaccounts][%d] getTaxTypeAccountsNotFound  %+v", 404, o.Payload)
}

func (o *GetTaxTypeAccountsNotFound) GetPayload() *sf_gate_models.Error {
	return o.Payload
}

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

	o.Payload = new(sf_gate_models.Error)

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

	return nil
}

// NewGetTaxTypeAccountsUnprocessableEntity creates a GetTaxTypeAccountsUnprocessableEntity with default headers values
func NewGetTaxTypeAccountsUnprocessableEntity() *GetTaxTypeAccountsUnprocessableEntity {
	return &GetTaxTypeAccountsUnprocessableEntity{}
}

/*GetTaxTypeAccountsUnprocessableEntity handles this case with default header values.

Unprocessable Entity, likely a bad parameter
*/
type GetTaxTypeAccountsUnprocessableEntity struct {
	Payload *sf_gate_models.Error
}

func (o *GetTaxTypeAccountsUnprocessableEntity) Error() string {
	return fmt.Sprintf("[GET /taxtypeaccounts][%d] getTaxTypeAccountsUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *GetTaxTypeAccountsUnprocessableEntity) GetPayload() *sf_gate_models.Error {
	return o.Payload
}

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

	o.Payload = new(sf_gate_models.Error)

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

	return nil
}

// NewGetTaxTypeAccountsInternalServerError creates a GetTaxTypeAccountsInternalServerError with default headers values
func NewGetTaxTypeAccountsInternalServerError() *GetTaxTypeAccountsInternalServerError {
	return &GetTaxTypeAccountsInternalServerError{}
}

/*GetTaxTypeAccountsInternalServerError handles this case with default header values.

Server Internal Error
*/
type GetTaxTypeAccountsInternalServerError struct {
	Payload *sf_gate_models.Error
}

func (o *GetTaxTypeAccountsInternalServerError) Error() string {
	return fmt.Sprintf("[GET /taxtypeaccounts][%d] getTaxTypeAccountsInternalServerError  %+v", 500, o.Payload)
}

func (o *GetTaxTypeAccountsInternalServerError) GetPayload() *sf_gate_models.Error {
	return o.Payload
}

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

	o.Payload = new(sf_gate_models.Error)

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

	return nil
}
