lib/api/sf-gate/sf_gate_client/subscriptions/get_subscriptions_responses.go

262 lines
8.0 KiB
Go
Raw Normal View History

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 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"
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
)
// 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:
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
}
}
// NewGetSubscriptionsOK creates a GetSubscriptionsOK with default headers values
func NewGetSubscriptionsOK() *GetSubscriptionsOK {
return &GetSubscriptionsOK{}
}
2021-02-09 16:56:57 +00:00
/* GetSubscriptionsOK describes a response with status code 200, with default header values.
2021-01-08 17:40:28 +00:00
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{}
}
2021-02-09 16:56:57 +00:00
/* GetSubscriptionsUnauthorized 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 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{}
}
2021-02-09 16:56:57 +00:00
/* GetSubscriptionsForbidden 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 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{}
}
2021-02-09 16:56:57 +00:00
/* GetSubscriptionsNotFound describes a response with status code 404, with default header values.
2021-01-08 17:40:28 +00:00
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{}
}
2021-02-09 16:56:57 +00:00
/* GetSubscriptionsUnprocessableEntity 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 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{}
}
2021-02-09 16:56:57 +00:00
/* GetSubscriptionsInternalServerError describes a response with status code 500, with default header values.
2021-01-08 17:40:28 +00:00
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
}