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

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

// PutPromptTagsReader is a Reader for the PutPromptTags structure.
type PutPromptTagsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PutPromptTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPutPromptTagsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewPutPromptTagsUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPutPromptTagsForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPutPromptTagsNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewPutPromptTagsUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPutPromptTagsInternalServerError()
		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())
	}
}

// NewPutPromptTagsOK creates a PutPromptTagsOK with default headers values
func NewPutPromptTagsOK() *PutPromptTagsOK {
	return &PutPromptTagsOK{}
}

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

Response with PromptTag objects
*/
type PutPromptTagsOK struct {
	Payload *sfgate_models.PromptTagResponse
}

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

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

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

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

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

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

func (o *PutPromptTagsOK) Error() string {
	return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsOK  %+v", 200, o.Payload)
}

func (o *PutPromptTagsOK) String() string {
	return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsOK  %+v", 200, o.Payload)
}

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

func (o *PutPromptTagsOK) 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 && err != io.EOF {
		return err
	}

	return nil
}

// NewPutPromptTagsUnauthorized creates a PutPromptTagsUnauthorized with default headers values
func NewPutPromptTagsUnauthorized() *PutPromptTagsUnauthorized {
	return &PutPromptTagsUnauthorized{}
}

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

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

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

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

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

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

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

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

func (o *PutPromptTagsUnauthorized) Error() string {
	return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsUnauthorized  %+v", 401, o.Payload)
}

func (o *PutPromptTagsUnauthorized) String() string {
	return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewPutPromptTagsForbidden creates a PutPromptTagsForbidden with default headers values
func NewPutPromptTagsForbidden() *PutPromptTagsForbidden {
	return &PutPromptTagsForbidden{}
}

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

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

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

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

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

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

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

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

func (o *PutPromptTagsForbidden) Error() string {
	return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsForbidden  %+v", 403, o.Payload)
}

func (o *PutPromptTagsForbidden) String() string {
	return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsForbidden  %+v", 403, o.Payload)
}

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

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

// NewPutPromptTagsNotFound creates a PutPromptTagsNotFound with default headers values
func NewPutPromptTagsNotFound() *PutPromptTagsNotFound {
	return &PutPromptTagsNotFound{}
}

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

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

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

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

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

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

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

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

func (o *PutPromptTagsNotFound) Error() string {
	return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsNotFound  %+v", 404, o.Payload)
}

func (o *PutPromptTagsNotFound) String() string {
	return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsNotFound  %+v", 404, o.Payload)
}

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

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

// NewPutPromptTagsUnprocessableEntity creates a PutPromptTagsUnprocessableEntity with default headers values
func NewPutPromptTagsUnprocessableEntity() *PutPromptTagsUnprocessableEntity {
	return &PutPromptTagsUnprocessableEntity{}
}

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

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

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

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

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

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

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

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

func (o *PutPromptTagsUnprocessableEntity) Error() string {
	return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *PutPromptTagsUnprocessableEntity) String() string {
	return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsUnprocessableEntity  %+v", 422, o.Payload)
}

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

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

// NewPutPromptTagsInternalServerError creates a PutPromptTagsInternalServerError with default headers values
func NewPutPromptTagsInternalServerError() *PutPromptTagsInternalServerError {
	return &PutPromptTagsInternalServerError{}
}

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

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

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

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

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

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

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

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

func (o *PutPromptTagsInternalServerError) Error() string {
	return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsInternalServerError  %+v", 500, o.Payload)
}

func (o *PutPromptTagsInternalServerError) String() string {
	return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsInternalServerError  %+v", 500, o.Payload)
}

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

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