// 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" ) // GetResearchProjectsReader is a Reader for the GetResearchProjects structure. type GetResearchProjectsReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *GetResearchProjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetResearchProjectsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 401: result := NewGetResearchProjectsUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewGetResearchProjectsForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewGetResearchProjectsNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 422: result := NewGetResearchProjectsUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewGetResearchProjectsInternalServerError() 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()) } } // NewGetResearchProjectsOK creates a GetResearchProjectsOK with default headers values func NewGetResearchProjectsOK() *GetResearchProjectsOK { return &GetResearchProjectsOK{} } /* GetResearchProjectsOK describes a response with status code 200, with default header values. ResearchProject Response Object */ type GetResearchProjectsOK struct { Payload *sfgate_models.ResearchProjectResponse } // IsSuccess returns true when this get research projects o k response has a 2xx status code func (o *GetResearchProjectsOK) IsSuccess() bool { return true } // IsRedirect returns true when this get research projects o k response has a 3xx status code func (o *GetResearchProjectsOK) IsRedirect() bool { return false } // IsClientError returns true when this get research projects o k response has a 4xx status code func (o *GetResearchProjectsOK) IsClientError() bool { return false } // IsServerError returns true when this get research projects o k response has a 5xx status code func (o *GetResearchProjectsOK) IsServerError() bool { return false } // IsCode returns true when this get research projects o k response a status code equal to that given func (o *GetResearchProjectsOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the get research projects o k response func (o *GetResearchProjectsOK) Code() int { return 200 } func (o *GetResearchProjectsOK) Error() string { return fmt.Sprintf("[GET /researchprojects][%d] getResearchProjectsOK %+v", 200, o.Payload) } func (o *GetResearchProjectsOK) String() string { return fmt.Sprintf("[GET /researchprojects][%d] getResearchProjectsOK %+v", 200, o.Payload) } func (o *GetResearchProjectsOK) GetPayload() *sfgate_models.ResearchProjectResponse { return o.Payload } func (o *GetResearchProjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(sfgate_models.ResearchProjectResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetResearchProjectsUnauthorized creates a GetResearchProjectsUnauthorized with default headers values func NewGetResearchProjectsUnauthorized() *GetResearchProjectsUnauthorized { return &GetResearchProjectsUnauthorized{} } /* GetResearchProjectsUnauthorized describes a response with status code 401, with default header values. Access unauthorized, invalid API-KEY was used */ type GetResearchProjectsUnauthorized struct { Payload *sfgate_models.Error } // IsSuccess returns true when this get research projects unauthorized response has a 2xx status code func (o *GetResearchProjectsUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this get research projects unauthorized response has a 3xx status code func (o *GetResearchProjectsUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this get research projects unauthorized response has a 4xx status code func (o *GetResearchProjectsUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this get research projects unauthorized response has a 5xx status code func (o *GetResearchProjectsUnauthorized) IsServerError() bool { return false } // IsCode returns true when this get research projects unauthorized response a status code equal to that given func (o *GetResearchProjectsUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the get research projects unauthorized response func (o *GetResearchProjectsUnauthorized) Code() int { return 401 } func (o *GetResearchProjectsUnauthorized) Error() string { return fmt.Sprintf("[GET /researchprojects][%d] getResearchProjectsUnauthorized %+v", 401, o.Payload) } func (o *GetResearchProjectsUnauthorized) String() string { return fmt.Sprintf("[GET /researchprojects][%d] getResearchProjectsUnauthorized %+v", 401, o.Payload) } func (o *GetResearchProjectsUnauthorized) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetResearchProjectsUnauthorized) 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 } // NewGetResearchProjectsForbidden creates a GetResearchProjectsForbidden with default headers values func NewGetResearchProjectsForbidden() *GetResearchProjectsForbidden { return &GetResearchProjectsForbidden{} } /* GetResearchProjectsForbidden describes a response with status code 403, with default header values. Access forbidden, account lacks access */ type GetResearchProjectsForbidden struct { Payload *sfgate_models.Error } // IsSuccess returns true when this get research projects forbidden response has a 2xx status code func (o *GetResearchProjectsForbidden) IsSuccess() bool { return false } // IsRedirect returns true when this get research projects forbidden response has a 3xx status code func (o *GetResearchProjectsForbidden) IsRedirect() bool { return false } // IsClientError returns true when this get research projects forbidden response has a 4xx status code func (o *GetResearchProjectsForbidden) IsClientError() bool { return true } // IsServerError returns true when this get research projects forbidden response has a 5xx status code func (o *GetResearchProjectsForbidden) IsServerError() bool { return false } // IsCode returns true when this get research projects forbidden response a status code equal to that given func (o *GetResearchProjectsForbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the get research projects forbidden response func (o *GetResearchProjectsForbidden) Code() int { return 403 } func (o *GetResearchProjectsForbidden) Error() string { return fmt.Sprintf("[GET /researchprojects][%d] getResearchProjectsForbidden %+v", 403, o.Payload) } func (o *GetResearchProjectsForbidden) String() string { return fmt.Sprintf("[GET /researchprojects][%d] getResearchProjectsForbidden %+v", 403, o.Payload) } func (o *GetResearchProjectsForbidden) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetResearchProjectsForbidden) 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 } // NewGetResearchProjectsNotFound creates a GetResearchProjectsNotFound with default headers values func NewGetResearchProjectsNotFound() *GetResearchProjectsNotFound { return &GetResearchProjectsNotFound{} } /* GetResearchProjectsNotFound describes a response with status code 404, with default header values. Resource was not found */ type GetResearchProjectsNotFound struct { Payload *sfgate_models.Error } // IsSuccess returns true when this get research projects not found response has a 2xx status code func (o *GetResearchProjectsNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this get research projects not found response has a 3xx status code func (o *GetResearchProjectsNotFound) IsRedirect() bool { return false } // IsClientError returns true when this get research projects not found response has a 4xx status code func (o *GetResearchProjectsNotFound) IsClientError() bool { return true } // IsServerError returns true when this get research projects not found response has a 5xx status code func (o *GetResearchProjectsNotFound) IsServerError() bool { return false } // IsCode returns true when this get research projects not found response a status code equal to that given func (o *GetResearchProjectsNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the get research projects not found response func (o *GetResearchProjectsNotFound) Code() int { return 404 } func (o *GetResearchProjectsNotFound) Error() string { return fmt.Sprintf("[GET /researchprojects][%d] getResearchProjectsNotFound %+v", 404, o.Payload) } func (o *GetResearchProjectsNotFound) String() string { return fmt.Sprintf("[GET /researchprojects][%d] getResearchProjectsNotFound %+v", 404, o.Payload) } func (o *GetResearchProjectsNotFound) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetResearchProjectsNotFound) 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 } // NewGetResearchProjectsUnprocessableEntity creates a GetResearchProjectsUnprocessableEntity with default headers values func NewGetResearchProjectsUnprocessableEntity() *GetResearchProjectsUnprocessableEntity { return &GetResearchProjectsUnprocessableEntity{} } /* GetResearchProjectsUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity, likely a bad parameter */ type GetResearchProjectsUnprocessableEntity struct { Payload *sfgate_models.Error } // IsSuccess returns true when this get research projects unprocessable entity response has a 2xx status code func (o *GetResearchProjectsUnprocessableEntity) IsSuccess() bool { return false } // IsRedirect returns true when this get research projects unprocessable entity response has a 3xx status code func (o *GetResearchProjectsUnprocessableEntity) IsRedirect() bool { return false } // IsClientError returns true when this get research projects unprocessable entity response has a 4xx status code func (o *GetResearchProjectsUnprocessableEntity) IsClientError() bool { return true } // IsServerError returns true when this get research projects unprocessable entity response has a 5xx status code func (o *GetResearchProjectsUnprocessableEntity) IsServerError() bool { return false } // IsCode returns true when this get research projects unprocessable entity response a status code equal to that given func (o *GetResearchProjectsUnprocessableEntity) IsCode(code int) bool { return code == 422 } // Code gets the status code for the get research projects unprocessable entity response func (o *GetResearchProjectsUnprocessableEntity) Code() int { return 422 } func (o *GetResearchProjectsUnprocessableEntity) Error() string { return fmt.Sprintf("[GET /researchprojects][%d] getResearchProjectsUnprocessableEntity %+v", 422, o.Payload) } func (o *GetResearchProjectsUnprocessableEntity) String() string { return fmt.Sprintf("[GET /researchprojects][%d] getResearchProjectsUnprocessableEntity %+v", 422, o.Payload) } func (o *GetResearchProjectsUnprocessableEntity) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetResearchProjectsUnprocessableEntity) 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 } // NewGetResearchProjectsInternalServerError creates a GetResearchProjectsInternalServerError with default headers values func NewGetResearchProjectsInternalServerError() *GetResearchProjectsInternalServerError { return &GetResearchProjectsInternalServerError{} } /* GetResearchProjectsInternalServerError describes a response with status code 500, with default header values. Server Internal Error */ type GetResearchProjectsInternalServerError struct { Payload *sfgate_models.Error } // IsSuccess returns true when this get research projects internal server error response has a 2xx status code func (o *GetResearchProjectsInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this get research projects internal server error response has a 3xx status code func (o *GetResearchProjectsInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this get research projects internal server error response has a 4xx status code func (o *GetResearchProjectsInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this get research projects internal server error response has a 5xx status code func (o *GetResearchProjectsInternalServerError) IsServerError() bool { return true } // IsCode returns true when this get research projects internal server error response a status code equal to that given func (o *GetResearchProjectsInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the get research projects internal server error response func (o *GetResearchProjectsInternalServerError) Code() int { return 500 } func (o *GetResearchProjectsInternalServerError) Error() string { return fmt.Sprintf("[GET /researchprojects][%d] getResearchProjectsInternalServerError %+v", 500, o.Payload) } func (o *GetResearchProjectsInternalServerError) String() string { return fmt.Sprintf("[GET /researchprojects][%d] getResearchProjectsInternalServerError %+v", 500, o.Payload) } func (o *GetResearchProjectsInternalServerError) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetResearchProjectsInternalServerError) 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 }