mirror of https://github.com/vernonkeenan/lib
487 lines
16 KiB
Go
487 lines
16 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"
|
|
)
|
|
|
|
// PutPromptAnsweersReader is a Reader for the PutPromptAnsweers structure.
|
|
type PutPromptAnsweersReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *PutPromptAnsweersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewPutPromptAnsweersOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewPutPromptAnsweersUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewPutPromptAnsweersForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewPutPromptAnsweersNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewPutPromptAnsweersUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewPutPromptAnsweersInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewPutPromptAnsweersOK creates a PutPromptAnsweersOK with default headers values
|
|
func NewPutPromptAnsweersOK() *PutPromptAnsweersOK {
|
|
return &PutPromptAnsweersOK{}
|
|
}
|
|
|
|
/*
|
|
PutPromptAnsweersOK describes a response with status code 200, with default header values.
|
|
|
|
Response with PromptAnswer objects
|
|
*/
|
|
type PutPromptAnsweersOK struct {
|
|
Payload *members_models.PromptAnswerResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this put prompt answeers o k response has a 2xx status code
|
|
func (o *PutPromptAnsweersOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this put prompt answeers o k response has a 3xx status code
|
|
func (o *PutPromptAnsweersOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this put prompt answeers o k response has a 4xx status code
|
|
func (o *PutPromptAnsweersOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this put prompt answeers o k response has a 5xx status code
|
|
func (o *PutPromptAnsweersOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this put prompt answeers o k response a status code equal to that given
|
|
func (o *PutPromptAnsweersOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the put prompt answeers o k response
|
|
func (o *PutPromptAnsweersOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *PutPromptAnsweersOK) Error() string {
|
|
return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *PutPromptAnsweersOK) String() string {
|
|
return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *PutPromptAnsweersOK) GetPayload() *members_models.PromptAnswerResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PutPromptAnsweersOK) 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
|
|
}
|
|
|
|
// NewPutPromptAnsweersUnauthorized creates a PutPromptAnsweersUnauthorized with default headers values
|
|
func NewPutPromptAnsweersUnauthorized() *PutPromptAnsweersUnauthorized {
|
|
return &PutPromptAnsweersUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
PutPromptAnsweersUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access Unauthorized, invalid API-KEY was used
|
|
*/
|
|
type PutPromptAnsweersUnauthorized struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this put prompt answeers unauthorized response has a 2xx status code
|
|
func (o *PutPromptAnsweersUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this put prompt answeers unauthorized response has a 3xx status code
|
|
func (o *PutPromptAnsweersUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this put prompt answeers unauthorized response has a 4xx status code
|
|
func (o *PutPromptAnsweersUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this put prompt answeers unauthorized response has a 5xx status code
|
|
func (o *PutPromptAnsweersUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this put prompt answeers unauthorized response a status code equal to that given
|
|
func (o *PutPromptAnsweersUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the put prompt answeers unauthorized response
|
|
func (o *PutPromptAnsweersUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *PutPromptAnsweersUnauthorized) Error() string {
|
|
return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *PutPromptAnsweersUnauthorized) String() string {
|
|
return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *PutPromptAnsweersUnauthorized) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PutPromptAnsweersUnauthorized) 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
|
|
}
|
|
|
|
// NewPutPromptAnsweersForbidden creates a PutPromptAnsweersForbidden with default headers values
|
|
func NewPutPromptAnsweersForbidden() *PutPromptAnsweersForbidden {
|
|
return &PutPromptAnsweersForbidden{}
|
|
}
|
|
|
|
/*
|
|
PutPromptAnsweersForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type PutPromptAnsweersForbidden struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this put prompt answeers forbidden response has a 2xx status code
|
|
func (o *PutPromptAnsweersForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this put prompt answeers forbidden response has a 3xx status code
|
|
func (o *PutPromptAnsweersForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this put prompt answeers forbidden response has a 4xx status code
|
|
func (o *PutPromptAnsweersForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this put prompt answeers forbidden response has a 5xx status code
|
|
func (o *PutPromptAnsweersForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this put prompt answeers forbidden response a status code equal to that given
|
|
func (o *PutPromptAnsweersForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the put prompt answeers forbidden response
|
|
func (o *PutPromptAnsweersForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *PutPromptAnsweersForbidden) Error() string {
|
|
return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *PutPromptAnsweersForbidden) String() string {
|
|
return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *PutPromptAnsweersForbidden) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PutPromptAnsweersForbidden) 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
|
|
}
|
|
|
|
// NewPutPromptAnsweersNotFound creates a PutPromptAnsweersNotFound with default headers values
|
|
func NewPutPromptAnsweersNotFound() *PutPromptAnsweersNotFound {
|
|
return &PutPromptAnsweersNotFound{}
|
|
}
|
|
|
|
/*
|
|
PutPromptAnsweersNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type PutPromptAnsweersNotFound struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this put prompt answeers not found response has a 2xx status code
|
|
func (o *PutPromptAnsweersNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this put prompt answeers not found response has a 3xx status code
|
|
func (o *PutPromptAnsweersNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this put prompt answeers not found response has a 4xx status code
|
|
func (o *PutPromptAnsweersNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this put prompt answeers not found response has a 5xx status code
|
|
func (o *PutPromptAnsweersNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this put prompt answeers not found response a status code equal to that given
|
|
func (o *PutPromptAnsweersNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the put prompt answeers not found response
|
|
func (o *PutPromptAnsweersNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *PutPromptAnsweersNotFound) Error() string {
|
|
return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *PutPromptAnsweersNotFound) String() string {
|
|
return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *PutPromptAnsweersNotFound) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PutPromptAnsweersNotFound) 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
|
|
}
|
|
|
|
// NewPutPromptAnsweersUnprocessableEntity creates a PutPromptAnsweersUnprocessableEntity with default headers values
|
|
func NewPutPromptAnsweersUnprocessableEntity() *PutPromptAnsweersUnprocessableEntity {
|
|
return &PutPromptAnsweersUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
PutPromptAnsweersUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type PutPromptAnsweersUnprocessableEntity struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this put prompt answeers unprocessable entity response has a 2xx status code
|
|
func (o *PutPromptAnsweersUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this put prompt answeers unprocessable entity response has a 3xx status code
|
|
func (o *PutPromptAnsweersUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this put prompt answeers unprocessable entity response has a 4xx status code
|
|
func (o *PutPromptAnsweersUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this put prompt answeers unprocessable entity response has a 5xx status code
|
|
func (o *PutPromptAnsweersUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this put prompt answeers unprocessable entity response a status code equal to that given
|
|
func (o *PutPromptAnsweersUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the put prompt answeers unprocessable entity response
|
|
func (o *PutPromptAnsweersUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *PutPromptAnsweersUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *PutPromptAnsweersUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *PutPromptAnsweersUnprocessableEntity) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PutPromptAnsweersUnprocessableEntity) 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
|
|
}
|
|
|
|
// NewPutPromptAnsweersInternalServerError creates a PutPromptAnsweersInternalServerError with default headers values
|
|
func NewPutPromptAnsweersInternalServerError() *PutPromptAnsweersInternalServerError {
|
|
return &PutPromptAnsweersInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
PutPromptAnsweersInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type PutPromptAnsweersInternalServerError struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this put prompt answeers internal server error response has a 2xx status code
|
|
func (o *PutPromptAnsweersInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this put prompt answeers internal server error response has a 3xx status code
|
|
func (o *PutPromptAnsweersInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this put prompt answeers internal server error response has a 4xx status code
|
|
func (o *PutPromptAnsweersInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this put prompt answeers internal server error response has a 5xx status code
|
|
func (o *PutPromptAnsweersInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this put prompt answeers internal server error response a status code equal to that given
|
|
func (o *PutPromptAnsweersInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the put prompt answeers internal server error response
|
|
func (o *PutPromptAnsweersInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *PutPromptAnsweersInternalServerError) Error() string {
|
|
return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *PutPromptAnsweersInternalServerError) String() string {
|
|
return fmt.Sprintf("[PUT /promptanswers][%d] putPromptAnsweersInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *PutPromptAnsweersInternalServerError) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PutPromptAnsweersInternalServerError) 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
|
|
}
|