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

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

// DeleteTypeAccountsReader is a Reader for the DeleteTypeAccounts structure.
type DeleteTypeAccountsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *DeleteTypeAccountsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewDeleteTypeAccountsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewDeleteTypeAccountsUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewDeleteTypeAccountsForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewDeleteTypeAccountsNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewDeleteTypeAccountsUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewDeleteTypeAccountsInternalServerError()
		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())
	}
}

// NewDeleteTypeAccountsOK creates a DeleteTypeAccountsOK with default headers values
func NewDeleteTypeAccountsOK() *DeleteTypeAccountsOK {
	return &DeleteTypeAccountsOK{}
}

/*DeleteTypeAccountsOK handles this case with default header values.

Taxnexus Response with Message Objects with Delete Status
*/
type DeleteTypeAccountsOK struct {
	AccessControlAllowOrigin string

	Payload *regs_models.DeleteResponse
}

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

func (o *DeleteTypeAccountsOK) GetPayload() *regs_models.DeleteResponse {
	return o.Payload
}

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

	// response header Access-Control-Allow-Origin
	o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")

	o.Payload = new(regs_models.DeleteResponse)

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

	return nil
}

// NewDeleteTypeAccountsUnauthorized creates a DeleteTypeAccountsUnauthorized with default headers values
func NewDeleteTypeAccountsUnauthorized() *DeleteTypeAccountsUnauthorized {
	return &DeleteTypeAccountsUnauthorized{}
}

/*DeleteTypeAccountsUnauthorized handles this case with default header values.

Access Unauthorized, invalid API-KEY was used
*/
type DeleteTypeAccountsUnauthorized struct {
	AccessControlAllowOrigin string

	Payload *regs_models.Error
}

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

func (o *DeleteTypeAccountsUnauthorized) GetPayload() *regs_models.Error {
	return o.Payload
}

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

	// response header Access-Control-Allow-Origin
	o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")

	o.Payload = new(regs_models.Error)

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

	return nil
}

// NewDeleteTypeAccountsForbidden creates a DeleteTypeAccountsForbidden with default headers values
func NewDeleteTypeAccountsForbidden() *DeleteTypeAccountsForbidden {
	return &DeleteTypeAccountsForbidden{}
}

/*DeleteTypeAccountsForbidden handles this case with default header values.

Access forbidden, account lacks access
*/
type DeleteTypeAccountsForbidden struct {
	AccessControlAllowOrigin string

	Payload *regs_models.Error
}

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

func (o *DeleteTypeAccountsForbidden) GetPayload() *regs_models.Error {
	return o.Payload
}

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

	// response header Access-Control-Allow-Origin
	o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")

	o.Payload = new(regs_models.Error)

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

	return nil
}

// NewDeleteTypeAccountsNotFound creates a DeleteTypeAccountsNotFound with default headers values
func NewDeleteTypeAccountsNotFound() *DeleteTypeAccountsNotFound {
	return &DeleteTypeAccountsNotFound{}
}

/*DeleteTypeAccountsNotFound handles this case with default header values.

Resource was not found
*/
type DeleteTypeAccountsNotFound struct {
	AccessControlAllowOrigin string

	Payload *regs_models.Error
}

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

func (o *DeleteTypeAccountsNotFound) GetPayload() *regs_models.Error {
	return o.Payload
}

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

	// response header Access-Control-Allow-Origin
	o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")

	o.Payload = new(regs_models.Error)

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

	return nil
}

// NewDeleteTypeAccountsUnprocessableEntity creates a DeleteTypeAccountsUnprocessableEntity with default headers values
func NewDeleteTypeAccountsUnprocessableEntity() *DeleteTypeAccountsUnprocessableEntity {
	return &DeleteTypeAccountsUnprocessableEntity{}
}

/*DeleteTypeAccountsUnprocessableEntity handles this case with default header values.

Unprocessable Entity, likely a bad parameter
*/
type DeleteTypeAccountsUnprocessableEntity struct {
	AccessControlAllowOrigin string

	Payload *regs_models.Error
}

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

func (o *DeleteTypeAccountsUnprocessableEntity) GetPayload() *regs_models.Error {
	return o.Payload
}

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

	// response header Access-Control-Allow-Origin
	o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")

	o.Payload = new(regs_models.Error)

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

	return nil
}

// NewDeleteTypeAccountsInternalServerError creates a DeleteTypeAccountsInternalServerError with default headers values
func NewDeleteTypeAccountsInternalServerError() *DeleteTypeAccountsInternalServerError {
	return &DeleteTypeAccountsInternalServerError{}
}

/*DeleteTypeAccountsInternalServerError handles this case with default header values.

Server Internal Error
*/
type DeleteTypeAccountsInternalServerError struct {
	AccessControlAllowOrigin string

	Payload *regs_models.Error
}

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

func (o *DeleteTypeAccountsInternalServerError) GetPayload() *regs_models.Error {
	return o.Payload
}

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

	// response header Access-Control-Allow-Origin
	o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")

	o.Payload = new(regs_models.Error)

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

	return nil
}
