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 countries
// 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/sf-gate/sf_gate_models"
2021-01-08 17:40:28 +00:00
)
// GetCountriesReader is a Reader for the GetCountries structure.
type GetCountriesReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * GetCountriesReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewGetCountriesOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewGetCountriesUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewGetCountriesForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewGetCountriesNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewGetCountriesUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewGetCountriesInternalServerError ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
default :
2021-02-09 16:56:57 +00:00
return nil , runtime . NewAPIError ( "response status code does not match any response statuses defined for this endpoint in the swagger spec" , response , response . Code ( ) )
2021-01-08 17:40:28 +00:00
}
}
// NewGetCountriesOK creates a GetCountriesOK with default headers values
func NewGetCountriesOK ( ) * GetCountriesOK {
return & GetCountriesOK { }
}
2021-02-09 16:56:57 +00:00
/ * GetCountriesOK describes a response with status code 200 , with default header values .
2021-01-08 17:40:28 +00:00
Taxnexus Response with an array of Country objects
* /
type GetCountriesOK struct {
Payload * sf_gate_models . CountryResponse
}
func ( o * GetCountriesOK ) Error ( ) string {
return fmt . Sprintf ( "[GET /countries][%d] getCountriesOK %+v" , 200 , o . Payload )
}
func ( o * GetCountriesOK ) GetPayload ( ) * sf_gate_models . CountryResponse {
return o . Payload
}
func ( o * GetCountriesOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( sf_gate_models . CountryResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetCountriesUnauthorized creates a GetCountriesUnauthorized with default headers values
func NewGetCountriesUnauthorized ( ) * GetCountriesUnauthorized {
return & GetCountriesUnauthorized { }
}
2021-02-09 16:56:57 +00:00
/ * GetCountriesUnauthorized describes a response with status code 401 , with default header values .
2021-01-08 17:40:28 +00:00
Access unauthorized , invalid API - KEY was used
* /
type GetCountriesUnauthorized struct {
Payload * sf_gate_models . Error
}
func ( o * GetCountriesUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[GET /countries][%d] getCountriesUnauthorized %+v" , 401 , o . Payload )
}
func ( o * GetCountriesUnauthorized ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetCountriesUnauthorized ) 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
}
// NewGetCountriesForbidden creates a GetCountriesForbidden with default headers values
func NewGetCountriesForbidden ( ) * GetCountriesForbidden {
return & GetCountriesForbidden { }
}
2021-02-09 16:56:57 +00:00
/ * GetCountriesForbidden describes a response with status code 403 , with default header values .
2021-01-08 17:40:28 +00:00
Access forbidden , account lacks access
* /
type GetCountriesForbidden struct {
Payload * sf_gate_models . Error
}
func ( o * GetCountriesForbidden ) Error ( ) string {
return fmt . Sprintf ( "[GET /countries][%d] getCountriesForbidden %+v" , 403 , o . Payload )
}
func ( o * GetCountriesForbidden ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetCountriesForbidden ) 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
}
// NewGetCountriesNotFound creates a GetCountriesNotFound with default headers values
func NewGetCountriesNotFound ( ) * GetCountriesNotFound {
return & GetCountriesNotFound { }
}
2021-02-09 16:56:57 +00:00
/ * GetCountriesNotFound describes a response with status code 404 , with default header values .
2021-01-08 17:40:28 +00:00
Resource was not found
* /
type GetCountriesNotFound struct {
Payload * sf_gate_models . Error
}
func ( o * GetCountriesNotFound ) Error ( ) string {
return fmt . Sprintf ( "[GET /countries][%d] getCountriesNotFound %+v" , 404 , o . Payload )
}
func ( o * GetCountriesNotFound ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetCountriesNotFound ) 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
}
// NewGetCountriesUnprocessableEntity creates a GetCountriesUnprocessableEntity with default headers values
func NewGetCountriesUnprocessableEntity ( ) * GetCountriesUnprocessableEntity {
return & GetCountriesUnprocessableEntity { }
}
2021-02-09 16:56:57 +00:00
/ * GetCountriesUnprocessableEntity describes a response with status code 422 , with default header values .
2021-01-08 17:40:28 +00:00
Unprocessable Entity , likely a bad parameter
* /
type GetCountriesUnprocessableEntity struct {
Payload * sf_gate_models . Error
}
func ( o * GetCountriesUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[GET /countries][%d] getCountriesUnprocessableEntity %+v" , 422 , o . Payload )
}
func ( o * GetCountriesUnprocessableEntity ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetCountriesUnprocessableEntity ) 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
}
// NewGetCountriesInternalServerError creates a GetCountriesInternalServerError with default headers values
func NewGetCountriesInternalServerError ( ) * GetCountriesInternalServerError {
return & GetCountriesInternalServerError { }
}
2021-02-09 16:56:57 +00:00
/ * GetCountriesInternalServerError describes a response with status code 500 , with default header values .
2021-01-08 17:40:28 +00:00
Server Internal Error
* /
type GetCountriesInternalServerError struct {
Payload * sf_gate_models . Error
}
func ( o * GetCountriesInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[GET /countries][%d] getCountriesInternalServerError %+v" , 500 , o . Payload )
}
func ( o * GetCountriesInternalServerError ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetCountriesInternalServerError ) 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
}