mirror of https://github.com/vernonkeenan/lib
487 lines
16 KiB
Go
487 lines
16 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"
|
||
|
)
|
||
|
|
||
|
// PutResearchProjectsReader is a Reader for the PutResearchProjects structure.
|
||
|
type PutResearchProjectsReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *PutResearchProjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 200:
|
||
|
result := NewPutResearchProjectsOK()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 401:
|
||
|
result := NewPutResearchProjectsUnauthorized()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 403:
|
||
|
result := NewPutResearchProjectsForbidden()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 404:
|
||
|
result := NewPutResearchProjectsNotFound()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 422:
|
||
|
result := NewPutResearchProjectsUnprocessableEntity()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewPutResearchProjectsInternalServerError()
|
||
|
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())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewPutResearchProjectsOK creates a PutResearchProjectsOK with default headers values
|
||
|
func NewPutResearchProjectsOK() *PutResearchProjectsOK {
|
||
|
return &PutResearchProjectsOK{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PutResearchProjectsOK describes a response with status code 200, with default header values.
|
||
|
|
||
|
ResearchProject Response Object
|
||
|
*/
|
||
|
type PutResearchProjectsOK struct {
|
||
|
Payload *members_models.ResearchProjectResponse
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this put research projects o k response has a 2xx status code
|
||
|
func (o *PutResearchProjectsOK) IsSuccess() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this put research projects o k response has a 3xx status code
|
||
|
func (o *PutResearchProjectsOK) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this put research projects o k response has a 4xx status code
|
||
|
func (o *PutResearchProjectsOK) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this put research projects o k response has a 5xx status code
|
||
|
func (o *PutResearchProjectsOK) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this put research projects o k response a status code equal to that given
|
||
|
func (o *PutResearchProjectsOK) IsCode(code int) bool {
|
||
|
return code == 200
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the put research projects o k response
|
||
|
func (o *PutResearchProjectsOK) Code() int {
|
||
|
return 200
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsOK) Error() string {
|
||
|
return fmt.Sprintf("[PUT /researchprojects][%d] putResearchProjectsOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsOK) String() string {
|
||
|
return fmt.Sprintf("[PUT /researchprojects][%d] putResearchProjectsOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsOK) GetPayload() *members_models.ResearchProjectResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(members_models.ResearchProjectResponse)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewPutResearchProjectsUnauthorized creates a PutResearchProjectsUnauthorized with default headers values
|
||
|
func NewPutResearchProjectsUnauthorized() *PutResearchProjectsUnauthorized {
|
||
|
return &PutResearchProjectsUnauthorized{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PutResearchProjectsUnauthorized describes a response with status code 401, with default header values.
|
||
|
|
||
|
Access Unauthorized, invalid API-KEY was used
|
||
|
*/
|
||
|
type PutResearchProjectsUnauthorized struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this put research projects unauthorized response has a 2xx status code
|
||
|
func (o *PutResearchProjectsUnauthorized) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this put research projects unauthorized response has a 3xx status code
|
||
|
func (o *PutResearchProjectsUnauthorized) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this put research projects unauthorized response has a 4xx status code
|
||
|
func (o *PutResearchProjectsUnauthorized) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this put research projects unauthorized response has a 5xx status code
|
||
|
func (o *PutResearchProjectsUnauthorized) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this put research projects unauthorized response a status code equal to that given
|
||
|
func (o *PutResearchProjectsUnauthorized) IsCode(code int) bool {
|
||
|
return code == 401
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the put research projects unauthorized response
|
||
|
func (o *PutResearchProjectsUnauthorized) Code() int {
|
||
|
return 401
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsUnauthorized) Error() string {
|
||
|
return fmt.Sprintf("[PUT /researchprojects][%d] putResearchProjectsUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsUnauthorized) String() string {
|
||
|
return fmt.Sprintf("[PUT /researchprojects][%d] putResearchProjectsUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsUnauthorized) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsUnauthorized) 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
|
||
|
}
|
||
|
|
||
|
// NewPutResearchProjectsForbidden creates a PutResearchProjectsForbidden with default headers values
|
||
|
func NewPutResearchProjectsForbidden() *PutResearchProjectsForbidden {
|
||
|
return &PutResearchProjectsForbidden{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PutResearchProjectsForbidden describes a response with status code 403, with default header values.
|
||
|
|
||
|
Access forbidden, account lacks access
|
||
|
*/
|
||
|
type PutResearchProjectsForbidden struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this put research projects forbidden response has a 2xx status code
|
||
|
func (o *PutResearchProjectsForbidden) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this put research projects forbidden response has a 3xx status code
|
||
|
func (o *PutResearchProjectsForbidden) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this put research projects forbidden response has a 4xx status code
|
||
|
func (o *PutResearchProjectsForbidden) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this put research projects forbidden response has a 5xx status code
|
||
|
func (o *PutResearchProjectsForbidden) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this put research projects forbidden response a status code equal to that given
|
||
|
func (o *PutResearchProjectsForbidden) IsCode(code int) bool {
|
||
|
return code == 403
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the put research projects forbidden response
|
||
|
func (o *PutResearchProjectsForbidden) Code() int {
|
||
|
return 403
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsForbidden) Error() string {
|
||
|
return fmt.Sprintf("[PUT /researchprojects][%d] putResearchProjectsForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsForbidden) String() string {
|
||
|
return fmt.Sprintf("[PUT /researchprojects][%d] putResearchProjectsForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsForbidden) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsForbidden) 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
|
||
|
}
|
||
|
|
||
|
// NewPutResearchProjectsNotFound creates a PutResearchProjectsNotFound with default headers values
|
||
|
func NewPutResearchProjectsNotFound() *PutResearchProjectsNotFound {
|
||
|
return &PutResearchProjectsNotFound{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PutResearchProjectsNotFound describes a response with status code 404, with default header values.
|
||
|
|
||
|
Resource was not found
|
||
|
*/
|
||
|
type PutResearchProjectsNotFound struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this put research projects not found response has a 2xx status code
|
||
|
func (o *PutResearchProjectsNotFound) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this put research projects not found response has a 3xx status code
|
||
|
func (o *PutResearchProjectsNotFound) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this put research projects not found response has a 4xx status code
|
||
|
func (o *PutResearchProjectsNotFound) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this put research projects not found response has a 5xx status code
|
||
|
func (o *PutResearchProjectsNotFound) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this put research projects not found response a status code equal to that given
|
||
|
func (o *PutResearchProjectsNotFound) IsCode(code int) bool {
|
||
|
return code == 404
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the put research projects not found response
|
||
|
func (o *PutResearchProjectsNotFound) Code() int {
|
||
|
return 404
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsNotFound) Error() string {
|
||
|
return fmt.Sprintf("[PUT /researchprojects][%d] putResearchProjectsNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsNotFound) String() string {
|
||
|
return fmt.Sprintf("[PUT /researchprojects][%d] putResearchProjectsNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsNotFound) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsNotFound) 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
|
||
|
}
|
||
|
|
||
|
// NewPutResearchProjectsUnprocessableEntity creates a PutResearchProjectsUnprocessableEntity with default headers values
|
||
|
func NewPutResearchProjectsUnprocessableEntity() *PutResearchProjectsUnprocessableEntity {
|
||
|
return &PutResearchProjectsUnprocessableEntity{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PutResearchProjectsUnprocessableEntity describes a response with status code 422, with default header values.
|
||
|
|
||
|
Unprocessable Entity, likely a bad parameter
|
||
|
*/
|
||
|
type PutResearchProjectsUnprocessableEntity struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this put research projects unprocessable entity response has a 2xx status code
|
||
|
func (o *PutResearchProjectsUnprocessableEntity) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this put research projects unprocessable entity response has a 3xx status code
|
||
|
func (o *PutResearchProjectsUnprocessableEntity) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this put research projects unprocessable entity response has a 4xx status code
|
||
|
func (o *PutResearchProjectsUnprocessableEntity) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this put research projects unprocessable entity response has a 5xx status code
|
||
|
func (o *PutResearchProjectsUnprocessableEntity) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this put research projects unprocessable entity response a status code equal to that given
|
||
|
func (o *PutResearchProjectsUnprocessableEntity) IsCode(code int) bool {
|
||
|
return code == 422
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the put research projects unprocessable entity response
|
||
|
func (o *PutResearchProjectsUnprocessableEntity) Code() int {
|
||
|
return 422
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsUnprocessableEntity) Error() string {
|
||
|
return fmt.Sprintf("[PUT /researchprojects][%d] putResearchProjectsUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsUnprocessableEntity) String() string {
|
||
|
return fmt.Sprintf("[PUT /researchprojects][%d] putResearchProjectsUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsUnprocessableEntity) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsUnprocessableEntity) 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
|
||
|
}
|
||
|
|
||
|
// NewPutResearchProjectsInternalServerError creates a PutResearchProjectsInternalServerError with default headers values
|
||
|
func NewPutResearchProjectsInternalServerError() *PutResearchProjectsInternalServerError {
|
||
|
return &PutResearchProjectsInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PutResearchProjectsInternalServerError describes a response with status code 500, with default header values.
|
||
|
|
||
|
Server Internal Error
|
||
|
*/
|
||
|
type PutResearchProjectsInternalServerError struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this put research projects internal server error response has a 2xx status code
|
||
|
func (o *PutResearchProjectsInternalServerError) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this put research projects internal server error response has a 3xx status code
|
||
|
func (o *PutResearchProjectsInternalServerError) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this put research projects internal server error response has a 4xx status code
|
||
|
func (o *PutResearchProjectsInternalServerError) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this put research projects internal server error response has a 5xx status code
|
||
|
func (o *PutResearchProjectsInternalServerError) IsServerError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this put research projects internal server error response a status code equal to that given
|
||
|
func (o *PutResearchProjectsInternalServerError) IsCode(code int) bool {
|
||
|
return code == 500
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the put research projects internal server error response
|
||
|
func (o *PutResearchProjectsInternalServerError) Code() int {
|
||
|
return 500
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[PUT /researchprojects][%d] putResearchProjectsInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsInternalServerError) String() string {
|
||
|
return fmt.Sprintf("[PUT /researchprojects][%d] putResearchProjectsInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsInternalServerError) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *PutResearchProjectsInternalServerError) 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
|
||
|
}
|