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:
|
|
|
|
return nil, runtime.NewAPIError("unknown error", response, response.Code())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewGetLicensesOK creates a GetLicensesOK with default headers values
|
|
|
|
func NewGetLicensesOK() *GetLicensesOK {
|
|
|
|
return &GetLicensesOK{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*GetLicensesOK handles this case with default header values.
|
|
|
|
|
|
|
|
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{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*GetLicensesUnauthorized handles this case with default header values.
|
|
|
|
|
|
|
|
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{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*GetLicensesForbidden handles this case with default header values.
|
|
|
|
|
|
|
|
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{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*GetLicensesNotFound handles this case with default header values.
|
|
|
|
|
|
|
|
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{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*GetLicensesUnprocessableEntity handles this case with default header values.
|
|
|
|
|
|
|
|
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{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*GetLicensesInternalServerError handles this case with default header values.
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|