mirror of https://github.com/vernonkeenan/lib
parent
5f6047db4d
commit
b3029bf4f5
|
@ -29,7 +29,6 @@ import (
|
|||
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/lesson_progress"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/orders"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/payment_methods"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/prompt_tags"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/prompts"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/research_projects"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/templates"
|
||||
|
@ -97,7 +96,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Members {
|
|||
cli.LessonProgress = lesson_progress.New(transport, formats)
|
||||
cli.Orders = orders.New(transport, formats)
|
||||
cli.PaymentMethods = payment_methods.New(transport, formats)
|
||||
cli.PromptTags = prompt_tags.New(transport, formats)
|
||||
cli.Prompts = prompts.New(transport, formats)
|
||||
cli.ResearchProjects = research_projects.New(transport, formats)
|
||||
cli.Templates = templates.New(transport, formats)
|
||||
|
@ -180,8 +178,6 @@ type Members struct {
|
|||
|
||||
PaymentMethods payment_methods.ClientService
|
||||
|
||||
PromptTags prompt_tags.ClientService
|
||||
|
||||
Prompts prompts.ClientService
|
||||
|
||||
ResearchProjects research_projects.ClientService
|
||||
|
@ -219,7 +215,6 @@ func (c *Members) SetTransport(transport runtime.ClientTransport) {
|
|||
c.LessonProgress.SetTransport(transport)
|
||||
c.Orders.SetTransport(transport)
|
||||
c.PaymentMethods.SetTransport(transport)
|
||||
c.PromptTags.SetTransport(transport)
|
||||
c.Prompts.SetTransport(transport)
|
||||
c.ResearchProjects.SetTransport(transport)
|
||||
c.Templates.SetTransport(transport)
|
||||
|
|
|
@ -1,172 +0,0 @@
|
|||
// 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"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new prompt tags API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for prompt tags API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ClientOption is the option for Client methods
|
||||
type ClientOption func(*runtime.ClientOperation)
|
||||
|
||||
// ClientService is the interface for Client methods
|
||||
type ClientService interface {
|
||||
GetPromptTags(params *GetPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptTagsOK, error)
|
||||
|
||||
PostPromptTags(params *PostPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptTagsOK, error)
|
||||
|
||||
PutPromptTags(params *PutPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptTagsOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptTags gets a list of prompt tags
|
||||
|
||||
Return a list of PromptTag records from the datastore
|
||||
*/
|
||||
func (a *Client) GetPromptTags(params *GetPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptTagsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetPromptTagsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getPromptTags",
|
||||
Method: "GET",
|
||||
PathPattern: "/prompttags",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetPromptTagsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetPromptTagsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getPromptTags: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostPromptTags creates new prompt tags
|
||||
|
||||
Create PromptTags in Taxnexus
|
||||
*/
|
||||
func (a *Client) PostPromptTags(params *PostPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptTagsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostPromptTagsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postPromptTags",
|
||||
Method: "POST",
|
||||
PathPattern: "/prompttags",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostPromptTagsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PostPromptTagsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postPromptTags: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptTags updates prompt tags
|
||||
|
||||
Update PromptTag in Taxnexus
|
||||
*/
|
||||
func (a *Client) PutPromptTags(params *PutPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptTagsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPutPromptTagsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "putPromptTags",
|
||||
Method: "PUT",
|
||||
PathPattern: "/prompttags",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PutPromptTagsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PutPromptTagsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for putPromptTags: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package prompt_tags
|
||||
package prompts
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
@ -4,7 +4,7 @@
|
|||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package prompt_tags
|
||||
package prompts
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
@ -4,7 +4,7 @@
|
|||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package prompt_tags
|
||||
package prompts
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
@ -4,7 +4,7 @@
|
|||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package prompt_tags
|
||||
package prompts
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
@ -36,14 +36,20 @@ type ClientOption func(*runtime.ClientOperation)
|
|||
type ClientService interface {
|
||||
GetPromptCategories(params *GetPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptCategoriesOK, error)
|
||||
|
||||
GetPromptTags(params *GetPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptTagsOK, error)
|
||||
|
||||
GetPrompts(params *GetPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptsOK, error)
|
||||
|
||||
PostPromptCategories(params *PostPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptCategoriesOK, error)
|
||||
|
||||
PostPromptTags(params *PostPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptTagsOK, error)
|
||||
|
||||
PostPrompts(params *PostPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptsOK, error)
|
||||
|
||||
PutPromptCategories(params *PutPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptCategoriesOK, error)
|
||||
|
||||
PutPromptTags(params *PutPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptTagsOK, error)
|
||||
|
||||
PutPrompts(params *PutPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptsOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
|
@ -90,6 +96,47 @@ func (a *Client) GetPromptCategories(params *GetPromptCategoriesParams, authInfo
|
|||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptTags gets a list of prompt tags
|
||||
|
||||
Return a list of PromptTag records from the datastore
|
||||
*/
|
||||
func (a *Client) GetPromptTags(params *GetPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptTagsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetPromptTagsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getPromptTags",
|
||||
Method: "GET",
|
||||
PathPattern: "/prompttags",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetPromptTagsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetPromptTagsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getPromptTags: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
GetPrompts gets a list of prompts
|
||||
|
||||
|
@ -172,6 +219,47 @@ func (a *Client) PostPromptCategories(params *PostPromptCategoriesParams, authIn
|
|||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostPromptTags creates new prompt tags
|
||||
|
||||
Create PromptTags in Taxnexus
|
||||
*/
|
||||
func (a *Client) PostPromptTags(params *PostPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptTagsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostPromptTagsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postPromptTags",
|
||||
Method: "POST",
|
||||
PathPattern: "/prompttags",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostPromptTagsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PostPromptTagsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postPromptTags: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostPrompts creates new prompts
|
||||
|
||||
|
@ -254,6 +342,47 @@ func (a *Client) PutPromptCategories(params *PutPromptCategoriesParams, authInfo
|
|||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptTags updates prompt tags
|
||||
|
||||
Update PromptTag in Taxnexus
|
||||
*/
|
||||
func (a *Client) PutPromptTags(params *PutPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptTagsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPutPromptTagsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "putPromptTags",
|
||||
Method: "PUT",
|
||||
PathPattern: "/prompttags",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PutPromptTagsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PutPromptTagsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for putPromptTags: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PutPrompts updates prompts
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package prompt_tags
|
||||
package prompts
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
@ -4,7 +4,7 @@
|
|||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package prompt_tags
|
||||
package prompts
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
@ -22,46 +22,58 @@ import (
|
|||
type Prompt struct {
|
||||
|
||||
// The ID of the user who created the prompt
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// The date the prompt was created
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// The icon for the prompt
|
||||
Icon string `json:"Icon,omitempty"`
|
||||
Icon *string `json:"Icon,omitempty"`
|
||||
|
||||
// The alt text for the prompt image
|
||||
ImageAltText string `json:"ImageAltText,omitempty"`
|
||||
ImageAltText *string `json:"ImageAltText,omitempty"`
|
||||
|
||||
// The URL of the prompt image
|
||||
ImageURL string `json:"ImageURL,omitempty"`
|
||||
ImageURL *string `json:"ImageURL,omitempty"`
|
||||
|
||||
// The ID of the user who last modified the prompt
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// The date the prompt was last modified
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// The logo for the prompt
|
||||
Logo *string `json:"Logo,omitempty"`
|
||||
|
||||
// The prompt text
|
||||
Prompt *string `json:"Prompt,omitempty"`
|
||||
|
||||
// The ID of the prompt category
|
||||
PromptCategoryID string `json:"PromptCategoryID,omitempty"`
|
||||
PromptCategoryID *string `json:"PromptCategoryID,omitempty"`
|
||||
|
||||
// A list of research project IDs
|
||||
ResearchProjectIDs []string `json:"ResearchProjectIDs"`
|
||||
|
||||
// The slug for the prompt
|
||||
Slug string `json:"Slug,omitempty"`
|
||||
Slug *string `json:"Slug,omitempty"`
|
||||
|
||||
// A list of tags
|
||||
Tags []string `json:"Tags"`
|
||||
|
||||
// The prompt text
|
||||
Text string `json:"Text,omitempty"`
|
||||
// The ID of the tenant
|
||||
TenantID *string `json:"TenantID,omitempty"`
|
||||
|
||||
// The title of the prompt
|
||||
Title *string `json:"Title,omitempty"`
|
||||
|
||||
// The number of times the prompt has been used
|
||||
UsedCount float64 `json:"UsedCount,omitempty"`
|
||||
UsedCount *float64 `json:"UsedCount,omitempty"`
|
||||
|
||||
// The ID of the user who created the prompt
|
||||
UserID *string `json:"UserID,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this prompt
|
||||
|
|
|
@ -22,22 +22,22 @@ import (
|
|||
type PromptCategory struct {
|
||||
|
||||
// The ID of the user who created the prompt category
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// The date the prompt category was created
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// The ID of the user who last modified the prompt category
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// The date the prompt category was last modified
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// The prompt category name
|
||||
Name string `json:"Name,omitempty"`
|
||||
Name *string `json:"Name,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this prompt category
|
||||
|
|
|
@ -22,22 +22,22 @@ import (
|
|||
type PromptTag struct {
|
||||
|
||||
// The ID of the user who created the prompt tag
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// The date the prompt tag was created
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// The ID of the user who last modified the prompt tag
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// The date the prompt tag was last modified
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// The prompt tag name
|
||||
Name string `json:"Name,omitempty"`
|
||||
Name *string `json:"Name,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this prompt tag
|
||||
|
|
|
@ -0,0 +1,240 @@
|
|||
// 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 (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetPromptCategoriesParams creates a new GetPromptCategoriesParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetPromptCategoriesParams() *GetPromptCategoriesParams {
|
||||
return &GetPromptCategoriesParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetPromptCategoriesParamsWithTimeout creates a new GetPromptCategoriesParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetPromptCategoriesParamsWithTimeout(timeout time.Duration) *GetPromptCategoriesParams {
|
||||
return &GetPromptCategoriesParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetPromptCategoriesParamsWithContext creates a new GetPromptCategoriesParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetPromptCategoriesParamsWithContext(ctx context.Context) *GetPromptCategoriesParams {
|
||||
return &GetPromptCategoriesParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetPromptCategoriesParamsWithHTTPClient creates a new GetPromptCategoriesParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetPromptCategoriesParamsWithHTTPClient(client *http.Client) *GetPromptCategoriesParams {
|
||||
return &GetPromptCategoriesParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptCategoriesParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the get prompt categories operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetPromptCategoriesParams struct {
|
||||
|
||||
/* ID.
|
||||
|
||||
Unique Record ID
|
||||
*/
|
||||
ID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip?
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get prompt categories params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetPromptCategoriesParams) WithDefaults() *GetPromptCategoriesParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get prompt categories params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetPromptCategoriesParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get prompt categories params
|
||||
func (o *GetPromptCategoriesParams) WithTimeout(timeout time.Duration) *GetPromptCategoriesParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get prompt categories params
|
||||
func (o *GetPromptCategoriesParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get prompt categories params
|
||||
func (o *GetPromptCategoriesParams) WithContext(ctx context.Context) *GetPromptCategoriesParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get prompt categories params
|
||||
func (o *GetPromptCategoriesParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get prompt categories params
|
||||
func (o *GetPromptCategoriesParams) WithHTTPClient(client *http.Client) *GetPromptCategoriesParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get prompt categories params
|
||||
func (o *GetPromptCategoriesParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithID adds the id to the get prompt categories params
|
||||
func (o *GetPromptCategoriesParams) WithID(id *string) *GetPromptCategoriesParams {
|
||||
o.SetID(id)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetID adds the id to the get prompt categories params
|
||||
func (o *GetPromptCategoriesParams) SetID(id *string) {
|
||||
o.ID = id
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get prompt categories params
|
||||
func (o *GetPromptCategoriesParams) WithLimit(limit *int64) *GetPromptCategoriesParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get prompt categories params
|
||||
func (o *GetPromptCategoriesParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get prompt categories params
|
||||
func (o *GetPromptCategoriesParams) WithOffset(offset *int64) *GetPromptCategoriesParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get prompt categories params
|
||||
func (o *GetPromptCategoriesParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetPromptCategoriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if o.ID != nil {
|
||||
|
||||
// query param id
|
||||
var qrID string
|
||||
|
||||
if o.ID != nil {
|
||||
qrID = *o.ID
|
||||
}
|
||||
qID := qrID
|
||||
if qID != "" {
|
||||
|
||||
if err := r.SetQueryParam("id", qID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Limit != nil {
|
||||
|
||||
// query param limit
|
||||
var qrLimit int64
|
||||
|
||||
if o.Limit != nil {
|
||||
qrLimit = *o.Limit
|
||||
}
|
||||
qLimit := swag.FormatInt64(qrLimit)
|
||||
if qLimit != "" {
|
||||
|
||||
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Offset != nil {
|
||||
|
||||
// query param offset
|
||||
var qrOffset int64
|
||||
|
||||
if o.Offset != nil {
|
||||
qrOffset = *o.Offset
|
||||
}
|
||||
qOffset := swag.FormatInt64(qrOffset)
|
||||
if qOffset != "" {
|
||||
|
||||
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,477 @@
|
|||
// 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/sfgate/sfgate_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 *sfgate_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() *sfgate_models.PromptCategoryResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptCategoriesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 {
|
||||
Payload *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptCategoriesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptCategoriesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptCategoriesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptCategoriesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,240 @@
|
|||
// 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 (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetPromptTagsParams creates a new GetPromptTagsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetPromptTagsParams() *GetPromptTagsParams {
|
||||
return &GetPromptTagsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetPromptTagsParamsWithTimeout creates a new GetPromptTagsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetPromptTagsParamsWithTimeout(timeout time.Duration) *GetPromptTagsParams {
|
||||
return &GetPromptTagsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetPromptTagsParamsWithContext creates a new GetPromptTagsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetPromptTagsParamsWithContext(ctx context.Context) *GetPromptTagsParams {
|
||||
return &GetPromptTagsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetPromptTagsParamsWithHTTPClient creates a new GetPromptTagsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetPromptTagsParamsWithHTTPClient(client *http.Client) *GetPromptTagsParams {
|
||||
return &GetPromptTagsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptTagsParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the get prompt tags operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetPromptTagsParams struct {
|
||||
|
||||
/* ID.
|
||||
|
||||
Unique Record ID
|
||||
*/
|
||||
ID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip?
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get prompt tags params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetPromptTagsParams) WithDefaults() *GetPromptTagsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get prompt tags params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetPromptTagsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get prompt tags params
|
||||
func (o *GetPromptTagsParams) WithTimeout(timeout time.Duration) *GetPromptTagsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get prompt tags params
|
||||
func (o *GetPromptTagsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get prompt tags params
|
||||
func (o *GetPromptTagsParams) WithContext(ctx context.Context) *GetPromptTagsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get prompt tags params
|
||||
func (o *GetPromptTagsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get prompt tags params
|
||||
func (o *GetPromptTagsParams) WithHTTPClient(client *http.Client) *GetPromptTagsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get prompt tags params
|
||||
func (o *GetPromptTagsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithID adds the id to the get prompt tags params
|
||||
func (o *GetPromptTagsParams) WithID(id *string) *GetPromptTagsParams {
|
||||
o.SetID(id)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetID adds the id to the get prompt tags params
|
||||
func (o *GetPromptTagsParams) SetID(id *string) {
|
||||
o.ID = id
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get prompt tags params
|
||||
func (o *GetPromptTagsParams) WithLimit(limit *int64) *GetPromptTagsParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get prompt tags params
|
||||
func (o *GetPromptTagsParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get prompt tags params
|
||||
func (o *GetPromptTagsParams) WithOffset(offset *int64) *GetPromptTagsParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get prompt tags params
|
||||
func (o *GetPromptTagsParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetPromptTagsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if o.ID != nil {
|
||||
|
||||
// query param id
|
||||
var qrID string
|
||||
|
||||
if o.ID != nil {
|
||||
qrID = *o.ID
|
||||
}
|
||||
qID := qrID
|
||||
if qID != "" {
|
||||
|
||||
if err := r.SetQueryParam("id", qID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Limit != nil {
|
||||
|
||||
// query param limit
|
||||
var qrLimit int64
|
||||
|
||||
if o.Limit != nil {
|
||||
qrLimit = *o.Limit
|
||||
}
|
||||
qLimit := swag.FormatInt64(qrLimit)
|
||||
if qLimit != "" {
|
||||
|
||||
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Offset != nil {
|
||||
|
||||
// query param offset
|
||||
var qrOffset int64
|
||||
|
||||
if o.Offset != nil {
|
||||
qrOffset = *o.Offset
|
||||
}
|
||||
qOffset := swag.FormatInt64(qrOffset)
|
||||
if qOffset != "" {
|
||||
|
||||
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,477 @@
|
|||
// 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/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// GetPromptTagsReader is a Reader for the GetPromptTags structure.
|
||||
type GetPromptTagsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetPromptTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetPromptTagsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetPromptTagsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetPromptTagsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetPromptTagsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetPromptTagsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetPromptTagsInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetPromptTagsOK creates a GetPromptTagsOK with default headers values
|
||||
func NewGetPromptTagsOK() *GetPromptTagsOK {
|
||||
return &GetPromptTagsOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptTagsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Response with PromptTag objects
|
||||
*/
|
||||
type GetPromptTagsOK struct {
|
||||
Payload *sfgate_models.PromptTagResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get prompt tags o k response has a 2xx status code
|
||||
func (o *GetPromptTagsOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get prompt tags o k response has a 3xx status code
|
||||
func (o *GetPromptTagsOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get prompt tags o k response has a 4xx status code
|
||||
func (o *GetPromptTagsOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get prompt tags o k response has a 5xx status code
|
||||
func (o *GetPromptTagsOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get prompt tags o k response a status code equal to that given
|
||||
func (o *GetPromptTagsOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the get prompt tags o k response
|
||||
func (o *GetPromptTagsOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsOK) Error() string {
|
||||
return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsOK) String() string {
|
||||
return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsOK) GetPayload() *sfgate_models.PromptTagResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.PromptTagResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetPromptTagsUnauthorized creates a GetPromptTagsUnauthorized with default headers values
|
||||
func NewGetPromptTagsUnauthorized() *GetPromptTagsUnauthorized {
|
||||
return &GetPromptTagsUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptTagsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetPromptTagsUnauthorized struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get prompt tags unauthorized response has a 2xx status code
|
||||
func (o *GetPromptTagsUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get prompt tags unauthorized response has a 3xx status code
|
||||
func (o *GetPromptTagsUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get prompt tags unauthorized response has a 4xx status code
|
||||
func (o *GetPromptTagsUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get prompt tags unauthorized response has a 5xx status code
|
||||
func (o *GetPromptTagsUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get prompt tags unauthorized response a status code equal to that given
|
||||
func (o *GetPromptTagsUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the get prompt tags unauthorized response
|
||||
func (o *GetPromptTagsUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsUnauthorized) String() string {
|
||||
return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetPromptTagsForbidden creates a GetPromptTagsForbidden with default headers values
|
||||
func NewGetPromptTagsForbidden() *GetPromptTagsForbidden {
|
||||
return &GetPromptTagsForbidden{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptTagsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetPromptTagsForbidden struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get prompt tags forbidden response has a 2xx status code
|
||||
func (o *GetPromptTagsForbidden) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get prompt tags forbidden response has a 3xx status code
|
||||
func (o *GetPromptTagsForbidden) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get prompt tags forbidden response has a 4xx status code
|
||||
func (o *GetPromptTagsForbidden) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get prompt tags forbidden response has a 5xx status code
|
||||
func (o *GetPromptTagsForbidden) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get prompt tags forbidden response a status code equal to that given
|
||||
func (o *GetPromptTagsForbidden) IsCode(code int) bool {
|
||||
return code == 403
|
||||
}
|
||||
|
||||
// Code gets the status code for the get prompt tags forbidden response
|
||||
func (o *GetPromptTagsForbidden) Code() int {
|
||||
return 403
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsForbidden) String() string {
|
||||
return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetPromptTagsNotFound creates a GetPromptTagsNotFound with default headers values
|
||||
func NewGetPromptTagsNotFound() *GetPromptTagsNotFound {
|
||||
return &GetPromptTagsNotFound{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptTagsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetPromptTagsNotFound struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get prompt tags not found response has a 2xx status code
|
||||
func (o *GetPromptTagsNotFound) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get prompt tags not found response has a 3xx status code
|
||||
func (o *GetPromptTagsNotFound) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get prompt tags not found response has a 4xx status code
|
||||
func (o *GetPromptTagsNotFound) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get prompt tags not found response has a 5xx status code
|
||||
func (o *GetPromptTagsNotFound) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get prompt tags not found response a status code equal to that given
|
||||
func (o *GetPromptTagsNotFound) IsCode(code int) bool {
|
||||
return code == 404
|
||||
}
|
||||
|
||||
// Code gets the status code for the get prompt tags not found response
|
||||
func (o *GetPromptTagsNotFound) Code() int {
|
||||
return 404
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsNotFound) String() string {
|
||||
return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetPromptTagsUnprocessableEntity creates a GetPromptTagsUnprocessableEntity with default headers values
|
||||
func NewGetPromptTagsUnprocessableEntity() *GetPromptTagsUnprocessableEntity {
|
||||
return &GetPromptTagsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptTagsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetPromptTagsUnprocessableEntity struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get prompt tags unprocessable entity response has a 2xx status code
|
||||
func (o *GetPromptTagsUnprocessableEntity) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get prompt tags unprocessable entity response has a 3xx status code
|
||||
func (o *GetPromptTagsUnprocessableEntity) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get prompt tags unprocessable entity response has a 4xx status code
|
||||
func (o *GetPromptTagsUnprocessableEntity) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get prompt tags unprocessable entity response has a 5xx status code
|
||||
func (o *GetPromptTagsUnprocessableEntity) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get prompt tags unprocessable entity response a status code equal to that given
|
||||
func (o *GetPromptTagsUnprocessableEntity) IsCode(code int) bool {
|
||||
return code == 422
|
||||
}
|
||||
|
||||
// Code gets the status code for the get prompt tags unprocessable entity response
|
||||
func (o *GetPromptTagsUnprocessableEntity) Code() int {
|
||||
return 422
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsUnprocessableEntity) String() string {
|
||||
return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetPromptTagsInternalServerError creates a GetPromptTagsInternalServerError with default headers values
|
||||
func NewGetPromptTagsInternalServerError() *GetPromptTagsInternalServerError {
|
||||
return &GetPromptTagsInternalServerError{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptTagsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetPromptTagsInternalServerError struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get prompt tags internal server error response has a 2xx status code
|
||||
func (o *GetPromptTagsInternalServerError) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get prompt tags internal server error response has a 3xx status code
|
||||
func (o *GetPromptTagsInternalServerError) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get prompt tags internal server error response has a 4xx status code
|
||||
func (o *GetPromptTagsInternalServerError) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get prompt tags internal server error response has a 5xx status code
|
||||
func (o *GetPromptTagsInternalServerError) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this get prompt tags internal server error response a status code equal to that given
|
||||
func (o *GetPromptTagsInternalServerError) IsCode(code int) bool {
|
||||
return code == 500
|
||||
}
|
||||
|
||||
// Code gets the status code for the get prompt tags internal server error response
|
||||
func (o *GetPromptTagsInternalServerError) Code() int {
|
||||
return 500
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsInternalServerError) String() string {
|
||||
return fmt.Sprintf("[GET /prompttags][%d] getPromptTagsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptTagsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,240 @@
|
|||
// 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 (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetPromptsParams creates a new GetPromptsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetPromptsParams() *GetPromptsParams {
|
||||
return &GetPromptsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetPromptsParamsWithTimeout creates a new GetPromptsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetPromptsParamsWithTimeout(timeout time.Duration) *GetPromptsParams {
|
||||
return &GetPromptsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetPromptsParamsWithContext creates a new GetPromptsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetPromptsParamsWithContext(ctx context.Context) *GetPromptsParams {
|
||||
return &GetPromptsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetPromptsParamsWithHTTPClient creates a new GetPromptsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetPromptsParamsWithHTTPClient(client *http.Client) *GetPromptsParams {
|
||||
return &GetPromptsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptsParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the get prompts operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetPromptsParams struct {
|
||||
|
||||
/* ID.
|
||||
|
||||
Unique Record ID
|
||||
*/
|
||||
ID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip?
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get prompts params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetPromptsParams) WithDefaults() *GetPromptsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get prompts params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetPromptsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get prompts params
|
||||
func (o *GetPromptsParams) WithTimeout(timeout time.Duration) *GetPromptsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get prompts params
|
||||
func (o *GetPromptsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get prompts params
|
||||
func (o *GetPromptsParams) WithContext(ctx context.Context) *GetPromptsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get prompts params
|
||||
func (o *GetPromptsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get prompts params
|
||||
func (o *GetPromptsParams) WithHTTPClient(client *http.Client) *GetPromptsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get prompts params
|
||||
func (o *GetPromptsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithID adds the id to the get prompts params
|
||||
func (o *GetPromptsParams) WithID(id *string) *GetPromptsParams {
|
||||
o.SetID(id)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetID adds the id to the get prompts params
|
||||
func (o *GetPromptsParams) SetID(id *string) {
|
||||
o.ID = id
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get prompts params
|
||||
func (o *GetPromptsParams) WithLimit(limit *int64) *GetPromptsParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get prompts params
|
||||
func (o *GetPromptsParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get prompts params
|
||||
func (o *GetPromptsParams) WithOffset(offset *int64) *GetPromptsParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get prompts params
|
||||
func (o *GetPromptsParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetPromptsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if o.ID != nil {
|
||||
|
||||
// query param id
|
||||
var qrID string
|
||||
|
||||
if o.ID != nil {
|
||||
qrID = *o.ID
|
||||
}
|
||||
qID := qrID
|
||||
if qID != "" {
|
||||
|
||||
if err := r.SetQueryParam("id", qID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Limit != nil {
|
||||
|
||||
// query param limit
|
||||
var qrLimit int64
|
||||
|
||||
if o.Limit != nil {
|
||||
qrLimit = *o.Limit
|
||||
}
|
||||
qLimit := swag.FormatInt64(qrLimit)
|
||||
if qLimit != "" {
|
||||
|
||||
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Offset != nil {
|
||||
|
||||
// query param offset
|
||||
var qrOffset int64
|
||||
|
||||
if o.Offset != nil {
|
||||
qrOffset = *o.Offset
|
||||
}
|
||||
qOffset := swag.FormatInt64(qrOffset)
|
||||
if qOffset != "" {
|
||||
|
||||
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,477 @@
|
|||
// 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/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// GetPromptsReader is a Reader for the GetPrompts structure.
|
||||
type GetPromptsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetPromptsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetPromptsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetPromptsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetPromptsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetPromptsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetPromptsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetPromptsInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetPromptsOK creates a GetPromptsOK with default headers values
|
||||
func NewGetPromptsOK() *GetPromptsOK {
|
||||
return &GetPromptsOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Response with Prompt objects
|
||||
*/
|
||||
type GetPromptsOK struct {
|
||||
Payload *sfgate_models.PromptResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get prompts o k response has a 2xx status code
|
||||
func (o *GetPromptsOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get prompts o k response has a 3xx status code
|
||||
func (o *GetPromptsOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get prompts o k response has a 4xx status code
|
||||
func (o *GetPromptsOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get prompts o k response has a 5xx status code
|
||||
func (o *GetPromptsOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get prompts o k response a status code equal to that given
|
||||
func (o *GetPromptsOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the get prompts o k response
|
||||
func (o *GetPromptsOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *GetPromptsOK) Error() string {
|
||||
return fmt.Sprintf("[GET /prompts][%d] getPromptsOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptsOK) String() string {
|
||||
return fmt.Sprintf("[GET /prompts][%d] getPromptsOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptsOK) GetPayload() *sfgate_models.PromptResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.PromptResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetPromptsUnauthorized creates a GetPromptsUnauthorized with default headers values
|
||||
func NewGetPromptsUnauthorized() *GetPromptsUnauthorized {
|
||||
return &GetPromptsUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetPromptsUnauthorized struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get prompts unauthorized response has a 2xx status code
|
||||
func (o *GetPromptsUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get prompts unauthorized response has a 3xx status code
|
||||
func (o *GetPromptsUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get prompts unauthorized response has a 4xx status code
|
||||
func (o *GetPromptsUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get prompts unauthorized response has a 5xx status code
|
||||
func (o *GetPromptsUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get prompts unauthorized response a status code equal to that given
|
||||
func (o *GetPromptsUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the get prompts unauthorized response
|
||||
func (o *GetPromptsUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *GetPromptsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /prompts][%d] getPromptsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptsUnauthorized) String() string {
|
||||
return fmt.Sprintf("[GET /prompts][%d] getPromptsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptsUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetPromptsForbidden creates a GetPromptsForbidden with default headers values
|
||||
func NewGetPromptsForbidden() *GetPromptsForbidden {
|
||||
return &GetPromptsForbidden{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetPromptsForbidden struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get prompts forbidden response has a 2xx status code
|
||||
func (o *GetPromptsForbidden) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get prompts forbidden response has a 3xx status code
|
||||
func (o *GetPromptsForbidden) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get prompts forbidden response has a 4xx status code
|
||||
func (o *GetPromptsForbidden) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get prompts forbidden response has a 5xx status code
|
||||
func (o *GetPromptsForbidden) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get prompts forbidden response a status code equal to that given
|
||||
func (o *GetPromptsForbidden) IsCode(code int) bool {
|
||||
return code == 403
|
||||
}
|
||||
|
||||
// Code gets the status code for the get prompts forbidden response
|
||||
func (o *GetPromptsForbidden) Code() int {
|
||||
return 403
|
||||
}
|
||||
|
||||
func (o *GetPromptsForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /prompts][%d] getPromptsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptsForbidden) String() string {
|
||||
return fmt.Sprintf("[GET /prompts][%d] getPromptsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptsForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetPromptsNotFound creates a GetPromptsNotFound with default headers values
|
||||
func NewGetPromptsNotFound() *GetPromptsNotFound {
|
||||
return &GetPromptsNotFound{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetPromptsNotFound struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get prompts not found response has a 2xx status code
|
||||
func (o *GetPromptsNotFound) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get prompts not found response has a 3xx status code
|
||||
func (o *GetPromptsNotFound) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get prompts not found response has a 4xx status code
|
||||
func (o *GetPromptsNotFound) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get prompts not found response has a 5xx status code
|
||||
func (o *GetPromptsNotFound) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get prompts not found response a status code equal to that given
|
||||
func (o *GetPromptsNotFound) IsCode(code int) bool {
|
||||
return code == 404
|
||||
}
|
||||
|
||||
// Code gets the status code for the get prompts not found response
|
||||
func (o *GetPromptsNotFound) Code() int {
|
||||
return 404
|
||||
}
|
||||
|
||||
func (o *GetPromptsNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /prompts][%d] getPromptsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptsNotFound) String() string {
|
||||
return fmt.Sprintf("[GET /prompts][%d] getPromptsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptsNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetPromptsUnprocessableEntity creates a GetPromptsUnprocessableEntity with default headers values
|
||||
func NewGetPromptsUnprocessableEntity() *GetPromptsUnprocessableEntity {
|
||||
return &GetPromptsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetPromptsUnprocessableEntity struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get prompts unprocessable entity response has a 2xx status code
|
||||
func (o *GetPromptsUnprocessableEntity) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get prompts unprocessable entity response has a 3xx status code
|
||||
func (o *GetPromptsUnprocessableEntity) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get prompts unprocessable entity response has a 4xx status code
|
||||
func (o *GetPromptsUnprocessableEntity) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get prompts unprocessable entity response has a 5xx status code
|
||||
func (o *GetPromptsUnprocessableEntity) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get prompts unprocessable entity response a status code equal to that given
|
||||
func (o *GetPromptsUnprocessableEntity) IsCode(code int) bool {
|
||||
return code == 422
|
||||
}
|
||||
|
||||
// Code gets the status code for the get prompts unprocessable entity response
|
||||
func (o *GetPromptsUnprocessableEntity) Code() int {
|
||||
return 422
|
||||
}
|
||||
|
||||
func (o *GetPromptsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /prompts][%d] getPromptsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptsUnprocessableEntity) String() string {
|
||||
return fmt.Sprintf("[GET /prompts][%d] getPromptsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptsUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetPromptsInternalServerError creates a GetPromptsInternalServerError with default headers values
|
||||
func NewGetPromptsInternalServerError() *GetPromptsInternalServerError {
|
||||
return &GetPromptsInternalServerError{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetPromptsInternalServerError struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get prompts internal server error response has a 2xx status code
|
||||
func (o *GetPromptsInternalServerError) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get prompts internal server error response has a 3xx status code
|
||||
func (o *GetPromptsInternalServerError) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get prompts internal server error response has a 4xx status code
|
||||
func (o *GetPromptsInternalServerError) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get prompts internal server error response has a 5xx status code
|
||||
func (o *GetPromptsInternalServerError) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this get prompts internal server error response a status code equal to that given
|
||||
func (o *GetPromptsInternalServerError) IsCode(code int) bool {
|
||||
return code == 500
|
||||
}
|
||||
|
||||
// Code gets the status code for the get prompts internal server error response
|
||||
func (o *GetPromptsInternalServerError) Code() int {
|
||||
return 500
|
||||
}
|
||||
|
||||
func (o *GetPromptsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /prompts][%d] getPromptsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptsInternalServerError) String() string {
|
||||
return fmt.Sprintf("[GET /prompts][%d] getPromptsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetPromptsInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetPromptsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
// 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 (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// NewPostPromptCategoriesParams creates a new PostPromptCategoriesParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostPromptCategoriesParams() *PostPromptCategoriesParams {
|
||||
return &PostPromptCategoriesParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostPromptCategoriesParamsWithTimeout creates a new PostPromptCategoriesParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostPromptCategoriesParamsWithTimeout(timeout time.Duration) *PostPromptCategoriesParams {
|
||||
return &PostPromptCategoriesParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostPromptCategoriesParamsWithContext creates a new PostPromptCategoriesParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostPromptCategoriesParamsWithContext(ctx context.Context) *PostPromptCategoriesParams {
|
||||
return &PostPromptCategoriesParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostPromptCategoriesParamsWithHTTPClient creates a new PostPromptCategoriesParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostPromptCategoriesParamsWithHTTPClient(client *http.Client) *PostPromptCategoriesParams {
|
||||
return &PostPromptCategoriesParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
PostPromptCategoriesParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the post prompt categories operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostPromptCategoriesParams struct {
|
||||
|
||||
/* PromptCategoryRequest.
|
||||
|
||||
An array of PromptCategory objects
|
||||
*/
|
||||
PromptCategoryRequest *sfgate_models.PromptCategoryRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post prompt categories params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostPromptCategoriesParams) WithDefaults() *PostPromptCategoriesParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post prompt categories params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostPromptCategoriesParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post prompt categories params
|
||||
func (o *PostPromptCategoriesParams) WithTimeout(timeout time.Duration) *PostPromptCategoriesParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post prompt categories params
|
||||
func (o *PostPromptCategoriesParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post prompt categories params
|
||||
func (o *PostPromptCategoriesParams) WithContext(ctx context.Context) *PostPromptCategoriesParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post prompt categories params
|
||||
func (o *PostPromptCategoriesParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post prompt categories params
|
||||
func (o *PostPromptCategoriesParams) WithHTTPClient(client *http.Client) *PostPromptCategoriesParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post prompt categories params
|
||||
func (o *PostPromptCategoriesParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithPromptCategoryRequest adds the promptCategoryRequest to the post prompt categories params
|
||||
func (o *PostPromptCategoriesParams) WithPromptCategoryRequest(promptCategoryRequest *sfgate_models.PromptCategoryRequest) *PostPromptCategoriesParams {
|
||||
o.SetPromptCategoryRequest(promptCategoryRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPromptCategoryRequest adds the promptCategoryRequest to the post prompt categories params
|
||||
func (o *PostPromptCategoriesParams) SetPromptCategoryRequest(promptCategoryRequest *sfgate_models.PromptCategoryRequest) {
|
||||
o.PromptCategoryRequest = promptCategoryRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostPromptCategoriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.PromptCategoryRequest != nil {
|
||||
if err := r.SetBodyParam(o.PromptCategoryRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,477 @@
|
|||
// 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/sfgate/sfgate_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 *sfgate_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() *sfgate_models.PromptCategoryResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptCategoriesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 {
|
||||
Payload *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptCategoriesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptCategoriesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptCategoriesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptCategoriesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
// 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 (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// NewPostPromptTagsParams creates a new PostPromptTagsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostPromptTagsParams() *PostPromptTagsParams {
|
||||
return &PostPromptTagsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostPromptTagsParamsWithTimeout creates a new PostPromptTagsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostPromptTagsParamsWithTimeout(timeout time.Duration) *PostPromptTagsParams {
|
||||
return &PostPromptTagsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostPromptTagsParamsWithContext creates a new PostPromptTagsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostPromptTagsParamsWithContext(ctx context.Context) *PostPromptTagsParams {
|
||||
return &PostPromptTagsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostPromptTagsParamsWithHTTPClient creates a new PostPromptTagsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostPromptTagsParamsWithHTTPClient(client *http.Client) *PostPromptTagsParams {
|
||||
return &PostPromptTagsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
PostPromptTagsParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the post prompt tags operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostPromptTagsParams struct {
|
||||
|
||||
/* PromptTagRequest.
|
||||
|
||||
An array of PromptTag objects
|
||||
*/
|
||||
PromptTagRequest *sfgate_models.PromptTagRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post prompt tags params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostPromptTagsParams) WithDefaults() *PostPromptTagsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post prompt tags params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostPromptTagsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post prompt tags params
|
||||
func (o *PostPromptTagsParams) WithTimeout(timeout time.Duration) *PostPromptTagsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post prompt tags params
|
||||
func (o *PostPromptTagsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post prompt tags params
|
||||
func (o *PostPromptTagsParams) WithContext(ctx context.Context) *PostPromptTagsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post prompt tags params
|
||||
func (o *PostPromptTagsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post prompt tags params
|
||||
func (o *PostPromptTagsParams) WithHTTPClient(client *http.Client) *PostPromptTagsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post prompt tags params
|
||||
func (o *PostPromptTagsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithPromptTagRequest adds the promptTagRequest to the post prompt tags params
|
||||
func (o *PostPromptTagsParams) WithPromptTagRequest(promptTagRequest *sfgate_models.PromptTagRequest) *PostPromptTagsParams {
|
||||
o.SetPromptTagRequest(promptTagRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPromptTagRequest adds the promptTagRequest to the post prompt tags params
|
||||
func (o *PostPromptTagsParams) SetPromptTagRequest(promptTagRequest *sfgate_models.PromptTagRequest) {
|
||||
o.PromptTagRequest = promptTagRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostPromptTagsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.PromptTagRequest != nil {
|
||||
if err := r.SetBodyParam(o.PromptTagRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,477 @@
|
|||
// 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/sfgate/sfgate_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 *sfgate_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() *sfgate_models.PromptTagResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptTagsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 {
|
||||
Payload *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptTagsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptTagsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptTagsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptTagsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
// 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 (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// NewPostPromptsParams creates a new PostPromptsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostPromptsParams() *PostPromptsParams {
|
||||
return &PostPromptsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostPromptsParamsWithTimeout creates a new PostPromptsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostPromptsParamsWithTimeout(timeout time.Duration) *PostPromptsParams {
|
||||
return &PostPromptsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostPromptsParamsWithContext creates a new PostPromptsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostPromptsParamsWithContext(ctx context.Context) *PostPromptsParams {
|
||||
return &PostPromptsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostPromptsParamsWithHTTPClient creates a new PostPromptsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostPromptsParamsWithHTTPClient(client *http.Client) *PostPromptsParams {
|
||||
return &PostPromptsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
PostPromptsParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the post prompts operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostPromptsParams struct {
|
||||
|
||||
/* PromptRequest.
|
||||
|
||||
An array of new Prompt records
|
||||
*/
|
||||
PromptRequest *sfgate_models.PromptRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post prompts params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostPromptsParams) WithDefaults() *PostPromptsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post prompts params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostPromptsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post prompts params
|
||||
func (o *PostPromptsParams) WithTimeout(timeout time.Duration) *PostPromptsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post prompts params
|
||||
func (o *PostPromptsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post prompts params
|
||||
func (o *PostPromptsParams) WithContext(ctx context.Context) *PostPromptsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post prompts params
|
||||
func (o *PostPromptsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post prompts params
|
||||
func (o *PostPromptsParams) WithHTTPClient(client *http.Client) *PostPromptsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post prompts params
|
||||
func (o *PostPromptsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithPromptRequest adds the promptRequest to the post prompts params
|
||||
func (o *PostPromptsParams) WithPromptRequest(promptRequest *sfgate_models.PromptRequest) *PostPromptsParams {
|
||||
o.SetPromptRequest(promptRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPromptRequest adds the promptRequest to the post prompts params
|
||||
func (o *PostPromptsParams) SetPromptRequest(promptRequest *sfgate_models.PromptRequest) {
|
||||
o.PromptRequest = promptRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostPromptsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.PromptRequest != nil {
|
||||
if err := r.SetBodyParam(o.PromptRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,477 @@
|
|||
// 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/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// PostPromptsReader is a Reader for the PostPrompts structure.
|
||||
type PostPromptsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostPromptsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostPromptsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostPromptsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostPromptsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostPromptsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostPromptsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostPromptsInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostPromptsOK creates a PostPromptsOK with default headers values
|
||||
func NewPostPromptsOK() *PostPromptsOK {
|
||||
return &PostPromptsOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostPromptsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Response with Prompt objects
|
||||
*/
|
||||
type PostPromptsOK struct {
|
||||
Payload *sfgate_models.PromptResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post prompts o k response has a 2xx status code
|
||||
func (o *PostPromptsOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post prompts o k response has a 3xx status code
|
||||
func (o *PostPromptsOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post prompts o k response has a 4xx status code
|
||||
func (o *PostPromptsOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post prompts o k response has a 5xx status code
|
||||
func (o *PostPromptsOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post prompts o k response a status code equal to that given
|
||||
func (o *PostPromptsOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the post prompts o k response
|
||||
func (o *PostPromptsOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *PostPromptsOK) Error() string {
|
||||
return fmt.Sprintf("[POST /prompts][%d] postPromptsOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostPromptsOK) String() string {
|
||||
return fmt.Sprintf("[POST /prompts][%d] postPromptsOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostPromptsOK) GetPayload() *sfgate_models.PromptResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.PromptResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostPromptsUnauthorized creates a PostPromptsUnauthorized with default headers values
|
||||
func NewPostPromptsUnauthorized() *PostPromptsUnauthorized {
|
||||
return &PostPromptsUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostPromptsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostPromptsUnauthorized struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post prompts unauthorized response has a 2xx status code
|
||||
func (o *PostPromptsUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post prompts unauthorized response has a 3xx status code
|
||||
func (o *PostPromptsUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post prompts unauthorized response has a 4xx status code
|
||||
func (o *PostPromptsUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post prompts unauthorized response has a 5xx status code
|
||||
func (o *PostPromptsUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post prompts unauthorized response a status code equal to that given
|
||||
func (o *PostPromptsUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the post prompts unauthorized response
|
||||
func (o *PostPromptsUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *PostPromptsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /prompts][%d] postPromptsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostPromptsUnauthorized) String() string {
|
||||
return fmt.Sprintf("[POST /prompts][%d] postPromptsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostPromptsUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostPromptsForbidden creates a PostPromptsForbidden with default headers values
|
||||
func NewPostPromptsForbidden() *PostPromptsForbidden {
|
||||
return &PostPromptsForbidden{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostPromptsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostPromptsForbidden struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post prompts forbidden response has a 2xx status code
|
||||
func (o *PostPromptsForbidden) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post prompts forbidden response has a 3xx status code
|
||||
func (o *PostPromptsForbidden) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post prompts forbidden response has a 4xx status code
|
||||
func (o *PostPromptsForbidden) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post prompts forbidden response has a 5xx status code
|
||||
func (o *PostPromptsForbidden) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post prompts forbidden response a status code equal to that given
|
||||
func (o *PostPromptsForbidden) IsCode(code int) bool {
|
||||
return code == 403
|
||||
}
|
||||
|
||||
// Code gets the status code for the post prompts forbidden response
|
||||
func (o *PostPromptsForbidden) Code() int {
|
||||
return 403
|
||||
}
|
||||
|
||||
func (o *PostPromptsForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /prompts][%d] postPromptsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostPromptsForbidden) String() string {
|
||||
return fmt.Sprintf("[POST /prompts][%d] postPromptsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostPromptsForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostPromptsNotFound creates a PostPromptsNotFound with default headers values
|
||||
func NewPostPromptsNotFound() *PostPromptsNotFound {
|
||||
return &PostPromptsNotFound{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostPromptsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostPromptsNotFound struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post prompts not found response has a 2xx status code
|
||||
func (o *PostPromptsNotFound) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post prompts not found response has a 3xx status code
|
||||
func (o *PostPromptsNotFound) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post prompts not found response has a 4xx status code
|
||||
func (o *PostPromptsNotFound) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post prompts not found response has a 5xx status code
|
||||
func (o *PostPromptsNotFound) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post prompts not found response a status code equal to that given
|
||||
func (o *PostPromptsNotFound) IsCode(code int) bool {
|
||||
return code == 404
|
||||
}
|
||||
|
||||
// Code gets the status code for the post prompts not found response
|
||||
func (o *PostPromptsNotFound) Code() int {
|
||||
return 404
|
||||
}
|
||||
|
||||
func (o *PostPromptsNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /prompts][%d] postPromptsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostPromptsNotFound) String() string {
|
||||
return fmt.Sprintf("[POST /prompts][%d] postPromptsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostPromptsNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostPromptsUnprocessableEntity creates a PostPromptsUnprocessableEntity with default headers values
|
||||
func NewPostPromptsUnprocessableEntity() *PostPromptsUnprocessableEntity {
|
||||
return &PostPromptsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostPromptsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostPromptsUnprocessableEntity struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post prompts unprocessable entity response has a 2xx status code
|
||||
func (o *PostPromptsUnprocessableEntity) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post prompts unprocessable entity response has a 3xx status code
|
||||
func (o *PostPromptsUnprocessableEntity) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post prompts unprocessable entity response has a 4xx status code
|
||||
func (o *PostPromptsUnprocessableEntity) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post prompts unprocessable entity response has a 5xx status code
|
||||
func (o *PostPromptsUnprocessableEntity) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post prompts unprocessable entity response a status code equal to that given
|
||||
func (o *PostPromptsUnprocessableEntity) IsCode(code int) bool {
|
||||
return code == 422
|
||||
}
|
||||
|
||||
// Code gets the status code for the post prompts unprocessable entity response
|
||||
func (o *PostPromptsUnprocessableEntity) Code() int {
|
||||
return 422
|
||||
}
|
||||
|
||||
func (o *PostPromptsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /prompts][%d] postPromptsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostPromptsUnprocessableEntity) String() string {
|
||||
return fmt.Sprintf("[POST /prompts][%d] postPromptsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostPromptsUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostPromptsInternalServerError creates a PostPromptsInternalServerError with default headers values
|
||||
func NewPostPromptsInternalServerError() *PostPromptsInternalServerError {
|
||||
return &PostPromptsInternalServerError{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostPromptsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostPromptsInternalServerError struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post prompts internal server error response has a 2xx status code
|
||||
func (o *PostPromptsInternalServerError) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post prompts internal server error response has a 3xx status code
|
||||
func (o *PostPromptsInternalServerError) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post prompts internal server error response has a 4xx status code
|
||||
func (o *PostPromptsInternalServerError) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post prompts internal server error response has a 5xx status code
|
||||
func (o *PostPromptsInternalServerError) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this post prompts internal server error response a status code equal to that given
|
||||
func (o *PostPromptsInternalServerError) IsCode(code int) bool {
|
||||
return code == 500
|
||||
}
|
||||
|
||||
// Code gets the status code for the post prompts internal server error response
|
||||
func (o *PostPromptsInternalServerError) Code() int {
|
||||
return 500
|
||||
}
|
||||
|
||||
func (o *PostPromptsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /prompts][%d] postPromptsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostPromptsInternalServerError) String() string {
|
||||
return fmt.Sprintf("[POST /prompts][%d] postPromptsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostPromptsInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostPromptsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,430 @@
|
|||
// 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"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new prompts API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for prompts API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ClientOption is the option for Client methods
|
||||
type ClientOption func(*runtime.ClientOperation)
|
||||
|
||||
// ClientService is the interface for Client methods
|
||||
type ClientService interface {
|
||||
GetPromptCategories(params *GetPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptCategoriesOK, error)
|
||||
|
||||
GetPromptTags(params *GetPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptTagsOK, error)
|
||||
|
||||
GetPrompts(params *GetPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptsOK, error)
|
||||
|
||||
PostPromptCategories(params *PostPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptCategoriesOK, error)
|
||||
|
||||
PostPromptTags(params *PostPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptTagsOK, error)
|
||||
|
||||
PostPrompts(params *PostPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptsOK, error)
|
||||
|
||||
PutPromptCategories(params *PutPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptCategoriesOK, error)
|
||||
|
||||
PutPromptTags(params *PutPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptTagsOK, error)
|
||||
|
||||
PutPrompts(params *PutPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptsOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptCategories gets a list of prompt categories
|
||||
|
||||
Return a list of PromptCategory records from the datastore
|
||||
*/
|
||||
func (a *Client) GetPromptCategories(params *GetPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptCategoriesOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetPromptCategoriesParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getPromptCategories",
|
||||
Method: "GET",
|
||||
PathPattern: "/promptcategories",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetPromptCategoriesReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetPromptCategoriesOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getPromptCategories: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
GetPromptTags gets a list of prompt tags
|
||||
|
||||
Return a list of PromptTag records from the datastore
|
||||
*/
|
||||
func (a *Client) GetPromptTags(params *GetPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptTagsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetPromptTagsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getPromptTags",
|
||||
Method: "GET",
|
||||
PathPattern: "/prompttags",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetPromptTagsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetPromptTagsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getPromptTags: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
GetPrompts gets a list of prompts
|
||||
|
||||
Return a list of Prompt records from the datastore
|
||||
*/
|
||||
func (a *Client) GetPrompts(params *GetPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetPromptsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getPrompts",
|
||||
Method: "GET",
|
||||
PathPattern: "/prompts",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetPromptsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetPromptsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getPrompts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostPromptCategories creates new prompt categories
|
||||
|
||||
Create PromptCategories
|
||||
*/
|
||||
func (a *Client) PostPromptCategories(params *PostPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptCategoriesOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostPromptCategoriesParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postPromptCategories",
|
||||
Method: "POST",
|
||||
PathPattern: "/promptcategories",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostPromptCategoriesReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PostPromptCategoriesOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postPromptCategories: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostPromptTags creates new prompt tags
|
||||
|
||||
Create PromptTags in Taxnexus
|
||||
*/
|
||||
func (a *Client) PostPromptTags(params *PostPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptTagsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostPromptTagsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postPromptTags",
|
||||
Method: "POST",
|
||||
PathPattern: "/prompttags",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostPromptTagsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PostPromptTagsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postPromptTags: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostPrompts creates new prompts
|
||||
|
||||
Create Prompts
|
||||
*/
|
||||
func (a *Client) PostPrompts(params *PostPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostPromptsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postPrompts",
|
||||
Method: "POST",
|
||||
PathPattern: "/prompts",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostPromptsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PostPromptsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postPrompts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptCategories updates prompt categories
|
||||
|
||||
Update PromptCategory
|
||||
*/
|
||||
func (a *Client) PutPromptCategories(params *PutPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptCategoriesOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPutPromptCategoriesParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "putPromptCategories",
|
||||
Method: "PUT",
|
||||
PathPattern: "/promptcategories",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PutPromptCategoriesReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PutPromptCategoriesOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for putPromptCategories: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptTags updates prompt tags
|
||||
|
||||
Update PromptTag in Taxnexus
|
||||
*/
|
||||
func (a *Client) PutPromptTags(params *PutPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptTagsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPutPromptTagsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "putPromptTags",
|
||||
Method: "PUT",
|
||||
PathPattern: "/prompttags",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PutPromptTagsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PutPromptTagsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for putPromptTags: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PutPrompts updates prompts
|
||||
|
||||
Update Prompt
|
||||
*/
|
||||
func (a *Client) PutPrompts(params *PutPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPutPromptsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "putPrompts",
|
||||
Method: "PUT",
|
||||
PathPattern: "/prompts",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PutPromptsReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PutPromptsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for putPrompts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
// 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 (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// NewPutPromptCategoriesParams creates a new PutPromptCategoriesParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPutPromptCategoriesParams() *PutPromptCategoriesParams {
|
||||
return &PutPromptCategoriesParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutPromptCategoriesParamsWithTimeout creates a new PutPromptCategoriesParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPutPromptCategoriesParamsWithTimeout(timeout time.Duration) *PutPromptCategoriesParams {
|
||||
return &PutPromptCategoriesParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutPromptCategoriesParamsWithContext creates a new PutPromptCategoriesParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPutPromptCategoriesParamsWithContext(ctx context.Context) *PutPromptCategoriesParams {
|
||||
return &PutPromptCategoriesParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutPromptCategoriesParamsWithHTTPClient creates a new PutPromptCategoriesParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPutPromptCategoriesParamsWithHTTPClient(client *http.Client) *PutPromptCategoriesParams {
|
||||
return &PutPromptCategoriesParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptCategoriesParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the put prompt categories operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PutPromptCategoriesParams struct {
|
||||
|
||||
/* PromptCategoryRequest.
|
||||
|
||||
An array of PromptCategory objects
|
||||
*/
|
||||
PromptCategoryRequest *sfgate_models.PromptCategoryRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the put prompt categories params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PutPromptCategoriesParams) WithDefaults() *PutPromptCategoriesParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the put prompt categories params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PutPromptCategoriesParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the put prompt categories params
|
||||
func (o *PutPromptCategoriesParams) WithTimeout(timeout time.Duration) *PutPromptCategoriesParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the put prompt categories params
|
||||
func (o *PutPromptCategoriesParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the put prompt categories params
|
||||
func (o *PutPromptCategoriesParams) WithContext(ctx context.Context) *PutPromptCategoriesParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the put prompt categories params
|
||||
func (o *PutPromptCategoriesParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the put prompt categories params
|
||||
func (o *PutPromptCategoriesParams) WithHTTPClient(client *http.Client) *PutPromptCategoriesParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the put prompt categories params
|
||||
func (o *PutPromptCategoriesParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithPromptCategoryRequest adds the promptCategoryRequest to the put prompt categories params
|
||||
func (o *PutPromptCategoriesParams) WithPromptCategoryRequest(promptCategoryRequest *sfgate_models.PromptCategoryRequest) *PutPromptCategoriesParams {
|
||||
o.SetPromptCategoryRequest(promptCategoryRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPromptCategoryRequest adds the promptCategoryRequest to the put prompt categories params
|
||||
func (o *PutPromptCategoriesParams) SetPromptCategoryRequest(promptCategoryRequest *sfgate_models.PromptCategoryRequest) {
|
||||
o.PromptCategoryRequest = promptCategoryRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PutPromptCategoriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.PromptCategoryRequest != nil {
|
||||
if err := r.SetBodyParam(o.PromptCategoryRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,477 @@
|
|||
// 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/sfgate/sfgate_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 *sfgate_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() *sfgate_models.PromptCategoryResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptCategoriesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 {
|
||||
Payload *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptCategoriesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptCategoriesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptCategoriesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_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 *sfgate_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() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptCategoriesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
// 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 (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// NewPutPromptTagsParams creates a new PutPromptTagsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPutPromptTagsParams() *PutPromptTagsParams {
|
||||
return &PutPromptTagsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutPromptTagsParamsWithTimeout creates a new PutPromptTagsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPutPromptTagsParamsWithTimeout(timeout time.Duration) *PutPromptTagsParams {
|
||||
return &PutPromptTagsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutPromptTagsParamsWithContext creates a new PutPromptTagsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPutPromptTagsParamsWithContext(ctx context.Context) *PutPromptTagsParams {
|
||||
return &PutPromptTagsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutPromptTagsParamsWithHTTPClient creates a new PutPromptTagsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPutPromptTagsParamsWithHTTPClient(client *http.Client) *PutPromptTagsParams {
|
||||
return &PutPromptTagsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptTagsParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the put prompt tags operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PutPromptTagsParams struct {
|
||||
|
||||
/* PromptTagRequest.
|
||||
|
||||
An array of PromptTag objects
|
||||
*/
|
||||
PromptTagRequest *sfgate_models.PromptTagRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the put prompt tags params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PutPromptTagsParams) WithDefaults() *PutPromptTagsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the put prompt tags params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PutPromptTagsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the put prompt tags params
|
||||
func (o *PutPromptTagsParams) WithTimeout(timeout time.Duration) *PutPromptTagsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the put prompt tags params
|
||||
func (o *PutPromptTagsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the put prompt tags params
|
||||
func (o *PutPromptTagsParams) WithContext(ctx context.Context) *PutPromptTagsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the put prompt tags params
|
||||
func (o *PutPromptTagsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the put prompt tags params
|
||||
func (o *PutPromptTagsParams) WithHTTPClient(client *http.Client) *PutPromptTagsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the put prompt tags params
|
||||
func (o *PutPromptTagsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithPromptTagRequest adds the promptTagRequest to the put prompt tags params
|
||||
func (o *PutPromptTagsParams) WithPromptTagRequest(promptTagRequest *sfgate_models.PromptTagRequest) *PutPromptTagsParams {
|
||||
o.SetPromptTagRequest(promptTagRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPromptTagRequest adds the promptTagRequest to the put prompt tags params
|
||||
func (o *PutPromptTagsParams) SetPromptTagRequest(promptTagRequest *sfgate_models.PromptTagRequest) {
|
||||
o.PromptTagRequest = promptTagRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PutPromptTagsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.PromptTagRequest != nil {
|
||||
if err := r.SetBodyParam(o.PromptTagRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,477 @@
|
|||
// 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/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// PutPromptTagsReader is a Reader for the PutPromptTags structure.
|
||||
type PutPromptTagsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PutPromptTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPutPromptTagsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPutPromptTagsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPutPromptTagsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPutPromptTagsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPutPromptTagsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPutPromptTagsInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutPromptTagsOK creates a PutPromptTagsOK with default headers values
|
||||
func NewPutPromptTagsOK() *PutPromptTagsOK {
|
||||
return &PutPromptTagsOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptTagsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Response with PromptTag objects
|
||||
*/
|
||||
type PutPromptTagsOK struct {
|
||||
Payload *sfgate_models.PromptTagResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this put prompt tags o k response has a 2xx status code
|
||||
func (o *PutPromptTagsOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this put prompt tags o k response has a 3xx status code
|
||||
func (o *PutPromptTagsOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this put prompt tags o k response has a 4xx status code
|
||||
func (o *PutPromptTagsOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this put prompt tags o k response has a 5xx status code
|
||||
func (o *PutPromptTagsOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this put prompt tags o k response a status code equal to that given
|
||||
func (o *PutPromptTagsOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the put prompt tags o k response
|
||||
func (o *PutPromptTagsOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsOK) Error() string {
|
||||
return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsOK) String() string {
|
||||
return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsOK) GetPayload() *sfgate_models.PromptTagResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.PromptTagResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutPromptTagsUnauthorized creates a PutPromptTagsUnauthorized with default headers values
|
||||
func NewPutPromptTagsUnauthorized() *PutPromptTagsUnauthorized {
|
||||
return &PutPromptTagsUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptTagsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PutPromptTagsUnauthorized struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this put prompt tags unauthorized response has a 2xx status code
|
||||
func (o *PutPromptTagsUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this put prompt tags unauthorized response has a 3xx status code
|
||||
func (o *PutPromptTagsUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this put prompt tags unauthorized response has a 4xx status code
|
||||
func (o *PutPromptTagsUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this put prompt tags unauthorized response has a 5xx status code
|
||||
func (o *PutPromptTagsUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this put prompt tags unauthorized response a status code equal to that given
|
||||
func (o *PutPromptTagsUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the put prompt tags unauthorized response
|
||||
func (o *PutPromptTagsUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsUnauthorized) String() string {
|
||||
return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutPromptTagsForbidden creates a PutPromptTagsForbidden with default headers values
|
||||
func NewPutPromptTagsForbidden() *PutPromptTagsForbidden {
|
||||
return &PutPromptTagsForbidden{}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptTagsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PutPromptTagsForbidden struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this put prompt tags forbidden response has a 2xx status code
|
||||
func (o *PutPromptTagsForbidden) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this put prompt tags forbidden response has a 3xx status code
|
||||
func (o *PutPromptTagsForbidden) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this put prompt tags forbidden response has a 4xx status code
|
||||
func (o *PutPromptTagsForbidden) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this put prompt tags forbidden response has a 5xx status code
|
||||
func (o *PutPromptTagsForbidden) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this put prompt tags forbidden response a status code equal to that given
|
||||
func (o *PutPromptTagsForbidden) IsCode(code int) bool {
|
||||
return code == 403
|
||||
}
|
||||
|
||||
// Code gets the status code for the put prompt tags forbidden response
|
||||
func (o *PutPromptTagsForbidden) Code() int {
|
||||
return 403
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsForbidden) Error() string {
|
||||
return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsForbidden) String() string {
|
||||
return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutPromptTagsNotFound creates a PutPromptTagsNotFound with default headers values
|
||||
func NewPutPromptTagsNotFound() *PutPromptTagsNotFound {
|
||||
return &PutPromptTagsNotFound{}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptTagsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PutPromptTagsNotFound struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this put prompt tags not found response has a 2xx status code
|
||||
func (o *PutPromptTagsNotFound) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this put prompt tags not found response has a 3xx status code
|
||||
func (o *PutPromptTagsNotFound) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this put prompt tags not found response has a 4xx status code
|
||||
func (o *PutPromptTagsNotFound) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this put prompt tags not found response has a 5xx status code
|
||||
func (o *PutPromptTagsNotFound) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this put prompt tags not found response a status code equal to that given
|
||||
func (o *PutPromptTagsNotFound) IsCode(code int) bool {
|
||||
return code == 404
|
||||
}
|
||||
|
||||
// Code gets the status code for the put prompt tags not found response
|
||||
func (o *PutPromptTagsNotFound) Code() int {
|
||||
return 404
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsNotFound) Error() string {
|
||||
return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsNotFound) String() string {
|
||||
return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutPromptTagsUnprocessableEntity creates a PutPromptTagsUnprocessableEntity with default headers values
|
||||
func NewPutPromptTagsUnprocessableEntity() *PutPromptTagsUnprocessableEntity {
|
||||
return &PutPromptTagsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptTagsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PutPromptTagsUnprocessableEntity struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this put prompt tags unprocessable entity response has a 2xx status code
|
||||
func (o *PutPromptTagsUnprocessableEntity) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this put prompt tags unprocessable entity response has a 3xx status code
|
||||
func (o *PutPromptTagsUnprocessableEntity) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this put prompt tags unprocessable entity response has a 4xx status code
|
||||
func (o *PutPromptTagsUnprocessableEntity) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this put prompt tags unprocessable entity response has a 5xx status code
|
||||
func (o *PutPromptTagsUnprocessableEntity) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this put prompt tags unprocessable entity response a status code equal to that given
|
||||
func (o *PutPromptTagsUnprocessableEntity) IsCode(code int) bool {
|
||||
return code == 422
|
||||
}
|
||||
|
||||
// Code gets the status code for the put prompt tags unprocessable entity response
|
||||
func (o *PutPromptTagsUnprocessableEntity) Code() int {
|
||||
return 422
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsUnprocessableEntity) String() string {
|
||||
return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutPromptTagsInternalServerError creates a PutPromptTagsInternalServerError with default headers values
|
||||
func NewPutPromptTagsInternalServerError() *PutPromptTagsInternalServerError {
|
||||
return &PutPromptTagsInternalServerError{}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptTagsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PutPromptTagsInternalServerError struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this put prompt tags internal server error response has a 2xx status code
|
||||
func (o *PutPromptTagsInternalServerError) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this put prompt tags internal server error response has a 3xx status code
|
||||
func (o *PutPromptTagsInternalServerError) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this put prompt tags internal server error response has a 4xx status code
|
||||
func (o *PutPromptTagsInternalServerError) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this put prompt tags internal server error response has a 5xx status code
|
||||
func (o *PutPromptTagsInternalServerError) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this put prompt tags internal server error response a status code equal to that given
|
||||
func (o *PutPromptTagsInternalServerError) IsCode(code int) bool {
|
||||
return code == 500
|
||||
}
|
||||
|
||||
// Code gets the status code for the put prompt tags internal server error response
|
||||
func (o *PutPromptTagsInternalServerError) Code() int {
|
||||
return 500
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsInternalServerError) String() string {
|
||||
return fmt.Sprintf("[PUT /prompttags][%d] putPromptTagsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptTagsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
// 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 (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// NewPutPromptsParams creates a new PutPromptsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPutPromptsParams() *PutPromptsParams {
|
||||
return &PutPromptsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutPromptsParamsWithTimeout creates a new PutPromptsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPutPromptsParamsWithTimeout(timeout time.Duration) *PutPromptsParams {
|
||||
return &PutPromptsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutPromptsParamsWithContext creates a new PutPromptsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPutPromptsParamsWithContext(ctx context.Context) *PutPromptsParams {
|
||||
return &PutPromptsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutPromptsParamsWithHTTPClient creates a new PutPromptsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPutPromptsParamsWithHTTPClient(client *http.Client) *PutPromptsParams {
|
||||
return &PutPromptsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptsParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the put prompts operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PutPromptsParams struct {
|
||||
|
||||
/* PromptRequest.
|
||||
|
||||
An array of new Prompt records
|
||||
*/
|
||||
PromptRequest *sfgate_models.PromptRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the put prompts params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PutPromptsParams) WithDefaults() *PutPromptsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the put prompts params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PutPromptsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the put prompts params
|
||||
func (o *PutPromptsParams) WithTimeout(timeout time.Duration) *PutPromptsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the put prompts params
|
||||
func (o *PutPromptsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the put prompts params
|
||||
func (o *PutPromptsParams) WithContext(ctx context.Context) *PutPromptsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the put prompts params
|
||||
func (o *PutPromptsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the put prompts params
|
||||
func (o *PutPromptsParams) WithHTTPClient(client *http.Client) *PutPromptsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the put prompts params
|
||||
func (o *PutPromptsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithPromptRequest adds the promptRequest to the put prompts params
|
||||
func (o *PutPromptsParams) WithPromptRequest(promptRequest *sfgate_models.PromptRequest) *PutPromptsParams {
|
||||
o.SetPromptRequest(promptRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPromptRequest adds the promptRequest to the put prompts params
|
||||
func (o *PutPromptsParams) SetPromptRequest(promptRequest *sfgate_models.PromptRequest) {
|
||||
o.PromptRequest = promptRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PutPromptsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.PromptRequest != nil {
|
||||
if err := r.SetBodyParam(o.PromptRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,477 @@
|
|||
// 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/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// PutPromptsReader is a Reader for the PutPrompts structure.
|
||||
type PutPromptsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PutPromptsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPutPromptsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPutPromptsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPutPromptsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPutPromptsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPutPromptsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPutPromptsInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPutPromptsOK creates a PutPromptsOK with default headers values
|
||||
func NewPutPromptsOK() *PutPromptsOK {
|
||||
return &PutPromptsOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Response with Prompt objects
|
||||
*/
|
||||
type PutPromptsOK struct {
|
||||
Payload *sfgate_models.PromptResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this put prompts o k response has a 2xx status code
|
||||
func (o *PutPromptsOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this put prompts o k response has a 3xx status code
|
||||
func (o *PutPromptsOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this put prompts o k response has a 4xx status code
|
||||
func (o *PutPromptsOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this put prompts o k response has a 5xx status code
|
||||
func (o *PutPromptsOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this put prompts o k response a status code equal to that given
|
||||
func (o *PutPromptsOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the put prompts o k response
|
||||
func (o *PutPromptsOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *PutPromptsOK) Error() string {
|
||||
return fmt.Sprintf("[PUT /prompts][%d] putPromptsOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptsOK) String() string {
|
||||
return fmt.Sprintf("[PUT /prompts][%d] putPromptsOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptsOK) GetPayload() *sfgate_models.PromptResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.PromptResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutPromptsUnauthorized creates a PutPromptsUnauthorized with default headers values
|
||||
func NewPutPromptsUnauthorized() *PutPromptsUnauthorized {
|
||||
return &PutPromptsUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PutPromptsUnauthorized struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this put prompts unauthorized response has a 2xx status code
|
||||
func (o *PutPromptsUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this put prompts unauthorized response has a 3xx status code
|
||||
func (o *PutPromptsUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this put prompts unauthorized response has a 4xx status code
|
||||
func (o *PutPromptsUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this put prompts unauthorized response has a 5xx status code
|
||||
func (o *PutPromptsUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this put prompts unauthorized response a status code equal to that given
|
||||
func (o *PutPromptsUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the put prompts unauthorized response
|
||||
func (o *PutPromptsUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *PutPromptsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[PUT /prompts][%d] putPromptsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptsUnauthorized) String() string {
|
||||
return fmt.Sprintf("[PUT /prompts][%d] putPromptsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptsUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutPromptsForbidden creates a PutPromptsForbidden with default headers values
|
||||
func NewPutPromptsForbidden() *PutPromptsForbidden {
|
||||
return &PutPromptsForbidden{}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PutPromptsForbidden struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this put prompts forbidden response has a 2xx status code
|
||||
func (o *PutPromptsForbidden) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this put prompts forbidden response has a 3xx status code
|
||||
func (o *PutPromptsForbidden) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this put prompts forbidden response has a 4xx status code
|
||||
func (o *PutPromptsForbidden) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this put prompts forbidden response has a 5xx status code
|
||||
func (o *PutPromptsForbidden) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this put prompts forbidden response a status code equal to that given
|
||||
func (o *PutPromptsForbidden) IsCode(code int) bool {
|
||||
return code == 403
|
||||
}
|
||||
|
||||
// Code gets the status code for the put prompts forbidden response
|
||||
func (o *PutPromptsForbidden) Code() int {
|
||||
return 403
|
||||
}
|
||||
|
||||
func (o *PutPromptsForbidden) Error() string {
|
||||
return fmt.Sprintf("[PUT /prompts][%d] putPromptsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptsForbidden) String() string {
|
||||
return fmt.Sprintf("[PUT /prompts][%d] putPromptsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptsForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutPromptsNotFound creates a PutPromptsNotFound with default headers values
|
||||
func NewPutPromptsNotFound() *PutPromptsNotFound {
|
||||
return &PutPromptsNotFound{}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PutPromptsNotFound struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this put prompts not found response has a 2xx status code
|
||||
func (o *PutPromptsNotFound) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this put prompts not found response has a 3xx status code
|
||||
func (o *PutPromptsNotFound) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this put prompts not found response has a 4xx status code
|
||||
func (o *PutPromptsNotFound) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this put prompts not found response has a 5xx status code
|
||||
func (o *PutPromptsNotFound) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this put prompts not found response a status code equal to that given
|
||||
func (o *PutPromptsNotFound) IsCode(code int) bool {
|
||||
return code == 404
|
||||
}
|
||||
|
||||
// Code gets the status code for the put prompts not found response
|
||||
func (o *PutPromptsNotFound) Code() int {
|
||||
return 404
|
||||
}
|
||||
|
||||
func (o *PutPromptsNotFound) Error() string {
|
||||
return fmt.Sprintf("[PUT /prompts][%d] putPromptsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptsNotFound) String() string {
|
||||
return fmt.Sprintf("[PUT /prompts][%d] putPromptsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptsNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutPromptsUnprocessableEntity creates a PutPromptsUnprocessableEntity with default headers values
|
||||
func NewPutPromptsUnprocessableEntity() *PutPromptsUnprocessableEntity {
|
||||
return &PutPromptsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PutPromptsUnprocessableEntity struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this put prompts unprocessable entity response has a 2xx status code
|
||||
func (o *PutPromptsUnprocessableEntity) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this put prompts unprocessable entity response has a 3xx status code
|
||||
func (o *PutPromptsUnprocessableEntity) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this put prompts unprocessable entity response has a 4xx status code
|
||||
func (o *PutPromptsUnprocessableEntity) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this put prompts unprocessable entity response has a 5xx status code
|
||||
func (o *PutPromptsUnprocessableEntity) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this put prompts unprocessable entity response a status code equal to that given
|
||||
func (o *PutPromptsUnprocessableEntity) IsCode(code int) bool {
|
||||
return code == 422
|
||||
}
|
||||
|
||||
// Code gets the status code for the put prompts unprocessable entity response
|
||||
func (o *PutPromptsUnprocessableEntity) Code() int {
|
||||
return 422
|
||||
}
|
||||
|
||||
func (o *PutPromptsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[PUT /prompts][%d] putPromptsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptsUnprocessableEntity) String() string {
|
||||
return fmt.Sprintf("[PUT /prompts][%d] putPromptsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptsUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPutPromptsInternalServerError creates a PutPromptsInternalServerError with default headers values
|
||||
func NewPutPromptsInternalServerError() *PutPromptsInternalServerError {
|
||||
return &PutPromptsInternalServerError{}
|
||||
}
|
||||
|
||||
/*
|
||||
PutPromptsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PutPromptsInternalServerError struct {
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this put prompts internal server error response has a 2xx status code
|
||||
func (o *PutPromptsInternalServerError) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this put prompts internal server error response has a 3xx status code
|
||||
func (o *PutPromptsInternalServerError) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this put prompts internal server error response has a 4xx status code
|
||||
func (o *PutPromptsInternalServerError) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this put prompts internal server error response has a 5xx status code
|
||||
func (o *PutPromptsInternalServerError) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this put prompts internal server error response a status code equal to that given
|
||||
func (o *PutPromptsInternalServerError) IsCode(code int) bool {
|
||||
return code == 500
|
||||
}
|
||||
|
||||
// Code gets the status code for the put prompts internal server error response
|
||||
func (o *PutPromptsInternalServerError) Code() int {
|
||||
return 500
|
||||
}
|
||||
|
||||
func (o *PutPromptsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[PUT /prompts][%d] putPromptsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptsInternalServerError) String() string {
|
||||
return fmt.Sprintf("[PUT /prompts][%d] putPromptsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PutPromptsInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PutPromptsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -34,6 +34,7 @@ import (
|
|||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industry_services"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/observations"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/operations"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/prompts"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/research_projects"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/roles"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/templates"
|
||||
|
@ -104,6 +105,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Sfgate {
|
|||
cli.IndustryServices = industry_services.New(transport, formats)
|
||||
cli.Observations = observations.New(transport, formats)
|
||||
cli.Operations = operations.New(transport, formats)
|
||||
cli.Prompts = prompts.New(transport, formats)
|
||||
cli.ResearchProjects = research_projects.New(transport, formats)
|
||||
cli.Roles = roles.New(transport, formats)
|
||||
cli.Templates = templates.New(transport, formats)
|
||||
|
@ -194,6 +196,8 @@ type Sfgate struct {
|
|||
|
||||
Operations operations.ClientService
|
||||
|
||||
Prompts prompts.ClientService
|
||||
|
||||
ResearchProjects research_projects.ClientService
|
||||
|
||||
Roles roles.ClientService
|
||||
|
@ -232,6 +236,7 @@ func (c *Sfgate) SetTransport(transport runtime.ClientTransport) {
|
|||
c.IndustryServices.SetTransport(transport)
|
||||
c.Observations.SetTransport(transport)
|
||||
c.Operations.SetTransport(transport)
|
||||
c.Prompts.SetTransport(transport)
|
||||
c.ResearchProjects.SetTransport(transport)
|
||||
c.Roles.SetTransport(transport)
|
||||
c.Templates.SetTransport(transport)
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
// 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 sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// Prompt A prompt
|
||||
//
|
||||
// swagger:model prompt
|
||||
type Prompt struct {
|
||||
|
||||
// The ID of the user who created the prompt
|
||||
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// The date the prompt was created
|
||||
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// The icon for the prompt
|
||||
Icon *string `json:"Icon,omitempty"`
|
||||
|
||||
// The alt text for the prompt image
|
||||
ImageAltText *string `json:"ImageAltText,omitempty"`
|
||||
|
||||
// The URL of the prompt image
|
||||
ImageURL *string `json:"ImageURL,omitempty"`
|
||||
|
||||
// The ID of the user who last modified the prompt
|
||||
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// The date the prompt was last modified
|
||||
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// The logo for the prompt
|
||||
Logo *string `json:"Logo,omitempty"`
|
||||
|
||||
// The prompt text
|
||||
Prompt *string `json:"Prompt,omitempty"`
|
||||
|
||||
// The ID of the prompt category
|
||||
PromptCategoryID *string `json:"PromptCategoryID,omitempty"`
|
||||
|
||||
// A list of research project IDs
|
||||
ResearchProjectIDs []string `json:"ResearchProjectIDs"`
|
||||
|
||||
// The slug for the prompt
|
||||
Slug *string `json:"Slug,omitempty"`
|
||||
|
||||
// A list of tags
|
||||
Tags []string `json:"Tags"`
|
||||
|
||||
// The ID of the tenant
|
||||
TenantID *string `json:"TenantID,omitempty"`
|
||||
|
||||
// The title of the prompt
|
||||
Title *string `json:"Title,omitempty"`
|
||||
|
||||
// The number of times the prompt has been used
|
||||
UsedCount *float64 `json:"UsedCount,omitempty"`
|
||||
|
||||
// The ID of the user who created the prompt
|
||||
UserID *string `json:"UserID,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this prompt
|
||||
func (m *Prompt) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this prompt based on context it is used
|
||||
func (m *Prompt) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *Prompt) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *Prompt) UnmarshalBinary(b []byte) error {
|
||||
var res Prompt
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
// 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 sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// PromptCategory A prompt category
|
||||
//
|
||||
// swagger:model promptCategory
|
||||
type PromptCategory struct {
|
||||
|
||||
// The ID of the user who created the prompt category
|
||||
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// The date the prompt category was created
|
||||
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// The ID of the user who last modified the prompt category
|
||||
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// The date the prompt category was last modified
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// The prompt category name
|
||||
Name *string `json:"Name,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this prompt category
|
||||
func (m *PromptCategory) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this prompt category based on context it is used
|
||||
func (m *PromptCategory) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *PromptCategory) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *PromptCategory) UnmarshalBinary(b []byte) error {
|
||||
var res PromptCategory
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
// 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 sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// PromptCategoryRequest An array of PromptCategory objects
|
||||
//
|
||||
// swagger:model PromptCategoryRequest
|
||||
type PromptCategoryRequest struct {
|
||||
|
||||
// data
|
||||
Data []*PromptCategory `json:"Data"`
|
||||
}
|
||||
|
||||
// Validate validates this prompt category request
|
||||
func (m *PromptCategoryRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptCategoryRequest) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this prompt category request based on the context it is used
|
||||
func (m *PromptCategoryRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptCategoryRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *PromptCategoryRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *PromptCategoryRequest) UnmarshalBinary(b []byte) error {
|
||||
var res PromptCategoryRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
// 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 sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// PromptCategoryResponse An array of PromptCategory objects
|
||||
//
|
||||
// swagger:model PromptCategoryResponse
|
||||
type PromptCategoryResponse struct {
|
||||
|
||||
// data
|
||||
Data []*PromptCategory `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this prompt category response
|
||||
func (m *PromptCategoryResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptCategoryResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptCategoryResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this prompt category response based on the context it is used
|
||||
func (m *PromptCategoryResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptCategoryResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptCategoryResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *PromptCategoryResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *PromptCategoryResponse) UnmarshalBinary(b []byte) error {
|
||||
var res PromptCategoryResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
// 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 sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// PromptRequest An array of Prompt objects
|
||||
//
|
||||
// swagger:model PromptRequest
|
||||
type PromptRequest struct {
|
||||
|
||||
// data
|
||||
Data []*Prompt `json:"Data"`
|
||||
}
|
||||
|
||||
// Validate validates this prompt request
|
||||
func (m *PromptRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptRequest) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this prompt request based on the context it is used
|
||||
func (m *PromptRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *PromptRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *PromptRequest) UnmarshalBinary(b []byte) error {
|
||||
var res PromptRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
// 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 sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// PromptResponse An array of Prompt objects
|
||||
//
|
||||
// swagger:model PromptResponse
|
||||
type PromptResponse struct {
|
||||
|
||||
// data
|
||||
Data []*Prompt `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this prompt response
|
||||
func (m *PromptResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this prompt response based on the context it is used
|
||||
func (m *PromptResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *PromptResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *PromptResponse) UnmarshalBinary(b []byte) error {
|
||||
var res PromptResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
// 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 sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// PromptTag A prompt tag
|
||||
//
|
||||
// swagger:model promptTag
|
||||
type PromptTag struct {
|
||||
|
||||
// The ID of the user who created the prompt tag
|
||||
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// The date the prompt tag was created
|
||||
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// The ID of the user who last modified the prompt tag
|
||||
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// The date the prompt tag was last modified
|
||||
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// The prompt tag name
|
||||
Name *string `json:"Name,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this prompt tag
|
||||
func (m *PromptTag) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this prompt tag based on context it is used
|
||||
func (m *PromptTag) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *PromptTag) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *PromptTag) UnmarshalBinary(b []byte) error {
|
||||
var res PromptTag
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
// 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 sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// PromptTagRequest An array of PromptTag objects
|
||||
//
|
||||
// swagger:model PromptTagRequest
|
||||
type PromptTagRequest struct {
|
||||
|
||||
// data
|
||||
Data []*PromptTag `json:"Data"`
|
||||
}
|
||||
|
||||
// Validate validates this prompt tag request
|
||||
func (m *PromptTagRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptTagRequest) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this prompt tag request based on the context it is used
|
||||
func (m *PromptTagRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptTagRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *PromptTagRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *PromptTagRequest) UnmarshalBinary(b []byte) error {
|
||||
var res PromptTagRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
// 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 sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// PromptTagResponse An array of PromptTag objects
|
||||
//
|
||||
// swagger:model PromptTagResponse
|
||||
type PromptTagResponse struct {
|
||||
|
||||
// data
|
||||
Data []*PromptTag `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this prompt tag response
|
||||
func (m *PromptTagResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptTagResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptTagResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this prompt tag response based on the context it is used
|
||||
func (m *PromptTagResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptTagResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PromptTagResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *PromptTagResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *PromptTagResponse) UnmarshalBinary(b []byte) error {
|
||||
var res PromptTagResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -7,16 +7,20 @@ PromptCategory:
|
|||
Name:
|
||||
description: The prompt category name
|
||||
type: string
|
||||
x-nullable: true
|
||||
CreatedDate:
|
||||
description: The date the prompt category was created
|
||||
type: string
|
||||
x-nullable: true
|
||||
CreatedByID:
|
||||
description: The ID of the user who created the prompt category
|
||||
type: string
|
||||
x-nullable: true
|
||||
LastModifiedDate:
|
||||
description: The date the prompt category was last modified
|
||||
type: string
|
||||
LastModifiedByID:
|
||||
x-nullable: true
|
||||
description: The ID of the user who last modified the prompt category
|
||||
type: string
|
||||
type: object
|
||||
|
|
|
@ -7,16 +7,21 @@ PromptTag:
|
|||
Name:
|
||||
description: The prompt tag name
|
||||
type: string
|
||||
x-nullable: true
|
||||
CreatedDate:
|
||||
description: The date the prompt tag was created
|
||||
type: string
|
||||
x-nullable: true
|
||||
CreatedByID:
|
||||
description: The ID of the user who created the prompt tag
|
||||
type: string
|
||||
x-nullable: true
|
||||
LastModifiedDate:
|
||||
description: The date the prompt tag was last modified
|
||||
type: string
|
||||
x-nullable: true
|
||||
LastModifiedByID:
|
||||
description: The ID of the user who last modified the prompt tag
|
||||
type: string
|
||||
x-nullable: true
|
||||
type: object
|
||||
|
|
|
@ -4,47 +4,76 @@ Prompt:
|
|||
ID:
|
||||
description: Record Id
|
||||
type: string
|
||||
Text:
|
||||
description: The prompt text
|
||||
type: string
|
||||
PromptCategoryID:
|
||||
description: The ID of the prompt category
|
||||
type: string
|
||||
ResearchProjectIDs:
|
||||
description: A list of research project IDs
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
Tags:
|
||||
description: A list of tags
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
UsedCount:
|
||||
description: The number of times the prompt has been used
|
||||
type: number
|
||||
CreatedDate:
|
||||
description: The date the prompt was created
|
||||
type: string
|
||||
CreatedByID:
|
||||
description: The ID of the user who created the prompt
|
||||
type: string
|
||||
LastModifiedDate:
|
||||
description: The date the prompt was last modified
|
||||
type: string
|
||||
LastModifiedByID:
|
||||
description: The ID of the user who last modified the prompt
|
||||
type: string
|
||||
ImageAltText:
|
||||
description: The alt text for the prompt image
|
||||
type: string
|
||||
ImageURL:
|
||||
description: The URL of the prompt image
|
||||
type: string
|
||||
Slug:
|
||||
description: The slug for the prompt
|
||||
x-nullable: true
|
||||
CreatedDate:
|
||||
description: The date the prompt was created
|
||||
type: string
|
||||
x-nullable: true
|
||||
Icon:
|
||||
description: The icon for the prompt
|
||||
type: string
|
||||
x-nullable: true
|
||||
ImageAltText:
|
||||
description: The alt text for the prompt image
|
||||
type: string
|
||||
x-nullable: true
|
||||
ImageURL:
|
||||
description: The URL of the prompt image
|
||||
type: string
|
||||
x-nullable: true
|
||||
LastModifiedByID:
|
||||
description: The ID of the user who last modified the prompt
|
||||
type: string
|
||||
x-nullable: true
|
||||
LastModifiedDate:
|
||||
description: The date the prompt was last modified
|
||||
type: string
|
||||
x-nullable: true
|
||||
Logo:
|
||||
description: The logo for the prompt
|
||||
type: string
|
||||
x-nullable: true
|
||||
Prompt:
|
||||
description: The prompt text
|
||||
type: string
|
||||
x-nullable: true
|
||||
PromptCategoryID:
|
||||
description: The ID of the prompt category
|
||||
type: string
|
||||
x-nullable: true
|
||||
ResearchProjectIDs:
|
||||
description: A list of research project IDs
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-nullable: true
|
||||
Slug:
|
||||
description: The slug for the prompt
|
||||
type: string
|
||||
x-nullable: true
|
||||
Tags:
|
||||
description: A list of tags
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-nullable: true
|
||||
TenantID:
|
||||
description: The ID of the tenant
|
||||
type: string
|
||||
x-nullable: true
|
||||
Title:
|
||||
description: The title of the prompt
|
||||
type: string
|
||||
x-nullable: true
|
||||
UsedCount:
|
||||
description: The number of times the prompt has been used
|
||||
type: number
|
||||
x-nullable: true
|
||||
UserID:
|
||||
description: The ID of the user who created the prompt
|
||||
type: string
|
||||
x-nullable: true
|
||||
type: object
|
||||
|
|
|
@ -1949,7 +1949,7 @@ paths:
|
|||
- ApiKeyAuth: []
|
||||
summary: Get a list of PromptTags
|
||||
tags:
|
||||
- PromptTags
|
||||
- Prompts
|
||||
post:
|
||||
description: Create PromptTags in Taxnexus
|
||||
operationId: postPromptTags
|
||||
|
@ -1972,7 +1972,7 @@ paths:
|
|||
- ApiKeyAuth: []
|
||||
summary: Create new PromptTags
|
||||
tags:
|
||||
- PromptTags
|
||||
- Prompts
|
||||
put:
|
||||
description: Update PromptTag in Taxnexus
|
||||
operationId: putPromptTags
|
||||
|
@ -1995,7 +1995,7 @@ paths:
|
|||
- ApiKeyAuth: []
|
||||
summary: Update PromptTags
|
||||
tags:
|
||||
- PromptTags
|
||||
- Prompts
|
||||
/researchprojectcompanies:
|
||||
get:
|
||||
description: Return a list of ResearchProjectCompany records from the datastore
|
||||
|
|
|
@ -323,6 +323,27 @@ parameters:
|
|||
name: roleId
|
||||
required: false
|
||||
type: string
|
||||
PromptRequest:
|
||||
description: An array of new Prompt records
|
||||
in: body
|
||||
name: promptRequest
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/PromptRequest"
|
||||
PromptCategoryRequest:
|
||||
description: An array of PromptCategory objects
|
||||
name: promptCategoryRequest
|
||||
required: true
|
||||
in: body
|
||||
schema:
|
||||
$ref: "#/definitions/PromptCategoryRequest"
|
||||
PromptTagRequest:
|
||||
description: An array of PromptTag objects
|
||||
name: promptTagRequest
|
||||
required: true
|
||||
in: body
|
||||
schema:
|
||||
$ref: "#/definitions/PromptTagRequest"
|
||||
ResearchProjectCompanyRequest:
|
||||
description: An array of new ResearchProjectCompany records
|
||||
in: body
|
||||
|
@ -504,6 +525,18 @@ responses:
|
|||
description: Resource was not found
|
||||
schema:
|
||||
$ref: "#/definitions/Error"
|
||||
PromptResponse:
|
||||
description: Response with Prompt objects
|
||||
schema:
|
||||
$ref: "#/definitions/PromptResponse"
|
||||
PromptCategoryResponse:
|
||||
description: Response with PromptCategory objects
|
||||
schema:
|
||||
$ref: "#/definitions/PromptCategoryResponse"
|
||||
PromptTagResponse:
|
||||
description: Response with PromptTag objects
|
||||
schema:
|
||||
$ref: "#/definitions/PromptTagResponse"
|
||||
ObservationResponse:
|
||||
description: Response with Observation objects
|
||||
schema:
|
||||
|
@ -1849,6 +1882,222 @@ paths:
|
|||
summary: Add a new Observation
|
||||
tags:
|
||||
- Observations
|
||||
/prompts:
|
||||
get:
|
||||
description: Return a list of Prompt records from the datastore
|
||||
operationId: getPrompts
|
||||
parameters:
|
||||
- $ref: "#/parameters/idQuery"
|
||||
- $ref: "#/parameters/limitQuery"
|
||||
- $ref: "#/parameters/offsetQuery"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Get a list of Prompts
|
||||
tags:
|
||||
- Prompts
|
||||
post:
|
||||
description: Create Prompts
|
||||
operationId: postPrompts
|
||||
parameters:
|
||||
- $ref: "#/parameters/PromptRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Create new Prompts
|
||||
tags:
|
||||
- Prompts
|
||||
put:
|
||||
description: Update Prompt
|
||||
operationId: putPrompts
|
||||
parameters:
|
||||
- $ref: "#/parameters/PromptRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Update Prompts
|
||||
tags:
|
||||
- Prompts
|
||||
/promptcategories:
|
||||
get:
|
||||
description: Return a list of PromptCategory records from the datastore
|
||||
operationId: getPromptCategories
|
||||
parameters:
|
||||
- $ref: "#/parameters/idQuery"
|
||||
- $ref: "#/parameters/limitQuery"
|
||||
- $ref: "#/parameters/offsetQuery"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptCategoryResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Get a list of PromptCategories
|
||||
tags:
|
||||
- Prompts
|
||||
post:
|
||||
description: Create PromptCategories
|
||||
operationId: postPromptCategories
|
||||
parameters:
|
||||
- $ref: "#/parameters/PromptCategoryRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptCategoryResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Create new PromptCategories
|
||||
tags:
|
||||
- Prompts
|
||||
put:
|
||||
description: Update PromptCategory
|
||||
operationId: putPromptCategories
|
||||
parameters:
|
||||
- $ref: "#/parameters/PromptCategoryRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptCategoryResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Update PromptCategories
|
||||
tags:
|
||||
- Prompts
|
||||
/prompttags:
|
||||
get:
|
||||
description: Return a list of PromptTag records from the datastore
|
||||
operationId: getPromptTags
|
||||
parameters:
|
||||
- $ref: "#/parameters/idQuery"
|
||||
- $ref: "#/parameters/limitQuery"
|
||||
- $ref: "#/parameters/offsetQuery"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptTagResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Get a list of PromptTags
|
||||
tags:
|
||||
- Prompts
|
||||
post:
|
||||
description: Create PromptTags in Taxnexus
|
||||
operationId: postPromptTags
|
||||
parameters:
|
||||
- $ref: "#/parameters/PromptTagRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptTagResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Create new PromptTags
|
||||
tags:
|
||||
- Prompts
|
||||
put:
|
||||
description: Update PromptTag in Taxnexus
|
||||
operationId: putPromptTags
|
||||
parameters:
|
||||
- $ref: "#/parameters/PromptTagRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptTagResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Update PromptTags
|
||||
tags:
|
||||
- Prompts
|
||||
/researchprojectcompanies:
|
||||
get:
|
||||
description: Return a list of ResearchProjectCompany records from the datastore
|
||||
|
@ -5127,3 +5376,57 @@ definitions:
|
|||
$ref: "../../lib/swagger/defs/research-project-service.yaml#/ResearchProjectService"
|
||||
type: array
|
||||
type: object
|
||||
PromptRequest:
|
||||
description: An array of Prompt objects
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "../../lib/swagger/defs/prompt.yaml#/Prompt"
|
||||
type: array
|
||||
type: object
|
||||
PromptResponse:
|
||||
description: An array of Prompt objects
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "../../lib/swagger/defs/prompt.yaml#/Prompt"
|
||||
type: array
|
||||
Meta:
|
||||
$ref: "#/definitions/ResponseMeta"
|
||||
type: object
|
||||
PromptCategoryRequest:
|
||||
description: An array of PromptCategory objects
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "../../lib/swagger/defs/prompt-category.yaml#/PromptCategory"
|
||||
type: array
|
||||
type: object
|
||||
PromptCategoryResponse:
|
||||
description: An array of PromptCategory objects
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "../../lib/swagger/defs/prompt-category.yaml#/PromptCategory"
|
||||
type: array
|
||||
Meta:
|
||||
$ref: "#/definitions/ResponseMeta"
|
||||
type: object
|
||||
PromptTagRequest:
|
||||
description: An array of PromptTag objects
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "../../lib/swagger/defs/prompt-tag.yaml#/PromptTag"
|
||||
type: array
|
||||
type: object
|
||||
PromptTagResponse:
|
||||
description: An array of PromptTag objects
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "../../lib/swagger/defs/prompt-tag.yaml#/PromptTag"
|
||||
type: array
|
||||
Meta:
|
||||
$ref: "#/definitions/ResponseMeta"
|
||||
type: object
|
||||
|
|
|
@ -1949,7 +1949,7 @@ paths:
|
|||
- ApiKeyAuth: []
|
||||
summary: Get a list of PromptTags
|
||||
tags:
|
||||
- PromptTags
|
||||
- Prompts
|
||||
post:
|
||||
description: Create PromptTags in Taxnexus
|
||||
operationId: postPromptTags
|
||||
|
@ -1972,7 +1972,7 @@ paths:
|
|||
- ApiKeyAuth: []
|
||||
summary: Create new PromptTags
|
||||
tags:
|
||||
- PromptTags
|
||||
- Prompts
|
||||
put:
|
||||
description: Update PromptTag in Taxnexus
|
||||
operationId: putPromptTags
|
||||
|
@ -1995,7 +1995,7 @@ paths:
|
|||
- ApiKeyAuth: []
|
||||
summary: Update PromptTags
|
||||
tags:
|
||||
- PromptTags
|
||||
- Prompts
|
||||
/researchprojectcompanies:
|
||||
get:
|
||||
description: Return a list of ResearchProjectCompany records from the datastore
|
||||
|
|
|
@ -323,6 +323,27 @@ parameters:
|
|||
name: roleId
|
||||
required: false
|
||||
type: string
|
||||
PromptRequest:
|
||||
description: An array of new Prompt records
|
||||
in: body
|
||||
name: promptRequest
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/PromptRequest"
|
||||
PromptCategoryRequest:
|
||||
description: An array of PromptCategory objects
|
||||
name: promptCategoryRequest
|
||||
required: true
|
||||
in: body
|
||||
schema:
|
||||
$ref: "#/definitions/PromptCategoryRequest"
|
||||
PromptTagRequest:
|
||||
description: An array of PromptTag objects
|
||||
name: promptTagRequest
|
||||
required: true
|
||||
in: body
|
||||
schema:
|
||||
$ref: "#/definitions/PromptTagRequest"
|
||||
ResearchProjectCompanyRequest:
|
||||
description: An array of new ResearchProjectCompany records
|
||||
in: body
|
||||
|
@ -504,6 +525,18 @@ responses:
|
|||
description: Resource was not found
|
||||
schema:
|
||||
$ref: "#/definitions/Error"
|
||||
PromptResponse:
|
||||
description: Response with Prompt objects
|
||||
schema:
|
||||
$ref: "#/definitions/PromptResponse"
|
||||
PromptCategoryResponse:
|
||||
description: Response with PromptCategory objects
|
||||
schema:
|
||||
$ref: "#/definitions/PromptCategoryResponse"
|
||||
PromptTagResponse:
|
||||
description: Response with PromptTag objects
|
||||
schema:
|
||||
$ref: "#/definitions/PromptTagResponse"
|
||||
ObservationResponse:
|
||||
description: Response with Observation objects
|
||||
schema:
|
||||
|
@ -1849,6 +1882,222 @@ paths:
|
|||
summary: Add a new Observation
|
||||
tags:
|
||||
- Observations
|
||||
/prompts:
|
||||
get:
|
||||
description: Return a list of Prompt records from the datastore
|
||||
operationId: getPrompts
|
||||
parameters:
|
||||
- $ref: "#/parameters/idQuery"
|
||||
- $ref: "#/parameters/limitQuery"
|
||||
- $ref: "#/parameters/offsetQuery"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Get a list of Prompts
|
||||
tags:
|
||||
- Prompts
|
||||
post:
|
||||
description: Create Prompts
|
||||
operationId: postPrompts
|
||||
parameters:
|
||||
- $ref: "#/parameters/PromptRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Create new Prompts
|
||||
tags:
|
||||
- Prompts
|
||||
put:
|
||||
description: Update Prompt
|
||||
operationId: putPrompts
|
||||
parameters:
|
||||
- $ref: "#/parameters/PromptRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Update Prompts
|
||||
tags:
|
||||
- Prompts
|
||||
/promptcategories:
|
||||
get:
|
||||
description: Return a list of PromptCategory records from the datastore
|
||||
operationId: getPromptCategories
|
||||
parameters:
|
||||
- $ref: "#/parameters/idQuery"
|
||||
- $ref: "#/parameters/limitQuery"
|
||||
- $ref: "#/parameters/offsetQuery"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptCategoryResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Get a list of PromptCategories
|
||||
tags:
|
||||
- Prompts
|
||||
post:
|
||||
description: Create PromptCategories
|
||||
operationId: postPromptCategories
|
||||
parameters:
|
||||
- $ref: "#/parameters/PromptCategoryRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptCategoryResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Create new PromptCategories
|
||||
tags:
|
||||
- Prompts
|
||||
put:
|
||||
description: Update PromptCategory
|
||||
operationId: putPromptCategories
|
||||
parameters:
|
||||
- $ref: "#/parameters/PromptCategoryRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptCategoryResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Update PromptCategories
|
||||
tags:
|
||||
- Prompts
|
||||
/prompttags:
|
||||
get:
|
||||
description: Return a list of PromptTag records from the datastore
|
||||
operationId: getPromptTags
|
||||
parameters:
|
||||
- $ref: "#/parameters/idQuery"
|
||||
- $ref: "#/parameters/limitQuery"
|
||||
- $ref: "#/parameters/offsetQuery"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptTagResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Get a list of PromptTags
|
||||
tags:
|
||||
- Prompts
|
||||
post:
|
||||
description: Create PromptTags in Taxnexus
|
||||
operationId: postPromptTags
|
||||
parameters:
|
||||
- $ref: "#/parameters/PromptTagRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptTagResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Create new PromptTags
|
||||
tags:
|
||||
- Prompts
|
||||
put:
|
||||
description: Update PromptTag in Taxnexus
|
||||
operationId: putPromptTags
|
||||
parameters:
|
||||
- $ref: "#/parameters/PromptTagRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/PromptTagResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Update PromptTags
|
||||
tags:
|
||||
- Prompts
|
||||
/researchprojectcompanies:
|
||||
get:
|
||||
description: Return a list of ResearchProjectCompany records from the datastore
|
||||
|
@ -5127,3 +5376,57 @@ definitions:
|
|||
$ref: "../../lib/swagger/defs/research-project-service.yaml#/ResearchProjectService"
|
||||
type: array
|
||||
type: object
|
||||
PromptRequest:
|
||||
description: An array of Prompt objects
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "../../lib/swagger/defs/prompt.yaml#/Prompt"
|
||||
type: array
|
||||
type: object
|
||||
PromptResponse:
|
||||
description: An array of Prompt objects
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "../../lib/swagger/defs/prompt.yaml#/Prompt"
|
||||
type: array
|
||||
Meta:
|
||||
$ref: "#/definitions/ResponseMeta"
|
||||
type: object
|
||||
PromptCategoryRequest:
|
||||
description: An array of PromptCategory objects
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "../../lib/swagger/defs/prompt-category.yaml#/PromptCategory"
|
||||
type: array
|
||||
type: object
|
||||
PromptCategoryResponse:
|
||||
description: An array of PromptCategory objects
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "../../lib/swagger/defs/prompt-category.yaml#/PromptCategory"
|
||||
type: array
|
||||
Meta:
|
||||
$ref: "#/definitions/ResponseMeta"
|
||||
type: object
|
||||
PromptTagRequest:
|
||||
description: An array of PromptTag objects
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "../../lib/swagger/defs/prompt-tag.yaml#/PromptTag"
|
||||
type: array
|
||||
type: object
|
||||
PromptTagResponse:
|
||||
description: An array of PromptTag objects
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "../../lib/swagger/defs/prompt-tag.yaml#/PromptTag"
|
||||
type: array
|
||||
Meta:
|
||||
$ref: "#/definitions/ResponseMeta"
|
||||
type: object
|
||||
|
|
Loading…
Reference in New Issue