299 lines
8.6 KiB
Go
299 lines
8.6 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 ingest
|
||
|
|
||
|
// 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"
|
||
|
)
|
||
|
|
||
|
// GetRenderIngestsReader is a Reader for the GetRenderIngests structure.
|
||
|
type GetRenderIngestsReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *GetRenderIngestsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 200:
|
||
|
result := NewGetRenderIngestsOK()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 401:
|
||
|
result := NewGetRenderIngestsUnauthorized()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 403:
|
||
|
result := NewGetRenderIngestsForbidden()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 404:
|
||
|
result := NewGetRenderIngestsNotFound()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 422:
|
||
|
result := NewGetRenderIngestsUnprocessableEntity()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewGetRenderIngestsInternalServerError()
|
||
|
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())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewGetRenderIngestsOK creates a GetRenderIngestsOK with default headers values
|
||
|
func NewGetRenderIngestsOK() *GetRenderIngestsOK {
|
||
|
return &GetRenderIngestsOK{}
|
||
|
}
|
||
|
|
||
|
/*GetRenderIngestsOK handles this case with default header values.
|
||
|
|
||
|
Rendered documents response
|
||
|
*/
|
||
|
type GetRenderIngestsOK struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *render_models.DocumentResponse
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsOK) Error() string {
|
||
|
return fmt.Sprintf("[GET /ingests][%d] getRenderIngestsOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsOK) GetPayload() *render_models.DocumentResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsOK) 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
|
||
|
}
|
||
|
|
||
|
// NewGetRenderIngestsUnauthorized creates a GetRenderIngestsUnauthorized with default headers values
|
||
|
func NewGetRenderIngestsUnauthorized() *GetRenderIngestsUnauthorized {
|
||
|
return &GetRenderIngestsUnauthorized{}
|
||
|
}
|
||
|
|
||
|
/*GetRenderIngestsUnauthorized handles this case with default header values.
|
||
|
|
||
|
Access unauthorized, invalid API-KEY was used
|
||
|
*/
|
||
|
type GetRenderIngestsUnauthorized struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *render_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsUnauthorized) Error() string {
|
||
|
return fmt.Sprintf("[GET /ingests][%d] getRenderIngestsUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsUnauthorized) GetPayload() *render_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsUnauthorized) 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
|
||
|
}
|
||
|
|
||
|
// NewGetRenderIngestsForbidden creates a GetRenderIngestsForbidden with default headers values
|
||
|
func NewGetRenderIngestsForbidden() *GetRenderIngestsForbidden {
|
||
|
return &GetRenderIngestsForbidden{}
|
||
|
}
|
||
|
|
||
|
/*GetRenderIngestsForbidden handles this case with default header values.
|
||
|
|
||
|
Access forbidden, account lacks access
|
||
|
*/
|
||
|
type GetRenderIngestsForbidden struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *render_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsForbidden) Error() string {
|
||
|
return fmt.Sprintf("[GET /ingests][%d] getRenderIngestsForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsForbidden) GetPayload() *render_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsForbidden) 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
|
||
|
}
|
||
|
|
||
|
// NewGetRenderIngestsNotFound creates a GetRenderIngestsNotFound with default headers values
|
||
|
func NewGetRenderIngestsNotFound() *GetRenderIngestsNotFound {
|
||
|
return &GetRenderIngestsNotFound{}
|
||
|
}
|
||
|
|
||
|
/*GetRenderIngestsNotFound handles this case with default header values.
|
||
|
|
||
|
Resource was not found
|
||
|
*/
|
||
|
type GetRenderIngestsNotFound struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *render_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsNotFound) Error() string {
|
||
|
return fmt.Sprintf("[GET /ingests][%d] getRenderIngestsNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsNotFound) GetPayload() *render_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsNotFound) 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
|
||
|
}
|
||
|
|
||
|
// NewGetRenderIngestsUnprocessableEntity creates a GetRenderIngestsUnprocessableEntity with default headers values
|
||
|
func NewGetRenderIngestsUnprocessableEntity() *GetRenderIngestsUnprocessableEntity {
|
||
|
return &GetRenderIngestsUnprocessableEntity{}
|
||
|
}
|
||
|
|
||
|
/*GetRenderIngestsUnprocessableEntity handles this case with default header values.
|
||
|
|
||
|
Unprocessable Entity, likely a bad parameter
|
||
|
*/
|
||
|
type GetRenderIngestsUnprocessableEntity struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *render_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsUnprocessableEntity) Error() string {
|
||
|
return fmt.Sprintf("[GET /ingests][%d] getRenderIngestsUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsUnprocessableEntity) GetPayload() *render_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsUnprocessableEntity) 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
|
||
|
}
|
||
|
|
||
|
// NewGetRenderIngestsInternalServerError creates a GetRenderIngestsInternalServerError with default headers values
|
||
|
func NewGetRenderIngestsInternalServerError() *GetRenderIngestsInternalServerError {
|
||
|
return &GetRenderIngestsInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/*GetRenderIngestsInternalServerError handles this case with default header values.
|
||
|
|
||
|
Server Internal Error
|
||
|
*/
|
||
|
type GetRenderIngestsInternalServerError struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *render_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[GET /ingests][%d] getRenderIngestsInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsInternalServerError) GetPayload() *render_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetRenderIngestsInternalServerError) 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
|
||
|
}
|