lib/api/stash/stash_client/stash_pdf/post_pdfs_responses.go

478 lines
14 KiB
Go
Raw Normal View History

2021-07-31 03:05:02 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-08-05 19:37:53 +00:00
// (c) 2012-2020 by Taxnexus, Inc.
2021-07-31 03:05:02 +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-08-01 00:08:25 +00:00
"code.tnxs.net/vernonkeenan/lib/api/stash/stash_models"
2021-07-31 03:05:02 +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:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewPostPdfsOK creates a PostPdfsOK with default headers values
func NewPostPdfsOK() *PostPdfsOK {
return &PostPdfsOK{}
}
2023-03-22 20:49:01 +00:00
/*
PostPdfsOK describes a response with status code 200, with default header values.
2021-07-31 03:05:02 +00:00
Rendered documents response
*/
type PostPdfsOK struct {
Payload *stash_models.DocumentResponse
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post pdfs o k response has a 2xx status code
func (o *PostPdfsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post pdfs o k response has a 3xx status code
func (o *PostPdfsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this post pdfs o k response has a 4xx status code
func (o *PostPdfsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this post pdfs o k response has a 5xx status code
func (o *PostPdfsOK) IsServerError() bool {
return false
}
// IsCode returns true when this post pdfs o k response a status code equal to that given
func (o *PostPdfsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the post pdfs o k response
func (o *PostPdfsOK) Code() int {
return 200
}
2021-07-31 03:05:02 +00:00
func (o *PostPdfsOK) Error() string {
return fmt.Sprintf("[POST /pdfs][%d] postPdfsOK %+v", 200, o.Payload)
}
2023-03-22 20:49:01 +00:00
func (o *PostPdfsOK) String() string {
return fmt.Sprintf("[POST /pdfs][%d] postPdfsOK %+v", 200, o.Payload)
}
2021-07-31 03:05:02 +00:00
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{}
}
2023-03-22 20:49:01 +00:00
/*
PostPdfsUnauthorized describes a response with status code 401, with default header values.
2021-07-31 03:05:02 +00:00
Access Unauthorized, invalid API-KEY was used
*/
type PostPdfsUnauthorized struct {
Payload *stash_models.Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post pdfs unauthorized response has a 2xx status code
func (o *PostPdfsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post pdfs unauthorized response has a 3xx status code
func (o *PostPdfsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post pdfs unauthorized response has a 4xx status code
func (o *PostPdfsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post pdfs unauthorized response has a 5xx status code
func (o *PostPdfsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post pdfs unauthorized response a status code equal to that given
func (o *PostPdfsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post pdfs unauthorized response
func (o *PostPdfsUnauthorized) Code() int {
return 401
}
2021-07-31 03:05:02 +00:00
func (o *PostPdfsUnauthorized) Error() string {
return fmt.Sprintf("[POST /pdfs][%d] postPdfsUnauthorized %+v", 401, o.Payload)
}
2023-03-22 20:49:01 +00:00
func (o *PostPdfsUnauthorized) String() string {
return fmt.Sprintf("[POST /pdfs][%d] postPdfsUnauthorized %+v", 401, o.Payload)
}
2021-07-31 03:05:02 +00:00
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{}
}
2023-03-22 20:49:01 +00:00
/*
PostPdfsForbidden describes a response with status code 403, with default header values.
2021-07-31 03:05:02 +00:00
Access forbidden, account lacks access
*/
type PostPdfsForbidden struct {
Payload *stash_models.Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post pdfs forbidden response has a 2xx status code
func (o *PostPdfsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post pdfs forbidden response has a 3xx status code
func (o *PostPdfsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post pdfs forbidden response has a 4xx status code
func (o *PostPdfsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post pdfs forbidden response has a 5xx status code
func (o *PostPdfsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post pdfs forbidden response a status code equal to that given
func (o *PostPdfsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post pdfs forbidden response
func (o *PostPdfsForbidden) Code() int {
return 403
}
2021-07-31 03:05:02 +00:00
func (o *PostPdfsForbidden) Error() string {
return fmt.Sprintf("[POST /pdfs][%d] postPdfsForbidden %+v", 403, o.Payload)
}
2023-03-22 20:49:01 +00:00
func (o *PostPdfsForbidden) String() string {
return fmt.Sprintf("[POST /pdfs][%d] postPdfsForbidden %+v", 403, o.Payload)
}
2021-07-31 03:05:02 +00:00
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{}
}
2023-03-22 20:49:01 +00:00
/*
PostPdfsNotFound describes a response with status code 404, with default header values.
2021-07-31 03:05:02 +00:00
Resource was not found
*/
type PostPdfsNotFound struct {
Payload *stash_models.Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post pdfs not found response has a 2xx status code
func (o *PostPdfsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post pdfs not found response has a 3xx status code
func (o *PostPdfsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post pdfs not found response has a 4xx status code
func (o *PostPdfsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post pdfs not found response has a 5xx status code
func (o *PostPdfsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post pdfs not found response a status code equal to that given
func (o *PostPdfsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post pdfs not found response
func (o *PostPdfsNotFound) Code() int {
return 404
}
2021-07-31 03:05:02 +00:00
func (o *PostPdfsNotFound) Error() string {
return fmt.Sprintf("[POST /pdfs][%d] postPdfsNotFound %+v", 404, o.Payload)
}
2023-03-22 20:49:01 +00:00
func (o *PostPdfsNotFound) String() string {
return fmt.Sprintf("[POST /pdfs][%d] postPdfsNotFound %+v", 404, o.Payload)
}
2021-07-31 03:05:02 +00:00
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{}
}
2023-03-22 20:49:01 +00:00
/*
PostPdfsUnprocessableEntity describes a response with status code 422, with default header values.
2021-07-31 03:05:02 +00:00
Unprocessable Entity, likely a bad parameter
*/
type PostPdfsUnprocessableEntity struct {
Payload *stash_models.Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post pdfs unprocessable entity response has a 2xx status code
func (o *PostPdfsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post pdfs unprocessable entity response has a 3xx status code
func (o *PostPdfsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post pdfs unprocessable entity response has a 4xx status code
func (o *PostPdfsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post pdfs unprocessable entity response has a 5xx status code
func (o *PostPdfsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post pdfs unprocessable entity response a status code equal to that given
func (o *PostPdfsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post pdfs unprocessable entity response
func (o *PostPdfsUnprocessableEntity) Code() int {
return 422
}
2021-07-31 03:05:02 +00:00
func (o *PostPdfsUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /pdfs][%d] postPdfsUnprocessableEntity %+v", 422, o.Payload)
}
2023-03-22 20:49:01 +00:00
func (o *PostPdfsUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /pdfs][%d] postPdfsUnprocessableEntity %+v", 422, o.Payload)
}
2021-07-31 03:05:02 +00:00
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{}
}
2023-03-22 20:49:01 +00:00
/*
PostPdfsInternalServerError describes a response with status code 500, with default header values.
2021-07-31 03:05:02 +00:00
Server Internal Error
*/
type PostPdfsInternalServerError struct {
Payload *stash_models.Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post pdfs internal server error response has a 2xx status code
func (o *PostPdfsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post pdfs internal server error response has a 3xx status code
func (o *PostPdfsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post pdfs internal server error response has a 4xx status code
func (o *PostPdfsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post pdfs internal server error response has a 5xx status code
func (o *PostPdfsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post pdfs internal server error response a status code equal to that given
func (o *PostPdfsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post pdfs internal server error response
func (o *PostPdfsInternalServerError) Code() int {
return 500
}
2021-07-31 03:05:02 +00:00
func (o *PostPdfsInternalServerError) Error() string {
return fmt.Sprintf("[POST /pdfs][%d] postPdfsInternalServerError %+v", 500, o.Payload)
}
2023-03-22 20:49:01 +00:00
func (o *PostPdfsInternalServerError) String() string {
return fmt.Sprintf("[POST /pdfs][%d] postPdfsInternalServerError %+v", 500, o.Payload)
}
2021-07-31 03:05:02 +00:00
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
}