2022-09-05 00:01:32 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package industries
// 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/vernonkeenan/lib/api/sfgate/sfgate_models"
)
// GetIndustriesReader is a Reader for the GetIndustries structure.
type GetIndustriesReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * GetIndustriesReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewGetIndustriesOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewGetIndustriesUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewGetIndustriesForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewGetIndustriesNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewGetIndustriesUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewGetIndustriesInternalServerError ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
default :
return nil , runtime . NewAPIError ( "response status code does not match any response statuses defined for this endpoint in the swagger spec" , response , response . Code ( ) )
}
}
// NewGetIndustriesOK creates a GetIndustriesOK with default headers values
func NewGetIndustriesOK ( ) * GetIndustriesOK {
return & GetIndustriesOK { }
}
2023-03-22 20:49:01 +00:00
/ *
GetIndustriesOK describes a response with status code 200 , with default header values .
2022-09-05 00:01:32 +00:00
Taxnexus Response with Industry objects
* /
type GetIndustriesOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload * sfgate_models . IndustryResponse
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get industries o k response has a 2xx status code
func ( o * GetIndustriesOK ) IsSuccess ( ) bool {
return true
}
// IsRedirect returns true when this get industries o k response has a 3xx status code
func ( o * GetIndustriesOK ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get industries o k response has a 4xx status code
func ( o * GetIndustriesOK ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this get industries o k response has a 5xx status code
func ( o * GetIndustriesOK ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get industries o k response a status code equal to that given
func ( o * GetIndustriesOK ) IsCode ( code int ) bool {
return code == 200
}
// Code gets the status code for the get industries o k response
func ( o * GetIndustriesOK ) Code ( ) int {
return 200
}
2022-09-05 00:01:32 +00:00
func ( o * GetIndustriesOK ) Error ( ) string {
return fmt . Sprintf ( "[GET /industries][%d] getIndustriesOK %+v" , 200 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetIndustriesOK ) String ( ) string {
return fmt . Sprintf ( "[GET /industries][%d] getIndustriesOK %+v" , 200 , o . Payload )
}
2022-09-05 00:01:32 +00:00
func ( o * GetIndustriesOK ) GetPayload ( ) * sfgate_models . IndustryResponse {
return o . Payload
}
func ( o * GetIndustriesOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Cache-Control
hdrCacheControl := response . GetHeader ( "Cache-Control" )
if hdrCacheControl != "" {
o . CacheControl = hdrCacheControl
}
o . Payload = new ( sfgate_models . IndustryResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetIndustriesUnauthorized creates a GetIndustriesUnauthorized with default headers values
func NewGetIndustriesUnauthorized ( ) * GetIndustriesUnauthorized {
return & GetIndustriesUnauthorized { }
}
2023-03-22 20:49:01 +00:00
/ *
GetIndustriesUnauthorized describes a response with status code 401 , with default header values .
2022-09-05 00:01:32 +00:00
Access unauthorized , invalid API - KEY was used
* /
type GetIndustriesUnauthorized struct {
AccessControlAllowOrigin string
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get industries unauthorized response has a 2xx status code
func ( o * GetIndustriesUnauthorized ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get industries unauthorized response has a 3xx status code
func ( o * GetIndustriesUnauthorized ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get industries unauthorized response has a 4xx status code
func ( o * GetIndustriesUnauthorized ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get industries unauthorized response has a 5xx status code
func ( o * GetIndustriesUnauthorized ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get industries unauthorized response a status code equal to that given
func ( o * GetIndustriesUnauthorized ) IsCode ( code int ) bool {
return code == 401
}
// Code gets the status code for the get industries unauthorized response
func ( o * GetIndustriesUnauthorized ) Code ( ) int {
return 401
}
2022-09-05 00:01:32 +00:00
func ( o * GetIndustriesUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[GET /industries][%d] getIndustriesUnauthorized %+v" , 401 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetIndustriesUnauthorized ) String ( ) string {
return fmt . Sprintf ( "[GET /industries][%d] getIndustriesUnauthorized %+v" , 401 , o . Payload )
}
2022-09-05 00:01:32 +00:00
func ( o * GetIndustriesUnauthorized ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * GetIndustriesUnauthorized ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o . Payload = new ( sfgate_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetIndustriesForbidden creates a GetIndustriesForbidden with default headers values
func NewGetIndustriesForbidden ( ) * GetIndustriesForbidden {
return & GetIndustriesForbidden { }
}
2023-03-22 20:49:01 +00:00
/ *
GetIndustriesForbidden describes a response with status code 403 , with default header values .
2022-09-05 00:01:32 +00:00
Access forbidden , account lacks access
* /
type GetIndustriesForbidden struct {
AccessControlAllowOrigin string
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get industries forbidden response has a 2xx status code
func ( o * GetIndustriesForbidden ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get industries forbidden response has a 3xx status code
func ( o * GetIndustriesForbidden ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get industries forbidden response has a 4xx status code
func ( o * GetIndustriesForbidden ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get industries forbidden response has a 5xx status code
func ( o * GetIndustriesForbidden ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get industries forbidden response a status code equal to that given
func ( o * GetIndustriesForbidden ) IsCode ( code int ) bool {
return code == 403
}
// Code gets the status code for the get industries forbidden response
func ( o * GetIndustriesForbidden ) Code ( ) int {
return 403
}
2022-09-05 00:01:32 +00:00
func ( o * GetIndustriesForbidden ) Error ( ) string {
return fmt . Sprintf ( "[GET /industries][%d] getIndustriesForbidden %+v" , 403 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetIndustriesForbidden ) String ( ) string {
return fmt . Sprintf ( "[GET /industries][%d] getIndustriesForbidden %+v" , 403 , o . Payload )
}
2022-09-05 00:01:32 +00:00
func ( o * GetIndustriesForbidden ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * GetIndustriesForbidden ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o . Payload = new ( sfgate_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetIndustriesNotFound creates a GetIndustriesNotFound with default headers values
func NewGetIndustriesNotFound ( ) * GetIndustriesNotFound {
return & GetIndustriesNotFound { }
}
2023-03-22 20:49:01 +00:00
/ *
GetIndustriesNotFound describes a response with status code 404 , with default header values .
2022-09-05 00:01:32 +00:00
Resource was not found
* /
type GetIndustriesNotFound struct {
AccessControlAllowOrigin string
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get industries not found response has a 2xx status code
func ( o * GetIndustriesNotFound ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get industries not found response has a 3xx status code
func ( o * GetIndustriesNotFound ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get industries not found response has a 4xx status code
func ( o * GetIndustriesNotFound ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get industries not found response has a 5xx status code
func ( o * GetIndustriesNotFound ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get industries not found response a status code equal to that given
func ( o * GetIndustriesNotFound ) IsCode ( code int ) bool {
return code == 404
}
// Code gets the status code for the get industries not found response
func ( o * GetIndustriesNotFound ) Code ( ) int {
return 404
}
2022-09-05 00:01:32 +00:00
func ( o * GetIndustriesNotFound ) Error ( ) string {
return fmt . Sprintf ( "[GET /industries][%d] getIndustriesNotFound %+v" , 404 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetIndustriesNotFound ) String ( ) string {
return fmt . Sprintf ( "[GET /industries][%d] getIndustriesNotFound %+v" , 404 , o . Payload )
}
2022-09-05 00:01:32 +00:00
func ( o * GetIndustriesNotFound ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * GetIndustriesNotFound ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o . Payload = new ( sfgate_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetIndustriesUnprocessableEntity creates a GetIndustriesUnprocessableEntity with default headers values
func NewGetIndustriesUnprocessableEntity ( ) * GetIndustriesUnprocessableEntity {
return & GetIndustriesUnprocessableEntity { }
}
2023-03-22 20:49:01 +00:00
/ *
GetIndustriesUnprocessableEntity describes a response with status code 422 , with default header values .
2022-09-05 00:01:32 +00:00
Unprocessable Entity , likely a bad parameter
* /
type GetIndustriesUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get industries unprocessable entity response has a 2xx status code
func ( o * GetIndustriesUnprocessableEntity ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get industries unprocessable entity response has a 3xx status code
func ( o * GetIndustriesUnprocessableEntity ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get industries unprocessable entity response has a 4xx status code
func ( o * GetIndustriesUnprocessableEntity ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get industries unprocessable entity response has a 5xx status code
func ( o * GetIndustriesUnprocessableEntity ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get industries unprocessable entity response a status code equal to that given
func ( o * GetIndustriesUnprocessableEntity ) IsCode ( code int ) bool {
return code == 422
}
// Code gets the status code for the get industries unprocessable entity response
func ( o * GetIndustriesUnprocessableEntity ) Code ( ) int {
return 422
}
2022-09-05 00:01:32 +00:00
func ( o * GetIndustriesUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[GET /industries][%d] getIndustriesUnprocessableEntity %+v" , 422 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetIndustriesUnprocessableEntity ) String ( ) string {
return fmt . Sprintf ( "[GET /industries][%d] getIndustriesUnprocessableEntity %+v" , 422 , o . Payload )
}
2022-09-05 00:01:32 +00:00
func ( o * GetIndustriesUnprocessableEntity ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * GetIndustriesUnprocessableEntity ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o . Payload = new ( sfgate_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetIndustriesInternalServerError creates a GetIndustriesInternalServerError with default headers values
func NewGetIndustriesInternalServerError ( ) * GetIndustriesInternalServerError {
return & GetIndustriesInternalServerError { }
}
2023-03-22 20:49:01 +00:00
/ *
GetIndustriesInternalServerError describes a response with status code 500 , with default header values .
2022-09-05 00:01:32 +00:00
Server Internal Error
* /
type GetIndustriesInternalServerError struct {
AccessControlAllowOrigin string
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get industries internal server error response has a 2xx status code
func ( o * GetIndustriesInternalServerError ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get industries internal server error response has a 3xx status code
func ( o * GetIndustriesInternalServerError ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get industries internal server error response has a 4xx status code
func ( o * GetIndustriesInternalServerError ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this get industries internal server error response has a 5xx status code
func ( o * GetIndustriesInternalServerError ) IsServerError ( ) bool {
return true
}
// IsCode returns true when this get industries internal server error response a status code equal to that given
func ( o * GetIndustriesInternalServerError ) IsCode ( code int ) bool {
return code == 500
}
// Code gets the status code for the get industries internal server error response
func ( o * GetIndustriesInternalServerError ) Code ( ) int {
return 500
}
2022-09-05 00:01:32 +00:00
func ( o * GetIndustriesInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[GET /industries][%d] getIndustriesInternalServerError %+v" , 500 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetIndustriesInternalServerError ) String ( ) string {
return fmt . Sprintf ( "[GET /industries][%d] getIndustriesInternalServerError %+v" , 500 , o . Payload )
}
2022-09-05 00:01:32 +00:00
func ( o * GetIndustriesInternalServerError ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * GetIndustriesInternalServerError ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o . Payload = new ( sfgate_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}