299 lines
8.7 KiB
Go
299 lines
8.7 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 account
|
||
|
|
||
|
// 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/render/render_models"
|
||
|
)
|
||
|
|
||
|
// GetRenderAccountReader is a Reader for the GetRenderAccount structure.
|
||
|
type GetRenderAccountReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *GetRenderAccountReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 200:
|
||
|
result := NewGetRenderAccountOK()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 401:
|
||
|
result := NewGetRenderAccountUnauthorized()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 403:
|
||
|
result := NewGetRenderAccountForbidden()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 404:
|
||
|
result := NewGetRenderAccountNotFound()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 422:
|
||
|
result := NewGetRenderAccountUnprocessableEntity()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewGetRenderAccountInternalServerError()
|
||
|
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())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewGetRenderAccountOK creates a GetRenderAccountOK with default headers values
|
||
|
func NewGetRenderAccountOK() *GetRenderAccountOK {
|
||
|
return &GetRenderAccountOK{}
|
||
|
}
|
||
|
|
||
|
/*GetRenderAccountOK handles this case with default header values.
|
||
|
|
||
|
Rendered documents response
|
||
|
*/
|
||
|
type GetRenderAccountOK struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *render_models.DocumentResponse
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountOK) Error() string {
|
||
|
return fmt.Sprintf("[GET /accounts][%d] getRenderAccountOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountOK) GetPayload() *render_models.DocumentResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
// response header Access-Control-Allow-Origin
|
||
|
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
|
||
|
|
||
|
o.Payload = new(render_models.DocumentResponse)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewGetRenderAccountUnauthorized creates a GetRenderAccountUnauthorized with default headers values
|
||
|
func NewGetRenderAccountUnauthorized() *GetRenderAccountUnauthorized {
|
||
|
return &GetRenderAccountUnauthorized{}
|
||
|
}
|
||
|
|
||
|
/*GetRenderAccountUnauthorized handles this case with default header values.
|
||
|
|
||
|
Access unauthorized, invalid API-KEY was used
|
||
|
*/
|
||
|
type GetRenderAccountUnauthorized struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *render_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountUnauthorized) Error() string {
|
||
|
return fmt.Sprintf("[GET /accounts][%d] getRenderAccountUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountUnauthorized) GetPayload() *render_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
// response header Access-Control-Allow-Origin
|
||
|
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
|
||
|
|
||
|
o.Payload = new(render_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewGetRenderAccountForbidden creates a GetRenderAccountForbidden with default headers values
|
||
|
func NewGetRenderAccountForbidden() *GetRenderAccountForbidden {
|
||
|
return &GetRenderAccountForbidden{}
|
||
|
}
|
||
|
|
||
|
/*GetRenderAccountForbidden handles this case with default header values.
|
||
|
|
||
|
Access forbidden, account lacks access
|
||
|
*/
|
||
|
type GetRenderAccountForbidden struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *render_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountForbidden) Error() string {
|
||
|
return fmt.Sprintf("[GET /accounts][%d] getRenderAccountForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountForbidden) GetPayload() *render_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
// response header Access-Control-Allow-Origin
|
||
|
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
|
||
|
|
||
|
o.Payload = new(render_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewGetRenderAccountNotFound creates a GetRenderAccountNotFound with default headers values
|
||
|
func NewGetRenderAccountNotFound() *GetRenderAccountNotFound {
|
||
|
return &GetRenderAccountNotFound{}
|
||
|
}
|
||
|
|
||
|
/*GetRenderAccountNotFound handles this case with default header values.
|
||
|
|
||
|
Resource was not found
|
||
|
*/
|
||
|
type GetRenderAccountNotFound struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *render_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountNotFound) Error() string {
|
||
|
return fmt.Sprintf("[GET /accounts][%d] getRenderAccountNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountNotFound) GetPayload() *render_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
// response header Access-Control-Allow-Origin
|
||
|
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
|
||
|
|
||
|
o.Payload = new(render_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewGetRenderAccountUnprocessableEntity creates a GetRenderAccountUnprocessableEntity with default headers values
|
||
|
func NewGetRenderAccountUnprocessableEntity() *GetRenderAccountUnprocessableEntity {
|
||
|
return &GetRenderAccountUnprocessableEntity{}
|
||
|
}
|
||
|
|
||
|
/*GetRenderAccountUnprocessableEntity handles this case with default header values.
|
||
|
|
||
|
Unprocessable Entity, likely a bad parameter
|
||
|
*/
|
||
|
type GetRenderAccountUnprocessableEntity struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *render_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountUnprocessableEntity) Error() string {
|
||
|
return fmt.Sprintf("[GET /accounts][%d] getRenderAccountUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountUnprocessableEntity) GetPayload() *render_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
// response header Access-Control-Allow-Origin
|
||
|
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
|
||
|
|
||
|
o.Payload = new(render_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewGetRenderAccountInternalServerError creates a GetRenderAccountInternalServerError with default headers values
|
||
|
func NewGetRenderAccountInternalServerError() *GetRenderAccountInternalServerError {
|
||
|
return &GetRenderAccountInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/*GetRenderAccountInternalServerError handles this case with default header values.
|
||
|
|
||
|
Server Internal Error
|
||
|
*/
|
||
|
type GetRenderAccountInternalServerError struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *render_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[GET /accounts][%d] getRenderAccountInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountInternalServerError) GetPayload() *render_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderAccountInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
// response header Access-Control-Allow-Origin
|
||
|
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
|
||
|
|
||
|
o.Payload = new(render_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|