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

299 lines
8.5 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("unknown error", response, response.Code())
}
}
// NewGetRenderTaxesOK creates a GetRenderTaxesOK with default headers values
func NewGetRenderTaxesOK() *GetRenderTaxesOK {
return &GetRenderTaxesOK{}
}
/*GetRenderTaxesOK handles this case 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 /taxes][%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 {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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 handles this case 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 /taxes][%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 {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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 handles this case 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 /taxes][%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 {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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 handles this case 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 /taxes][%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 {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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 handles this case 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 /taxes][%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 {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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 handles this case 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 /taxes][%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 {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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
}