lib/api/sfgate/sfgate_client/research_projects/put_research_project_topics...

478 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/sfgate/sfgate_models"
)
// PutResearchProjectTopicsReader is a Reader for the PutResearchProjectTopics structure.
type PutResearchProjectTopicsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PutResearchProjectTopicsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPutResearchProjectTopicsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPutResearchProjectTopicsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPutResearchProjectTopicsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPutResearchProjectTopicsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPutResearchProjectTopicsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPutResearchProjectTopicsInternalServerError()
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())
}
}
// NewPutResearchProjectTopicsOK creates a PutResearchProjectTopicsOK with default headers values
func NewPutResearchProjectTopicsOK() *PutResearchProjectTopicsOK {
return &PutResearchProjectTopicsOK{}
}
/*
PutResearchProjectTopicsOK describes a response with status code 200, with default header values.
ResearchProjectTopic Response Object
*/
type PutResearchProjectTopicsOK struct {
Payload *sfgate_models.ResearchProjectTopicResponse
}
// IsSuccess returns true when this put research project topics o k response has a 2xx status code
func (o *PutResearchProjectTopicsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this put research project topics o k response has a 3xx status code
func (o *PutResearchProjectTopicsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this put research project topics o k response has a 4xx status code
func (o *PutResearchProjectTopicsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this put research project topics o k response has a 5xx status code
func (o *PutResearchProjectTopicsOK) IsServerError() bool {
return false
}
// IsCode returns true when this put research project topics o k response a status code equal to that given
func (o *PutResearchProjectTopicsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the put research project topics o k response
func (o *PutResearchProjectTopicsOK) Code() int {
return 200
}
func (o *PutResearchProjectTopicsOK) Error() string {
return fmt.Sprintf("[PUT /researchprojecttopics][%d] putResearchProjectTopicsOK %+v", 200, o.Payload)
}
func (o *PutResearchProjectTopicsOK) String() string {
return fmt.Sprintf("[PUT /researchprojecttopics][%d] putResearchProjectTopicsOK %+v", 200, o.Payload)
}
func (o *PutResearchProjectTopicsOK) GetPayload() *sfgate_models.ResearchProjectTopicResponse {
return o.Payload
}
func (o *PutResearchProjectTopicsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.ResearchProjectTopicResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPutResearchProjectTopicsUnauthorized creates a PutResearchProjectTopicsUnauthorized with default headers values
func NewPutResearchProjectTopicsUnauthorized() *PutResearchProjectTopicsUnauthorized {
return &PutResearchProjectTopicsUnauthorized{}
}
/*
PutResearchProjectTopicsUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type PutResearchProjectTopicsUnauthorized struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this put research project topics unauthorized response has a 2xx status code
func (o *PutResearchProjectTopicsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put research project topics unauthorized response has a 3xx status code
func (o *PutResearchProjectTopicsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this put research project topics unauthorized response has a 4xx status code
func (o *PutResearchProjectTopicsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this put research project topics unauthorized response has a 5xx status code
func (o *PutResearchProjectTopicsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this put research project topics unauthorized response a status code equal to that given
func (o *PutResearchProjectTopicsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the put research project topics unauthorized response
func (o *PutResearchProjectTopicsUnauthorized) Code() int {
return 401
}
func (o *PutResearchProjectTopicsUnauthorized) Error() string {
return fmt.Sprintf("[PUT /researchprojecttopics][%d] putResearchProjectTopicsUnauthorized %+v", 401, o.Payload)
}
func (o *PutResearchProjectTopicsUnauthorized) String() string {
return fmt.Sprintf("[PUT /researchprojecttopics][%d] putResearchProjectTopicsUnauthorized %+v", 401, o.Payload)
}
func (o *PutResearchProjectTopicsUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PutResearchProjectTopicsUnauthorized) 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
}
// NewPutResearchProjectTopicsForbidden creates a PutResearchProjectTopicsForbidden with default headers values
func NewPutResearchProjectTopicsForbidden() *PutResearchProjectTopicsForbidden {
return &PutResearchProjectTopicsForbidden{}
}
/*
PutResearchProjectTopicsForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PutResearchProjectTopicsForbidden struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this put research project topics forbidden response has a 2xx status code
func (o *PutResearchProjectTopicsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put research project topics forbidden response has a 3xx status code
func (o *PutResearchProjectTopicsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this put research project topics forbidden response has a 4xx status code
func (o *PutResearchProjectTopicsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this put research project topics forbidden response has a 5xx status code
func (o *PutResearchProjectTopicsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this put research project topics forbidden response a status code equal to that given
func (o *PutResearchProjectTopicsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the put research project topics forbidden response
func (o *PutResearchProjectTopicsForbidden) Code() int {
return 403
}
func (o *PutResearchProjectTopicsForbidden) Error() string {
return fmt.Sprintf("[PUT /researchprojecttopics][%d] putResearchProjectTopicsForbidden %+v", 403, o.Payload)
}
func (o *PutResearchProjectTopicsForbidden) String() string {
return fmt.Sprintf("[PUT /researchprojecttopics][%d] putResearchProjectTopicsForbidden %+v", 403, o.Payload)
}
func (o *PutResearchProjectTopicsForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PutResearchProjectTopicsForbidden) 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
}
// NewPutResearchProjectTopicsNotFound creates a PutResearchProjectTopicsNotFound with default headers values
func NewPutResearchProjectTopicsNotFound() *PutResearchProjectTopicsNotFound {
return &PutResearchProjectTopicsNotFound{}
}
/*
PutResearchProjectTopicsNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PutResearchProjectTopicsNotFound struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this put research project topics not found response has a 2xx status code
func (o *PutResearchProjectTopicsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put research project topics not found response has a 3xx status code
func (o *PutResearchProjectTopicsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this put research project topics not found response has a 4xx status code
func (o *PutResearchProjectTopicsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this put research project topics not found response has a 5xx status code
func (o *PutResearchProjectTopicsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this put research project topics not found response a status code equal to that given
func (o *PutResearchProjectTopicsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the put research project topics not found response
func (o *PutResearchProjectTopicsNotFound) Code() int {
return 404
}
func (o *PutResearchProjectTopicsNotFound) Error() string {
return fmt.Sprintf("[PUT /researchprojecttopics][%d] putResearchProjectTopicsNotFound %+v", 404, o.Payload)
}
func (o *PutResearchProjectTopicsNotFound) String() string {
return fmt.Sprintf("[PUT /researchprojecttopics][%d] putResearchProjectTopicsNotFound %+v", 404, o.Payload)
}
func (o *PutResearchProjectTopicsNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PutResearchProjectTopicsNotFound) 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
}
// NewPutResearchProjectTopicsUnprocessableEntity creates a PutResearchProjectTopicsUnprocessableEntity with default headers values
func NewPutResearchProjectTopicsUnprocessableEntity() *PutResearchProjectTopicsUnprocessableEntity {
return &PutResearchProjectTopicsUnprocessableEntity{}
}
/*
PutResearchProjectTopicsUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PutResearchProjectTopicsUnprocessableEntity struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this put research project topics unprocessable entity response has a 2xx status code
func (o *PutResearchProjectTopicsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put research project topics unprocessable entity response has a 3xx status code
func (o *PutResearchProjectTopicsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this put research project topics unprocessable entity response has a 4xx status code
func (o *PutResearchProjectTopicsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this put research project topics unprocessable entity response has a 5xx status code
func (o *PutResearchProjectTopicsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this put research project topics unprocessable entity response a status code equal to that given
func (o *PutResearchProjectTopicsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the put research project topics unprocessable entity response
func (o *PutResearchProjectTopicsUnprocessableEntity) Code() int {
return 422
}
func (o *PutResearchProjectTopicsUnprocessableEntity) Error() string {
return fmt.Sprintf("[PUT /researchprojecttopics][%d] putResearchProjectTopicsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutResearchProjectTopicsUnprocessableEntity) String() string {
return fmt.Sprintf("[PUT /researchprojecttopics][%d] putResearchProjectTopicsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutResearchProjectTopicsUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PutResearchProjectTopicsUnprocessableEntity) 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
}
// NewPutResearchProjectTopicsInternalServerError creates a PutResearchProjectTopicsInternalServerError with default headers values
func NewPutResearchProjectTopicsInternalServerError() *PutResearchProjectTopicsInternalServerError {
return &PutResearchProjectTopicsInternalServerError{}
}
/*
PutResearchProjectTopicsInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PutResearchProjectTopicsInternalServerError struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this put research project topics internal server error response has a 2xx status code
func (o *PutResearchProjectTopicsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put research project topics internal server error response has a 3xx status code
func (o *PutResearchProjectTopicsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this put research project topics internal server error response has a 4xx status code
func (o *PutResearchProjectTopicsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this put research project topics internal server error response has a 5xx status code
func (o *PutResearchProjectTopicsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this put research project topics internal server error response a status code equal to that given
func (o *PutResearchProjectTopicsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the put research project topics internal server error response
func (o *PutResearchProjectTopicsInternalServerError) Code() int {
return 500
}
func (o *PutResearchProjectTopicsInternalServerError) Error() string {
return fmt.Sprintf("[PUT /researchprojecttopics][%d] putResearchProjectTopicsInternalServerError %+v", 500, o.Payload)
}
func (o *PutResearchProjectTopicsInternalServerError) String() string {
return fmt.Sprintf("[PUT /researchprojecttopics][%d] putResearchProjectTopicsInternalServerError %+v", 500, o.Payload)
}
func (o *PutResearchProjectTopicsInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PutResearchProjectTopicsInternalServerError) 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
}