mirror of https://github.com/vernonkeenan/lib
552 lines
20 KiB
Go
552 lines
20 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/sfgate/sfgate_models"
|
|
)
|
|
|
|
// PostResearchProjectDocumentsReader is a Reader for the PostResearchProjectDocuments structure.
|
|
type PostResearchProjectDocumentsReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *PostResearchProjectDocumentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewPostResearchProjectDocumentsOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 201:
|
|
result := NewPostResearchProjectDocumentsCreated()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewPostResearchProjectDocumentsUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewPostResearchProjectDocumentsForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewPostResearchProjectDocumentsNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewPostResearchProjectDocumentsUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewPostResearchProjectDocumentsInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewPostResearchProjectDocumentsOK creates a PostResearchProjectDocumentsOK with default headers values
|
|
func NewPostResearchProjectDocumentsOK() *PostResearchProjectDocumentsOK {
|
|
return &PostResearchProjectDocumentsOK{}
|
|
}
|
|
|
|
/*
|
|
PostResearchProjectDocumentsOK describes a response with status code 200, with default header values.
|
|
|
|
ResearchProjectDocument Response Object
|
|
*/
|
|
type PostResearchProjectDocumentsOK struct {
|
|
Payload *sfgate_models.ResearchProjectDocumentResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this post research project documents o k response has a 2xx status code
|
|
func (o *PostResearchProjectDocumentsOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this post research project documents o k response has a 3xx status code
|
|
func (o *PostResearchProjectDocumentsOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post research project documents o k response has a 4xx status code
|
|
func (o *PostResearchProjectDocumentsOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this post research project documents o k response has a 5xx status code
|
|
func (o *PostResearchProjectDocumentsOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post research project documents o k response a status code equal to that given
|
|
func (o *PostResearchProjectDocumentsOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the post research project documents o k response
|
|
func (o *PostResearchProjectDocumentsOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsOK) Error() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsOK) String() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsOK) GetPayload() *sfgate_models.ResearchProjectDocumentResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(sfgate_models.ResearchProjectDocumentResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostResearchProjectDocumentsCreated creates a PostResearchProjectDocumentsCreated with default headers values
|
|
func NewPostResearchProjectDocumentsCreated() *PostResearchProjectDocumentsCreated {
|
|
return &PostResearchProjectDocumentsCreated{}
|
|
}
|
|
|
|
/*
|
|
PostResearchProjectDocumentsCreated describes a response with status code 201, with default header values.
|
|
|
|
ResearchProjectDocument Response Object
|
|
*/
|
|
type PostResearchProjectDocumentsCreated struct {
|
|
Payload *sfgate_models.ResearchProjectDocumentResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this post research project documents created response has a 2xx status code
|
|
func (o *PostResearchProjectDocumentsCreated) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this post research project documents created response has a 3xx status code
|
|
func (o *PostResearchProjectDocumentsCreated) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post research project documents created response has a 4xx status code
|
|
func (o *PostResearchProjectDocumentsCreated) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this post research project documents created response has a 5xx status code
|
|
func (o *PostResearchProjectDocumentsCreated) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post research project documents created response a status code equal to that given
|
|
func (o *PostResearchProjectDocumentsCreated) IsCode(code int) bool {
|
|
return code == 201
|
|
}
|
|
|
|
// Code gets the status code for the post research project documents created response
|
|
func (o *PostResearchProjectDocumentsCreated) Code() int {
|
|
return 201
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsCreated) Error() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsCreated %+v", 201, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsCreated) String() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsCreated %+v", 201, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsCreated) GetPayload() *sfgate_models.ResearchProjectDocumentResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(sfgate_models.ResearchProjectDocumentResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostResearchProjectDocumentsUnauthorized creates a PostResearchProjectDocumentsUnauthorized with default headers values
|
|
func NewPostResearchProjectDocumentsUnauthorized() *PostResearchProjectDocumentsUnauthorized {
|
|
return &PostResearchProjectDocumentsUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
PostResearchProjectDocumentsUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access unauthorized, invalid API-KEY was used
|
|
*/
|
|
type PostResearchProjectDocumentsUnauthorized struct {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post research project documents unauthorized response has a 2xx status code
|
|
func (o *PostResearchProjectDocumentsUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post research project documents unauthorized response has a 3xx status code
|
|
func (o *PostResearchProjectDocumentsUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post research project documents unauthorized response has a 4xx status code
|
|
func (o *PostResearchProjectDocumentsUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post research project documents unauthorized response has a 5xx status code
|
|
func (o *PostResearchProjectDocumentsUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post research project documents unauthorized response a status code equal to that given
|
|
func (o *PostResearchProjectDocumentsUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the post research project documents unauthorized response
|
|
func (o *PostResearchProjectDocumentsUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsUnauthorized) Error() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsUnauthorized) String() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsUnauthorized) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(sfgate_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostResearchProjectDocumentsForbidden creates a PostResearchProjectDocumentsForbidden with default headers values
|
|
func NewPostResearchProjectDocumentsForbidden() *PostResearchProjectDocumentsForbidden {
|
|
return &PostResearchProjectDocumentsForbidden{}
|
|
}
|
|
|
|
/*
|
|
PostResearchProjectDocumentsForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type PostResearchProjectDocumentsForbidden struct {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post research project documents forbidden response has a 2xx status code
|
|
func (o *PostResearchProjectDocumentsForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post research project documents forbidden response has a 3xx status code
|
|
func (o *PostResearchProjectDocumentsForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post research project documents forbidden response has a 4xx status code
|
|
func (o *PostResearchProjectDocumentsForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post research project documents forbidden response has a 5xx status code
|
|
func (o *PostResearchProjectDocumentsForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post research project documents forbidden response a status code equal to that given
|
|
func (o *PostResearchProjectDocumentsForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the post research project documents forbidden response
|
|
func (o *PostResearchProjectDocumentsForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsForbidden) Error() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsForbidden) String() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsForbidden) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(sfgate_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostResearchProjectDocumentsNotFound creates a PostResearchProjectDocumentsNotFound with default headers values
|
|
func NewPostResearchProjectDocumentsNotFound() *PostResearchProjectDocumentsNotFound {
|
|
return &PostResearchProjectDocumentsNotFound{}
|
|
}
|
|
|
|
/*
|
|
PostResearchProjectDocumentsNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type PostResearchProjectDocumentsNotFound struct {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post research project documents not found response has a 2xx status code
|
|
func (o *PostResearchProjectDocumentsNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post research project documents not found response has a 3xx status code
|
|
func (o *PostResearchProjectDocumentsNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post research project documents not found response has a 4xx status code
|
|
func (o *PostResearchProjectDocumentsNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post research project documents not found response has a 5xx status code
|
|
func (o *PostResearchProjectDocumentsNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post research project documents not found response a status code equal to that given
|
|
func (o *PostResearchProjectDocumentsNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the post research project documents not found response
|
|
func (o *PostResearchProjectDocumentsNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsNotFound) Error() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsNotFound) String() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsNotFound) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(sfgate_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostResearchProjectDocumentsUnprocessableEntity creates a PostResearchProjectDocumentsUnprocessableEntity with default headers values
|
|
func NewPostResearchProjectDocumentsUnprocessableEntity() *PostResearchProjectDocumentsUnprocessableEntity {
|
|
return &PostResearchProjectDocumentsUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
PostResearchProjectDocumentsUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type PostResearchProjectDocumentsUnprocessableEntity struct {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post research project documents unprocessable entity response has a 2xx status code
|
|
func (o *PostResearchProjectDocumentsUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post research project documents unprocessable entity response has a 3xx status code
|
|
func (o *PostResearchProjectDocumentsUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post research project documents unprocessable entity response has a 4xx status code
|
|
func (o *PostResearchProjectDocumentsUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post research project documents unprocessable entity response has a 5xx status code
|
|
func (o *PostResearchProjectDocumentsUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post research project documents unprocessable entity response a status code equal to that given
|
|
func (o *PostResearchProjectDocumentsUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the post research project documents unprocessable entity response
|
|
func (o *PostResearchProjectDocumentsUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(sfgate_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostResearchProjectDocumentsInternalServerError creates a PostResearchProjectDocumentsInternalServerError with default headers values
|
|
func NewPostResearchProjectDocumentsInternalServerError() *PostResearchProjectDocumentsInternalServerError {
|
|
return &PostResearchProjectDocumentsInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
PostResearchProjectDocumentsInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type PostResearchProjectDocumentsInternalServerError struct {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post research project documents internal server error response has a 2xx status code
|
|
func (o *PostResearchProjectDocumentsInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post research project documents internal server error response has a 3xx status code
|
|
func (o *PostResearchProjectDocumentsInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post research project documents internal server error response has a 4xx status code
|
|
func (o *PostResearchProjectDocumentsInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this post research project documents internal server error response has a 5xx status code
|
|
func (o *PostResearchProjectDocumentsInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this post research project documents internal server error response a status code equal to that given
|
|
func (o *PostResearchProjectDocumentsInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the post research project documents internal server error response
|
|
func (o *PostResearchProjectDocumentsInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsInternalServerError) Error() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsInternalServerError) String() string {
|
|
return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsInternalServerError) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostResearchProjectDocumentsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(sfgate_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|