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 backends
// 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
)
// GetBackendsReader is a Reader for the GetBackends structure.
type GetBackendsReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * GetBackendsReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewGetBackendsOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewGetBackendsUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewGetBackendsForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewGetBackendsNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewGetBackendsUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewGetBackendsInternalServerError ( )
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
}
}
// NewGetBackendsOK creates a GetBackendsOK with default headers values
func NewGetBackendsOK ( ) * GetBackendsOK {
return & GetBackendsOK { }
}
2021-02-09 16:56:57 +00:00
/ * GetBackendsOK describes a response with status code 200 , with default header values .
2021-01-08 17:40:28 +00:00
Taxnexus Response with Backend objects
* /
type GetBackendsOK struct {
Payload * sf_gate_models . BackendResponse
}
func ( o * GetBackendsOK ) Error ( ) string {
return fmt . Sprintf ( "[GET /backends][%d] getBackendsOK %+v" , 200 , o . Payload )
}
func ( o * GetBackendsOK ) GetPayload ( ) * sf_gate_models . BackendResponse {
return o . Payload
}
func ( o * GetBackendsOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( sf_gate_models . BackendResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetBackendsUnauthorized creates a GetBackendsUnauthorized with default headers values
func NewGetBackendsUnauthorized ( ) * GetBackendsUnauthorized {
return & GetBackendsUnauthorized { }
}
2021-02-09 16:56:57 +00:00
/ * GetBackendsUnauthorized 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 GetBackendsUnauthorized struct {
Payload * sf_gate_models . Error
}
func ( o * GetBackendsUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[GET /backends][%d] getBackendsUnauthorized %+v" , 401 , o . Payload )
}
func ( o * GetBackendsUnauthorized ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetBackendsUnauthorized ) 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
}
// NewGetBackendsForbidden creates a GetBackendsForbidden with default headers values
func NewGetBackendsForbidden ( ) * GetBackendsForbidden {
return & GetBackendsForbidden { }
}
2021-02-09 16:56:57 +00:00
/ * GetBackendsForbidden 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 GetBackendsForbidden struct {
Payload * sf_gate_models . Error
}
func ( o * GetBackendsForbidden ) Error ( ) string {
return fmt . Sprintf ( "[GET /backends][%d] getBackendsForbidden %+v" , 403 , o . Payload )
}
func ( o * GetBackendsForbidden ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetBackendsForbidden ) 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
}
// NewGetBackendsNotFound creates a GetBackendsNotFound with default headers values
func NewGetBackendsNotFound ( ) * GetBackendsNotFound {
return & GetBackendsNotFound { }
}
2021-02-09 16:56:57 +00:00
/ * GetBackendsNotFound describes a response with status code 404 , with default header values .
2021-01-08 17:40:28 +00:00
Resource was not found
* /
type GetBackendsNotFound struct {
Payload * sf_gate_models . Error
}
func ( o * GetBackendsNotFound ) Error ( ) string {
return fmt . Sprintf ( "[GET /backends][%d] getBackendsNotFound %+v" , 404 , o . Payload )
}
func ( o * GetBackendsNotFound ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetBackendsNotFound ) 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
}
// NewGetBackendsUnprocessableEntity creates a GetBackendsUnprocessableEntity with default headers values
func NewGetBackendsUnprocessableEntity ( ) * GetBackendsUnprocessableEntity {
return & GetBackendsUnprocessableEntity { }
}
2021-02-09 16:56:57 +00:00
/ * GetBackendsUnprocessableEntity 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 GetBackendsUnprocessableEntity struct {
Payload * sf_gate_models . Error
}
func ( o * GetBackendsUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[GET /backends][%d] getBackendsUnprocessableEntity %+v" , 422 , o . Payload )
}
func ( o * GetBackendsUnprocessableEntity ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetBackendsUnprocessableEntity ) 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
}
// NewGetBackendsInternalServerError creates a GetBackendsInternalServerError with default headers values
func NewGetBackendsInternalServerError ( ) * GetBackendsInternalServerError {
return & GetBackendsInternalServerError { }
}
2021-02-09 16:56:57 +00:00
/ * GetBackendsInternalServerError describes a response with status code 500 , with default header values .
2021-01-08 17:40:28 +00:00
Server Internal Error
* /
type GetBackendsInternalServerError struct {
Payload * sf_gate_models . Error
}
func ( o * GetBackendsInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[GET /backends][%d] getBackendsInternalServerError %+v" , 500 , o . Payload )
}
func ( o * GetBackendsInternalServerError ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetBackendsInternalServerError ) 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
}