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 prompt_tags
|
|
|
|
// 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"
|
|
)
|
|
|
|
// PostPromptTagsReader is a Reader for the PostPromptTags structure.
|
|
type PostPromptTagsReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *PostPromptTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewPostPromptTagsOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewPostPromptTagsUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewPostPromptTagsForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewPostPromptTagsNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewPostPromptTagsUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewPostPromptTagsInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewPostPromptTagsOK creates a PostPromptTagsOK with default headers values
|
|
func NewPostPromptTagsOK() *PostPromptTagsOK {
|
|
return &PostPromptTagsOK{}
|
|
}
|
|
|
|
/*
|
|
PostPromptTagsOK describes a response with status code 200, with default header values.
|
|
|
|
Response with PromptTag objects
|
|
*/
|
|
type PostPromptTagsOK struct {
|
|
Payload *members_models.PromptTagResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this post prompt tags o k response has a 2xx status code
|
|
func (o *PostPromptTagsOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this post prompt tags o k response has a 3xx status code
|
|
func (o *PostPromptTagsOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post prompt tags o k response has a 4xx status code
|
|
func (o *PostPromptTagsOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this post prompt tags o k response has a 5xx status code
|
|
func (o *PostPromptTagsOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post prompt tags o k response a status code equal to that given
|
|
func (o *PostPromptTagsOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the post prompt tags o k response
|
|
func (o *PostPromptTagsOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *PostPromptTagsOK) Error() string {
|
|
return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *PostPromptTagsOK) String() string {
|
|
return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *PostPromptTagsOK) GetPayload() *members_models.PromptTagResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostPromptTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.PromptTagResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewPostPromptTagsUnauthorized creates a PostPromptTagsUnauthorized with default headers values
|
|
func NewPostPromptTagsUnauthorized() *PostPromptTagsUnauthorized {
|
|
return &PostPromptTagsUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
PostPromptTagsUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access Unauthorized, invalid API-KEY was used
|
|
*/
|
|
type PostPromptTagsUnauthorized struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post prompt tags unauthorized response has a 2xx status code
|
|
func (o *PostPromptTagsUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post prompt tags unauthorized response has a 3xx status code
|
|
func (o *PostPromptTagsUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post prompt tags unauthorized response has a 4xx status code
|
|
func (o *PostPromptTagsUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post prompt tags unauthorized response has a 5xx status code
|
|
func (o *PostPromptTagsUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post prompt tags unauthorized response a status code equal to that given
|
|
func (o *PostPromptTagsUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the post prompt tags unauthorized response
|
|
func (o *PostPromptTagsUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *PostPromptTagsUnauthorized) Error() string {
|
|
return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *PostPromptTagsUnauthorized) String() string {
|
|
return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *PostPromptTagsUnauthorized) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostPromptTagsUnauthorized) 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
|
|
}
|
|
|
|
// NewPostPromptTagsForbidden creates a PostPromptTagsForbidden with default headers values
|
|
func NewPostPromptTagsForbidden() *PostPromptTagsForbidden {
|
|
return &PostPromptTagsForbidden{}
|
|
}
|
|
|
|
/*
|
|
PostPromptTagsForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type PostPromptTagsForbidden struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post prompt tags forbidden response has a 2xx status code
|
|
func (o *PostPromptTagsForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post prompt tags forbidden response has a 3xx status code
|
|
func (o *PostPromptTagsForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post prompt tags forbidden response has a 4xx status code
|
|
func (o *PostPromptTagsForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post prompt tags forbidden response has a 5xx status code
|
|
func (o *PostPromptTagsForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post prompt tags forbidden response a status code equal to that given
|
|
func (o *PostPromptTagsForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the post prompt tags forbidden response
|
|
func (o *PostPromptTagsForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *PostPromptTagsForbidden) Error() string {
|
|
return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *PostPromptTagsForbidden) String() string {
|
|
return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *PostPromptTagsForbidden) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostPromptTagsForbidden) 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
|
|
}
|
|
|
|
// NewPostPromptTagsNotFound creates a PostPromptTagsNotFound with default headers values
|
|
func NewPostPromptTagsNotFound() *PostPromptTagsNotFound {
|
|
return &PostPromptTagsNotFound{}
|
|
}
|
|
|
|
/*
|
|
PostPromptTagsNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type PostPromptTagsNotFound struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post prompt tags not found response has a 2xx status code
|
|
func (o *PostPromptTagsNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post prompt tags not found response has a 3xx status code
|
|
func (o *PostPromptTagsNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post prompt tags not found response has a 4xx status code
|
|
func (o *PostPromptTagsNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post prompt tags not found response has a 5xx status code
|
|
func (o *PostPromptTagsNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post prompt tags not found response a status code equal to that given
|
|
func (o *PostPromptTagsNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the post prompt tags not found response
|
|
func (o *PostPromptTagsNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *PostPromptTagsNotFound) Error() string {
|
|
return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *PostPromptTagsNotFound) String() string {
|
|
return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *PostPromptTagsNotFound) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostPromptTagsNotFound) 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
|
|
}
|
|
|
|
// NewPostPromptTagsUnprocessableEntity creates a PostPromptTagsUnprocessableEntity with default headers values
|
|
func NewPostPromptTagsUnprocessableEntity() *PostPromptTagsUnprocessableEntity {
|
|
return &PostPromptTagsUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
PostPromptTagsUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type PostPromptTagsUnprocessableEntity struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post prompt tags unprocessable entity response has a 2xx status code
|
|
func (o *PostPromptTagsUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post prompt tags unprocessable entity response has a 3xx status code
|
|
func (o *PostPromptTagsUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post prompt tags unprocessable entity response has a 4xx status code
|
|
func (o *PostPromptTagsUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this post prompt tags unprocessable entity response has a 5xx status code
|
|
func (o *PostPromptTagsUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post prompt tags unprocessable entity response a status code equal to that given
|
|
func (o *PostPromptTagsUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the post prompt tags unprocessable entity response
|
|
func (o *PostPromptTagsUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *PostPromptTagsUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *PostPromptTagsUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *PostPromptTagsUnprocessableEntity) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostPromptTagsUnprocessableEntity) 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
|
|
}
|
|
|
|
// NewPostPromptTagsInternalServerError creates a PostPromptTagsInternalServerError with default headers values
|
|
func NewPostPromptTagsInternalServerError() *PostPromptTagsInternalServerError {
|
|
return &PostPromptTagsInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
PostPromptTagsInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type PostPromptTagsInternalServerError struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this post prompt tags internal server error response has a 2xx status code
|
|
func (o *PostPromptTagsInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this post prompt tags internal server error response has a 3xx status code
|
|
func (o *PostPromptTagsInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post prompt tags internal server error response has a 4xx status code
|
|
func (o *PostPromptTagsInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this post prompt tags internal server error response has a 5xx status code
|
|
func (o *PostPromptTagsInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this post prompt tags internal server error response a status code equal to that given
|
|
func (o *PostPromptTagsInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the post prompt tags internal server error response
|
|
func (o *PostPromptTagsInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *PostPromptTagsInternalServerError) Error() string {
|
|
return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *PostPromptTagsInternalServerError) String() string {
|
|
return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *PostPromptTagsInternalServerError) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostPromptTagsInternalServerError) 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
|
|
}
|