// 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 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"

	"code.tnxs.net/vernonkeenan/lib/api/stash/stash_models"
)

// 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{}
}

/*
PostPdfsOK describes a response with status code 200, with default header values.

Rendered documents response
*/
type PostPdfsOK struct {
	Payload *stash_models.DocumentResponse
}

// 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
}

func (o *PostPdfsOK) Error() string {
	return fmt.Sprintf("[POST /pdfs][%d] postPdfsOK  %+v", 200, o.Payload)
}

func (o *PostPdfsOK) String() 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{}
}

/*
PostPdfsUnauthorized describes a response with status code 401, with default header values.

Access Unauthorized, invalid API-KEY was used
*/
type PostPdfsUnauthorized struct {
	Payload *stash_models.Error
}

// 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
}

func (o *PostPdfsUnauthorized) Error() string {
	return fmt.Sprintf("[POST /pdfs][%d] postPdfsUnauthorized  %+v", 401, o.Payload)
}

func (o *PostPdfsUnauthorized) String() 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{}
}

/*
PostPdfsForbidden describes a response with status code 403, with default header values.

Access forbidden, account lacks access
*/
type PostPdfsForbidden struct {
	Payload *stash_models.Error
}

// 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
}

func (o *PostPdfsForbidden) Error() string {
	return fmt.Sprintf("[POST /pdfs][%d] postPdfsForbidden  %+v", 403, o.Payload)
}

func (o *PostPdfsForbidden) String() 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{}
}

/*
PostPdfsNotFound describes a response with status code 404, with default header values.

Resource was not found
*/
type PostPdfsNotFound struct {
	Payload *stash_models.Error
}

// 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
}

func (o *PostPdfsNotFound) Error() string {
	return fmt.Sprintf("[POST /pdfs][%d] postPdfsNotFound  %+v", 404, o.Payload)
}

func (o *PostPdfsNotFound) String() 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{}
}

/*
PostPdfsUnprocessableEntity describes a response with status code 422, with default header values.

Unprocessable Entity, likely a bad parameter
*/
type PostPdfsUnprocessableEntity struct {
	Payload *stash_models.Error
}

// 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
}

func (o *PostPdfsUnprocessableEntity) Error() string {
	return fmt.Sprintf("[POST /pdfs][%d] postPdfsUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *PostPdfsUnprocessableEntity) String() 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{}
}

/*
PostPdfsInternalServerError describes a response with status code 500, with default header values.

Server Internal Error
*/
type PostPdfsInternalServerError struct {
	Payload *stash_models.Error
}

// 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
}

func (o *PostPdfsInternalServerError) Error() string {
	return fmt.Sprintf("[POST /pdfs][%d] postPdfsInternalServerError  %+v", 500, o.Payload)
}

func (o *PostPdfsInternalServerError) String() 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
}
