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 domain
// 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
)
// GetDomainsReader is a Reader for the GetDomains structure.
type GetDomainsReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * GetDomainsReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewGetDomainsOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewGetDomainsUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewGetDomainsForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewGetDomainsNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewGetDomainsUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewGetDomainsInternalServerError ( )
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
}
}
// NewGetDomainsOK creates a GetDomainsOK with default headers values
func NewGetDomainsOK ( ) * GetDomainsOK {
return & GetDomainsOK { }
}
2021-02-09 16:56:57 +00:00
/ * GetDomainsOK 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 Domain objects
* /
type GetDomainsOK struct {
AccessControlAllowOrigin string
2021-02-09 16:56:57 +00:00
CacheControl string
2021-01-08 17:40:28 +00:00
Payload * geo_models . DomainResponse
}
func ( o * GetDomainsOK ) Error ( ) string {
return fmt . Sprintf ( "[GET /domains][%d] getDomainsOK %+v" , 200 , o . Payload )
}
func ( o * GetDomainsOK ) GetPayload ( ) * geo_models . DomainResponse {
return o . Payload
}
func ( o * GetDomainsOK ) 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
o . Payload = new ( geo_models . DomainResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetDomainsUnauthorized creates a GetDomainsUnauthorized with default headers values
func NewGetDomainsUnauthorized ( ) * GetDomainsUnauthorized {
return & GetDomainsUnauthorized { }
}
2021-02-09 16:56:57 +00:00
/ * GetDomainsUnauthorized 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 GetDomainsUnauthorized struct {
AccessControlAllowOrigin string
Payload * geo_models . Error
}
func ( o * GetDomainsUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[GET /domains][%d] getDomainsUnauthorized %+v" , 401 , o . Payload )
}
func ( o * GetDomainsUnauthorized ) GetPayload ( ) * geo_models . Error {
return o . Payload
}
func ( o * GetDomainsUnauthorized ) 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
}
// NewGetDomainsForbidden creates a GetDomainsForbidden with default headers values
func NewGetDomainsForbidden ( ) * GetDomainsForbidden {
return & GetDomainsForbidden { }
}
2021-02-09 16:56:57 +00:00
/ * GetDomainsForbidden 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 GetDomainsForbidden struct {
AccessControlAllowOrigin string
Payload * geo_models . Error
}
func ( o * GetDomainsForbidden ) Error ( ) string {
return fmt . Sprintf ( "[GET /domains][%d] getDomainsForbidden %+v" , 403 , o . Payload )
}
func ( o * GetDomainsForbidden ) GetPayload ( ) * geo_models . Error {
return o . Payload
}
func ( o * GetDomainsForbidden ) 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
}
// NewGetDomainsNotFound creates a GetDomainsNotFound with default headers values
func NewGetDomainsNotFound ( ) * GetDomainsNotFound {
return & GetDomainsNotFound { }
}
2021-02-09 16:56:57 +00:00
/ * GetDomainsNotFound describes a response with status code 404 , with default header values .
2021-01-08 17:40:28 +00:00
Resource was not found
* /
type GetDomainsNotFound struct {
AccessControlAllowOrigin string
Payload * geo_models . Error
}
func ( o * GetDomainsNotFound ) Error ( ) string {
return fmt . Sprintf ( "[GET /domains][%d] getDomainsNotFound %+v" , 404 , o . Payload )
}
func ( o * GetDomainsNotFound ) GetPayload ( ) * geo_models . Error {
return o . Payload
}
func ( o * GetDomainsNotFound ) 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
}
// NewGetDomainsUnprocessableEntity creates a GetDomainsUnprocessableEntity with default headers values
func NewGetDomainsUnprocessableEntity ( ) * GetDomainsUnprocessableEntity {
return & GetDomainsUnprocessableEntity { }
}
2021-02-09 16:56:57 +00:00
/ * GetDomainsUnprocessableEntity 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 GetDomainsUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload * geo_models . Error
}
func ( o * GetDomainsUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[GET /domains][%d] getDomainsUnprocessableEntity %+v" , 422 , o . Payload )
}
func ( o * GetDomainsUnprocessableEntity ) GetPayload ( ) * geo_models . Error {
return o . Payload
}
func ( o * GetDomainsUnprocessableEntity ) 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
}
// NewGetDomainsInternalServerError creates a GetDomainsInternalServerError with default headers values
func NewGetDomainsInternalServerError ( ) * GetDomainsInternalServerError {
return & GetDomainsInternalServerError { }
}
2021-02-09 16:56:57 +00:00
/ * GetDomainsInternalServerError describes a response with status code 500 , with default header values .
2021-01-08 17:40:28 +00:00
Server Internal Error
* /
type GetDomainsInternalServerError struct {
AccessControlAllowOrigin string
Payload * geo_models . Error
}
func ( o * GetDomainsInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[GET /domains][%d] getDomainsInternalServerError %+v" , 500 , o . Payload )
}
func ( o * GetDomainsInternalServerError ) GetPayload ( ) * geo_models . Error {
return o . Payload
}
func ( o * GetDomainsInternalServerError ) 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
}