// Code generated by go-swagger; DO NOT EDIT.

// (c) 2012-2023 by Vernon Keenan
// 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/work/lib/api/sfgate/sfgate_models"
)

// PostResearchProjectTopicsReader is a Reader for the PostResearchProjectTopics structure.
type PostResearchProjectTopicsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PostResearchProjectTopicsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPostResearchProjectTopicsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewPostResearchProjectTopicsUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPostResearchProjectTopicsForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPostResearchProjectTopicsNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewPostResearchProjectTopicsUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPostResearchProjectTopicsInternalServerError()
		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())
	}
}

// NewPostResearchProjectTopicsOK creates a PostResearchProjectTopicsOK with default headers values
func NewPostResearchProjectTopicsOK() *PostResearchProjectTopicsOK {
	return &PostResearchProjectTopicsOK{}
}

/*
PostResearchProjectTopicsOK describes a response with status code 200, with default header values.

ResearchProjectTopic Response Object
*/
type PostResearchProjectTopicsOK struct {
	Payload *sfgate_models.ResearchProjectTopicResponse
}

// IsSuccess returns true when this post research project topics o k response has a 2xx status code
func (o *PostResearchProjectTopicsOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this post research project topics o k response has a 3xx status code
func (o *PostResearchProjectTopicsOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this post research project topics o k response has a 4xx status code
func (o *PostResearchProjectTopicsOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this post research project topics o k response has a 5xx status code
func (o *PostResearchProjectTopicsOK) IsServerError() bool {
	return false
}

// IsCode returns true when this post research project topics o k response a status code equal to that given
func (o *PostResearchProjectTopicsOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the post research project topics o k response
func (o *PostResearchProjectTopicsOK) Code() int {
	return 200
}

func (o *PostResearchProjectTopicsOK) Error() string {
	return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicsOK  %+v", 200, o.Payload)
}

func (o *PostResearchProjectTopicsOK) String() string {
	return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicsOK  %+v", 200, o.Payload)
}

func (o *PostResearchProjectTopicsOK) GetPayload() *sfgate_models.ResearchProjectTopicResponse {
	return o.Payload
}

func (o *PostResearchProjectTopicsOK) 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
}

// NewPostResearchProjectTopicsUnauthorized creates a PostResearchProjectTopicsUnauthorized with default headers values
func NewPostResearchProjectTopicsUnauthorized() *PostResearchProjectTopicsUnauthorized {
	return &PostResearchProjectTopicsUnauthorized{}
}

/*
PostResearchProjectTopicsUnauthorized describes a response with status code 401, with default header values.

Access unauthorized, invalid API-KEY was used
*/
type PostResearchProjectTopicsUnauthorized struct {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this post research project topics unauthorized response has a 2xx status code
func (o *PostResearchProjectTopicsUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this post research project topics unauthorized response has a 3xx status code
func (o *PostResearchProjectTopicsUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this post research project topics unauthorized response has a 4xx status code
func (o *PostResearchProjectTopicsUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this post research project topics unauthorized response has a 5xx status code
func (o *PostResearchProjectTopicsUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this post research project topics unauthorized response a status code equal to that given
func (o *PostResearchProjectTopicsUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the post research project topics unauthorized response
func (o *PostResearchProjectTopicsUnauthorized) Code() int {
	return 401
}

func (o *PostResearchProjectTopicsUnauthorized) Error() string {
	return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicsUnauthorized  %+v", 401, o.Payload)
}

func (o *PostResearchProjectTopicsUnauthorized) String() string {
	return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicsUnauthorized  %+v", 401, o.Payload)
}

func (o *PostResearchProjectTopicsUnauthorized) GetPayload() *sfgate_models.Error {
	return o.Payload
}

func (o *PostResearchProjectTopicsUnauthorized) 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
}

// NewPostResearchProjectTopicsForbidden creates a PostResearchProjectTopicsForbidden with default headers values
func NewPostResearchProjectTopicsForbidden() *PostResearchProjectTopicsForbidden {
	return &PostResearchProjectTopicsForbidden{}
}

/*
PostResearchProjectTopicsForbidden describes a response with status code 403, with default header values.

Access forbidden, account lacks access
*/
type PostResearchProjectTopicsForbidden struct {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this post research project topics forbidden response has a 2xx status code
func (o *PostResearchProjectTopicsForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this post research project topics forbidden response has a 3xx status code
func (o *PostResearchProjectTopicsForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this post research project topics forbidden response has a 4xx status code
func (o *PostResearchProjectTopicsForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this post research project topics forbidden response has a 5xx status code
func (o *PostResearchProjectTopicsForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this post research project topics forbidden response a status code equal to that given
func (o *PostResearchProjectTopicsForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the post research project topics forbidden response
func (o *PostResearchProjectTopicsForbidden) Code() int {
	return 403
}

func (o *PostResearchProjectTopicsForbidden) Error() string {
	return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicsForbidden  %+v", 403, o.Payload)
}

func (o *PostResearchProjectTopicsForbidden) String() string {
	return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicsForbidden  %+v", 403, o.Payload)
}

func (o *PostResearchProjectTopicsForbidden) GetPayload() *sfgate_models.Error {
	return o.Payload
}

func (o *PostResearchProjectTopicsForbidden) 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
}

// NewPostResearchProjectTopicsNotFound creates a PostResearchProjectTopicsNotFound with default headers values
func NewPostResearchProjectTopicsNotFound() *PostResearchProjectTopicsNotFound {
	return &PostResearchProjectTopicsNotFound{}
}

/*
PostResearchProjectTopicsNotFound describes a response with status code 404, with default header values.

Resource was not found
*/
type PostResearchProjectTopicsNotFound struct {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this post research project topics not found response has a 2xx status code
func (o *PostResearchProjectTopicsNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this post research project topics not found response has a 3xx status code
func (o *PostResearchProjectTopicsNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this post research project topics not found response has a 4xx status code
func (o *PostResearchProjectTopicsNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this post research project topics not found response has a 5xx status code
func (o *PostResearchProjectTopicsNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this post research project topics not found response a status code equal to that given
func (o *PostResearchProjectTopicsNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the post research project topics not found response
func (o *PostResearchProjectTopicsNotFound) Code() int {
	return 404
}

func (o *PostResearchProjectTopicsNotFound) Error() string {
	return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicsNotFound  %+v", 404, o.Payload)
}

func (o *PostResearchProjectTopicsNotFound) String() string {
	return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicsNotFound  %+v", 404, o.Payload)
}

func (o *PostResearchProjectTopicsNotFound) GetPayload() *sfgate_models.Error {
	return o.Payload
}

func (o *PostResearchProjectTopicsNotFound) 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
}

// NewPostResearchProjectTopicsUnprocessableEntity creates a PostResearchProjectTopicsUnprocessableEntity with default headers values
func NewPostResearchProjectTopicsUnprocessableEntity() *PostResearchProjectTopicsUnprocessableEntity {
	return &PostResearchProjectTopicsUnprocessableEntity{}
}

/*
PostResearchProjectTopicsUnprocessableEntity describes a response with status code 422, with default header values.

Unprocessable Entity, likely a bad parameter
*/
type PostResearchProjectTopicsUnprocessableEntity struct {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this post research project topics unprocessable entity response has a 2xx status code
func (o *PostResearchProjectTopicsUnprocessableEntity) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this post research project topics unprocessable entity response has a 3xx status code
func (o *PostResearchProjectTopicsUnprocessableEntity) IsRedirect() bool {
	return false
}

// IsClientError returns true when this post research project topics unprocessable entity response has a 4xx status code
func (o *PostResearchProjectTopicsUnprocessableEntity) IsClientError() bool {
	return true
}

// IsServerError returns true when this post research project topics unprocessable entity response has a 5xx status code
func (o *PostResearchProjectTopicsUnprocessableEntity) IsServerError() bool {
	return false
}

// IsCode returns true when this post research project topics unprocessable entity response a status code equal to that given
func (o *PostResearchProjectTopicsUnprocessableEntity) IsCode(code int) bool {
	return code == 422
}

// Code gets the status code for the post research project topics unprocessable entity response
func (o *PostResearchProjectTopicsUnprocessableEntity) Code() int {
	return 422
}

func (o *PostResearchProjectTopicsUnprocessableEntity) Error() string {
	return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicsUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *PostResearchProjectTopicsUnprocessableEntity) String() string {
	return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicsUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *PostResearchProjectTopicsUnprocessableEntity) GetPayload() *sfgate_models.Error {
	return o.Payload
}

func (o *PostResearchProjectTopicsUnprocessableEntity) 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
}

// NewPostResearchProjectTopicsInternalServerError creates a PostResearchProjectTopicsInternalServerError with default headers values
func NewPostResearchProjectTopicsInternalServerError() *PostResearchProjectTopicsInternalServerError {
	return &PostResearchProjectTopicsInternalServerError{}
}

/*
PostResearchProjectTopicsInternalServerError describes a response with status code 500, with default header values.

Server Internal Error
*/
type PostResearchProjectTopicsInternalServerError struct {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this post research project topics internal server error response has a 2xx status code
func (o *PostResearchProjectTopicsInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this post research project topics internal server error response has a 3xx status code
func (o *PostResearchProjectTopicsInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this post research project topics internal server error response has a 4xx status code
func (o *PostResearchProjectTopicsInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this post research project topics internal server error response has a 5xx status code
func (o *PostResearchProjectTopicsInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this post research project topics internal server error response a status code equal to that given
func (o *PostResearchProjectTopicsInternalServerError) IsCode(code int) bool {
	return code == 500
}

// Code gets the status code for the post research project topics internal server error response
func (o *PostResearchProjectTopicsInternalServerError) Code() int {
	return 500
}

func (o *PostResearchProjectTopicsInternalServerError) Error() string {
	return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicsInternalServerError  %+v", 500, o.Payload)
}

func (o *PostResearchProjectTopicsInternalServerError) String() string {
	return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicsInternalServerError  %+v", 500, o.Payload)
}

func (o *PostResearchProjectTopicsInternalServerError) GetPayload() *sfgate_models.Error {
	return o.Payload
}

func (o *PostResearchProjectTopicsInternalServerError) 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
}
