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

// GetTrackTopicsReader is a Reader for the GetTrackTopics structure.
type GetTrackTopicsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetTrackTopicsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetTrackTopicsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewGetTrackTopicsUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetTrackTopicsForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetTrackTopicsNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewGetTrackTopicsUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetTrackTopicsInternalServerError()
		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())
	}
}

// NewGetTrackTopicsOK creates a GetTrackTopicsOK with default headers values
func NewGetTrackTopicsOK() *GetTrackTopicsOK {
	return &GetTrackTopicsOK{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewGetTrackTopicsUnauthorized creates a GetTrackTopicsUnauthorized with default headers values
func NewGetTrackTopicsUnauthorized() *GetTrackTopicsUnauthorized {
	return &GetTrackTopicsUnauthorized{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewGetTrackTopicsForbidden creates a GetTrackTopicsForbidden with default headers values
func NewGetTrackTopicsForbidden() *GetTrackTopicsForbidden {
	return &GetTrackTopicsForbidden{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewGetTrackTopicsNotFound creates a GetTrackTopicsNotFound with default headers values
func NewGetTrackTopicsNotFound() *GetTrackTopicsNotFound {
	return &GetTrackTopicsNotFound{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewGetTrackTopicsUnprocessableEntity creates a GetTrackTopicsUnprocessableEntity with default headers values
func NewGetTrackTopicsUnprocessableEntity() *GetTrackTopicsUnprocessableEntity {
	return &GetTrackTopicsUnprocessableEntity{}
}

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

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

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

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

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

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

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

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

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

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

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

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

// NewGetTrackTopicsInternalServerError creates a GetTrackTopicsInternalServerError with default headers values
func NewGetTrackTopicsInternalServerError() *GetTrackTopicsInternalServerError {
	return &GetTrackTopicsInternalServerError{}
}

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

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

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

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

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

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

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

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

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

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

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

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