mirror of https://github.com/vernonkeenan/lib
478 lines
16 KiB
Go
478 lines
16 KiB
Go
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||
|
// All rights reserved worldwide.
|
||
|
// Proprietary product; unlicensed use is not allowed
|
||
|
|
||
|
package financial_statements
|
||
|
|
||
|
// 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"
|
||
|
|
||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||
|
)
|
||
|
|
||
|
// PostFinancialStatementsReader is a Reader for the PostFinancialStatements structure.
|
||
|
type PostFinancialStatementsReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *PostFinancialStatementsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 201:
|
||
|
result := NewPostFinancialStatementsCreated()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 401:
|
||
|
result := NewPostFinancialStatementsUnauthorized()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 403:
|
||
|
result := NewPostFinancialStatementsForbidden()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 404:
|
||
|
result := NewPostFinancialStatementsNotFound()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 422:
|
||
|
result := NewPostFinancialStatementsUnprocessableEntity()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewPostFinancialStatementsInternalServerError()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
default:
|
||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewPostFinancialStatementsCreated creates a PostFinancialStatementsCreated with default headers values
|
||
|
func NewPostFinancialStatementsCreated() *PostFinancialStatementsCreated {
|
||
|
return &PostFinancialStatementsCreated{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostFinancialStatementsCreated describes a response with status code 201, with default header values.
|
||
|
|
||
|
Response from Salesforce
|
||
|
*/
|
||
|
type PostFinancialStatementsCreated struct {
|
||
|
Payload *sfgate_models.SalesforcePostResponse
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this post financial statements created response has a 2xx status code
|
||
|
func (o *PostFinancialStatementsCreated) IsSuccess() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this post financial statements created response has a 3xx status code
|
||
|
func (o *PostFinancialStatementsCreated) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this post financial statements created response has a 4xx status code
|
||
|
func (o *PostFinancialStatementsCreated) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this post financial statements created response has a 5xx status code
|
||
|
func (o *PostFinancialStatementsCreated) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this post financial statements created response a status code equal to that given
|
||
|
func (o *PostFinancialStatementsCreated) IsCode(code int) bool {
|
||
|
return code == 201
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the post financial statements created response
|
||
|
func (o *PostFinancialStatementsCreated) Code() int {
|
||
|
return 201
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsCreated) Error() string {
|
||
|
return fmt.Sprintf("[POST /financialstatements][%d] postFinancialStatementsCreated %+v", 201, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsCreated) String() string {
|
||
|
return fmt.Sprintf("[POST /financialstatements][%d] postFinancialStatementsCreated %+v", 201, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsCreated) GetPayload() *sfgate_models.SalesforcePostResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(sfgate_models.SalesforcePostResponse)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewPostFinancialStatementsUnauthorized creates a PostFinancialStatementsUnauthorized with default headers values
|
||
|
func NewPostFinancialStatementsUnauthorized() *PostFinancialStatementsUnauthorized {
|
||
|
return &PostFinancialStatementsUnauthorized{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostFinancialStatementsUnauthorized describes a response with status code 401, with default header values.
|
||
|
|
||
|
Access unauthorized, invalid API-KEY was used
|
||
|
*/
|
||
|
type PostFinancialStatementsUnauthorized struct {
|
||
|
Payload *sfgate_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this post financial statements unauthorized response has a 2xx status code
|
||
|
func (o *PostFinancialStatementsUnauthorized) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this post financial statements unauthorized response has a 3xx status code
|
||
|
func (o *PostFinancialStatementsUnauthorized) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this post financial statements unauthorized response has a 4xx status code
|
||
|
func (o *PostFinancialStatementsUnauthorized) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this post financial statements unauthorized response has a 5xx status code
|
||
|
func (o *PostFinancialStatementsUnauthorized) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this post financial statements unauthorized response a status code equal to that given
|
||
|
func (o *PostFinancialStatementsUnauthorized) IsCode(code int) bool {
|
||
|
return code == 401
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the post financial statements unauthorized response
|
||
|
func (o *PostFinancialStatementsUnauthorized) Code() int {
|
||
|
return 401
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsUnauthorized) Error() string {
|
||
|
return fmt.Sprintf("[POST /financialstatements][%d] postFinancialStatementsUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsUnauthorized) String() string {
|
||
|
return fmt.Sprintf("[POST /financialstatements][%d] postFinancialStatementsUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsUnauthorized) GetPayload() *sfgate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(sfgate_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewPostFinancialStatementsForbidden creates a PostFinancialStatementsForbidden with default headers values
|
||
|
func NewPostFinancialStatementsForbidden() *PostFinancialStatementsForbidden {
|
||
|
return &PostFinancialStatementsForbidden{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostFinancialStatementsForbidden describes a response with status code 403, with default header values.
|
||
|
|
||
|
Access forbidden, account lacks access
|
||
|
*/
|
||
|
type PostFinancialStatementsForbidden struct {
|
||
|
Payload *sfgate_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this post financial statements forbidden response has a 2xx status code
|
||
|
func (o *PostFinancialStatementsForbidden) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this post financial statements forbidden response has a 3xx status code
|
||
|
func (o *PostFinancialStatementsForbidden) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this post financial statements forbidden response has a 4xx status code
|
||
|
func (o *PostFinancialStatementsForbidden) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this post financial statements forbidden response has a 5xx status code
|
||
|
func (o *PostFinancialStatementsForbidden) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this post financial statements forbidden response a status code equal to that given
|
||
|
func (o *PostFinancialStatementsForbidden) IsCode(code int) bool {
|
||
|
return code == 403
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the post financial statements forbidden response
|
||
|
func (o *PostFinancialStatementsForbidden) Code() int {
|
||
|
return 403
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsForbidden) Error() string {
|
||
|
return fmt.Sprintf("[POST /financialstatements][%d] postFinancialStatementsForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsForbidden) String() string {
|
||
|
return fmt.Sprintf("[POST /financialstatements][%d] postFinancialStatementsForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsForbidden) GetPayload() *sfgate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(sfgate_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewPostFinancialStatementsNotFound creates a PostFinancialStatementsNotFound with default headers values
|
||
|
func NewPostFinancialStatementsNotFound() *PostFinancialStatementsNotFound {
|
||
|
return &PostFinancialStatementsNotFound{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostFinancialStatementsNotFound describes a response with status code 404, with default header values.
|
||
|
|
||
|
Resource was not found
|
||
|
*/
|
||
|
type PostFinancialStatementsNotFound struct {
|
||
|
Payload *sfgate_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this post financial statements not found response has a 2xx status code
|
||
|
func (o *PostFinancialStatementsNotFound) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this post financial statements not found response has a 3xx status code
|
||
|
func (o *PostFinancialStatementsNotFound) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this post financial statements not found response has a 4xx status code
|
||
|
func (o *PostFinancialStatementsNotFound) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this post financial statements not found response has a 5xx status code
|
||
|
func (o *PostFinancialStatementsNotFound) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this post financial statements not found response a status code equal to that given
|
||
|
func (o *PostFinancialStatementsNotFound) IsCode(code int) bool {
|
||
|
return code == 404
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the post financial statements not found response
|
||
|
func (o *PostFinancialStatementsNotFound) Code() int {
|
||
|
return 404
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsNotFound) Error() string {
|
||
|
return fmt.Sprintf("[POST /financialstatements][%d] postFinancialStatementsNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsNotFound) String() string {
|
||
|
return fmt.Sprintf("[POST /financialstatements][%d] postFinancialStatementsNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsNotFound) GetPayload() *sfgate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(sfgate_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewPostFinancialStatementsUnprocessableEntity creates a PostFinancialStatementsUnprocessableEntity with default headers values
|
||
|
func NewPostFinancialStatementsUnprocessableEntity() *PostFinancialStatementsUnprocessableEntity {
|
||
|
return &PostFinancialStatementsUnprocessableEntity{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostFinancialStatementsUnprocessableEntity describes a response with status code 422, with default header values.
|
||
|
|
||
|
Unprocessable Entity, likely a bad parameter
|
||
|
*/
|
||
|
type PostFinancialStatementsUnprocessableEntity struct {
|
||
|
Payload *sfgate_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this post financial statements unprocessable entity response has a 2xx status code
|
||
|
func (o *PostFinancialStatementsUnprocessableEntity) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this post financial statements unprocessable entity response has a 3xx status code
|
||
|
func (o *PostFinancialStatementsUnprocessableEntity) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this post financial statements unprocessable entity response has a 4xx status code
|
||
|
func (o *PostFinancialStatementsUnprocessableEntity) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this post financial statements unprocessable entity response has a 5xx status code
|
||
|
func (o *PostFinancialStatementsUnprocessableEntity) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this post financial statements unprocessable entity response a status code equal to that given
|
||
|
func (o *PostFinancialStatementsUnprocessableEntity) IsCode(code int) bool {
|
||
|
return code == 422
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the post financial statements unprocessable entity response
|
||
|
func (o *PostFinancialStatementsUnprocessableEntity) Code() int {
|
||
|
return 422
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsUnprocessableEntity) Error() string {
|
||
|
return fmt.Sprintf("[POST /financialstatements][%d] postFinancialStatementsUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsUnprocessableEntity) String() string {
|
||
|
return fmt.Sprintf("[POST /financialstatements][%d] postFinancialStatementsUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(sfgate_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewPostFinancialStatementsInternalServerError creates a PostFinancialStatementsInternalServerError with default headers values
|
||
|
func NewPostFinancialStatementsInternalServerError() *PostFinancialStatementsInternalServerError {
|
||
|
return &PostFinancialStatementsInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PostFinancialStatementsInternalServerError describes a response with status code 500, with default header values.
|
||
|
|
||
|
Server Internal Error
|
||
|
*/
|
||
|
type PostFinancialStatementsInternalServerError struct {
|
||
|
Payload *sfgate_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this post financial statements internal server error response has a 2xx status code
|
||
|
func (o *PostFinancialStatementsInternalServerError) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this post financial statements internal server error response has a 3xx status code
|
||
|
func (o *PostFinancialStatementsInternalServerError) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this post financial statements internal server error response has a 4xx status code
|
||
|
func (o *PostFinancialStatementsInternalServerError) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this post financial statements internal server error response has a 5xx status code
|
||
|
func (o *PostFinancialStatementsInternalServerError) IsServerError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this post financial statements internal server error response a status code equal to that given
|
||
|
func (o *PostFinancialStatementsInternalServerError) IsCode(code int) bool {
|
||
|
return code == 500
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the post financial statements internal server error response
|
||
|
func (o *PostFinancialStatementsInternalServerError) Code() int {
|
||
|
return 500
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[POST /financialstatements][%d] postFinancialStatementsInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsInternalServerError) String() string {
|
||
|
return fmt.Sprintf("[POST /financialstatements][%d] postFinancialStatementsInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsInternalServerError) GetPayload() *sfgate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PostFinancialStatementsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(sfgate_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|