lib/api/render/render_client/tax/get_render_taxes_responses.go

316 lines
9.4 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package tax
// 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"
"code.tnxs.net/taxnexus/lib/api/render/render_models"
)
// GetRenderTaxesReader is a Reader for the GetRenderTaxes structure.
type GetRenderTaxesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetRenderTaxesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetRenderTaxesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetRenderTaxesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetRenderTaxesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetRenderTaxesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetRenderTaxesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetRenderTaxesInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewGetRenderTaxesOK creates a GetRenderTaxesOK with default headers values
func NewGetRenderTaxesOK() *GetRenderTaxesOK {
return &GetRenderTaxesOK{}
}
/* GetRenderTaxesOK describes a response with status code 200, with default header values.
Rendered documents response
*/
type GetRenderTaxesOK struct {
AccessControlAllowOrigin string
Payload *render_models.DocumentResponse
}
func (o *GetRenderTaxesOK) Error() string {
return fmt.Sprintf("[GET /accounts/tax][%d] getRenderTaxesOK %+v", 200, o.Payload)
}
func (o *GetRenderTaxesOK) GetPayload() *render_models.DocumentResponse {
return o.Payload
}
func (o *GetRenderTaxesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(render_models.DocumentResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetRenderTaxesUnauthorized creates a GetRenderTaxesUnauthorized with default headers values
func NewGetRenderTaxesUnauthorized() *GetRenderTaxesUnauthorized {
return &GetRenderTaxesUnauthorized{}
}
/* GetRenderTaxesUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type GetRenderTaxesUnauthorized struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderTaxesUnauthorized) Error() string {
return fmt.Sprintf("[GET /accounts/tax][%d] getRenderTaxesUnauthorized %+v", 401, o.Payload)
}
func (o *GetRenderTaxesUnauthorized) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderTaxesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(render_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetRenderTaxesForbidden creates a GetRenderTaxesForbidden with default headers values
func NewGetRenderTaxesForbidden() *GetRenderTaxesForbidden {
return &GetRenderTaxesForbidden{}
}
/* GetRenderTaxesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetRenderTaxesForbidden struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderTaxesForbidden) Error() string {
return fmt.Sprintf("[GET /accounts/tax][%d] getRenderTaxesForbidden %+v", 403, o.Payload)
}
func (o *GetRenderTaxesForbidden) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderTaxesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(render_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetRenderTaxesNotFound creates a GetRenderTaxesNotFound with default headers values
func NewGetRenderTaxesNotFound() *GetRenderTaxesNotFound {
return &GetRenderTaxesNotFound{}
}
/* GetRenderTaxesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetRenderTaxesNotFound struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderTaxesNotFound) Error() string {
return fmt.Sprintf("[GET /accounts/tax][%d] getRenderTaxesNotFound %+v", 404, o.Payload)
}
func (o *GetRenderTaxesNotFound) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderTaxesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(render_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetRenderTaxesUnprocessableEntity creates a GetRenderTaxesUnprocessableEntity with default headers values
func NewGetRenderTaxesUnprocessableEntity() *GetRenderTaxesUnprocessableEntity {
return &GetRenderTaxesUnprocessableEntity{}
}
/* GetRenderTaxesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetRenderTaxesUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderTaxesUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /accounts/tax][%d] getRenderTaxesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetRenderTaxesUnprocessableEntity) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderTaxesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(render_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetRenderTaxesInternalServerError creates a GetRenderTaxesInternalServerError with default headers values
func NewGetRenderTaxesInternalServerError() *GetRenderTaxesInternalServerError {
return &GetRenderTaxesInternalServerError{}
}
/* GetRenderTaxesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetRenderTaxesInternalServerError struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderTaxesInternalServerError) Error() string {
return fmt.Sprintf("[GET /accounts/tax][%d] getRenderTaxesInternalServerError %+v", 500, o.Payload)
}
func (o *GetRenderTaxesInternalServerError) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderTaxesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(render_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}