269 lines
7.8 KiB
Go
269 lines
7.8 KiB
Go
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
||
|
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
|
||
|
// All rights reserved worldwide.
|
||
|
// Proprietary product; unlicensed use is not allowed
|
||
|
|
||
|
package subscriptions
|
||
|
|
||
|
// 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"
|
||
|
|
||
|
"github.com/taxnexus/go/lib/api/sf-gate/sf_gate_models"
|
||
|
)
|
||
|
|
||
|
// GetSubscriptionsReader is a Reader for the GetSubscriptions structure.
|
||
|
type GetSubscriptionsReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *GetSubscriptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 200:
|
||
|
result := NewGetSubscriptionsOK()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 401:
|
||
|
result := NewGetSubscriptionsUnauthorized()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 403:
|
||
|
result := NewGetSubscriptionsForbidden()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 404:
|
||
|
result := NewGetSubscriptionsNotFound()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 422:
|
||
|
result := NewGetSubscriptionsUnprocessableEntity()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewGetSubscriptionsInternalServerError()
|
||
|
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())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewGetSubscriptionsOK creates a GetSubscriptionsOK with default headers values
|
||
|
func NewGetSubscriptionsOK() *GetSubscriptionsOK {
|
||
|
return &GetSubscriptionsOK{}
|
||
|
}
|
||
|
|
||
|
/*GetSubscriptionsOK handles this case with default header values.
|
||
|
|
||
|
An array of Subscription Objects
|
||
|
*/
|
||
|
type GetSubscriptionsOK struct {
|
||
|
Payload *sf_gate_models.SubscriptionResponse
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsOK) Error() string {
|
||
|
return fmt.Sprintf("[GET /subscriptions][%d] getSubscriptionsOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsOK) GetPayload() *sf_gate_models.SubscriptionResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(sf_gate_models.SubscriptionResponse)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewGetSubscriptionsUnauthorized creates a GetSubscriptionsUnauthorized with default headers values
|
||
|
func NewGetSubscriptionsUnauthorized() *GetSubscriptionsUnauthorized {
|
||
|
return &GetSubscriptionsUnauthorized{}
|
||
|
}
|
||
|
|
||
|
/*GetSubscriptionsUnauthorized handles this case with default header values.
|
||
|
|
||
|
Access unauthorized, invalid API-KEY was used
|
||
|
*/
|
||
|
type GetSubscriptionsUnauthorized struct {
|
||
|
Payload *sf_gate_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsUnauthorized) Error() string {
|
||
|
return fmt.Sprintf("[GET /subscriptions][%d] getSubscriptionsUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsUnauthorized) GetPayload() *sf_gate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsUnauthorized) 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
|
||
|
}
|
||
|
|
||
|
// NewGetSubscriptionsForbidden creates a GetSubscriptionsForbidden with default headers values
|
||
|
func NewGetSubscriptionsForbidden() *GetSubscriptionsForbidden {
|
||
|
return &GetSubscriptionsForbidden{}
|
||
|
}
|
||
|
|
||
|
/*GetSubscriptionsForbidden handles this case with default header values.
|
||
|
|
||
|
Access forbidden, account lacks access
|
||
|
*/
|
||
|
type GetSubscriptionsForbidden struct {
|
||
|
Payload *sf_gate_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsForbidden) Error() string {
|
||
|
return fmt.Sprintf("[GET /subscriptions][%d] getSubscriptionsForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsForbidden) GetPayload() *sf_gate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsForbidden) 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
|
||
|
}
|
||
|
|
||
|
// NewGetSubscriptionsNotFound creates a GetSubscriptionsNotFound with default headers values
|
||
|
func NewGetSubscriptionsNotFound() *GetSubscriptionsNotFound {
|
||
|
return &GetSubscriptionsNotFound{}
|
||
|
}
|
||
|
|
||
|
/*GetSubscriptionsNotFound handles this case with default header values.
|
||
|
|
||
|
Resource was not found
|
||
|
*/
|
||
|
type GetSubscriptionsNotFound struct {
|
||
|
Payload *sf_gate_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsNotFound) Error() string {
|
||
|
return fmt.Sprintf("[GET /subscriptions][%d] getSubscriptionsNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsNotFound) GetPayload() *sf_gate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsNotFound) 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
|
||
|
}
|
||
|
|
||
|
// NewGetSubscriptionsUnprocessableEntity creates a GetSubscriptionsUnprocessableEntity with default headers values
|
||
|
func NewGetSubscriptionsUnprocessableEntity() *GetSubscriptionsUnprocessableEntity {
|
||
|
return &GetSubscriptionsUnprocessableEntity{}
|
||
|
}
|
||
|
|
||
|
/*GetSubscriptionsUnprocessableEntity handles this case with default header values.
|
||
|
|
||
|
Unprocessable Entity, likely a bad parameter
|
||
|
*/
|
||
|
type GetSubscriptionsUnprocessableEntity struct {
|
||
|
Payload *sf_gate_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsUnprocessableEntity) Error() string {
|
||
|
return fmt.Sprintf("[GET /subscriptions][%d] getSubscriptionsUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsUnprocessableEntity) GetPayload() *sf_gate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsUnprocessableEntity) 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
|
||
|
}
|
||
|
|
||
|
// NewGetSubscriptionsInternalServerError creates a GetSubscriptionsInternalServerError with default headers values
|
||
|
func NewGetSubscriptionsInternalServerError() *GetSubscriptionsInternalServerError {
|
||
|
return &GetSubscriptionsInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/*GetSubscriptionsInternalServerError handles this case with default header values.
|
||
|
|
||
|
Server Internal Error
|
||
|
*/
|
||
|
type GetSubscriptionsInternalServerError struct {
|
||
|
Payload *sf_gate_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[GET /subscriptions][%d] getSubscriptionsInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsInternalServerError) GetPayload() *sf_gate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetSubscriptionsInternalServerError) 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
|
||
|
}
|