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 stash_pdf
// 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/stash/stash_models"
2021-01-08 17:40:28 +00:00
)
// PostPdfsReader is a Reader for the PostPdfs structure.
type PostPdfsReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * PostPdfsReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewPostPdfsOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewPostPdfsUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewPostPdfsForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewPostPdfsNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewPostPdfsUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewPostPdfsInternalServerError ( )
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
}
}
// NewPostPdfsOK creates a PostPdfsOK with default headers values
func NewPostPdfsOK ( ) * PostPdfsOK {
return & PostPdfsOK { }
}
2021-02-09 16:56:57 +00:00
/ * PostPdfsOK describes a response with status code 200 , with default header values .
2021-01-08 17:40:28 +00:00
Rendered documents response
* /
type PostPdfsOK struct {
Payload * stash_models . DocumentResponse
}
func ( o * PostPdfsOK ) Error ( ) string {
return fmt . Sprintf ( "[POST /pdfs][%d] postPdfsOK %+v" , 200 , o . Payload )
}
func ( o * PostPdfsOK ) GetPayload ( ) * stash_models . DocumentResponse {
return o . Payload
}
func ( o * PostPdfsOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( stash_models . DocumentResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewPostPdfsUnauthorized creates a PostPdfsUnauthorized with default headers values
func NewPostPdfsUnauthorized ( ) * PostPdfsUnauthorized {
return & PostPdfsUnauthorized { }
}
2021-02-09 16:56:57 +00:00
/ * PostPdfsUnauthorized 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 PostPdfsUnauthorized struct {
Payload * stash_models . Error
}
func ( o * PostPdfsUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[POST /pdfs][%d] postPdfsUnauthorized %+v" , 401 , o . Payload )
}
func ( o * PostPdfsUnauthorized ) GetPayload ( ) * stash_models . Error {
return o . Payload
}
func ( o * PostPdfsUnauthorized ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( stash_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewPostPdfsForbidden creates a PostPdfsForbidden with default headers values
func NewPostPdfsForbidden ( ) * PostPdfsForbidden {
return & PostPdfsForbidden { }
}
2021-02-09 16:56:57 +00:00
/ * PostPdfsForbidden 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 PostPdfsForbidden struct {
Payload * stash_models . Error
}
func ( o * PostPdfsForbidden ) Error ( ) string {
return fmt . Sprintf ( "[POST /pdfs][%d] postPdfsForbidden %+v" , 403 , o . Payload )
}
func ( o * PostPdfsForbidden ) GetPayload ( ) * stash_models . Error {
return o . Payload
}
func ( o * PostPdfsForbidden ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( stash_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewPostPdfsNotFound creates a PostPdfsNotFound with default headers values
func NewPostPdfsNotFound ( ) * PostPdfsNotFound {
return & PostPdfsNotFound { }
}
2021-02-09 16:56:57 +00:00
/ * PostPdfsNotFound describes a response with status code 404 , with default header values .
2021-01-08 17:40:28 +00:00
Resource was not found
* /
type PostPdfsNotFound struct {
Payload * stash_models . Error
}
func ( o * PostPdfsNotFound ) Error ( ) string {
return fmt . Sprintf ( "[POST /pdfs][%d] postPdfsNotFound %+v" , 404 , o . Payload )
}
func ( o * PostPdfsNotFound ) GetPayload ( ) * stash_models . Error {
return o . Payload
}
func ( o * PostPdfsNotFound ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( stash_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewPostPdfsUnprocessableEntity creates a PostPdfsUnprocessableEntity with default headers values
func NewPostPdfsUnprocessableEntity ( ) * PostPdfsUnprocessableEntity {
return & PostPdfsUnprocessableEntity { }
}
2021-02-09 16:56:57 +00:00
/ * PostPdfsUnprocessableEntity describes a response with status code 422 , with default header values .
2021-01-08 17:40:28 +00:00
Unprocessable Entity , likely a bad parameter
* /
type PostPdfsUnprocessableEntity struct {
Payload * stash_models . Error
}
func ( o * PostPdfsUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[POST /pdfs][%d] postPdfsUnprocessableEntity %+v" , 422 , o . Payload )
}
func ( o * PostPdfsUnprocessableEntity ) GetPayload ( ) * stash_models . Error {
return o . Payload
}
func ( o * PostPdfsUnprocessableEntity ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( stash_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewPostPdfsInternalServerError creates a PostPdfsInternalServerError with default headers values
func NewPostPdfsInternalServerError ( ) * PostPdfsInternalServerError {
return & PostPdfsInternalServerError { }
}
2021-02-09 16:56:57 +00:00
/ * PostPdfsInternalServerError describes a response with status code 500 , with default header values .
2021-01-08 17:40:28 +00:00
Server Internal Error
* /
type PostPdfsInternalServerError struct {
Payload * stash_models . Error
}
func ( o * PostPdfsInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[POST /pdfs][%d] postPdfsInternalServerError %+v" , 500 , o . Payload )
}
func ( o * PostPdfsInternalServerError ) GetPayload ( ) * stash_models . Error {
return o . Payload
}
func ( o * PostPdfsInternalServerError ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( stash_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}