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"
|
|
)
|
|
|
|
// PostResearchProjectServicesReader is a Reader for the PostResearchProjectServices structure.
|
|
type PostResearchProjectServicesReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *PostResearchProjectServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewPostResearchProjectServicesOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 201:
|
|
result := NewPostResearchProjectServicesCreated()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewPostResearchProjectServicesUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewPostResearchProjectServicesForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewPostResearchProjectServicesUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewPostResearchProjectServicesInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewPostResearchProjectServicesOK creates a PostResearchProjectServicesOK with default headers values
|
|
func NewPostResearchProjectServicesOK() *PostResearchProjectServicesOK {
|
|
return &PostResearchProjectServicesOK{}
|
|
}
|
|
|
|
/*
|
|
PostResearchProjectServicesOK describes a response with status code 200, with default header values.
|
|
|
|
ResearchProjectService Response Object
|
|
*/
|
|
type PostResearchProjectServicesOK struct {
|
|
Payload *members_models.ResearchProjectServiceResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this post research project services o k response has a 2xx status code
|
|
func (o *PostResearchProjectServicesOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this post research project services o k response has a 3xx status code
|
|
func (o *PostResearchProjectServicesOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post research project services o k response has a 4xx status code
|
|
func (o *PostResearchProjectServicesOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this post research project services o k response has a 5xx status code
|
|
func (o *PostResearchProjectServicesOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post research project services o k response a status code equal to that given
|
|
func (o *PostResearchProjectServicesOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the post research project services o k response
|
|
func (o *PostResearchProjectServicesOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesOK) Error() string {
|
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesOK) String() string {
|
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesOK) GetPayload() *members_models.ResearchProjectServiceResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.ResearchProjectServiceResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostResearchProjectServicesCreated creates a PostResearchProjectServicesCreated with default headers values
|
|
func NewPostResearchProjectServicesCreated() *PostResearchProjectServicesCreated {
|
|
return &PostResearchProjectServicesCreated{}
|
|
}
|
|
|
|
/*
|
|
PostResearchProjectServicesCreated describes a response with status code 201, with default header values.
|
|
|
|
ResearchProjectService Response Object
|
|
*/
|
|
type PostResearchProjectServicesCreated struct {
|
|
Payload *members_models.ResearchProjectServiceResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this post research project services created response has a 2xx status code
|
|
func (o *PostResearchProjectServicesCreated) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this post research project services created response has a 3xx status code
|
|
func (o *PostResearchProjectServicesCreated) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post research project services created response has a 4xx status code
|
|
func (o *PostResearchProjectServicesCreated) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this post research project services created response has a 5xx status code
|
|
func (o *PostResearchProjectServicesCreated) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post research project services created response a status code equal to that given
|
|
func (o *PostResearchProjectServicesCreated) IsCode(code int) bool {
|
|
return code == 201
|
|
}
|
|
|
|
// Code gets the status code for the post research project services created response
|
|
func (o *PostResearchProjectServicesCreated) Code() int {
|
|
return 201
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesCreated) Error() string {
|
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesCreated %+v", 201, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesCreated) String() string {
|
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesCreated %+v", 201, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesCreated) GetPayload() *members_models.ResearchProjectServiceResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.ResearchProjectServiceResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostResearchProjectServicesUnauthorized creates a PostResearchProjectServicesUnauthorized with default headers values
|
|
func NewPostResearchProjectServicesUnauthorized() *PostResearchProjectServicesUnauthorized {
|
|
return &PostResearchProjectServicesUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
PostResearchProjectServicesUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access Unauthorized, invalid API-KEY was used
|
|
*/
|
|
type PostResearchProjectServicesUnauthorized struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post research project services unauthorized response has a 2xx status code
|
|
func (o *PostResearchProjectServicesUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post research project services unauthorized response has a 3xx status code
|
|
func (o *PostResearchProjectServicesUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post research project services unauthorized response has a 4xx status code
|
|
func (o *PostResearchProjectServicesUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post research project services unauthorized response has a 5xx status code
|
|
func (o *PostResearchProjectServicesUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post research project services unauthorized response a status code equal to that given
|
|
func (o *PostResearchProjectServicesUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the post research project services unauthorized response
|
|
func (o *PostResearchProjectServicesUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesUnauthorized) Error() string {
|
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesUnauthorized) String() string {
|
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesUnauthorized) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesUnauthorized) 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
|
|
}
|
|
|
|
// NewPostResearchProjectServicesForbidden creates a PostResearchProjectServicesForbidden with default headers values
|
|
func NewPostResearchProjectServicesForbidden() *PostResearchProjectServicesForbidden {
|
|
return &PostResearchProjectServicesForbidden{}
|
|
}
|
|
|
|
/*
|
|
PostResearchProjectServicesForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type PostResearchProjectServicesForbidden struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post research project services forbidden response has a 2xx status code
|
|
func (o *PostResearchProjectServicesForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post research project services forbidden response has a 3xx status code
|
|
func (o *PostResearchProjectServicesForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post research project services forbidden response has a 4xx status code
|
|
func (o *PostResearchProjectServicesForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post research project services forbidden response has a 5xx status code
|
|
func (o *PostResearchProjectServicesForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post research project services forbidden response a status code equal to that given
|
|
func (o *PostResearchProjectServicesForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the post research project services forbidden response
|
|
func (o *PostResearchProjectServicesForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesForbidden) Error() string {
|
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesForbidden) String() string {
|
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesForbidden) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesForbidden) 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
|
|
}
|
|
|
|
// NewPostResearchProjectServicesUnprocessableEntity creates a PostResearchProjectServicesUnprocessableEntity with default headers values
|
|
func NewPostResearchProjectServicesUnprocessableEntity() *PostResearchProjectServicesUnprocessableEntity {
|
|
return &PostResearchProjectServicesUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
PostResearchProjectServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type PostResearchProjectServicesUnprocessableEntity struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post research project services unprocessable entity response has a 2xx status code
|
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post research project services unprocessable entity response has a 3xx status code
|
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post research project services unprocessable entity response has a 4xx status code
|
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post research project services unprocessable entity response has a 5xx status code
|
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post research project services unprocessable entity response a status code equal to that given
|
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the post research project services unprocessable entity response
|
|
func (o *PostResearchProjectServicesUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesUnprocessableEntity) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesUnprocessableEntity) 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
|
|
}
|
|
|
|
// NewPostResearchProjectServicesInternalServerError creates a PostResearchProjectServicesInternalServerError with default headers values
|
|
func NewPostResearchProjectServicesInternalServerError() *PostResearchProjectServicesInternalServerError {
|
|
return &PostResearchProjectServicesInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
PostResearchProjectServicesInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type PostResearchProjectServicesInternalServerError struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post research project services internal server error response has a 2xx status code
|
|
func (o *PostResearchProjectServicesInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post research project services internal server error response has a 3xx status code
|
|
func (o *PostResearchProjectServicesInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post research project services internal server error response has a 4xx status code
|
|
func (o *PostResearchProjectServicesInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this post research project services internal server error response has a 5xx status code
|
|
func (o *PostResearchProjectServicesInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this post research project services internal server error response a status code equal to that given
|
|
func (o *PostResearchProjectServicesInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the post research project services internal server error response
|
|
func (o *PostResearchProjectServicesInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesInternalServerError) Error() string {
|
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesInternalServerError) String() string {
|
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesInternalServerError) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostResearchProjectServicesInternalServerError) 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
|
|
}
|