lib/api/sfgate/sfgate_client/prompts/post_prompt_answers_respons...

478 lines
15 KiB
Go
Raw Permalink Normal View History

2023-06-17 01:24:46 +00:00
// 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"
)
// PostPromptAnswersReader is a Reader for the PostPromptAnswers structure.
type PostPromptAnswersReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostPromptAnswersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPostPromptAnswersOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostPromptAnswersUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostPromptAnswersForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostPromptAnswersNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostPromptAnswersUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostPromptAnswersInternalServerError()
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())
}
}
// NewPostPromptAnswersOK creates a PostPromptAnswersOK with default headers values
func NewPostPromptAnswersOK() *PostPromptAnswersOK {
return &PostPromptAnswersOK{}
}
/*
PostPromptAnswersOK describes a response with status code 200, with default header values.
Response with PromptAnswer objects
*/
type PostPromptAnswersOK struct {
Payload *sfgate_models.PromptAnswerResponse
}
// IsSuccess returns true when this post prompt answers o k response has a 2xx status code
func (o *PostPromptAnswersOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post prompt answers o k response has a 3xx status code
func (o *PostPromptAnswersOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this post prompt answers o k response has a 4xx status code
func (o *PostPromptAnswersOK) IsClientError() bool {
return false
}
// IsServerError returns true when this post prompt answers o k response has a 5xx status code
func (o *PostPromptAnswersOK) IsServerError() bool {
return false
}
// IsCode returns true when this post prompt answers o k response a status code equal to that given
func (o *PostPromptAnswersOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the post prompt answers o k response
func (o *PostPromptAnswersOK) Code() int {
return 200
}
func (o *PostPromptAnswersOK) Error() string {
return fmt.Sprintf("[POST /promptanswers][%d] postPromptAnswersOK %+v", 200, o.Payload)
}
func (o *PostPromptAnswersOK) String() string {
return fmt.Sprintf("[POST /promptanswers][%d] postPromptAnswersOK %+v", 200, o.Payload)
}
func (o *PostPromptAnswersOK) GetPayload() *sfgate_models.PromptAnswerResponse {
return o.Payload
}
func (o *PostPromptAnswersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.PromptAnswerResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostPromptAnswersUnauthorized creates a PostPromptAnswersUnauthorized with default headers values
func NewPostPromptAnswersUnauthorized() *PostPromptAnswersUnauthorized {
return &PostPromptAnswersUnauthorized{}
}
/*
PostPromptAnswersUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type PostPromptAnswersUnauthorized struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post prompt answers unauthorized response has a 2xx status code
func (o *PostPromptAnswersUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post prompt answers unauthorized response has a 3xx status code
func (o *PostPromptAnswersUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post prompt answers unauthorized response has a 4xx status code
func (o *PostPromptAnswersUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post prompt answers unauthorized response has a 5xx status code
func (o *PostPromptAnswersUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post prompt answers unauthorized response a status code equal to that given
func (o *PostPromptAnswersUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post prompt answers unauthorized response
func (o *PostPromptAnswersUnauthorized) Code() int {
return 401
}
func (o *PostPromptAnswersUnauthorized) Error() string {
return fmt.Sprintf("[POST /promptanswers][%d] postPromptAnswersUnauthorized %+v", 401, o.Payload)
}
func (o *PostPromptAnswersUnauthorized) String() string {
return fmt.Sprintf("[POST /promptanswers][%d] postPromptAnswersUnauthorized %+v", 401, o.Payload)
}
func (o *PostPromptAnswersUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostPromptAnswersUnauthorized) 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
}
// NewPostPromptAnswersForbidden creates a PostPromptAnswersForbidden with default headers values
func NewPostPromptAnswersForbidden() *PostPromptAnswersForbidden {
return &PostPromptAnswersForbidden{}
}
/*
PostPromptAnswersForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PostPromptAnswersForbidden struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post prompt answers forbidden response has a 2xx status code
func (o *PostPromptAnswersForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post prompt answers forbidden response has a 3xx status code
func (o *PostPromptAnswersForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post prompt answers forbidden response has a 4xx status code
func (o *PostPromptAnswersForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post prompt answers forbidden response has a 5xx status code
func (o *PostPromptAnswersForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post prompt answers forbidden response a status code equal to that given
func (o *PostPromptAnswersForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post prompt answers forbidden response
func (o *PostPromptAnswersForbidden) Code() int {
return 403
}
func (o *PostPromptAnswersForbidden) Error() string {
return fmt.Sprintf("[POST /promptanswers][%d] postPromptAnswersForbidden %+v", 403, o.Payload)
}
func (o *PostPromptAnswersForbidden) String() string {
return fmt.Sprintf("[POST /promptanswers][%d] postPromptAnswersForbidden %+v", 403, o.Payload)
}
func (o *PostPromptAnswersForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostPromptAnswersForbidden) 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
}
// NewPostPromptAnswersNotFound creates a PostPromptAnswersNotFound with default headers values
func NewPostPromptAnswersNotFound() *PostPromptAnswersNotFound {
return &PostPromptAnswersNotFound{}
}
/*
PostPromptAnswersNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PostPromptAnswersNotFound struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post prompt answers not found response has a 2xx status code
func (o *PostPromptAnswersNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post prompt answers not found response has a 3xx status code
func (o *PostPromptAnswersNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post prompt answers not found response has a 4xx status code
func (o *PostPromptAnswersNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post prompt answers not found response has a 5xx status code
func (o *PostPromptAnswersNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post prompt answers not found response a status code equal to that given
func (o *PostPromptAnswersNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post prompt answers not found response
func (o *PostPromptAnswersNotFound) Code() int {
return 404
}
func (o *PostPromptAnswersNotFound) Error() string {
return fmt.Sprintf("[POST /promptanswers][%d] postPromptAnswersNotFound %+v", 404, o.Payload)
}
func (o *PostPromptAnswersNotFound) String() string {
return fmt.Sprintf("[POST /promptanswers][%d] postPromptAnswersNotFound %+v", 404, o.Payload)
}
func (o *PostPromptAnswersNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostPromptAnswersNotFound) 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
}
// NewPostPromptAnswersUnprocessableEntity creates a PostPromptAnswersUnprocessableEntity with default headers values
func NewPostPromptAnswersUnprocessableEntity() *PostPromptAnswersUnprocessableEntity {
return &PostPromptAnswersUnprocessableEntity{}
}
/*
PostPromptAnswersUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PostPromptAnswersUnprocessableEntity struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post prompt answers unprocessable entity response has a 2xx status code
func (o *PostPromptAnswersUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post prompt answers unprocessable entity response has a 3xx status code
func (o *PostPromptAnswersUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post prompt answers unprocessable entity response has a 4xx status code
func (o *PostPromptAnswersUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post prompt answers unprocessable entity response has a 5xx status code
func (o *PostPromptAnswersUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post prompt answers unprocessable entity response a status code equal to that given
func (o *PostPromptAnswersUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post prompt answers unprocessable entity response
func (o *PostPromptAnswersUnprocessableEntity) Code() int {
return 422
}
func (o *PostPromptAnswersUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /promptanswers][%d] postPromptAnswersUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostPromptAnswersUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /promptanswers][%d] postPromptAnswersUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostPromptAnswersUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostPromptAnswersUnprocessableEntity) 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
}
// NewPostPromptAnswersInternalServerError creates a PostPromptAnswersInternalServerError with default headers values
func NewPostPromptAnswersInternalServerError() *PostPromptAnswersInternalServerError {
return &PostPromptAnswersInternalServerError{}
}
/*
PostPromptAnswersInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PostPromptAnswersInternalServerError struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post prompt answers internal server error response has a 2xx status code
func (o *PostPromptAnswersInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post prompt answers internal server error response has a 3xx status code
func (o *PostPromptAnswersInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post prompt answers internal server error response has a 4xx status code
func (o *PostPromptAnswersInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post prompt answers internal server error response has a 5xx status code
func (o *PostPromptAnswersInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post prompt answers internal server error response a status code equal to that given
func (o *PostPromptAnswersInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post prompt answers internal server error response
func (o *PostPromptAnswersInternalServerError) Code() int {
return 500
}
func (o *PostPromptAnswersInternalServerError) Error() string {
return fmt.Sprintf("[POST /promptanswers][%d] postPromptAnswersInternalServerError %+v", 500, o.Payload)
}
func (o *PostPromptAnswersInternalServerError) String() string {
return fmt.Sprintf("[POST /promptanswers][%d] postPromptAnswersInternalServerError %+v", 500, o.Payload)
}
func (o *PostPromptAnswersInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostPromptAnswersInternalServerError) 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
}