lib/api/plex/plex_client/tax/get_use_tax_responses.go

269 lines
7.2 KiB
Go
Raw Permalink Normal View History

2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-01-19 16:58:40 +00:00
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
2021-01-08 17:40:28 +00:00
// 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"
2021-01-10 17:03:26 +00:00
"code.tnxs.net/taxnexus/lib/api/plex/plex_models"
2021-01-08 17:40:28 +00:00
)
// GetUseTaxReader is a Reader for the GetUseTax structure.
type GetUseTaxReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetUseTaxReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetUseTaxOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetUseTaxUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetUseTaxForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetUseTaxNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetUseTaxUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetUseTaxInternalServerError()
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())
}
}
// NewGetUseTaxOK creates a GetUseTaxOK with default headers values
func NewGetUseTaxOK() *GetUseTaxOK {
return &GetUseTaxOK{}
}
/*GetUseTaxOK handles this case with default header values.
Taxnexus Response with TaxSummaryResponse Objects
*/
type GetUseTaxOK struct {
Payload *plex_models.UseTaxResponse
}
func (o *GetUseTaxOK) Error() string {
return fmt.Sprintf("[GET /taxes/usetax][%d] getUseTaxOK %+v", 200, o.Payload)
}
func (o *GetUseTaxOK) GetPayload() *plex_models.UseTaxResponse {
return o.Payload
}
func (o *GetUseTaxOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(plex_models.UseTaxResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetUseTaxUnauthorized creates a GetUseTaxUnauthorized with default headers values
func NewGetUseTaxUnauthorized() *GetUseTaxUnauthorized {
return &GetUseTaxUnauthorized{}
}
/*GetUseTaxUnauthorized handles this case with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetUseTaxUnauthorized struct {
Payload *plex_models.Error
}
func (o *GetUseTaxUnauthorized) Error() string {
return fmt.Sprintf("[GET /taxes/usetax][%d] getUseTaxUnauthorized %+v", 401, o.Payload)
}
func (o *GetUseTaxUnauthorized) GetPayload() *plex_models.Error {
return o.Payload
}
func (o *GetUseTaxUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(plex_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetUseTaxForbidden creates a GetUseTaxForbidden with default headers values
func NewGetUseTaxForbidden() *GetUseTaxForbidden {
return &GetUseTaxForbidden{}
}
/*GetUseTaxForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
type GetUseTaxForbidden struct {
Payload *plex_models.Error
}
func (o *GetUseTaxForbidden) Error() string {
return fmt.Sprintf("[GET /taxes/usetax][%d] getUseTaxForbidden %+v", 403, o.Payload)
}
func (o *GetUseTaxForbidden) GetPayload() *plex_models.Error {
return o.Payload
}
func (o *GetUseTaxForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(plex_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetUseTaxNotFound creates a GetUseTaxNotFound with default headers values
func NewGetUseTaxNotFound() *GetUseTaxNotFound {
return &GetUseTaxNotFound{}
}
/*GetUseTaxNotFound handles this case with default header values.
Resource was not found
*/
type GetUseTaxNotFound struct {
Payload *plex_models.Error
}
func (o *GetUseTaxNotFound) Error() string {
return fmt.Sprintf("[GET /taxes/usetax][%d] getUseTaxNotFound %+v", 404, o.Payload)
}
func (o *GetUseTaxNotFound) GetPayload() *plex_models.Error {
return o.Payload
}
func (o *GetUseTaxNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(plex_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetUseTaxUnprocessableEntity creates a GetUseTaxUnprocessableEntity with default headers values
func NewGetUseTaxUnprocessableEntity() *GetUseTaxUnprocessableEntity {
return &GetUseTaxUnprocessableEntity{}
}
/*GetUseTaxUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetUseTaxUnprocessableEntity struct {
Payload *plex_models.Error
}
func (o *GetUseTaxUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /taxes/usetax][%d] getUseTaxUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetUseTaxUnprocessableEntity) GetPayload() *plex_models.Error {
return o.Payload
}
func (o *GetUseTaxUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(plex_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetUseTaxInternalServerError creates a GetUseTaxInternalServerError with default headers values
func NewGetUseTaxInternalServerError() *GetUseTaxInternalServerError {
return &GetUseTaxInternalServerError{}
}
/*GetUseTaxInternalServerError handles this case with default header values.
Server Internal Error
*/
type GetUseTaxInternalServerError struct {
Payload *plex_models.Error
}
func (o *GetUseTaxInternalServerError) Error() string {
return fmt.Sprintf("[GET /taxes/usetax][%d] getUseTaxInternalServerError %+v", 500, o.Payload)
}
func (o *GetUseTaxInternalServerError) GetPayload() *plex_models.Error {
return o.Payload
}
func (o *GetUseTaxInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(plex_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}