lib/api/research/research_client/financial_statements/put_financial_statement_res...

523 lines
17 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/research/research_models"
)
// PutFinancialStatementReader is a Reader for the PutFinancialStatement structure.
type PutFinancialStatementReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PutFinancialStatementReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPutFinancialStatementOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPutFinancialStatementUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPutFinancialStatementForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPutFinancialStatementNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPutFinancialStatementUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPutFinancialStatementInternalServerError()
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())
}
}
// NewPutFinancialStatementOK creates a PutFinancialStatementOK with default headers values
func NewPutFinancialStatementOK() *PutFinancialStatementOK {
return &PutFinancialStatementOK{}
}
/*
PutFinancialStatementOK describes a response with status code 200, with default header values.
Response with FinancialStatement objects
*/
type PutFinancialStatementOK struct {
Payload *research_models.FinancialStatementResponse
}
// IsSuccess returns true when this put financial statement o k response has a 2xx status code
func (o *PutFinancialStatementOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this put financial statement o k response has a 3xx status code
func (o *PutFinancialStatementOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this put financial statement o k response has a 4xx status code
func (o *PutFinancialStatementOK) IsClientError() bool {
return false
}
// IsServerError returns true when this put financial statement o k response has a 5xx status code
func (o *PutFinancialStatementOK) IsServerError() bool {
return false
}
// IsCode returns true when this put financial statement o k response a status code equal to that given
func (o *PutFinancialStatementOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the put financial statement o k response
func (o *PutFinancialStatementOK) Code() int {
return 200
}
func (o *PutFinancialStatementOK) Error() string {
return fmt.Sprintf("[PUT /financialstatements][%d] putFinancialStatementOK %+v", 200, o.Payload)
}
func (o *PutFinancialStatementOK) String() string {
return fmt.Sprintf("[PUT /financialstatements][%d] putFinancialStatementOK %+v", 200, o.Payload)
}
func (o *PutFinancialStatementOK) GetPayload() *research_models.FinancialStatementResponse {
return o.Payload
}
func (o *PutFinancialStatementOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(research_models.FinancialStatementResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPutFinancialStatementUnauthorized creates a PutFinancialStatementUnauthorized with default headers values
func NewPutFinancialStatementUnauthorized() *PutFinancialStatementUnauthorized {
return &PutFinancialStatementUnauthorized{}
}
/*
PutFinancialStatementUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type PutFinancialStatementUnauthorized struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
// IsSuccess returns true when this put financial statement unauthorized response has a 2xx status code
func (o *PutFinancialStatementUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put financial statement unauthorized response has a 3xx status code
func (o *PutFinancialStatementUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this put financial statement unauthorized response has a 4xx status code
func (o *PutFinancialStatementUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this put financial statement unauthorized response has a 5xx status code
func (o *PutFinancialStatementUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this put financial statement unauthorized response a status code equal to that given
func (o *PutFinancialStatementUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the put financial statement unauthorized response
func (o *PutFinancialStatementUnauthorized) Code() int {
return 401
}
func (o *PutFinancialStatementUnauthorized) Error() string {
return fmt.Sprintf("[PUT /financialstatements][%d] putFinancialStatementUnauthorized %+v", 401, o.Payload)
}
func (o *PutFinancialStatementUnauthorized) String() string {
return fmt.Sprintf("[PUT /financialstatements][%d] putFinancialStatementUnauthorized %+v", 401, o.Payload)
}
func (o *PutFinancialStatementUnauthorized) GetPayload() *research_models.Error {
return o.Payload
}
func (o *PutFinancialStatementUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(research_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPutFinancialStatementForbidden creates a PutFinancialStatementForbidden with default headers values
func NewPutFinancialStatementForbidden() *PutFinancialStatementForbidden {
return &PutFinancialStatementForbidden{}
}
/*
PutFinancialStatementForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PutFinancialStatementForbidden struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
// IsSuccess returns true when this put financial statement forbidden response has a 2xx status code
func (o *PutFinancialStatementForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put financial statement forbidden response has a 3xx status code
func (o *PutFinancialStatementForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this put financial statement forbidden response has a 4xx status code
func (o *PutFinancialStatementForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this put financial statement forbidden response has a 5xx status code
func (o *PutFinancialStatementForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this put financial statement forbidden response a status code equal to that given
func (o *PutFinancialStatementForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the put financial statement forbidden response
func (o *PutFinancialStatementForbidden) Code() int {
return 403
}
func (o *PutFinancialStatementForbidden) Error() string {
return fmt.Sprintf("[PUT /financialstatements][%d] putFinancialStatementForbidden %+v", 403, o.Payload)
}
func (o *PutFinancialStatementForbidden) String() string {
return fmt.Sprintf("[PUT /financialstatements][%d] putFinancialStatementForbidden %+v", 403, o.Payload)
}
func (o *PutFinancialStatementForbidden) GetPayload() *research_models.Error {
return o.Payload
}
func (o *PutFinancialStatementForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(research_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPutFinancialStatementNotFound creates a PutFinancialStatementNotFound with default headers values
func NewPutFinancialStatementNotFound() *PutFinancialStatementNotFound {
return &PutFinancialStatementNotFound{}
}
/*
PutFinancialStatementNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PutFinancialStatementNotFound struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
// IsSuccess returns true when this put financial statement not found response has a 2xx status code
func (o *PutFinancialStatementNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put financial statement not found response has a 3xx status code
func (o *PutFinancialStatementNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this put financial statement not found response has a 4xx status code
func (o *PutFinancialStatementNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this put financial statement not found response has a 5xx status code
func (o *PutFinancialStatementNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this put financial statement not found response a status code equal to that given
func (o *PutFinancialStatementNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the put financial statement not found response
func (o *PutFinancialStatementNotFound) Code() int {
return 404
}
func (o *PutFinancialStatementNotFound) Error() string {
return fmt.Sprintf("[PUT /financialstatements][%d] putFinancialStatementNotFound %+v", 404, o.Payload)
}
func (o *PutFinancialStatementNotFound) String() string {
return fmt.Sprintf("[PUT /financialstatements][%d] putFinancialStatementNotFound %+v", 404, o.Payload)
}
func (o *PutFinancialStatementNotFound) GetPayload() *research_models.Error {
return o.Payload
}
func (o *PutFinancialStatementNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(research_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPutFinancialStatementUnprocessableEntity creates a PutFinancialStatementUnprocessableEntity with default headers values
func NewPutFinancialStatementUnprocessableEntity() *PutFinancialStatementUnprocessableEntity {
return &PutFinancialStatementUnprocessableEntity{}
}
/*
PutFinancialStatementUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PutFinancialStatementUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
// IsSuccess returns true when this put financial statement unprocessable entity response has a 2xx status code
func (o *PutFinancialStatementUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put financial statement unprocessable entity response has a 3xx status code
func (o *PutFinancialStatementUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this put financial statement unprocessable entity response has a 4xx status code
func (o *PutFinancialStatementUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this put financial statement unprocessable entity response has a 5xx status code
func (o *PutFinancialStatementUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this put financial statement unprocessable entity response a status code equal to that given
func (o *PutFinancialStatementUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the put financial statement unprocessable entity response
func (o *PutFinancialStatementUnprocessableEntity) Code() int {
return 422
}
func (o *PutFinancialStatementUnprocessableEntity) Error() string {
return fmt.Sprintf("[PUT /financialstatements][%d] putFinancialStatementUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutFinancialStatementUnprocessableEntity) String() string {
return fmt.Sprintf("[PUT /financialstatements][%d] putFinancialStatementUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutFinancialStatementUnprocessableEntity) GetPayload() *research_models.Error {
return o.Payload
}
func (o *PutFinancialStatementUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(research_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPutFinancialStatementInternalServerError creates a PutFinancialStatementInternalServerError with default headers values
func NewPutFinancialStatementInternalServerError() *PutFinancialStatementInternalServerError {
return &PutFinancialStatementInternalServerError{}
}
/*
PutFinancialStatementInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PutFinancialStatementInternalServerError struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
// IsSuccess returns true when this put financial statement internal server error response has a 2xx status code
func (o *PutFinancialStatementInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put financial statement internal server error response has a 3xx status code
func (o *PutFinancialStatementInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this put financial statement internal server error response has a 4xx status code
func (o *PutFinancialStatementInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this put financial statement internal server error response has a 5xx status code
func (o *PutFinancialStatementInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this put financial statement internal server error response a status code equal to that given
func (o *PutFinancialStatementInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the put financial statement internal server error response
func (o *PutFinancialStatementInternalServerError) Code() int {
return 500
}
func (o *PutFinancialStatementInternalServerError) Error() string {
return fmt.Sprintf("[PUT /financialstatements][%d] putFinancialStatementInternalServerError %+v", 500, o.Payload)
}
func (o *PutFinancialStatementInternalServerError) String() string {
return fmt.Sprintf("[PUT /financialstatements][%d] putFinancialStatementInternalServerError %+v", 500, o.Payload)
}
func (o *PutFinancialStatementInternalServerError) GetPayload() *research_models.Error {
return o.Payload
}
func (o *PutFinancialStatementInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(research_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}