lib/api/members/members_client/prompts/post_prompt_categories_resp...

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"
)
// PostPromptCategoriesReader is a Reader for the PostPromptCategories structure.
type PostPromptCategoriesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostPromptCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPostPromptCategoriesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostPromptCategoriesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostPromptCategoriesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostPromptCategoriesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostPromptCategoriesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostPromptCategoriesInternalServerError()
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())
}
}
// NewPostPromptCategoriesOK creates a PostPromptCategoriesOK with default headers values
func NewPostPromptCategoriesOK() *PostPromptCategoriesOK {
return &PostPromptCategoriesOK{}
}
/*
PostPromptCategoriesOK describes a response with status code 200, with default header values.
Response with PromptCategory objects
*/
type PostPromptCategoriesOK struct {
Payload *members_models.PromptCategoryResponse
}
// IsSuccess returns true when this post prompt categories o k response has a 2xx status code
func (o *PostPromptCategoriesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post prompt categories o k response has a 3xx status code
func (o *PostPromptCategoriesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this post prompt categories o k response has a 4xx status code
func (o *PostPromptCategoriesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this post prompt categories o k response has a 5xx status code
func (o *PostPromptCategoriesOK) IsServerError() bool {
return false
}
// IsCode returns true when this post prompt categories o k response a status code equal to that given
func (o *PostPromptCategoriesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the post prompt categories o k response
func (o *PostPromptCategoriesOK) Code() int {
return 200
}
func (o *PostPromptCategoriesOK) Error() string {
return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesOK %+v", 200, o.Payload)
}
func (o *PostPromptCategoriesOK) String() string {
return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesOK %+v", 200, o.Payload)
}
func (o *PostPromptCategoriesOK) GetPayload() *members_models.PromptCategoryResponse {
return o.Payload
}
func (o *PostPromptCategoriesOK) 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
}
// NewPostPromptCategoriesUnauthorized creates a PostPromptCategoriesUnauthorized with default headers values
func NewPostPromptCategoriesUnauthorized() *PostPromptCategoriesUnauthorized {
return &PostPromptCategoriesUnauthorized{}
}
/*
PostPromptCategoriesUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type PostPromptCategoriesUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post prompt categories unauthorized response has a 2xx status code
func (o *PostPromptCategoriesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post prompt categories unauthorized response has a 3xx status code
func (o *PostPromptCategoriesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post prompt categories unauthorized response has a 4xx status code
func (o *PostPromptCategoriesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post prompt categories unauthorized response has a 5xx status code
func (o *PostPromptCategoriesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post prompt categories unauthorized response a status code equal to that given
func (o *PostPromptCategoriesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post prompt categories unauthorized response
func (o *PostPromptCategoriesUnauthorized) Code() int {
return 401
}
func (o *PostPromptCategoriesUnauthorized) Error() string {
return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesUnauthorized %+v", 401, o.Payload)
}
func (o *PostPromptCategoriesUnauthorized) String() string {
return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesUnauthorized %+v", 401, o.Payload)
}
func (o *PostPromptCategoriesUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostPromptCategoriesUnauthorized) 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
}
// NewPostPromptCategoriesForbidden creates a PostPromptCategoriesForbidden with default headers values
func NewPostPromptCategoriesForbidden() *PostPromptCategoriesForbidden {
return &PostPromptCategoriesForbidden{}
}
/*
PostPromptCategoriesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PostPromptCategoriesForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this post prompt categories forbidden response has a 2xx status code
func (o *PostPromptCategoriesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post prompt categories forbidden response has a 3xx status code
func (o *PostPromptCategoriesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post prompt categories forbidden response has a 4xx status code
func (o *PostPromptCategoriesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post prompt categories forbidden response has a 5xx status code
func (o *PostPromptCategoriesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post prompt categories forbidden response a status code equal to that given
func (o *PostPromptCategoriesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post prompt categories forbidden response
func (o *PostPromptCategoriesForbidden) Code() int {
return 403
}
func (o *PostPromptCategoriesForbidden) Error() string {
return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesForbidden %+v", 403, o.Payload)
}
func (o *PostPromptCategoriesForbidden) String() string {
return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesForbidden %+v", 403, o.Payload)
}
func (o *PostPromptCategoriesForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostPromptCategoriesForbidden) 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
}
// NewPostPromptCategoriesNotFound creates a PostPromptCategoriesNotFound with default headers values
func NewPostPromptCategoriesNotFound() *PostPromptCategoriesNotFound {
return &PostPromptCategoriesNotFound{}
}
/*
PostPromptCategoriesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PostPromptCategoriesNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post prompt categories not found response has a 2xx status code
func (o *PostPromptCategoriesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post prompt categories not found response has a 3xx status code
func (o *PostPromptCategoriesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post prompt categories not found response has a 4xx status code
func (o *PostPromptCategoriesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post prompt categories not found response has a 5xx status code
func (o *PostPromptCategoriesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post prompt categories not found response a status code equal to that given
func (o *PostPromptCategoriesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post prompt categories not found response
func (o *PostPromptCategoriesNotFound) Code() int {
return 404
}
func (o *PostPromptCategoriesNotFound) Error() string {
return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesNotFound %+v", 404, o.Payload)
}
func (o *PostPromptCategoriesNotFound) String() string {
return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesNotFound %+v", 404, o.Payload)
}
func (o *PostPromptCategoriesNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostPromptCategoriesNotFound) 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
}
// NewPostPromptCategoriesUnprocessableEntity creates a PostPromptCategoriesUnprocessableEntity with default headers values
func NewPostPromptCategoriesUnprocessableEntity() *PostPromptCategoriesUnprocessableEntity {
return &PostPromptCategoriesUnprocessableEntity{}
}
/*
PostPromptCategoriesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PostPromptCategoriesUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post prompt categories unprocessable entity response has a 2xx status code
func (o *PostPromptCategoriesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post prompt categories unprocessable entity response has a 3xx status code
func (o *PostPromptCategoriesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post prompt categories unprocessable entity response has a 4xx status code
func (o *PostPromptCategoriesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post prompt categories unprocessable entity response has a 5xx status code
func (o *PostPromptCategoriesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post prompt categories unprocessable entity response a status code equal to that given
func (o *PostPromptCategoriesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post prompt categories unprocessable entity response
func (o *PostPromptCategoriesUnprocessableEntity) Code() int {
return 422
}
func (o *PostPromptCategoriesUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostPromptCategoriesUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostPromptCategoriesUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostPromptCategoriesUnprocessableEntity) 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
}
// NewPostPromptCategoriesInternalServerError creates a PostPromptCategoriesInternalServerError with default headers values
func NewPostPromptCategoriesInternalServerError() *PostPromptCategoriesInternalServerError {
return &PostPromptCategoriesInternalServerError{}
}
/*
PostPromptCategoriesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PostPromptCategoriesInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post prompt categories internal server error response has a 2xx status code
func (o *PostPromptCategoriesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post prompt categories internal server error response has a 3xx status code
func (o *PostPromptCategoriesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post prompt categories internal server error response has a 4xx status code
func (o *PostPromptCategoriesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post prompt categories internal server error response has a 5xx status code
func (o *PostPromptCategoriesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post prompt categories internal server error response a status code equal to that given
func (o *PostPromptCategoriesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post prompt categories internal server error response
func (o *PostPromptCategoriesInternalServerError) Code() int {
return 500
}
func (o *PostPromptCategoriesInternalServerError) Error() string {
return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesInternalServerError %+v", 500, o.Payload)
}
func (o *PostPromptCategoriesInternalServerError) String() string {
return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesInternalServerError %+v", 500, o.Payload)
}
func (o *PostPromptCategoriesInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostPromptCategoriesInternalServerError) 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
}