lib/api/members/members_client/prompts/put_prompt_categories_respo...

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"
)
// PutPromptCategoriesReader is a Reader for the PutPromptCategories structure.
type PutPromptCategoriesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PutPromptCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPutPromptCategoriesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPutPromptCategoriesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPutPromptCategoriesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPutPromptCategoriesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPutPromptCategoriesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPutPromptCategoriesInternalServerError()
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())
}
}
// NewPutPromptCategoriesOK creates a PutPromptCategoriesOK with default headers values
func NewPutPromptCategoriesOK() *PutPromptCategoriesOK {
return &PutPromptCategoriesOK{}
}
/*
PutPromptCategoriesOK describes a response with status code 200, with default header values.
Response with PromptCategory objects
*/
type PutPromptCategoriesOK struct {
Payload *members_models.PromptCategoryResponse
}
// IsSuccess returns true when this put prompt categories o k response has a 2xx status code
func (o *PutPromptCategoriesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this put prompt categories o k response has a 3xx status code
func (o *PutPromptCategoriesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this put prompt categories o k response has a 4xx status code
func (o *PutPromptCategoriesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this put prompt categories o k response has a 5xx status code
func (o *PutPromptCategoriesOK) IsServerError() bool {
return false
}
// IsCode returns true when this put prompt categories o k response a status code equal to that given
func (o *PutPromptCategoriesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the put prompt categories o k response
func (o *PutPromptCategoriesOK) Code() int {
return 200
}
func (o *PutPromptCategoriesOK) Error() string {
return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesOK %+v", 200, o.Payload)
}
func (o *PutPromptCategoriesOK) String() string {
return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesOK %+v", 200, o.Payload)
}
func (o *PutPromptCategoriesOK) GetPayload() *members_models.PromptCategoryResponse {
return o.Payload
}
func (o *PutPromptCategoriesOK) 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
}
// NewPutPromptCategoriesUnauthorized creates a PutPromptCategoriesUnauthorized with default headers values
func NewPutPromptCategoriesUnauthorized() *PutPromptCategoriesUnauthorized {
return &PutPromptCategoriesUnauthorized{}
}
/*
PutPromptCategoriesUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type PutPromptCategoriesUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put prompt categories unauthorized response has a 2xx status code
func (o *PutPromptCategoriesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put prompt categories unauthorized response has a 3xx status code
func (o *PutPromptCategoriesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this put prompt categories unauthorized response has a 4xx status code
func (o *PutPromptCategoriesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this put prompt categories unauthorized response has a 5xx status code
func (o *PutPromptCategoriesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this put prompt categories unauthorized response a status code equal to that given
func (o *PutPromptCategoriesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the put prompt categories unauthorized response
func (o *PutPromptCategoriesUnauthorized) Code() int {
return 401
}
func (o *PutPromptCategoriesUnauthorized) Error() string {
return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesUnauthorized %+v", 401, o.Payload)
}
func (o *PutPromptCategoriesUnauthorized) String() string {
return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesUnauthorized %+v", 401, o.Payload)
}
func (o *PutPromptCategoriesUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutPromptCategoriesUnauthorized) 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
}
// NewPutPromptCategoriesForbidden creates a PutPromptCategoriesForbidden with default headers values
func NewPutPromptCategoriesForbidden() *PutPromptCategoriesForbidden {
return &PutPromptCategoriesForbidden{}
}
/*
PutPromptCategoriesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PutPromptCategoriesForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this put prompt categories forbidden response has a 2xx status code
func (o *PutPromptCategoriesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put prompt categories forbidden response has a 3xx status code
func (o *PutPromptCategoriesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this put prompt categories forbidden response has a 4xx status code
func (o *PutPromptCategoriesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this put prompt categories forbidden response has a 5xx status code
func (o *PutPromptCategoriesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this put prompt categories forbidden response a status code equal to that given
func (o *PutPromptCategoriesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the put prompt categories forbidden response
func (o *PutPromptCategoriesForbidden) Code() int {
return 403
}
func (o *PutPromptCategoriesForbidden) Error() string {
return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesForbidden %+v", 403, o.Payload)
}
func (o *PutPromptCategoriesForbidden) String() string {
return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesForbidden %+v", 403, o.Payload)
}
func (o *PutPromptCategoriesForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutPromptCategoriesForbidden) 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
}
// NewPutPromptCategoriesNotFound creates a PutPromptCategoriesNotFound with default headers values
func NewPutPromptCategoriesNotFound() *PutPromptCategoriesNotFound {
return &PutPromptCategoriesNotFound{}
}
/*
PutPromptCategoriesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PutPromptCategoriesNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put prompt categories not found response has a 2xx status code
func (o *PutPromptCategoriesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put prompt categories not found response has a 3xx status code
func (o *PutPromptCategoriesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this put prompt categories not found response has a 4xx status code
func (o *PutPromptCategoriesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this put prompt categories not found response has a 5xx status code
func (o *PutPromptCategoriesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this put prompt categories not found response a status code equal to that given
func (o *PutPromptCategoriesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the put prompt categories not found response
func (o *PutPromptCategoriesNotFound) Code() int {
return 404
}
func (o *PutPromptCategoriesNotFound) Error() string {
return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesNotFound %+v", 404, o.Payload)
}
func (o *PutPromptCategoriesNotFound) String() string {
return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesNotFound %+v", 404, o.Payload)
}
func (o *PutPromptCategoriesNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutPromptCategoriesNotFound) 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
}
// NewPutPromptCategoriesUnprocessableEntity creates a PutPromptCategoriesUnprocessableEntity with default headers values
func NewPutPromptCategoriesUnprocessableEntity() *PutPromptCategoriesUnprocessableEntity {
return &PutPromptCategoriesUnprocessableEntity{}
}
/*
PutPromptCategoriesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PutPromptCategoriesUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put prompt categories unprocessable entity response has a 2xx status code
func (o *PutPromptCategoriesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put prompt categories unprocessable entity response has a 3xx status code
func (o *PutPromptCategoriesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this put prompt categories unprocessable entity response has a 4xx status code
func (o *PutPromptCategoriesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this put prompt categories unprocessable entity response has a 5xx status code
func (o *PutPromptCategoriesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this put prompt categories unprocessable entity response a status code equal to that given
func (o *PutPromptCategoriesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the put prompt categories unprocessable entity response
func (o *PutPromptCategoriesUnprocessableEntity) Code() int {
return 422
}
func (o *PutPromptCategoriesUnprocessableEntity) Error() string {
return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutPromptCategoriesUnprocessableEntity) String() string {
return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutPromptCategoriesUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutPromptCategoriesUnprocessableEntity) 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
}
// NewPutPromptCategoriesInternalServerError creates a PutPromptCategoriesInternalServerError with default headers values
func NewPutPromptCategoriesInternalServerError() *PutPromptCategoriesInternalServerError {
return &PutPromptCategoriesInternalServerError{}
}
/*
PutPromptCategoriesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PutPromptCategoriesInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put prompt categories internal server error response has a 2xx status code
func (o *PutPromptCategoriesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put prompt categories internal server error response has a 3xx status code
func (o *PutPromptCategoriesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this put prompt categories internal server error response has a 4xx status code
func (o *PutPromptCategoriesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this put prompt categories internal server error response has a 5xx status code
func (o *PutPromptCategoriesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this put prompt categories internal server error response a status code equal to that given
func (o *PutPromptCategoriesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the put prompt categories internal server error response
func (o *PutPromptCategoriesInternalServerError) Code() int {
return 500
}
func (o *PutPromptCategoriesInternalServerError) Error() string {
return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesInternalServerError %+v", 500, o.Payload)
}
func (o *PutPromptCategoriesInternalServerError) String() string {
return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesInternalServerError %+v", 500, o.Payload)
}
func (o *PutPromptCategoriesInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutPromptCategoriesInternalServerError) 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
}