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

import (
	"encoding/json"
	stderrors "errors"
	"fmt"
	"io"

	"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
)

// GetPromptTagsReader is a Reader for the GetPromptTags structure.
type GetPromptTagsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetPromptTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) {
	switch response.Code() {
	case 200:
		result := NewGetPromptTagsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewGetPromptTagsUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetPromptTagsForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetPromptTagsNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewGetPromptTagsUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetPromptTagsInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[GET /prompttags] getPromptTags", response, response.Code())
	}
}

// NewGetPromptTagsOK creates a GetPromptTagsOK with default headers values
func NewGetPromptTagsOK() *GetPromptTagsOK {
	return &GetPromptTagsOK{}
}

// GetPromptTagsOK describes a response with status code 200, with default header values.
//
// Response with PromptTag objects
type GetPromptTagsOK struct {
	Payload *sfgate_models.PromptTagResponse
}

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

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

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

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

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

// Code gets the status code for the get prompt tags o k response
func (o *GetPromptTagsOK) Code() int {
	return 200
}

func (o *GetPromptTagsOK) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsOK %s", 200, payload)
}

func (o *GetPromptTagsOK) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsOK %s", 200, payload)
}

func (o *GetPromptTagsOK) GetPayload() *sfgate_models.PromptTagResponse {
	return o.Payload
}

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

	o.Payload = new(sfgate_models.PromptTagResponse)

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

	return nil
}

// NewGetPromptTagsUnauthorized creates a GetPromptTagsUnauthorized with default headers values
func NewGetPromptTagsUnauthorized() *GetPromptTagsUnauthorized {
	return &GetPromptTagsUnauthorized{}
}

// GetPromptTagsUnauthorized describes a response with status code 401, with default header values.
//
// Access unauthorized, invalid API-KEY was used
type GetPromptTagsUnauthorized struct {
	Payload *sfgate_models.Error
}

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

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

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

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

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

// Code gets the status code for the get prompt tags unauthorized response
func (o *GetPromptTagsUnauthorized) Code() int {
	return 401
}

func (o *GetPromptTagsUnauthorized) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsUnauthorized %s", 401, payload)
}

func (o *GetPromptTagsUnauthorized) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsUnauthorized %s", 401, payload)
}

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

func (o *GetPromptTagsUnauthorized) 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 && !stderrors.Is(err, io.EOF) {
		return err
	}

	return nil
}

// NewGetPromptTagsForbidden creates a GetPromptTagsForbidden with default headers values
func NewGetPromptTagsForbidden() *GetPromptTagsForbidden {
	return &GetPromptTagsForbidden{}
}

// GetPromptTagsForbidden describes a response with status code 403, with default header values.
//
// Access forbidden, account lacks access
type GetPromptTagsForbidden struct {
	Payload *sfgate_models.Error
}

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

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

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

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

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

// Code gets the status code for the get prompt tags forbidden response
func (o *GetPromptTagsForbidden) Code() int {
	return 403
}

func (o *GetPromptTagsForbidden) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsForbidden %s", 403, payload)
}

func (o *GetPromptTagsForbidden) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsForbidden %s", 403, payload)
}

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

func (o *GetPromptTagsForbidden) 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 && !stderrors.Is(err, io.EOF) {
		return err
	}

	return nil
}

// NewGetPromptTagsNotFound creates a GetPromptTagsNotFound with default headers values
func NewGetPromptTagsNotFound() *GetPromptTagsNotFound {
	return &GetPromptTagsNotFound{}
}

// GetPromptTagsNotFound describes a response with status code 404, with default header values.
//
// Resource was not found
type GetPromptTagsNotFound struct {
	Payload *sfgate_models.Error
}

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

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

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

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

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

// Code gets the status code for the get prompt tags not found response
func (o *GetPromptTagsNotFound) Code() int {
	return 404
}

func (o *GetPromptTagsNotFound) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsNotFound %s", 404, payload)
}

func (o *GetPromptTagsNotFound) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsNotFound %s", 404, payload)
}

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

func (o *GetPromptTagsNotFound) 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 && !stderrors.Is(err, io.EOF) {
		return err
	}

	return nil
}

// NewGetPromptTagsUnprocessableEntity creates a GetPromptTagsUnprocessableEntity with default headers values
func NewGetPromptTagsUnprocessableEntity() *GetPromptTagsUnprocessableEntity {
	return &GetPromptTagsUnprocessableEntity{}
}

// GetPromptTagsUnprocessableEntity describes a response with status code 422, with default header values.
//
// Unprocessable Entity, likely a bad parameter
type GetPromptTagsUnprocessableEntity struct {
	Payload *sfgate_models.Error
}

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

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

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

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

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

// Code gets the status code for the get prompt tags unprocessable entity response
func (o *GetPromptTagsUnprocessableEntity) Code() int {
	return 422
}

func (o *GetPromptTagsUnprocessableEntity) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsUnprocessableEntity %s", 422, payload)
}

func (o *GetPromptTagsUnprocessableEntity) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsUnprocessableEntity %s", 422, payload)
}

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

func (o *GetPromptTagsUnprocessableEntity) 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 && !stderrors.Is(err, io.EOF) {
		return err
	}

	return nil
}

// NewGetPromptTagsInternalServerError creates a GetPromptTagsInternalServerError with default headers values
func NewGetPromptTagsInternalServerError() *GetPromptTagsInternalServerError {
	return &GetPromptTagsInternalServerError{}
}

// GetPromptTagsInternalServerError describes a response with status code 500, with default header values.
//
// Server Internal Error
type GetPromptTagsInternalServerError struct {
	Payload *sfgate_models.Error
}

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

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

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

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

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

// Code gets the status code for the get prompt tags internal server error response
func (o *GetPromptTagsInternalServerError) Code() int {
	return 500
}

func (o *GetPromptTagsInternalServerError) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsInternalServerError %s", 500, payload)
}

func (o *GetPromptTagsInternalServerError) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsInternalServerError %s", 500, payload)
}

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

func (o *GetPromptTagsInternalServerError) 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 && !stderrors.Is(err, io.EOF) {
		return err
	}

	return nil
}
