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"
|
|
)
|
|
|
|
// GetPromptCategoriesReader is a Reader for the GetPromptCategories structure.
|
|
type GetPromptCategoriesReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetPromptCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetPromptCategoriesOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetPromptCategoriesUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewGetPromptCategoriesForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetPromptCategoriesNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewGetPromptCategoriesUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetPromptCategoriesInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetPromptCategoriesOK creates a GetPromptCategoriesOK with default headers values
|
|
func NewGetPromptCategoriesOK() *GetPromptCategoriesOK {
|
|
return &GetPromptCategoriesOK{}
|
|
}
|
|
|
|
/*
|
|
GetPromptCategoriesOK describes a response with status code 200, with default header values.
|
|
|
|
Response with PromptCategory objects
|
|
*/
|
|
type GetPromptCategoriesOK struct {
|
|
Payload *members_models.PromptCategoryResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this get prompt categories o k response has a 2xx status code
|
|
func (o *GetPromptCategoriesOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get prompt categories o k response has a 3xx status code
|
|
func (o *GetPromptCategoriesOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get prompt categories o k response has a 4xx status code
|
|
func (o *GetPromptCategoriesOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get prompt categories o k response has a 5xx status code
|
|
func (o *GetPromptCategoriesOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get prompt categories o k response a status code equal to that given
|
|
func (o *GetPromptCategoriesOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get prompt categories o k response
|
|
func (o *GetPromptCategoriesOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetPromptCategoriesOK) Error() string {
|
|
return fmt.Sprintf("[GET /promptcategories][%d] getPromptCategoriesOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptCategoriesOK) String() string {
|
|
return fmt.Sprintf("[GET /promptcategories][%d] getPromptCategoriesOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptCategoriesOK) GetPayload() *members_models.PromptCategoryResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPromptCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.PromptCategoryResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetPromptCategoriesUnauthorized creates a GetPromptCategoriesUnauthorized with default headers values
|
|
func NewGetPromptCategoriesUnauthorized() *GetPromptCategoriesUnauthorized {
|
|
return &GetPromptCategoriesUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetPromptCategoriesUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access Unauthorized, invalid API-KEY was used
|
|
*/
|
|
type GetPromptCategoriesUnauthorized struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get prompt categories unauthorized response has a 2xx status code
|
|
func (o *GetPromptCategoriesUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get prompt categories unauthorized response has a 3xx status code
|
|
func (o *GetPromptCategoriesUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get prompt categories unauthorized response has a 4xx status code
|
|
func (o *GetPromptCategoriesUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get prompt categories unauthorized response has a 5xx status code
|
|
func (o *GetPromptCategoriesUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get prompt categories unauthorized response a status code equal to that given
|
|
func (o *GetPromptCategoriesUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get prompt categories unauthorized response
|
|
func (o *GetPromptCategoriesUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetPromptCategoriesUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /promptcategories][%d] getPromptCategoriesUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptCategoriesUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /promptcategories][%d] getPromptCategoriesUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptCategoriesUnauthorized) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPromptCategoriesUnauthorized) 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
|
|
}
|
|
|
|
// NewGetPromptCategoriesForbidden creates a GetPromptCategoriesForbidden with default headers values
|
|
func NewGetPromptCategoriesForbidden() *GetPromptCategoriesForbidden {
|
|
return &GetPromptCategoriesForbidden{}
|
|
}
|
|
|
|
/*
|
|
GetPromptCategoriesForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type GetPromptCategoriesForbidden struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get prompt categories forbidden response has a 2xx status code
|
|
func (o *GetPromptCategoriesForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get prompt categories forbidden response has a 3xx status code
|
|
func (o *GetPromptCategoriesForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get prompt categories forbidden response has a 4xx status code
|
|
func (o *GetPromptCategoriesForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get prompt categories forbidden response has a 5xx status code
|
|
func (o *GetPromptCategoriesForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get prompt categories forbidden response a status code equal to that given
|
|
func (o *GetPromptCategoriesForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the get prompt categories forbidden response
|
|
func (o *GetPromptCategoriesForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *GetPromptCategoriesForbidden) Error() string {
|
|
return fmt.Sprintf("[GET /promptcategories][%d] getPromptCategoriesForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptCategoriesForbidden) String() string {
|
|
return fmt.Sprintf("[GET /promptcategories][%d] getPromptCategoriesForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptCategoriesForbidden) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPromptCategoriesForbidden) 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
|
|
}
|
|
|
|
// NewGetPromptCategoriesNotFound creates a GetPromptCategoriesNotFound with default headers values
|
|
func NewGetPromptCategoriesNotFound() *GetPromptCategoriesNotFound {
|
|
return &GetPromptCategoriesNotFound{}
|
|
}
|
|
|
|
/*
|
|
GetPromptCategoriesNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type GetPromptCategoriesNotFound struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get prompt categories not found response has a 2xx status code
|
|
func (o *GetPromptCategoriesNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get prompt categories not found response has a 3xx status code
|
|
func (o *GetPromptCategoriesNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get prompt categories not found response has a 4xx status code
|
|
func (o *GetPromptCategoriesNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get prompt categories not found response has a 5xx status code
|
|
func (o *GetPromptCategoriesNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get prompt categories not found response a status code equal to that given
|
|
func (o *GetPromptCategoriesNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the get prompt categories not found response
|
|
func (o *GetPromptCategoriesNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *GetPromptCategoriesNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /promptcategories][%d] getPromptCategoriesNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptCategoriesNotFound) String() string {
|
|
return fmt.Sprintf("[GET /promptcategories][%d] getPromptCategoriesNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptCategoriesNotFound) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPromptCategoriesNotFound) 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
|
|
}
|
|
|
|
// NewGetPromptCategoriesUnprocessableEntity creates a GetPromptCategoriesUnprocessableEntity with default headers values
|
|
func NewGetPromptCategoriesUnprocessableEntity() *GetPromptCategoriesUnprocessableEntity {
|
|
return &GetPromptCategoriesUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
GetPromptCategoriesUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type GetPromptCategoriesUnprocessableEntity struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get prompt categories unprocessable entity response has a 2xx status code
|
|
func (o *GetPromptCategoriesUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get prompt categories unprocessable entity response has a 3xx status code
|
|
func (o *GetPromptCategoriesUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get prompt categories unprocessable entity response has a 4xx status code
|
|
func (o *GetPromptCategoriesUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get prompt categories unprocessable entity response has a 5xx status code
|
|
func (o *GetPromptCategoriesUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get prompt categories unprocessable entity response a status code equal to that given
|
|
func (o *GetPromptCategoriesUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the get prompt categories unprocessable entity response
|
|
func (o *GetPromptCategoriesUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *GetPromptCategoriesUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[GET /promptcategories][%d] getPromptCategoriesUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptCategoriesUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[GET /promptcategories][%d] getPromptCategoriesUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptCategoriesUnprocessableEntity) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPromptCategoriesUnprocessableEntity) 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
|
|
}
|
|
|
|
// NewGetPromptCategoriesInternalServerError creates a GetPromptCategoriesInternalServerError with default headers values
|
|
func NewGetPromptCategoriesInternalServerError() *GetPromptCategoriesInternalServerError {
|
|
return &GetPromptCategoriesInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
GetPromptCategoriesInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type GetPromptCategoriesInternalServerError struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get prompt categories internal server error response has a 2xx status code
|
|
func (o *GetPromptCategoriesInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get prompt categories internal server error response has a 3xx status code
|
|
func (o *GetPromptCategoriesInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get prompt categories internal server error response has a 4xx status code
|
|
func (o *GetPromptCategoriesInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get prompt categories internal server error response has a 5xx status code
|
|
func (o *GetPromptCategoriesInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get prompt categories internal server error response a status code equal to that given
|
|
func (o *GetPromptCategoriesInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the get prompt categories internal server error response
|
|
func (o *GetPromptCategoriesInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *GetPromptCategoriesInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /promptcategories][%d] getPromptCategoriesInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptCategoriesInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /promptcategories][%d] getPromptCategoriesInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetPromptCategoriesInternalServerError) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPromptCategoriesInternalServerError) 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
|
|
}
|