lib/api/sfgate/sfgate_client/prompts/put_prompts_responses.go

478 lines
14 KiB
Go

// 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
// 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/vernonkeenan/lib/api/sfgate/sfgate_models"
)
// PutPromptsReader is a Reader for the PutPrompts structure.
type PutPromptsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PutPromptsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPutPromptsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPutPromptsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPutPromptsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPutPromptsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPutPromptsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPutPromptsInternalServerError()
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())
}
}
// NewPutPromptsOK creates a PutPromptsOK with default headers values
func NewPutPromptsOK() *PutPromptsOK {
return &PutPromptsOK{}
}
/*
PutPromptsOK describes a response with status code 200, with default header values.
Response with Prompt objects
*/
type PutPromptsOK struct {
Payload *sfgate_models.PromptResponse
}
// IsSuccess returns true when this put prompts o k response has a 2xx status code
func (o *PutPromptsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this put prompts o k response has a 3xx status code
func (o *PutPromptsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this put prompts o k response has a 4xx status code
func (o *PutPromptsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this put prompts o k response has a 5xx status code
func (o *PutPromptsOK) IsServerError() bool {
return false
}
// IsCode returns true when this put prompts o k response a status code equal to that given
func (o *PutPromptsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the put prompts o k response
func (o *PutPromptsOK) Code() int {
return 200
}
func (o *PutPromptsOK) Error() string {
return fmt.Sprintf("[PUT /prompts][%d] putPromptsOK %+v", 200, o.Payload)
}
func (o *PutPromptsOK) String() string {
return fmt.Sprintf("[PUT /prompts][%d] putPromptsOK %+v", 200, o.Payload)
}
func (o *PutPromptsOK) GetPayload() *sfgate_models.PromptResponse {
return o.Payload
}
func (o *PutPromptsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.PromptResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPutPromptsUnauthorized creates a PutPromptsUnauthorized with default headers values
func NewPutPromptsUnauthorized() *PutPromptsUnauthorized {
return &PutPromptsUnauthorized{}
}
/*
PutPromptsUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type PutPromptsUnauthorized struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this put prompts unauthorized response has a 2xx status code
func (o *PutPromptsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put prompts unauthorized response has a 3xx status code
func (o *PutPromptsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this put prompts unauthorized response has a 4xx status code
func (o *PutPromptsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this put prompts unauthorized response has a 5xx status code
func (o *PutPromptsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this put prompts unauthorized response a status code equal to that given
func (o *PutPromptsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the put prompts unauthorized response
func (o *PutPromptsUnauthorized) Code() int {
return 401
}
func (o *PutPromptsUnauthorized) Error() string {
return fmt.Sprintf("[PUT /prompts][%d] putPromptsUnauthorized %+v", 401, o.Payload)
}
func (o *PutPromptsUnauthorized) String() string {
return fmt.Sprintf("[PUT /prompts][%d] putPromptsUnauthorized %+v", 401, o.Payload)
}
func (o *PutPromptsUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PutPromptsUnauthorized) 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
}
// NewPutPromptsForbidden creates a PutPromptsForbidden with default headers values
func NewPutPromptsForbidden() *PutPromptsForbidden {
return &PutPromptsForbidden{}
}
/*
PutPromptsForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PutPromptsForbidden struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this put prompts forbidden response has a 2xx status code
func (o *PutPromptsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put prompts forbidden response has a 3xx status code
func (o *PutPromptsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this put prompts forbidden response has a 4xx status code
func (o *PutPromptsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this put prompts forbidden response has a 5xx status code
func (o *PutPromptsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this put prompts forbidden response a status code equal to that given
func (o *PutPromptsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the put prompts forbidden response
func (o *PutPromptsForbidden) Code() int {
return 403
}
func (o *PutPromptsForbidden) Error() string {
return fmt.Sprintf("[PUT /prompts][%d] putPromptsForbidden %+v", 403, o.Payload)
}
func (o *PutPromptsForbidden) String() string {
return fmt.Sprintf("[PUT /prompts][%d] putPromptsForbidden %+v", 403, o.Payload)
}
func (o *PutPromptsForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PutPromptsForbidden) 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
}
// NewPutPromptsNotFound creates a PutPromptsNotFound with default headers values
func NewPutPromptsNotFound() *PutPromptsNotFound {
return &PutPromptsNotFound{}
}
/*
PutPromptsNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PutPromptsNotFound struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this put prompts not found response has a 2xx status code
func (o *PutPromptsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put prompts not found response has a 3xx status code
func (o *PutPromptsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this put prompts not found response has a 4xx status code
func (o *PutPromptsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this put prompts not found response has a 5xx status code
func (o *PutPromptsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this put prompts not found response a status code equal to that given
func (o *PutPromptsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the put prompts not found response
func (o *PutPromptsNotFound) Code() int {
return 404
}
func (o *PutPromptsNotFound) Error() string {
return fmt.Sprintf("[PUT /prompts][%d] putPromptsNotFound %+v", 404, o.Payload)
}
func (o *PutPromptsNotFound) String() string {
return fmt.Sprintf("[PUT /prompts][%d] putPromptsNotFound %+v", 404, o.Payload)
}
func (o *PutPromptsNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PutPromptsNotFound) 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
}
// NewPutPromptsUnprocessableEntity creates a PutPromptsUnprocessableEntity with default headers values
func NewPutPromptsUnprocessableEntity() *PutPromptsUnprocessableEntity {
return &PutPromptsUnprocessableEntity{}
}
/*
PutPromptsUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PutPromptsUnprocessableEntity struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this put prompts unprocessable entity response has a 2xx status code
func (o *PutPromptsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put prompts unprocessable entity response has a 3xx status code
func (o *PutPromptsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this put prompts unprocessable entity response has a 4xx status code
func (o *PutPromptsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this put prompts unprocessable entity response has a 5xx status code
func (o *PutPromptsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this put prompts unprocessable entity response a status code equal to that given
func (o *PutPromptsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the put prompts unprocessable entity response
func (o *PutPromptsUnprocessableEntity) Code() int {
return 422
}
func (o *PutPromptsUnprocessableEntity) Error() string {
return fmt.Sprintf("[PUT /prompts][%d] putPromptsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutPromptsUnprocessableEntity) String() string {
return fmt.Sprintf("[PUT /prompts][%d] putPromptsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutPromptsUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PutPromptsUnprocessableEntity) 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
}
// NewPutPromptsInternalServerError creates a PutPromptsInternalServerError with default headers values
func NewPutPromptsInternalServerError() *PutPromptsInternalServerError {
return &PutPromptsInternalServerError{}
}
/*
PutPromptsInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PutPromptsInternalServerError struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this put prompts internal server error response has a 2xx status code
func (o *PutPromptsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put prompts internal server error response has a 3xx status code
func (o *PutPromptsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this put prompts internal server error response has a 4xx status code
func (o *PutPromptsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this put prompts internal server error response has a 5xx status code
func (o *PutPromptsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this put prompts internal server error response a status code equal to that given
func (o *PutPromptsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the put prompts internal server error response
func (o *PutPromptsInternalServerError) Code() int {
return 500
}
func (o *PutPromptsInternalServerError) Error() string {
return fmt.Sprintf("[PUT /prompts][%d] putPromptsInternalServerError %+v", 500, o.Payload)
}
func (o *PutPromptsInternalServerError) String() string {
return fmt.Sprintf("[PUT /prompts][%d] putPromptsInternalServerError %+v", 500, o.Payload)
}
func (o *PutPromptsInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PutPromptsInternalServerError) 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
}