// 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" ) // PostResearchProjectsReader is a Reader for the PostResearchProjects structure. type PostResearchProjectsReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *PostResearchProjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewPostResearchProjectsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 401: result := NewPostResearchProjectsUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewPostResearchProjectsForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewPostResearchProjectsNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 422: result := NewPostResearchProjectsUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewPostResearchProjectsInternalServerError() 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()) } } // NewPostResearchProjectsOK creates a PostResearchProjectsOK with default headers values func NewPostResearchProjectsOK() *PostResearchProjectsOK { return &PostResearchProjectsOK{} } /* PostResearchProjectsOK describes a response with status code 200, with default header values. ResearchProject Response Object */ type PostResearchProjectsOK struct { Payload *sfgate_models.ResearchProjectResponse } // IsSuccess returns true when this post research projects o k response has a 2xx status code func (o *PostResearchProjectsOK) IsSuccess() bool { return true } // IsRedirect returns true when this post research projects o k response has a 3xx status code func (o *PostResearchProjectsOK) IsRedirect() bool { return false } // IsClientError returns true when this post research projects o k response has a 4xx status code func (o *PostResearchProjectsOK) IsClientError() bool { return false } // IsServerError returns true when this post research projects o k response has a 5xx status code func (o *PostResearchProjectsOK) IsServerError() bool { return false } // IsCode returns true when this post research projects o k response a status code equal to that given func (o *PostResearchProjectsOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the post research projects o k response func (o *PostResearchProjectsOK) Code() int { return 200 } func (o *PostResearchProjectsOK) Error() string { return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectsOK %+v", 200, o.Payload) } func (o *PostResearchProjectsOK) String() string { return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectsOK %+v", 200, o.Payload) } func (o *PostResearchProjectsOK) GetPayload() *sfgate_models.ResearchProjectResponse { return o.Payload } func (o *PostResearchProjectsOK) 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 } // NewPostResearchProjectsUnauthorized creates a PostResearchProjectsUnauthorized with default headers values func NewPostResearchProjectsUnauthorized() *PostResearchProjectsUnauthorized { return &PostResearchProjectsUnauthorized{} } /* PostResearchProjectsUnauthorized describes a response with status code 401, with default header values. Access unauthorized, invalid API-KEY was used */ type PostResearchProjectsUnauthorized struct { Payload *sfgate_models.Error } // IsSuccess returns true when this post research projects unauthorized response has a 2xx status code func (o *PostResearchProjectsUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this post research projects unauthorized response has a 3xx status code func (o *PostResearchProjectsUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this post research projects unauthorized response has a 4xx status code func (o *PostResearchProjectsUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this post research projects unauthorized response has a 5xx status code func (o *PostResearchProjectsUnauthorized) IsServerError() bool { return false } // IsCode returns true when this post research projects unauthorized response a status code equal to that given func (o *PostResearchProjectsUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the post research projects unauthorized response func (o *PostResearchProjectsUnauthorized) Code() int { return 401 } func (o *PostResearchProjectsUnauthorized) Error() string { return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectsUnauthorized %+v", 401, o.Payload) } func (o *PostResearchProjectsUnauthorized) String() string { return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectsUnauthorized %+v", 401, o.Payload) } func (o *PostResearchProjectsUnauthorized) GetPayload() *sfgate_models.Error { return o.Payload } func (o *PostResearchProjectsUnauthorized) 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 } // NewPostResearchProjectsForbidden creates a PostResearchProjectsForbidden with default headers values func NewPostResearchProjectsForbidden() *PostResearchProjectsForbidden { return &PostResearchProjectsForbidden{} } /* PostResearchProjectsForbidden describes a response with status code 403, with default header values. Access forbidden, account lacks access */ type PostResearchProjectsForbidden struct { Payload *sfgate_models.Error } // IsSuccess returns true when this post research projects forbidden response has a 2xx status code func (o *PostResearchProjectsForbidden) IsSuccess() bool { return false } // IsRedirect returns true when this post research projects forbidden response has a 3xx status code func (o *PostResearchProjectsForbidden) IsRedirect() bool { return false } // IsClientError returns true when this post research projects forbidden response has a 4xx status code func (o *PostResearchProjectsForbidden) IsClientError() bool { return true } // IsServerError returns true when this post research projects forbidden response has a 5xx status code func (o *PostResearchProjectsForbidden) IsServerError() bool { return false } // IsCode returns true when this post research projects forbidden response a status code equal to that given func (o *PostResearchProjectsForbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the post research projects forbidden response func (o *PostResearchProjectsForbidden) Code() int { return 403 } func (o *PostResearchProjectsForbidden) Error() string { return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectsForbidden %+v", 403, o.Payload) } func (o *PostResearchProjectsForbidden) String() string { return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectsForbidden %+v", 403, o.Payload) } func (o *PostResearchProjectsForbidden) GetPayload() *sfgate_models.Error { return o.Payload } func (o *PostResearchProjectsForbidden) 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 } // NewPostResearchProjectsNotFound creates a PostResearchProjectsNotFound with default headers values func NewPostResearchProjectsNotFound() *PostResearchProjectsNotFound { return &PostResearchProjectsNotFound{} } /* PostResearchProjectsNotFound describes a response with status code 404, with default header values. Resource was not found */ type PostResearchProjectsNotFound struct { Payload *sfgate_models.Error } // IsSuccess returns true when this post research projects not found response has a 2xx status code func (o *PostResearchProjectsNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this post research projects not found response has a 3xx status code func (o *PostResearchProjectsNotFound) IsRedirect() bool { return false } // IsClientError returns true when this post research projects not found response has a 4xx status code func (o *PostResearchProjectsNotFound) IsClientError() bool { return true } // IsServerError returns true when this post research projects not found response has a 5xx status code func (o *PostResearchProjectsNotFound) IsServerError() bool { return false } // IsCode returns true when this post research projects not found response a status code equal to that given func (o *PostResearchProjectsNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the post research projects not found response func (o *PostResearchProjectsNotFound) Code() int { return 404 } func (o *PostResearchProjectsNotFound) Error() string { return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectsNotFound %+v", 404, o.Payload) } func (o *PostResearchProjectsNotFound) String() string { return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectsNotFound %+v", 404, o.Payload) } func (o *PostResearchProjectsNotFound) GetPayload() *sfgate_models.Error { return o.Payload } func (o *PostResearchProjectsNotFound) 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 } // NewPostResearchProjectsUnprocessableEntity creates a PostResearchProjectsUnprocessableEntity with default headers values func NewPostResearchProjectsUnprocessableEntity() *PostResearchProjectsUnprocessableEntity { return &PostResearchProjectsUnprocessableEntity{} } /* PostResearchProjectsUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity, likely a bad parameter */ type PostResearchProjectsUnprocessableEntity struct { Payload *sfgate_models.Error } // IsSuccess returns true when this post research projects unprocessable entity response has a 2xx status code func (o *PostResearchProjectsUnprocessableEntity) IsSuccess() bool { return false } // IsRedirect returns true when this post research projects unprocessable entity response has a 3xx status code func (o *PostResearchProjectsUnprocessableEntity) IsRedirect() bool { return false } // IsClientError returns true when this post research projects unprocessable entity response has a 4xx status code func (o *PostResearchProjectsUnprocessableEntity) IsClientError() bool { return true } // IsServerError returns true when this post research projects unprocessable entity response has a 5xx status code func (o *PostResearchProjectsUnprocessableEntity) IsServerError() bool { return false } // IsCode returns true when this post research projects unprocessable entity response a status code equal to that given func (o *PostResearchProjectsUnprocessableEntity) IsCode(code int) bool { return code == 422 } // Code gets the status code for the post research projects unprocessable entity response func (o *PostResearchProjectsUnprocessableEntity) Code() int { return 422 } func (o *PostResearchProjectsUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectsUnprocessableEntity %+v", 422, o.Payload) } func (o *PostResearchProjectsUnprocessableEntity) String() string { return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectsUnprocessableEntity %+v", 422, o.Payload) } func (o *PostResearchProjectsUnprocessableEntity) GetPayload() *sfgate_models.Error { return o.Payload } func (o *PostResearchProjectsUnprocessableEntity) 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 } // NewPostResearchProjectsInternalServerError creates a PostResearchProjectsInternalServerError with default headers values func NewPostResearchProjectsInternalServerError() *PostResearchProjectsInternalServerError { return &PostResearchProjectsInternalServerError{} } /* PostResearchProjectsInternalServerError describes a response with status code 500, with default header values. Server Internal Error */ type PostResearchProjectsInternalServerError struct { Payload *sfgate_models.Error } // IsSuccess returns true when this post research projects internal server error response has a 2xx status code func (o *PostResearchProjectsInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this post research projects internal server error response has a 3xx status code func (o *PostResearchProjectsInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this post research projects internal server error response has a 4xx status code func (o *PostResearchProjectsInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this post research projects internal server error response has a 5xx status code func (o *PostResearchProjectsInternalServerError) IsServerError() bool { return true } // IsCode returns true when this post research projects internal server error response a status code equal to that given func (o *PostResearchProjectsInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the post research projects internal server error response func (o *PostResearchProjectsInternalServerError) Code() int { return 500 } func (o *PostResearchProjectsInternalServerError) Error() string { return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectsInternalServerError %+v", 500, o.Payload) } func (o *PostResearchProjectsInternalServerError) String() string { return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectsInternalServerError %+v", 500, o.Payload) } func (o *PostResearchProjectsInternalServerError) GetPayload() *sfgate_models.Error { return o.Payload } func (o *PostResearchProjectsInternalServerError) 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 }