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 licenses
// 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
)
// GetLicensesReader is a Reader for the GetLicenses structure.
type GetLicensesReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * GetLicensesReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewGetLicensesOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewGetLicensesUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewGetLicensesForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewGetLicensesNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewGetLicensesUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewGetLicensesInternalServerError ( )
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
}
}
// NewGetLicensesOK creates a GetLicensesOK with default headers values
func NewGetLicensesOK ( ) * GetLicensesOK {
return & GetLicensesOK { }
}
2021-02-09 16:56:57 +00:00
/ * GetLicensesOK describes a response with status code 200 , with default header values .
2021-01-08 17:40:28 +00:00
An array of License Objects
* /
type GetLicensesOK struct {
Payload * sf_gate_models . LicenseResponse
}
func ( o * GetLicensesOK ) Error ( ) string {
return fmt . Sprintf ( "[GET /licenses][%d] getLicensesOK %+v" , 200 , o . Payload )
}
func ( o * GetLicensesOK ) GetPayload ( ) * sf_gate_models . LicenseResponse {
return o . Payload
}
func ( o * GetLicensesOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( sf_gate_models . LicenseResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetLicensesUnauthorized creates a GetLicensesUnauthorized with default headers values
func NewGetLicensesUnauthorized ( ) * GetLicensesUnauthorized {
return & GetLicensesUnauthorized { }
}
2021-02-09 16:56:57 +00:00
/ * GetLicensesUnauthorized 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 GetLicensesUnauthorized struct {
Payload * sf_gate_models . Error
}
func ( o * GetLicensesUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[GET /licenses][%d] getLicensesUnauthorized %+v" , 401 , o . Payload )
}
func ( o * GetLicensesUnauthorized ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetLicensesUnauthorized ) 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
}
// NewGetLicensesForbidden creates a GetLicensesForbidden with default headers values
func NewGetLicensesForbidden ( ) * GetLicensesForbidden {
return & GetLicensesForbidden { }
}
2021-02-09 16:56:57 +00:00
/ * GetLicensesForbidden 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 GetLicensesForbidden struct {
Payload * sf_gate_models . Error
}
func ( o * GetLicensesForbidden ) Error ( ) string {
return fmt . Sprintf ( "[GET /licenses][%d] getLicensesForbidden %+v" , 403 , o . Payload )
}
func ( o * GetLicensesForbidden ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetLicensesForbidden ) 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
}
// NewGetLicensesNotFound creates a GetLicensesNotFound with default headers values
func NewGetLicensesNotFound ( ) * GetLicensesNotFound {
return & GetLicensesNotFound { }
}
2021-02-09 16:56:57 +00:00
/ * GetLicensesNotFound describes a response with status code 404 , with default header values .
2021-01-08 17:40:28 +00:00
Resource was not found
* /
type GetLicensesNotFound struct {
Payload * sf_gate_models . Error
}
func ( o * GetLicensesNotFound ) Error ( ) string {
return fmt . Sprintf ( "[GET /licenses][%d] getLicensesNotFound %+v" , 404 , o . Payload )
}
func ( o * GetLicensesNotFound ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetLicensesNotFound ) 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
}
// NewGetLicensesUnprocessableEntity creates a GetLicensesUnprocessableEntity with default headers values
func NewGetLicensesUnprocessableEntity ( ) * GetLicensesUnprocessableEntity {
return & GetLicensesUnprocessableEntity { }
}
2021-02-09 16:56:57 +00:00
/ * GetLicensesUnprocessableEntity 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 GetLicensesUnprocessableEntity struct {
Payload * sf_gate_models . Error
}
func ( o * GetLicensesUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[GET /licenses][%d] getLicensesUnprocessableEntity %+v" , 422 , o . Payload )
}
func ( o * GetLicensesUnprocessableEntity ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetLicensesUnprocessableEntity ) 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
}
// NewGetLicensesInternalServerError creates a GetLicensesInternalServerError with default headers values
func NewGetLicensesInternalServerError ( ) * GetLicensesInternalServerError {
return & GetLicensesInternalServerError { }
}
2021-02-09 16:56:57 +00:00
/ * GetLicensesInternalServerError describes a response with status code 500 , with default header values .
2021-01-08 17:40:28 +00:00
Server Internal Error
* /
type GetLicensesInternalServerError struct {
Payload * sf_gate_models . Error
}
func ( o * GetLicensesInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[GET /licenses][%d] getLicensesInternalServerError %+v" , 500 , o . Payload )
}
func ( o * GetLicensesInternalServerError ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * GetLicensesInternalServerError ) 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
}