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 county
// 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/geo/geo_models"
2021-01-08 17:40:28 +00:00
)
// GetCountiesObservableReader is a Reader for the GetCountiesObservable structure.
type GetCountiesObservableReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * GetCountiesObservableReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewGetCountiesObservableOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewGetCountiesObservableUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewGetCountiesObservableForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewGetCountiesObservableNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewGetCountiesObservableUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewGetCountiesObservableInternalServerError ( )
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
}
}
// NewGetCountiesObservableOK creates a GetCountiesObservableOK with default headers values
func NewGetCountiesObservableOK ( ) * GetCountiesObservableOK {
return & GetCountiesObservableOK { }
}
2021-02-09 16:56:57 +00:00
/ * GetCountiesObservableOK describes a response with status code 200 , with default header values .
2021-01-08 17:40:28 +00:00
Observable array response to a county retrieval
* /
type GetCountiesObservableOK struct {
AccessControlAllowOrigin string
2021-02-09 16:56:57 +00:00
CacheControl string
2021-01-08 17:40:28 +00:00
Payload [ ] * geo_models . County
}
func ( o * GetCountiesObservableOK ) Error ( ) string {
return fmt . Sprintf ( "[GET /counties/observable][%d] getCountiesObservableOK %+v" , 200 , o . Payload )
}
func ( o * GetCountiesObservableOK ) GetPayload ( ) [ ] * geo_models . County {
return o . Payload
}
func ( o * GetCountiesObservableOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Cache-Control
hdrCacheControl := response . GetHeader ( "Cache-Control" )
if hdrCacheControl != "" {
o . CacheControl = hdrCacheControl
}
2021-01-08 17:40:28 +00:00
// response payload
if err := consumer . Consume ( response . Body ( ) , & o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetCountiesObservableUnauthorized creates a GetCountiesObservableUnauthorized with default headers values
func NewGetCountiesObservableUnauthorized ( ) * GetCountiesObservableUnauthorized {
return & GetCountiesObservableUnauthorized { }
}
2021-02-09 16:56:57 +00:00
/ * GetCountiesObservableUnauthorized 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 GetCountiesObservableUnauthorized struct {
AccessControlAllowOrigin string
Payload * geo_models . Error
}
func ( o * GetCountiesObservableUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[GET /counties/observable][%d] getCountiesObservableUnauthorized %+v" , 401 , o . Payload )
}
func ( o * GetCountiesObservableUnauthorized ) GetPayload ( ) * geo_models . Error {
return o . Payload
}
func ( o * GetCountiesObservableUnauthorized ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o . Payload = new ( geo_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetCountiesObservableForbidden creates a GetCountiesObservableForbidden with default headers values
func NewGetCountiesObservableForbidden ( ) * GetCountiesObservableForbidden {
return & GetCountiesObservableForbidden { }
}
2021-02-09 16:56:57 +00:00
/ * GetCountiesObservableForbidden 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 GetCountiesObservableForbidden struct {
AccessControlAllowOrigin string
Payload * geo_models . Error
}
func ( o * GetCountiesObservableForbidden ) Error ( ) string {
return fmt . Sprintf ( "[GET /counties/observable][%d] getCountiesObservableForbidden %+v" , 403 , o . Payload )
}
func ( o * GetCountiesObservableForbidden ) GetPayload ( ) * geo_models . Error {
return o . Payload
}
func ( o * GetCountiesObservableForbidden ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o . Payload = new ( geo_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetCountiesObservableNotFound creates a GetCountiesObservableNotFound with default headers values
func NewGetCountiesObservableNotFound ( ) * GetCountiesObservableNotFound {
return & GetCountiesObservableNotFound { }
}
2021-02-09 16:56:57 +00:00
/ * GetCountiesObservableNotFound describes a response with status code 404 , with default header values .
2021-01-08 17:40:28 +00:00
Resource was not found
* /
type GetCountiesObservableNotFound struct {
AccessControlAllowOrigin string
Payload * geo_models . Error
}
func ( o * GetCountiesObservableNotFound ) Error ( ) string {
return fmt . Sprintf ( "[GET /counties/observable][%d] getCountiesObservableNotFound %+v" , 404 , o . Payload )
}
func ( o * GetCountiesObservableNotFound ) GetPayload ( ) * geo_models . Error {
return o . Payload
}
func ( o * GetCountiesObservableNotFound ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o . Payload = new ( geo_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetCountiesObservableUnprocessableEntity creates a GetCountiesObservableUnprocessableEntity with default headers values
func NewGetCountiesObservableUnprocessableEntity ( ) * GetCountiesObservableUnprocessableEntity {
return & GetCountiesObservableUnprocessableEntity { }
}
2021-02-09 16:56:57 +00:00
/ * GetCountiesObservableUnprocessableEntity 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 GetCountiesObservableUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload * geo_models . Error
}
func ( o * GetCountiesObservableUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[GET /counties/observable][%d] getCountiesObservableUnprocessableEntity %+v" , 422 , o . Payload )
}
func ( o * GetCountiesObservableUnprocessableEntity ) GetPayload ( ) * geo_models . Error {
return o . Payload
}
func ( o * GetCountiesObservableUnprocessableEntity ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o . Payload = new ( geo_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetCountiesObservableInternalServerError creates a GetCountiesObservableInternalServerError with default headers values
func NewGetCountiesObservableInternalServerError ( ) * GetCountiesObservableInternalServerError {
return & GetCountiesObservableInternalServerError { }
}
2021-02-09 16:56:57 +00:00
/ * GetCountiesObservableInternalServerError describes a response with status code 500 , with default header values .
2021-01-08 17:40:28 +00:00
Server Internal Error
* /
type GetCountiesObservableInternalServerError struct {
AccessControlAllowOrigin string
Payload * geo_models . Error
}
func ( o * GetCountiesObservableInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[GET /counties/observable][%d] getCountiesObservableInternalServerError %+v" , 500 , o . Payload )
}
func ( o * GetCountiesObservableInternalServerError ) GetPayload ( ) * geo_models . Error {
return o . Payload
}
func ( o * GetCountiesObservableInternalServerError ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o . Payload = new ( geo_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}