lib/api/members/members_client/research_projects/get_research_project_docume...

487 lines
17 KiB
Go

// 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 research_projects
// 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/members/members_models"
)
// GetResearchProjectDocumentsReader is a Reader for the GetResearchProjectDocuments structure.
type GetResearchProjectDocumentsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetResearchProjectDocumentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetResearchProjectDocumentsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetResearchProjectDocumentsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetResearchProjectDocumentsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetResearchProjectDocumentsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetResearchProjectDocumentsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetResearchProjectDocumentsInternalServerError()
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())
}
}
// NewGetResearchProjectDocumentsOK creates a GetResearchProjectDocumentsOK with default headers values
func NewGetResearchProjectDocumentsOK() *GetResearchProjectDocumentsOK {
return &GetResearchProjectDocumentsOK{}
}
/*
GetResearchProjectDocumentsOK describes a response with status code 200, with default header values.
ResearchProjectDocument Response Object
*/
type GetResearchProjectDocumentsOK struct {
Payload *members_models.ResearchProjectDocumentResponse
}
// IsSuccess returns true when this get research project documents o k response has a 2xx status code
func (o *GetResearchProjectDocumentsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get research project documents o k response has a 3xx status code
func (o *GetResearchProjectDocumentsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get research project documents o k response has a 4xx status code
func (o *GetResearchProjectDocumentsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get research project documents o k response has a 5xx status code
func (o *GetResearchProjectDocumentsOK) IsServerError() bool {
return false
}
// IsCode returns true when this get research project documents o k response a status code equal to that given
func (o *GetResearchProjectDocumentsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get research project documents o k response
func (o *GetResearchProjectDocumentsOK) Code() int {
return 200
}
func (o *GetResearchProjectDocumentsOK) Error() string {
return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsOK %+v", 200, o.Payload)
}
func (o *GetResearchProjectDocumentsOK) String() string {
return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsOK %+v", 200, o.Payload)
}
func (o *GetResearchProjectDocumentsOK) GetPayload() *members_models.ResearchProjectDocumentResponse {
return o.Payload
}
func (o *GetResearchProjectDocumentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.ResearchProjectDocumentResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetResearchProjectDocumentsUnauthorized creates a GetResearchProjectDocumentsUnauthorized with default headers values
func NewGetResearchProjectDocumentsUnauthorized() *GetResearchProjectDocumentsUnauthorized {
return &GetResearchProjectDocumentsUnauthorized{}
}
/*
GetResearchProjectDocumentsUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetResearchProjectDocumentsUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get research project documents unauthorized response has a 2xx status code
func (o *GetResearchProjectDocumentsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get research project documents unauthorized response has a 3xx status code
func (o *GetResearchProjectDocumentsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get research project documents unauthorized response has a 4xx status code
func (o *GetResearchProjectDocumentsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get research project documents unauthorized response has a 5xx status code
func (o *GetResearchProjectDocumentsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get research project documents unauthorized response a status code equal to that given
func (o *GetResearchProjectDocumentsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get research project documents unauthorized response
func (o *GetResearchProjectDocumentsUnauthorized) Code() int {
return 401
}
func (o *GetResearchProjectDocumentsUnauthorized) Error() string {
return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsUnauthorized %+v", 401, o.Payload)
}
func (o *GetResearchProjectDocumentsUnauthorized) String() string {
return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsUnauthorized %+v", 401, o.Payload)
}
func (o *GetResearchProjectDocumentsUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetResearchProjectDocumentsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetResearchProjectDocumentsForbidden creates a GetResearchProjectDocumentsForbidden with default headers values
func NewGetResearchProjectDocumentsForbidden() *GetResearchProjectDocumentsForbidden {
return &GetResearchProjectDocumentsForbidden{}
}
/*
GetResearchProjectDocumentsForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetResearchProjectDocumentsForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this get research project documents forbidden response has a 2xx status code
func (o *GetResearchProjectDocumentsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get research project documents forbidden response has a 3xx status code
func (o *GetResearchProjectDocumentsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get research project documents forbidden response has a 4xx status code
func (o *GetResearchProjectDocumentsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get research project documents forbidden response has a 5xx status code
func (o *GetResearchProjectDocumentsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get research project documents forbidden response a status code equal to that given
func (o *GetResearchProjectDocumentsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get research project documents forbidden response
func (o *GetResearchProjectDocumentsForbidden) Code() int {
return 403
}
func (o *GetResearchProjectDocumentsForbidden) Error() string {
return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsForbidden %+v", 403, o.Payload)
}
func (o *GetResearchProjectDocumentsForbidden) String() string {
return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsForbidden %+v", 403, o.Payload)
}
func (o *GetResearchProjectDocumentsForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetResearchProjectDocumentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetResearchProjectDocumentsNotFound creates a GetResearchProjectDocumentsNotFound with default headers values
func NewGetResearchProjectDocumentsNotFound() *GetResearchProjectDocumentsNotFound {
return &GetResearchProjectDocumentsNotFound{}
}
/*
GetResearchProjectDocumentsNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetResearchProjectDocumentsNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get research project documents not found response has a 2xx status code
func (o *GetResearchProjectDocumentsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get research project documents not found response has a 3xx status code
func (o *GetResearchProjectDocumentsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get research project documents not found response has a 4xx status code
func (o *GetResearchProjectDocumentsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get research project documents not found response has a 5xx status code
func (o *GetResearchProjectDocumentsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get research project documents not found response a status code equal to that given
func (o *GetResearchProjectDocumentsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get research project documents not found response
func (o *GetResearchProjectDocumentsNotFound) Code() int {
return 404
}
func (o *GetResearchProjectDocumentsNotFound) Error() string {
return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsNotFound %+v", 404, o.Payload)
}
func (o *GetResearchProjectDocumentsNotFound) String() string {
return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsNotFound %+v", 404, o.Payload)
}
func (o *GetResearchProjectDocumentsNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetResearchProjectDocumentsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetResearchProjectDocumentsUnprocessableEntity creates a GetResearchProjectDocumentsUnprocessableEntity with default headers values
func NewGetResearchProjectDocumentsUnprocessableEntity() *GetResearchProjectDocumentsUnprocessableEntity {
return &GetResearchProjectDocumentsUnprocessableEntity{}
}
/*
GetResearchProjectDocumentsUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetResearchProjectDocumentsUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get research project documents unprocessable entity response has a 2xx status code
func (o *GetResearchProjectDocumentsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get research project documents unprocessable entity response has a 3xx status code
func (o *GetResearchProjectDocumentsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get research project documents unprocessable entity response has a 4xx status code
func (o *GetResearchProjectDocumentsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get research project documents unprocessable entity response has a 5xx status code
func (o *GetResearchProjectDocumentsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get research project documents unprocessable entity response a status code equal to that given
func (o *GetResearchProjectDocumentsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get research project documents unprocessable entity response
func (o *GetResearchProjectDocumentsUnprocessableEntity) Code() int {
return 422
}
func (o *GetResearchProjectDocumentsUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetResearchProjectDocumentsUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetResearchProjectDocumentsUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetResearchProjectDocumentsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetResearchProjectDocumentsInternalServerError creates a GetResearchProjectDocumentsInternalServerError with default headers values
func NewGetResearchProjectDocumentsInternalServerError() *GetResearchProjectDocumentsInternalServerError {
return &GetResearchProjectDocumentsInternalServerError{}
}
/*
GetResearchProjectDocumentsInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetResearchProjectDocumentsInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get research project documents internal server error response has a 2xx status code
func (o *GetResearchProjectDocumentsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get research project documents internal server error response has a 3xx status code
func (o *GetResearchProjectDocumentsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get research project documents internal server error response has a 4xx status code
func (o *GetResearchProjectDocumentsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get research project documents internal server error response has a 5xx status code
func (o *GetResearchProjectDocumentsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get research project documents internal server error response a status code equal to that given
func (o *GetResearchProjectDocumentsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get research project documents internal server error response
func (o *GetResearchProjectDocumentsInternalServerError) Code() int {
return 500
}
func (o *GetResearchProjectDocumentsInternalServerError) Error() string {
return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsInternalServerError %+v", 500, o.Payload)
}
func (o *GetResearchProjectDocumentsInternalServerError) String() string {
return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsInternalServerError %+v", 500, o.Payload)
}
func (o *GetResearchProjectDocumentsInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetResearchProjectDocumentsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}