lib/api/sfgate/sfgate_client/research_projects/get_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"
)
// GetResearchProjectTopicsReader is a Reader for the GetResearchProjectTopics structure.
type GetResearchProjectTopicsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetResearchProjectTopicsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetResearchProjectTopicsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetResearchProjectTopicsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetResearchProjectTopicsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetResearchProjectTopicsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetResearchProjectTopicsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetResearchProjectTopicsInternalServerError()
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())
}
}
// NewGetResearchProjectTopicsOK creates a GetResearchProjectTopicsOK with default headers values
func NewGetResearchProjectTopicsOK() *GetResearchProjectTopicsOK {
return &GetResearchProjectTopicsOK{}
}
/*
GetResearchProjectTopicsOK describes a response with status code 200, with default header values.
ResearchProjectTopic Response Object
*/
type GetResearchProjectTopicsOK struct {
Payload *sfgate_models.ResearchProjectTopicResponse
}
// IsSuccess returns true when this get research project topics o k response has a 2xx status code
func (o *GetResearchProjectTopicsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get research project topics o k response has a 3xx status code
func (o *GetResearchProjectTopicsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get research project topics o k response has a 4xx status code
func (o *GetResearchProjectTopicsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get research project topics o k response has a 5xx status code
func (o *GetResearchProjectTopicsOK) IsServerError() bool {
return false
}
// IsCode returns true when this get research project topics o k response a status code equal to that given
func (o *GetResearchProjectTopicsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get research project topics o k response
func (o *GetResearchProjectTopicsOK) Code() int {
return 200
}
func (o *GetResearchProjectTopicsOK) Error() string {
return fmt.Sprintf("[GET /researchprojecttopics][%d] getResearchProjectTopicsOK %+v", 200, o.Payload)
}
func (o *GetResearchProjectTopicsOK) String() string {
return fmt.Sprintf("[GET /researchprojecttopics][%d] getResearchProjectTopicsOK %+v", 200, o.Payload)
}
func (o *GetResearchProjectTopicsOK) GetPayload() *sfgate_models.ResearchProjectTopicResponse {
return o.Payload
}
func (o *GetResearchProjectTopicsOK) 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
}
// NewGetResearchProjectTopicsUnauthorized creates a GetResearchProjectTopicsUnauthorized with default headers values
func NewGetResearchProjectTopicsUnauthorized() *GetResearchProjectTopicsUnauthorized {
return &GetResearchProjectTopicsUnauthorized{}
}
/*
GetResearchProjectTopicsUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type GetResearchProjectTopicsUnauthorized struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this get research project topics unauthorized response has a 2xx status code
func (o *GetResearchProjectTopicsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get research project topics unauthorized response has a 3xx status code
func (o *GetResearchProjectTopicsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get research project topics unauthorized response has a 4xx status code
func (o *GetResearchProjectTopicsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get research project topics unauthorized response has a 5xx status code
func (o *GetResearchProjectTopicsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get research project topics unauthorized response a status code equal to that given
func (o *GetResearchProjectTopicsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get research project topics unauthorized response
func (o *GetResearchProjectTopicsUnauthorized) Code() int {
return 401
}
func (o *GetResearchProjectTopicsUnauthorized) Error() string {
return fmt.Sprintf("[GET /researchprojecttopics][%d] getResearchProjectTopicsUnauthorized %+v", 401, o.Payload)
}
func (o *GetResearchProjectTopicsUnauthorized) String() string {
return fmt.Sprintf("[GET /researchprojecttopics][%d] getResearchProjectTopicsUnauthorized %+v", 401, o.Payload)
}
func (o *GetResearchProjectTopicsUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetResearchProjectTopicsUnauthorized) 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
}
// NewGetResearchProjectTopicsForbidden creates a GetResearchProjectTopicsForbidden with default headers values
func NewGetResearchProjectTopicsForbidden() *GetResearchProjectTopicsForbidden {
return &GetResearchProjectTopicsForbidden{}
}
/*
GetResearchProjectTopicsForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetResearchProjectTopicsForbidden struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this get research project topics forbidden response has a 2xx status code
func (o *GetResearchProjectTopicsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get research project topics forbidden response has a 3xx status code
func (o *GetResearchProjectTopicsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get research project topics forbidden response has a 4xx status code
func (o *GetResearchProjectTopicsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get research project topics forbidden response has a 5xx status code
func (o *GetResearchProjectTopicsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get research project topics forbidden response a status code equal to that given
func (o *GetResearchProjectTopicsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get research project topics forbidden response
func (o *GetResearchProjectTopicsForbidden) Code() int {
return 403
}
func (o *GetResearchProjectTopicsForbidden) Error() string {
return fmt.Sprintf("[GET /researchprojecttopics][%d] getResearchProjectTopicsForbidden %+v", 403, o.Payload)
}
func (o *GetResearchProjectTopicsForbidden) String() string {
return fmt.Sprintf("[GET /researchprojecttopics][%d] getResearchProjectTopicsForbidden %+v", 403, o.Payload)
}
func (o *GetResearchProjectTopicsForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetResearchProjectTopicsForbidden) 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
}
// NewGetResearchProjectTopicsNotFound creates a GetResearchProjectTopicsNotFound with default headers values
func NewGetResearchProjectTopicsNotFound() *GetResearchProjectTopicsNotFound {
return &GetResearchProjectTopicsNotFound{}
}
/*
GetResearchProjectTopicsNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetResearchProjectTopicsNotFound struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this get research project topics not found response has a 2xx status code
func (o *GetResearchProjectTopicsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get research project topics not found response has a 3xx status code
func (o *GetResearchProjectTopicsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get research project topics not found response has a 4xx status code
func (o *GetResearchProjectTopicsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get research project topics not found response has a 5xx status code
func (o *GetResearchProjectTopicsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get research project topics not found response a status code equal to that given
func (o *GetResearchProjectTopicsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get research project topics not found response
func (o *GetResearchProjectTopicsNotFound) Code() int {
return 404
}
func (o *GetResearchProjectTopicsNotFound) Error() string {
return fmt.Sprintf("[GET /researchprojecttopics][%d] getResearchProjectTopicsNotFound %+v", 404, o.Payload)
}
func (o *GetResearchProjectTopicsNotFound) String() string {
return fmt.Sprintf("[GET /researchprojecttopics][%d] getResearchProjectTopicsNotFound %+v", 404, o.Payload)
}
func (o *GetResearchProjectTopicsNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetResearchProjectTopicsNotFound) 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
}
// NewGetResearchProjectTopicsUnprocessableEntity creates a GetResearchProjectTopicsUnprocessableEntity with default headers values
func NewGetResearchProjectTopicsUnprocessableEntity() *GetResearchProjectTopicsUnprocessableEntity {
return &GetResearchProjectTopicsUnprocessableEntity{}
}
/*
GetResearchProjectTopicsUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetResearchProjectTopicsUnprocessableEntity struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this get research project topics unprocessable entity response has a 2xx status code
func (o *GetResearchProjectTopicsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get research project topics unprocessable entity response has a 3xx status code
func (o *GetResearchProjectTopicsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get research project topics unprocessable entity response has a 4xx status code
func (o *GetResearchProjectTopicsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get research project topics unprocessable entity response has a 5xx status code
func (o *GetResearchProjectTopicsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get research project topics unprocessable entity response a status code equal to that given
func (o *GetResearchProjectTopicsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get research project topics unprocessable entity response
func (o *GetResearchProjectTopicsUnprocessableEntity) Code() int {
return 422
}
func (o *GetResearchProjectTopicsUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /researchprojecttopics][%d] getResearchProjectTopicsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetResearchProjectTopicsUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /researchprojecttopics][%d] getResearchProjectTopicsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetResearchProjectTopicsUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetResearchProjectTopicsUnprocessableEntity) 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
}
// NewGetResearchProjectTopicsInternalServerError creates a GetResearchProjectTopicsInternalServerError with default headers values
func NewGetResearchProjectTopicsInternalServerError() *GetResearchProjectTopicsInternalServerError {
return &GetResearchProjectTopicsInternalServerError{}
}
/*
GetResearchProjectTopicsInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetResearchProjectTopicsInternalServerError struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this get research project topics internal server error response has a 2xx status code
func (o *GetResearchProjectTopicsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get research project topics internal server error response has a 3xx status code
func (o *GetResearchProjectTopicsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get research project topics internal server error response has a 4xx status code
func (o *GetResearchProjectTopicsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get research project topics internal server error response has a 5xx status code
func (o *GetResearchProjectTopicsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get research project topics internal server error response a status code equal to that given
func (o *GetResearchProjectTopicsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get research project topics internal server error response
func (o *GetResearchProjectTopicsInternalServerError) Code() int {
return 500
}
func (o *GetResearchProjectTopicsInternalServerError) Error() string {
return fmt.Sprintf("[GET /researchprojecttopics][%d] getResearchProjectTopicsInternalServerError %+v", 500, o.Payload)
}
func (o *GetResearchProjectTopicsInternalServerError) String() string {
return fmt.Sprintf("[GET /researchprojecttopics][%d] getResearchProjectTopicsInternalServerError %+v", 500, o.Payload)
}
func (o *GetResearchProjectTopicsInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetResearchProjectTopicsInternalServerError) 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
}