lib/api/members/members_client/prompts/prompts_client.go

560 lines
19 KiB
Go
Raw Normal View History

2023-06-04 23:54:48 +00:00
// 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 {
2023-06-17 01:24:46 +00:00
GetPromptAnswers(params *GetPromptAnswersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptAnswersOK, error)
2023-06-04 23:54:48 +00:00
GetPromptCategories(params *GetPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptCategoriesOK, error)
2023-06-05 19:44:18 +00:00
GetPromptTags(params *GetPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptTagsOK, error)
2023-06-04 23:54:48 +00:00
GetPrompts(params *GetPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptsOK, error)
2023-06-17 01:24:46 +00:00
PostPromptAnswers(params *PostPromptAnswersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptAnswersOK, error)
2023-06-04 23:54:48 +00:00
PostPromptCategories(params *PostPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptCategoriesOK, error)
2023-06-05 19:44:18 +00:00
PostPromptTags(params *PostPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptTagsOK, error)
2023-06-04 23:54:48 +00:00
PostPrompts(params *PostPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptsOK, error)
2023-06-17 01:24:46 +00:00
PutPromptAnsweers(params *PutPromptAnsweersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptAnsweersOK, error)
2023-06-04 23:54:48 +00:00
PutPromptCategories(params *PutPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptCategoriesOK, error)
2023-06-05 19:44:18 +00:00
PutPromptTags(params *PutPromptTagsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptTagsOK, error)
2023-06-04 23:54:48 +00:00
PutPrompts(params *PutPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptsOK, error)
SetTransport(transport runtime.ClientTransport)
}
2023-06-17 01:24:46 +00:00
/*
GetPromptAnswers gets a list of prompt responses
Return a list of PromptAnswers records from the datastore
*/
func (a *Client) GetPromptAnswers(params *GetPromptAnswersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptAnswersOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetPromptAnswersParams()
}
op := &runtime.ClientOperation{
ID: "getPromptAnswers",
Method: "GET",
PathPattern: "/promptanswers",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetPromptAnswersReader{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.(*GetPromptAnswersOK)
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 getPromptAnswers: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
2023-06-04 23:54:48 +00:00
/*
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)
}
2023-06-05 19:44:18 +00:00
/*
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)
}
2023-06-04 23:54:48 +00:00
/*
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)
}
2023-06-17 01:24:46 +00:00
/*
PostPromptAnswers creates new prompt responses
Create PromptAnswers
*/
func (a *Client) PostPromptAnswers(params *PostPromptAnswersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptAnswersOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostPromptAnswersParams()
}
op := &runtime.ClientOperation{
ID: "postPromptAnswers",
Method: "POST",
PathPattern: "/promptanswers",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &PostPromptAnswersReader{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.(*PostPromptAnswersOK)
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 postPromptAnswers: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
2023-06-04 23:54:48 +00:00
/*
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)
}
2023-06-05 19:44:18 +00:00
/*
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)
}
2023-06-04 23:54:48 +00:00
/*
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)
}
2023-06-17 01:24:46 +00:00
/*
PutPromptAnsweers updates prompt response
Update PromptAnswers
*/
func (a *Client) PutPromptAnsweers(params *PutPromptAnsweersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptAnsweersOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPutPromptAnsweersParams()
}
op := &runtime.ClientOperation{
ID: "putPromptAnsweers",
Method: "PUT",
PathPattern: "/promptanswers",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &PutPromptAnsweersReader{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.(*PutPromptAnsweersOK)
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 putPromptAnsweers: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
2023-06-04 23:54:48 +00:00
/*
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)
}
2023-06-05 19:44:18 +00:00
/*
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)
}
2023-06-04 23:54:48 +00:00
/*
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
}