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
)
// PutSubscriptionsReader is a Reader for the PutSubscriptions structure.
type PutSubscriptionsReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * PutSubscriptionsReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewPutSubscriptionsOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewPutSubscriptionsUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewPutSubscriptionsForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewPutSubscriptionsNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewPutSubscriptionsInternalServerError ( )
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
}
}
// NewPutSubscriptionsOK creates a PutSubscriptionsOK with default headers values
func NewPutSubscriptionsOK ( ) * PutSubscriptionsOK {
return & PutSubscriptionsOK { }
}
2021-02-09 16:56:57 +00:00
/ * PutSubscriptionsOK 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 PutSubscriptionsOK struct {
Payload * sf_gate_models . SubscriptionResponse
}
func ( o * PutSubscriptionsOK ) Error ( ) string {
return fmt . Sprintf ( "[PUT /subscriptions][%d] putSubscriptionsOK %+v" , 200 , o . Payload )
}
func ( o * PutSubscriptionsOK ) GetPayload ( ) * sf_gate_models . SubscriptionResponse {
return o . Payload
}
func ( o * PutSubscriptionsOK ) 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
}
// NewPutSubscriptionsUnauthorized creates a PutSubscriptionsUnauthorized with default headers values
func NewPutSubscriptionsUnauthorized ( ) * PutSubscriptionsUnauthorized {
return & PutSubscriptionsUnauthorized { }
}
2021-02-09 16:56:57 +00:00
/ * PutSubscriptionsUnauthorized 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 PutSubscriptionsUnauthorized struct {
Payload * sf_gate_models . Error
}
func ( o * PutSubscriptionsUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[PUT /subscriptions][%d] putSubscriptionsUnauthorized %+v" , 401 , o . Payload )
}
func ( o * PutSubscriptionsUnauthorized ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * PutSubscriptionsUnauthorized ) 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
}
// NewPutSubscriptionsForbidden creates a PutSubscriptionsForbidden with default headers values
func NewPutSubscriptionsForbidden ( ) * PutSubscriptionsForbidden {
return & PutSubscriptionsForbidden { }
}
2021-02-09 16:56:57 +00:00
/ * PutSubscriptionsForbidden 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 PutSubscriptionsForbidden struct {
Payload * sf_gate_models . Error
}
func ( o * PutSubscriptionsForbidden ) Error ( ) string {
return fmt . Sprintf ( "[PUT /subscriptions][%d] putSubscriptionsForbidden %+v" , 403 , o . Payload )
}
func ( o * PutSubscriptionsForbidden ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * PutSubscriptionsForbidden ) 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
}
// NewPutSubscriptionsNotFound creates a PutSubscriptionsNotFound with default headers values
func NewPutSubscriptionsNotFound ( ) * PutSubscriptionsNotFound {
return & PutSubscriptionsNotFound { }
}
2021-02-09 16:56:57 +00:00
/ * PutSubscriptionsNotFound describes a response with status code 404 , with default header values .
2021-01-08 17:40:28 +00:00
Resource was not found
* /
type PutSubscriptionsNotFound struct {
Payload * sf_gate_models . Error
}
func ( o * PutSubscriptionsNotFound ) Error ( ) string {
return fmt . Sprintf ( "[PUT /subscriptions][%d] putSubscriptionsNotFound %+v" , 404 , o . Payload )
}
func ( o * PutSubscriptionsNotFound ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * PutSubscriptionsNotFound ) 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
}
// NewPutSubscriptionsInternalServerError creates a PutSubscriptionsInternalServerError with default headers values
func NewPutSubscriptionsInternalServerError ( ) * PutSubscriptionsInternalServerError {
return & PutSubscriptionsInternalServerError { }
}
2021-02-09 16:56:57 +00:00
/ * PutSubscriptionsInternalServerError describes a response with status code 500 , with default header values .
2021-01-08 17:40:28 +00:00
Server Internal Error
* /
type PutSubscriptionsInternalServerError struct {
Payload * sf_gate_models . Error
}
func ( o * PutSubscriptionsInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[PUT /subscriptions][%d] putSubscriptionsInternalServerError %+v" , 500 , o . Payload )
}
func ( o * PutSubscriptionsInternalServerError ) GetPayload ( ) * sf_gate_models . Error {
return o . Payload
}
func ( o * PutSubscriptionsInternalServerError ) 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
}