lib/api/members/members_client/research_projects/put_research_project_servic...

478 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"
)
// PutResearchProjectServicesReader is a Reader for the PutResearchProjectServices structure.
type PutResearchProjectServicesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PutResearchProjectServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPutResearchProjectServicesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 201:
result := NewPutResearchProjectServicesCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPutResearchProjectServicesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPutResearchProjectServicesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPutResearchProjectServicesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPutResearchProjectServicesInternalServerError()
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())
}
}
// NewPutResearchProjectServicesOK creates a PutResearchProjectServicesOK with default headers values
func NewPutResearchProjectServicesOK() *PutResearchProjectServicesOK {
return &PutResearchProjectServicesOK{}
}
/*
PutResearchProjectServicesOK describes a response with status code 200, with default header values.
ResearchProjectService Response Object
*/
type PutResearchProjectServicesOK struct {
Payload *members_models.ResearchProjectServiceResponse
}
// IsSuccess returns true when this put research project services o k response has a 2xx status code
func (o *PutResearchProjectServicesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this put research project services o k response has a 3xx status code
func (o *PutResearchProjectServicesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this put research project services o k response has a 4xx status code
func (o *PutResearchProjectServicesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this put research project services o k response has a 5xx status code
func (o *PutResearchProjectServicesOK) IsServerError() bool {
return false
}
// IsCode returns true when this put research project services o k response a status code equal to that given
func (o *PutResearchProjectServicesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the put research project services o k response
func (o *PutResearchProjectServicesOK) Code() int {
return 200
}
func (o *PutResearchProjectServicesOK) Error() string {
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesOK %+v", 200, o.Payload)
}
func (o *PutResearchProjectServicesOK) String() string {
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesOK %+v", 200, o.Payload)
}
func (o *PutResearchProjectServicesOK) GetPayload() *members_models.ResearchProjectServiceResponse {
return o.Payload
}
func (o *PutResearchProjectServicesOK) 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
}
// NewPutResearchProjectServicesCreated creates a PutResearchProjectServicesCreated with default headers values
func NewPutResearchProjectServicesCreated() *PutResearchProjectServicesCreated {
return &PutResearchProjectServicesCreated{}
}
/*
PutResearchProjectServicesCreated describes a response with status code 201, with default header values.
ResearchProjectService Response Object
*/
type PutResearchProjectServicesCreated struct {
Payload *members_models.ResearchProjectServiceResponse
}
// IsSuccess returns true when this put research project services created response has a 2xx status code
func (o *PutResearchProjectServicesCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this put research project services created response has a 3xx status code
func (o *PutResearchProjectServicesCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this put research project services created response has a 4xx status code
func (o *PutResearchProjectServicesCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this put research project services created response has a 5xx status code
func (o *PutResearchProjectServicesCreated) IsServerError() bool {
return false
}
// IsCode returns true when this put research project services created response a status code equal to that given
func (o *PutResearchProjectServicesCreated) IsCode(code int) bool {
return code == 201
}
// Code gets the status code for the put research project services created response
func (o *PutResearchProjectServicesCreated) Code() int {
return 201
}
func (o *PutResearchProjectServicesCreated) Error() string {
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesCreated %+v", 201, o.Payload)
}
func (o *PutResearchProjectServicesCreated) String() string {
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesCreated %+v", 201, o.Payload)
}
func (o *PutResearchProjectServicesCreated) GetPayload() *members_models.ResearchProjectServiceResponse {
return o.Payload
}
func (o *PutResearchProjectServicesCreated) 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
}
// NewPutResearchProjectServicesUnauthorized creates a PutResearchProjectServicesUnauthorized with default headers values
func NewPutResearchProjectServicesUnauthorized() *PutResearchProjectServicesUnauthorized {
return &PutResearchProjectServicesUnauthorized{}
}
/*
PutResearchProjectServicesUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type PutResearchProjectServicesUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put research project services unauthorized response has a 2xx status code
func (o *PutResearchProjectServicesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put research project services unauthorized response has a 3xx status code
func (o *PutResearchProjectServicesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this put research project services unauthorized response has a 4xx status code
func (o *PutResearchProjectServicesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this put research project services unauthorized response has a 5xx status code
func (o *PutResearchProjectServicesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this put research project services unauthorized response a status code equal to that given
func (o *PutResearchProjectServicesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the put research project services unauthorized response
func (o *PutResearchProjectServicesUnauthorized) Code() int {
return 401
}
func (o *PutResearchProjectServicesUnauthorized) Error() string {
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesUnauthorized %+v", 401, o.Payload)
}
func (o *PutResearchProjectServicesUnauthorized) String() string {
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesUnauthorized %+v", 401, o.Payload)
}
func (o *PutResearchProjectServicesUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutResearchProjectServicesUnauthorized) 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
}
// NewPutResearchProjectServicesNotFound creates a PutResearchProjectServicesNotFound with default headers values
func NewPutResearchProjectServicesNotFound() *PutResearchProjectServicesNotFound {
return &PutResearchProjectServicesNotFound{}
}
/*
PutResearchProjectServicesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PutResearchProjectServicesNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put research project services not found response has a 2xx status code
func (o *PutResearchProjectServicesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put research project services not found response has a 3xx status code
func (o *PutResearchProjectServicesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this put research project services not found response has a 4xx status code
func (o *PutResearchProjectServicesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this put research project services not found response has a 5xx status code
func (o *PutResearchProjectServicesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this put research project services not found response a status code equal to that given
func (o *PutResearchProjectServicesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the put research project services not found response
func (o *PutResearchProjectServicesNotFound) Code() int {
return 404
}
func (o *PutResearchProjectServicesNotFound) Error() string {
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesNotFound %+v", 404, o.Payload)
}
func (o *PutResearchProjectServicesNotFound) String() string {
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesNotFound %+v", 404, o.Payload)
}
func (o *PutResearchProjectServicesNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutResearchProjectServicesNotFound) 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
}
// NewPutResearchProjectServicesUnprocessableEntity creates a PutResearchProjectServicesUnprocessableEntity with default headers values
func NewPutResearchProjectServicesUnprocessableEntity() *PutResearchProjectServicesUnprocessableEntity {
return &PutResearchProjectServicesUnprocessableEntity{}
}
/*
PutResearchProjectServicesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PutResearchProjectServicesUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put research project services unprocessable entity response has a 2xx status code
func (o *PutResearchProjectServicesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put research project services unprocessable entity response has a 3xx status code
func (o *PutResearchProjectServicesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this put research project services unprocessable entity response has a 4xx status code
func (o *PutResearchProjectServicesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this put research project services unprocessable entity response has a 5xx status code
func (o *PutResearchProjectServicesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this put research project services unprocessable entity response a status code equal to that given
func (o *PutResearchProjectServicesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the put research project services unprocessable entity response
func (o *PutResearchProjectServicesUnprocessableEntity) Code() int {
return 422
}
func (o *PutResearchProjectServicesUnprocessableEntity) Error() string {
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutResearchProjectServicesUnprocessableEntity) String() string {
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutResearchProjectServicesUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutResearchProjectServicesUnprocessableEntity) 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
}
// NewPutResearchProjectServicesInternalServerError creates a PutResearchProjectServicesInternalServerError with default headers values
func NewPutResearchProjectServicesInternalServerError() *PutResearchProjectServicesInternalServerError {
return &PutResearchProjectServicesInternalServerError{}
}
/*
PutResearchProjectServicesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PutResearchProjectServicesInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put research project services internal server error response has a 2xx status code
func (o *PutResearchProjectServicesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put research project services internal server error response has a 3xx status code
func (o *PutResearchProjectServicesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this put research project services internal server error response has a 4xx status code
func (o *PutResearchProjectServicesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this put research project services internal server error response has a 5xx status code
func (o *PutResearchProjectServicesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this put research project services internal server error response a status code equal to that given
func (o *PutResearchProjectServicesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the put research project services internal server error response
func (o *PutResearchProjectServicesInternalServerError) Code() int {
return 500
}
func (o *PutResearchProjectServicesInternalServerError) Error() string {
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesInternalServerError %+v", 500, o.Payload)
}
func (o *PutResearchProjectServicesInternalServerError) String() string {
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesInternalServerError %+v", 500, o.Payload)
}
func (o *PutResearchProjectServicesInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutResearchProjectServicesInternalServerError) 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
}