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 quotes
// 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
)
// GetQuotesReader is a Reader for the GetQuotes structure.
type GetQuotesReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * GetQuotesReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewGetQuotesOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewGetQuotesUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewGetQuotesForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewGetQuotesNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewGetQuotesUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewGetQuotesInternalServerError ( )
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
}
}
// NewGetQuotesOK creates a GetQuotesOK with default headers values
func NewGetQuotesOK ( ) * GetQuotesOK {
return & GetQuotesOK { }
}
2021-02-09 16:56:57 +00:00
/ * GetQuotesOK describes a response with status code 200 , with default header values .
2021-01-08 17:40:28 +00:00
An array of Quote objects
* /
type GetQuotesOK struct {
Payload * sf_gate_models . QuoteResponse
}
func ( o * GetQuotesOK ) Error ( ) string {
return fmt . Sprintf ( "[GET /quotes][%d] getQuotesOK %+v" , 200 , o . Payload )
}
func ( o * GetQuotesOK ) GetPayload ( ) * sf_gate_models . QuoteResponse {
return o . Payload
}
func ( o * GetQuotesOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( sf_gate_models . QuoteResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetQuotesUnauthorized creates a GetQuotesUnauthorized with default headers values
func NewGetQuotesUnauthorized ( ) * GetQuotesUnauthorized {
return & GetQuotesUnauthorized { }
}
2021-02-09 16:56:57 +00:00
/ * GetQuotesUnauthorized 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 GetQuotesUnauthorized struct {
Payload * sf_gate_models . Error
}
func ( o * GetQuotesUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[GET /quotes][%d] getQuotesUnauthorized %+v" , 401 , o . Payload )
}
func ( o * GetQuotesUnauthorized ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetQuotesUnauthorized ) 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
}
// NewGetQuotesForbidden creates a GetQuotesForbidden with default headers values
func NewGetQuotesForbidden ( ) * GetQuotesForbidden {
return & GetQuotesForbidden { }
}
2021-02-09 16:56:57 +00:00
/ * GetQuotesForbidden 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 GetQuotesForbidden struct {
Payload * sf_gate_models . Error
}
func ( o * GetQuotesForbidden ) Error ( ) string {
return fmt . Sprintf ( "[GET /quotes][%d] getQuotesForbidden %+v" , 403 , o . Payload )
}
func ( o * GetQuotesForbidden ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetQuotesForbidden ) 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
}
// NewGetQuotesNotFound creates a GetQuotesNotFound with default headers values
func NewGetQuotesNotFound ( ) * GetQuotesNotFound {
return & GetQuotesNotFound { }
}
2021-02-09 16:56:57 +00:00
/ * GetQuotesNotFound describes a response with status code 404 , with default header values .
2021-01-08 17:40:28 +00:00
Resource was not found
* /
type GetQuotesNotFound struct {
Payload * sf_gate_models . Error
}
func ( o * GetQuotesNotFound ) Error ( ) string {
return fmt . Sprintf ( "[GET /quotes][%d] getQuotesNotFound %+v" , 404 , o . Payload )
}
func ( o * GetQuotesNotFound ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetQuotesNotFound ) 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
}
// NewGetQuotesUnprocessableEntity creates a GetQuotesUnprocessableEntity with default headers values
func NewGetQuotesUnprocessableEntity ( ) * GetQuotesUnprocessableEntity {
return & GetQuotesUnprocessableEntity { }
}
2021-02-09 16:56:57 +00:00
/ * GetQuotesUnprocessableEntity 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 GetQuotesUnprocessableEntity struct {
Payload * sf_gate_models . Error
}
func ( o * GetQuotesUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[GET /quotes][%d] getQuotesUnprocessableEntity %+v" , 422 , o . Payload )
}
func ( o * GetQuotesUnprocessableEntity ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetQuotesUnprocessableEntity ) 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
}
// NewGetQuotesInternalServerError creates a GetQuotesInternalServerError with default headers values
func NewGetQuotesInternalServerError ( ) * GetQuotesInternalServerError {
return & GetQuotesInternalServerError { }
}
2021-02-09 16:56:57 +00:00
/ * GetQuotesInternalServerError describes a response with status code 500 , with default header values .
2021-01-08 17:40:28 +00:00
Server Internal Error
* /
type GetQuotesInternalServerError struct {
Payload * sf_gate_models . Error
}
func ( o * GetQuotesInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[GET /quotes][%d] getQuotesInternalServerError %+v" , 500 , o . Payload )
}
func ( o * GetQuotesInternalServerError ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetQuotesInternalServerError ) 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
}