mirror of https://github.com/vernonkeenan/lib
487 lines
15 KiB
Go
487 lines
15 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"
|
|
)
|
|
|
|
// GetPromptAnswersReader is a Reader for the GetPromptAnswers structure.
|
|
type GetPromptAnswersReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetPromptAnswersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetPromptAnswersOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetPromptAnswersUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewGetPromptAnswersForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetPromptAnswersNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewGetPromptAnswersUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetPromptAnswersInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetPromptAnswersOK creates a GetPromptAnswersOK with default headers values
|
|
func NewGetPromptAnswersOK() *GetPromptAnswersOK {
|
|
return &GetPromptAnswersOK{}
|
|
}
|
|
|
|
/*
|
|
GetPromptAnswersOK describes a response with status code 200, with default header values.
|
|
|
|
Response with PromptAnswer objects
|
|
*/
|
|
type GetPromptAnswersOK struct {
|
|
Payload *members_models.PromptAnswerResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this get prompt answers o k response has a 2xx status code
|
|
func (o *GetPromptAnswersOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get prompt answers o k response has a 3xx status code
|
|
func (o *GetPromptAnswersOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get prompt answers o k response has a 4xx status code
|
|
func (o *GetPromptAnswersOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get prompt answers o k response has a 5xx status code
|
|
func (o *GetPromptAnswersOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get prompt answers o k response a status code equal to that given
|
|
func (o *GetPromptAnswersOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get prompt answers o k response
|
|
func (o *GetPromptAnswersOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetPromptAnswersOK) Error() string {
|
|
return fmt.Sprintf("[GET /promptanswers][%d] getPromptAnswersOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptAnswersOK) String() string {
|
|
return fmt.Sprintf("[GET /promptanswers][%d] getPromptAnswersOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptAnswersOK) GetPayload() *members_models.PromptAnswerResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPromptAnswersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.PromptAnswerResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetPromptAnswersUnauthorized creates a GetPromptAnswersUnauthorized with default headers values
|
|
func NewGetPromptAnswersUnauthorized() *GetPromptAnswersUnauthorized {
|
|
return &GetPromptAnswersUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetPromptAnswersUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access Unauthorized, invalid API-KEY was used
|
|
*/
|
|
type GetPromptAnswersUnauthorized struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get prompt answers unauthorized response has a 2xx status code
|
|
func (o *GetPromptAnswersUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get prompt answers unauthorized response has a 3xx status code
|
|
func (o *GetPromptAnswersUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get prompt answers unauthorized response has a 4xx status code
|
|
func (o *GetPromptAnswersUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get prompt answers unauthorized response has a 5xx status code
|
|
func (o *GetPromptAnswersUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get prompt answers unauthorized response a status code equal to that given
|
|
func (o *GetPromptAnswersUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get prompt answers unauthorized response
|
|
func (o *GetPromptAnswersUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetPromptAnswersUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /promptanswers][%d] getPromptAnswersUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptAnswersUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /promptanswers][%d] getPromptAnswersUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptAnswersUnauthorized) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPromptAnswersUnauthorized) 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
|
|
}
|
|
|
|
// NewGetPromptAnswersForbidden creates a GetPromptAnswersForbidden with default headers values
|
|
func NewGetPromptAnswersForbidden() *GetPromptAnswersForbidden {
|
|
return &GetPromptAnswersForbidden{}
|
|
}
|
|
|
|
/*
|
|
GetPromptAnswersForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type GetPromptAnswersForbidden struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get prompt answers forbidden response has a 2xx status code
|
|
func (o *GetPromptAnswersForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get prompt answers forbidden response has a 3xx status code
|
|
func (o *GetPromptAnswersForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get prompt answers forbidden response has a 4xx status code
|
|
func (o *GetPromptAnswersForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get prompt answers forbidden response has a 5xx status code
|
|
func (o *GetPromptAnswersForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get prompt answers forbidden response a status code equal to that given
|
|
func (o *GetPromptAnswersForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the get prompt answers forbidden response
|
|
func (o *GetPromptAnswersForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *GetPromptAnswersForbidden) Error() string {
|
|
return fmt.Sprintf("[GET /promptanswers][%d] getPromptAnswersForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptAnswersForbidden) String() string {
|
|
return fmt.Sprintf("[GET /promptanswers][%d] getPromptAnswersForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptAnswersForbidden) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPromptAnswersForbidden) 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
|
|
}
|
|
|
|
// NewGetPromptAnswersNotFound creates a GetPromptAnswersNotFound with default headers values
|
|
func NewGetPromptAnswersNotFound() *GetPromptAnswersNotFound {
|
|
return &GetPromptAnswersNotFound{}
|
|
}
|
|
|
|
/*
|
|
GetPromptAnswersNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type GetPromptAnswersNotFound struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get prompt answers not found response has a 2xx status code
|
|
func (o *GetPromptAnswersNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get prompt answers not found response has a 3xx status code
|
|
func (o *GetPromptAnswersNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get prompt answers not found response has a 4xx status code
|
|
func (o *GetPromptAnswersNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get prompt answers not found response has a 5xx status code
|
|
func (o *GetPromptAnswersNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get prompt answers not found response a status code equal to that given
|
|
func (o *GetPromptAnswersNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the get prompt answers not found response
|
|
func (o *GetPromptAnswersNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *GetPromptAnswersNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /promptanswers][%d] getPromptAnswersNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptAnswersNotFound) String() string {
|
|
return fmt.Sprintf("[GET /promptanswers][%d] getPromptAnswersNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptAnswersNotFound) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPromptAnswersNotFound) 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
|
|
}
|
|
|
|
// NewGetPromptAnswersUnprocessableEntity creates a GetPromptAnswersUnprocessableEntity with default headers values
|
|
func NewGetPromptAnswersUnprocessableEntity() *GetPromptAnswersUnprocessableEntity {
|
|
return &GetPromptAnswersUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
GetPromptAnswersUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type GetPromptAnswersUnprocessableEntity struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get prompt answers unprocessable entity response has a 2xx status code
|
|
func (o *GetPromptAnswersUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get prompt answers unprocessable entity response has a 3xx status code
|
|
func (o *GetPromptAnswersUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get prompt answers unprocessable entity response has a 4xx status code
|
|
func (o *GetPromptAnswersUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get prompt answers unprocessable entity response has a 5xx status code
|
|
func (o *GetPromptAnswersUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get prompt answers unprocessable entity response a status code equal to that given
|
|
func (o *GetPromptAnswersUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the get prompt answers unprocessable entity response
|
|
func (o *GetPromptAnswersUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *GetPromptAnswersUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[GET /promptanswers][%d] getPromptAnswersUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptAnswersUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[GET /promptanswers][%d] getPromptAnswersUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptAnswersUnprocessableEntity) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPromptAnswersUnprocessableEntity) 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
|
|
}
|
|
|
|
// NewGetPromptAnswersInternalServerError creates a GetPromptAnswersInternalServerError with default headers values
|
|
func NewGetPromptAnswersInternalServerError() *GetPromptAnswersInternalServerError {
|
|
return &GetPromptAnswersInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
GetPromptAnswersInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type GetPromptAnswersInternalServerError struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get prompt answers internal server error response has a 2xx status code
|
|
func (o *GetPromptAnswersInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get prompt answers internal server error response has a 3xx status code
|
|
func (o *GetPromptAnswersInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get prompt answers internal server error response has a 4xx status code
|
|
func (o *GetPromptAnswersInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get prompt answers internal server error response has a 5xx status code
|
|
func (o *GetPromptAnswersInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get prompt answers internal server error response a status code equal to that given
|
|
func (o *GetPromptAnswersInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the get prompt answers internal server error response
|
|
func (o *GetPromptAnswersInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *GetPromptAnswersInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /promptanswers][%d] getPromptAnswersInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptAnswersInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /promptanswers][%d] getPromptAnswersInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptAnswersInternalServerError) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPromptAnswersInternalServerError) 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
|
|
}
|