// 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 track_topics

// 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"
)

// PostTrackTopicsReader is a Reader for the PostTrackTopics structure.
type PostTrackTopicsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PostTrackTopicsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPostTrackTopicsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewPostTrackTopicsUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPostTrackTopicsForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPostTrackTopicsNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewPostTrackTopicsUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPostTrackTopicsInternalServerError()
		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())
	}
}

// NewPostTrackTopicsOK creates a PostTrackTopicsOK with default headers values
func NewPostTrackTopicsOK() *PostTrackTopicsOK {
	return &PostTrackTopicsOK{}
}

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

TrackTopic Response Object
*/
type PostTrackTopicsOK struct {
	Payload *sfgate_models.TrackTopicResponse
}

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

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

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

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

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

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

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

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

func (o *PostTrackTopicsOK) GetPayload() *sfgate_models.TrackTopicResponse {
	return o.Payload
}

func (o *PostTrackTopicsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(sfgate_models.TrackTopicResponse)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewPostTrackTopicsUnauthorized creates a PostTrackTopicsUnauthorized with default headers values
func NewPostTrackTopicsUnauthorized() *PostTrackTopicsUnauthorized {
	return &PostTrackTopicsUnauthorized{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPostTrackTopicsForbidden creates a PostTrackTopicsForbidden with default headers values
func NewPostTrackTopicsForbidden() *PostTrackTopicsForbidden {
	return &PostTrackTopicsForbidden{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPostTrackTopicsNotFound creates a PostTrackTopicsNotFound with default headers values
func NewPostTrackTopicsNotFound() *PostTrackTopicsNotFound {
	return &PostTrackTopicsNotFound{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPostTrackTopicsUnprocessableEntity creates a PostTrackTopicsUnprocessableEntity with default headers values
func NewPostTrackTopicsUnprocessableEntity() *PostTrackTopicsUnprocessableEntity {
	return &PostTrackTopicsUnprocessableEntity{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewPostTrackTopicsInternalServerError creates a PostTrackTopicsInternalServerError with default headers values
func NewPostTrackTopicsInternalServerError() *PostTrackTopicsInternalServerError {
	return &PostTrackTopicsInternalServerError{}
}

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

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

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

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

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

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

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

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

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

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

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

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