lib/api/members/members_client/prompts/get_prompts_responses.go

487 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/members/members_models"
)
// GetPromptsReader is a Reader for the GetPrompts structure.
type GetPromptsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetPromptsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetPromptsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetPromptsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetPromptsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetPromptsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetPromptsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetPromptsInternalServerError()
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())
}
}
// NewGetPromptsOK creates a GetPromptsOK with default headers values
func NewGetPromptsOK() *GetPromptsOK {
return &GetPromptsOK{}
}
/*
GetPromptsOK describes a response with status code 200, with default header values.
Response with Prompt objects
*/
type GetPromptsOK struct {
Payload *members_models.PromptResponse
}
// IsSuccess returns true when this get prompts o k response has a 2xx status code
func (o *GetPromptsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get prompts o k response has a 3xx status code
func (o *GetPromptsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get prompts o k response has a 4xx status code
func (o *GetPromptsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get prompts o k response has a 5xx status code
func (o *GetPromptsOK) IsServerError() bool {
return false
}
// IsCode returns true when this get prompts o k response a status code equal to that given
func (o *GetPromptsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get prompts o k response
func (o *GetPromptsOK) Code() int {
return 200
}
func (o *GetPromptsOK) Error() string {
return fmt.Sprintf("[GET /prompts][%d] getPromptsOK %+v", 200, o.Payload)
}
func (o *GetPromptsOK) String() string {
return fmt.Sprintf("[GET /prompts][%d] getPromptsOK %+v", 200, o.Payload)
}
func (o *GetPromptsOK) GetPayload() *members_models.PromptResponse {
return o.Payload
}
func (o *GetPromptsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.PromptResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetPromptsUnauthorized creates a GetPromptsUnauthorized with default headers values
func NewGetPromptsUnauthorized() *GetPromptsUnauthorized {
return &GetPromptsUnauthorized{}
}
/*
GetPromptsUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetPromptsUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get prompts unauthorized response has a 2xx status code
func (o *GetPromptsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get prompts unauthorized response has a 3xx status code
func (o *GetPromptsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get prompts unauthorized response has a 4xx status code
func (o *GetPromptsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get prompts unauthorized response has a 5xx status code
func (o *GetPromptsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get prompts unauthorized response a status code equal to that given
func (o *GetPromptsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get prompts unauthorized response
func (o *GetPromptsUnauthorized) Code() int {
return 401
}
func (o *GetPromptsUnauthorized) Error() string {
return fmt.Sprintf("[GET /prompts][%d] getPromptsUnauthorized %+v", 401, o.Payload)
}
func (o *GetPromptsUnauthorized) String() string {
return fmt.Sprintf("[GET /prompts][%d] getPromptsUnauthorized %+v", 401, o.Payload)
}
func (o *GetPromptsUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetPromptsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetPromptsForbidden creates a GetPromptsForbidden with default headers values
func NewGetPromptsForbidden() *GetPromptsForbidden {
return &GetPromptsForbidden{}
}
/*
GetPromptsForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetPromptsForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this get prompts forbidden response has a 2xx status code
func (o *GetPromptsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get prompts forbidden response has a 3xx status code
func (o *GetPromptsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get prompts forbidden response has a 4xx status code
func (o *GetPromptsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get prompts forbidden response has a 5xx status code
func (o *GetPromptsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get prompts forbidden response a status code equal to that given
func (o *GetPromptsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get prompts forbidden response
func (o *GetPromptsForbidden) Code() int {
return 403
}
func (o *GetPromptsForbidden) Error() string {
return fmt.Sprintf("[GET /prompts][%d] getPromptsForbidden %+v", 403, o.Payload)
}
func (o *GetPromptsForbidden) String() string {
return fmt.Sprintf("[GET /prompts][%d] getPromptsForbidden %+v", 403, o.Payload)
}
func (o *GetPromptsForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetPromptsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetPromptsNotFound creates a GetPromptsNotFound with default headers values
func NewGetPromptsNotFound() *GetPromptsNotFound {
return &GetPromptsNotFound{}
}
/*
GetPromptsNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetPromptsNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get prompts not found response has a 2xx status code
func (o *GetPromptsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get prompts not found response has a 3xx status code
func (o *GetPromptsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get prompts not found response has a 4xx status code
func (o *GetPromptsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get prompts not found response has a 5xx status code
func (o *GetPromptsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get prompts not found response a status code equal to that given
func (o *GetPromptsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get prompts not found response
func (o *GetPromptsNotFound) Code() int {
return 404
}
func (o *GetPromptsNotFound) Error() string {
return fmt.Sprintf("[GET /prompts][%d] getPromptsNotFound %+v", 404, o.Payload)
}
func (o *GetPromptsNotFound) String() string {
return fmt.Sprintf("[GET /prompts][%d] getPromptsNotFound %+v", 404, o.Payload)
}
func (o *GetPromptsNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetPromptsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetPromptsUnprocessableEntity creates a GetPromptsUnprocessableEntity with default headers values
func NewGetPromptsUnprocessableEntity() *GetPromptsUnprocessableEntity {
return &GetPromptsUnprocessableEntity{}
}
/*
GetPromptsUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetPromptsUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get prompts unprocessable entity response has a 2xx status code
func (o *GetPromptsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get prompts unprocessable entity response has a 3xx status code
func (o *GetPromptsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get prompts unprocessable entity response has a 4xx status code
func (o *GetPromptsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get prompts unprocessable entity response has a 5xx status code
func (o *GetPromptsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get prompts unprocessable entity response a status code equal to that given
func (o *GetPromptsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get prompts unprocessable entity response
func (o *GetPromptsUnprocessableEntity) Code() int {
return 422
}
func (o *GetPromptsUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /prompts][%d] getPromptsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetPromptsUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /prompts][%d] getPromptsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetPromptsUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetPromptsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetPromptsInternalServerError creates a GetPromptsInternalServerError with default headers values
func NewGetPromptsInternalServerError() *GetPromptsInternalServerError {
return &GetPromptsInternalServerError{}
}
/*
GetPromptsInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetPromptsInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get prompts internal server error response has a 2xx status code
func (o *GetPromptsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get prompts internal server error response has a 3xx status code
func (o *GetPromptsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get prompts internal server error response has a 4xx status code
func (o *GetPromptsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get prompts internal server error response has a 5xx status code
func (o *GetPromptsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get prompts internal server error response a status code equal to that given
func (o *GetPromptsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get prompts internal server error response
func (o *GetPromptsInternalServerError) Code() int {
return 500
}
func (o *GetPromptsInternalServerError) Error() string {
return fmt.Sprintf("[GET /prompts][%d] getPromptsInternalServerError %+v", 500, o.Payload)
}
func (o *GetPromptsInternalServerError) String() string {
return fmt.Sprintf("[GET /prompts][%d] getPromptsInternalServerError %+v", 500, o.Payload)
}
func (o *GetPromptsInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetPromptsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}