mirror of https://github.com/vernonkeenan/lib
487 lines
17 KiB
Go
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"
|
||
|
)
|
||
|
|
||
|
// GetResearchProjectProductsReader is a Reader for the GetResearchProjectProducts structure.
|
||
|
type GetResearchProjectProductsReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *GetResearchProjectProductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 200:
|
||
|
result := NewGetResearchProjectProductsOK()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 401:
|
||
|
result := NewGetResearchProjectProductsUnauthorized()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 403:
|
||
|
result := NewGetResearchProjectProductsForbidden()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 404:
|
||
|
result := NewGetResearchProjectProductsNotFound()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 422:
|
||
|
result := NewGetResearchProjectProductsUnprocessableEntity()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewGetResearchProjectProductsInternalServerError()
|
||
|
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())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewGetResearchProjectProductsOK creates a GetResearchProjectProductsOK with default headers values
|
||
|
func NewGetResearchProjectProductsOK() *GetResearchProjectProductsOK {
|
||
|
return &GetResearchProjectProductsOK{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetResearchProjectProductsOK describes a response with status code 200, with default header values.
|
||
|
|
||
|
ResearchProjectProduct Response Object
|
||
|
*/
|
||
|
type GetResearchProjectProductsOK struct {
|
||
|
Payload *members_models.ResearchProjectProductResponse
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get research project products o k response has a 2xx status code
|
||
|
func (o *GetResearchProjectProductsOK) IsSuccess() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get research project products o k response has a 3xx status code
|
||
|
func (o *GetResearchProjectProductsOK) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get research project products o k response has a 4xx status code
|
||
|
func (o *GetResearchProjectProductsOK) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get research project products o k response has a 5xx status code
|
||
|
func (o *GetResearchProjectProductsOK) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get research project products o k response a status code equal to that given
|
||
|
func (o *GetResearchProjectProductsOK) IsCode(code int) bool {
|
||
|
return code == 200
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get research project products o k response
|
||
|
func (o *GetResearchProjectProductsOK) Code() int {
|
||
|
return 200
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsOK) Error() string {
|
||
|
return fmt.Sprintf("[GET /researchprojectproducts][%d] getResearchProjectProductsOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsOK) String() string {
|
||
|
return fmt.Sprintf("[GET /researchprojectproducts][%d] getResearchProjectProductsOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsOK) GetPayload() *members_models.ResearchProjectProductResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(members_models.ResearchProjectProductResponse)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewGetResearchProjectProductsUnauthorized creates a GetResearchProjectProductsUnauthorized with default headers values
|
||
|
func NewGetResearchProjectProductsUnauthorized() *GetResearchProjectProductsUnauthorized {
|
||
|
return &GetResearchProjectProductsUnauthorized{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetResearchProjectProductsUnauthorized describes a response with status code 401, with default header values.
|
||
|
|
||
|
Access Unauthorized, invalid API-KEY was used
|
||
|
*/
|
||
|
type GetResearchProjectProductsUnauthorized struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get research project products unauthorized response has a 2xx status code
|
||
|
func (o *GetResearchProjectProductsUnauthorized) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get research project products unauthorized response has a 3xx status code
|
||
|
func (o *GetResearchProjectProductsUnauthorized) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get research project products unauthorized response has a 4xx status code
|
||
|
func (o *GetResearchProjectProductsUnauthorized) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get research project products unauthorized response has a 5xx status code
|
||
|
func (o *GetResearchProjectProductsUnauthorized) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get research project products unauthorized response a status code equal to that given
|
||
|
func (o *GetResearchProjectProductsUnauthorized) IsCode(code int) bool {
|
||
|
return code == 401
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get research project products unauthorized response
|
||
|
func (o *GetResearchProjectProductsUnauthorized) Code() int {
|
||
|
return 401
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsUnauthorized) Error() string {
|
||
|
return fmt.Sprintf("[GET /researchprojectproducts][%d] getResearchProjectProductsUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsUnauthorized) String() string {
|
||
|
return fmt.Sprintf("[GET /researchprojectproducts][%d] getResearchProjectProductsUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsUnauthorized) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsUnauthorized) 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
|
||
|
}
|
||
|
|
||
|
// NewGetResearchProjectProductsForbidden creates a GetResearchProjectProductsForbidden with default headers values
|
||
|
func NewGetResearchProjectProductsForbidden() *GetResearchProjectProductsForbidden {
|
||
|
return &GetResearchProjectProductsForbidden{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetResearchProjectProductsForbidden describes a response with status code 403, with default header values.
|
||
|
|
||
|
Access forbidden, account lacks access
|
||
|
*/
|
||
|
type GetResearchProjectProductsForbidden struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get research project products forbidden response has a 2xx status code
|
||
|
func (o *GetResearchProjectProductsForbidden) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get research project products forbidden response has a 3xx status code
|
||
|
func (o *GetResearchProjectProductsForbidden) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get research project products forbidden response has a 4xx status code
|
||
|
func (o *GetResearchProjectProductsForbidden) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get research project products forbidden response has a 5xx status code
|
||
|
func (o *GetResearchProjectProductsForbidden) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get research project products forbidden response a status code equal to that given
|
||
|
func (o *GetResearchProjectProductsForbidden) IsCode(code int) bool {
|
||
|
return code == 403
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get research project products forbidden response
|
||
|
func (o *GetResearchProjectProductsForbidden) Code() int {
|
||
|
return 403
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsForbidden) Error() string {
|
||
|
return fmt.Sprintf("[GET /researchprojectproducts][%d] getResearchProjectProductsForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsForbidden) String() string {
|
||
|
return fmt.Sprintf("[GET /researchprojectproducts][%d] getResearchProjectProductsForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsForbidden) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsForbidden) 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
|
||
|
}
|
||
|
|
||
|
// NewGetResearchProjectProductsNotFound creates a GetResearchProjectProductsNotFound with default headers values
|
||
|
func NewGetResearchProjectProductsNotFound() *GetResearchProjectProductsNotFound {
|
||
|
return &GetResearchProjectProductsNotFound{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetResearchProjectProductsNotFound describes a response with status code 404, with default header values.
|
||
|
|
||
|
Resource was not found
|
||
|
*/
|
||
|
type GetResearchProjectProductsNotFound struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get research project products not found response has a 2xx status code
|
||
|
func (o *GetResearchProjectProductsNotFound) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get research project products not found response has a 3xx status code
|
||
|
func (o *GetResearchProjectProductsNotFound) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get research project products not found response has a 4xx status code
|
||
|
func (o *GetResearchProjectProductsNotFound) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get research project products not found response has a 5xx status code
|
||
|
func (o *GetResearchProjectProductsNotFound) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get research project products not found response a status code equal to that given
|
||
|
func (o *GetResearchProjectProductsNotFound) IsCode(code int) bool {
|
||
|
return code == 404
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get research project products not found response
|
||
|
func (o *GetResearchProjectProductsNotFound) Code() int {
|
||
|
return 404
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsNotFound) Error() string {
|
||
|
return fmt.Sprintf("[GET /researchprojectproducts][%d] getResearchProjectProductsNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsNotFound) String() string {
|
||
|
return fmt.Sprintf("[GET /researchprojectproducts][%d] getResearchProjectProductsNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsNotFound) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsNotFound) 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
|
||
|
}
|
||
|
|
||
|
// NewGetResearchProjectProductsUnprocessableEntity creates a GetResearchProjectProductsUnprocessableEntity with default headers values
|
||
|
func NewGetResearchProjectProductsUnprocessableEntity() *GetResearchProjectProductsUnprocessableEntity {
|
||
|
return &GetResearchProjectProductsUnprocessableEntity{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetResearchProjectProductsUnprocessableEntity describes a response with status code 422, with default header values.
|
||
|
|
||
|
Unprocessable Entity, likely a bad parameter
|
||
|
*/
|
||
|
type GetResearchProjectProductsUnprocessableEntity struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get research project products unprocessable entity response has a 2xx status code
|
||
|
func (o *GetResearchProjectProductsUnprocessableEntity) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get research project products unprocessable entity response has a 3xx status code
|
||
|
func (o *GetResearchProjectProductsUnprocessableEntity) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get research project products unprocessable entity response has a 4xx status code
|
||
|
func (o *GetResearchProjectProductsUnprocessableEntity) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get research project products unprocessable entity response has a 5xx status code
|
||
|
func (o *GetResearchProjectProductsUnprocessableEntity) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get research project products unprocessable entity response a status code equal to that given
|
||
|
func (o *GetResearchProjectProductsUnprocessableEntity) IsCode(code int) bool {
|
||
|
return code == 422
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get research project products unprocessable entity response
|
||
|
func (o *GetResearchProjectProductsUnprocessableEntity) Code() int {
|
||
|
return 422
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsUnprocessableEntity) Error() string {
|
||
|
return fmt.Sprintf("[GET /researchprojectproducts][%d] getResearchProjectProductsUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsUnprocessableEntity) String() string {
|
||
|
return fmt.Sprintf("[GET /researchprojectproducts][%d] getResearchProjectProductsUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsUnprocessableEntity) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsUnprocessableEntity) 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
|
||
|
}
|
||
|
|
||
|
// NewGetResearchProjectProductsInternalServerError creates a GetResearchProjectProductsInternalServerError with default headers values
|
||
|
func NewGetResearchProjectProductsInternalServerError() *GetResearchProjectProductsInternalServerError {
|
||
|
return &GetResearchProjectProductsInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetResearchProjectProductsInternalServerError describes a response with status code 500, with default header values.
|
||
|
|
||
|
Server Internal Error
|
||
|
*/
|
||
|
type GetResearchProjectProductsInternalServerError struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get research project products internal server error response has a 2xx status code
|
||
|
func (o *GetResearchProjectProductsInternalServerError) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get research project products internal server error response has a 3xx status code
|
||
|
func (o *GetResearchProjectProductsInternalServerError) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get research project products internal server error response has a 4xx status code
|
||
|
func (o *GetResearchProjectProductsInternalServerError) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get research project products internal server error response has a 5xx status code
|
||
|
func (o *GetResearchProjectProductsInternalServerError) IsServerError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get research project products internal server error response a status code equal to that given
|
||
|
func (o *GetResearchProjectProductsInternalServerError) IsCode(code int) bool {
|
||
|
return code == 500
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get research project products internal server error response
|
||
|
func (o *GetResearchProjectProductsInternalServerError) Code() int {
|
||
|
return 500
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[GET /researchprojectproducts][%d] getResearchProjectProductsInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsInternalServerError) String() string {
|
||
|
return fmt.Sprintf("[GET /researchprojectproducts][%d] getResearchProjectProductsInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsInternalServerError) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetResearchProjectProductsInternalServerError) 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
|
||
|
}
|