diff --git a/api/auth/auth_models/response_meta.go b/api/auth/auth_models/response_meta.go index 4e879b4..1d1b1da 100644 --- a/api/auth/auth_models/response_meta.go +++ b/api/auth/auth_models/response_meta.go @@ -27,6 +27,9 @@ type ResponseMeta struct { // Copyright Info Copyright string `json:"Copyright,omitempty"` + // Account Number used for recording transactions + ExternalAccount string `json:"ExternalAccount,omitempty"` + // License Information and Restrictions License string `json:"License,omitempty"` @@ -50,9 +53,6 @@ type ResponseMeta struct { // Backend Server Timestamp ServerTimestamp string `json:"ServerTimestamp,omitempty"` - - // Account Number used for recording transactions - TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` } // Validate validates this response meta diff --git a/api/auth/auth_models/tenant_user.go b/api/auth/auth_models/tenant_user.go index 7d23500..45d91e3 100644 --- a/api/auth/auth_models/tenant_user.go +++ b/api/auth/auth_models/tenant_user.go @@ -37,7 +37,7 @@ type TenantUser struct { ContactID string `json:"ContactID,omitempty"` // Account - TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` + ExternalAccount string `json:"ExternalAccount,omitempty"` // Tenant active? TenantActive bool `json:"TenantActive,omitempty"` diff --git a/api/auth/auth_models/user.go b/api/auth/auth_models/user.go index 87d260a..a8792f0 100644 --- a/api/auth/auth_models/user.go +++ b/api/auth/auth_models/user.go @@ -80,6 +80,9 @@ type User struct { // Extension Extension string `json:"Extension,omitempty"` + // Account + ExternalAccount string `json:"ExternalAccount,omitempty"` + // Fabric API Key FabricAPIKey string `json:"FabricAPIKey,omitempty"` @@ -170,9 +173,6 @@ type User struct { // The time day starts StartOfDay string `json:"StartOfDay,omitempty"` - // Account - TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` - // Tenant ID associated with this user TenantID string `json:"TenantID,omitempty"` diff --git a/api/auth/auth_models/user_role.go b/api/auth/auth_models/user_role.go index 15b36f1..2dcfd61 100644 --- a/api/auth/auth_models/user_role.go +++ b/api/auth/auth_models/user_role.go @@ -36,6 +36,9 @@ type UserRole struct { // Contact ID ContactID string `json:"ContactID,omitempty"` + // Account Number + ExternalAccount string `json:"ExternalAccount,omitempty"` + // Role description RoleDescription string `json:"RoleDescription,omitempty"` @@ -45,9 +48,6 @@ type UserRole struct { // Role Name RoleName string `json:"RoleName,omitempty"` - // Account Number - TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` - // User Email Address UserEmail string `json:"UserEmail,omitempty"` diff --git a/api/members/members_client/members_client.go b/api/members/members_client/members_client.go index bc65ceb..3f5ea4e 100644 --- a/api/members/members_client/members_client.go +++ b/api/members/members_client/members_client.go @@ -29,6 +29,8 @@ 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" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/tenants" @@ -95,6 +97,8 @@ 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) cli.Tenants = tenants.New(transport, formats) @@ -176,6 +180,10 @@ type Members struct { PaymentMethods payment_methods.ClientService + PromptTags prompt_tags.ClientService + + Prompts prompts.ClientService + ResearchProjects research_projects.ClientService Templates templates.ClientService @@ -211,6 +219,8 @@ 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) c.Tenants.SetTransport(transport) diff --git a/api/members/members_client/prompt_tags/get_prompt_tags_parameters.go b/api/members/members_client/prompt_tags/get_prompt_tags_parameters.go new file mode 100644 index 0000000..de87d2f --- /dev/null +++ b/api/members/members_client/prompt_tags/get_prompt_tags_parameters.go @@ -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 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 ( + "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 +} diff --git a/api/members/members_client/prompt_tags/get_prompt_tags_responses.go b/api/members/members_client/prompt_tags/get_prompt_tags_responses.go new file mode 100644 index 0000000..a366b0c --- /dev/null +++ b/api/members/members_client/prompt_tags/get_prompt_tags_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package prompt_tags + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// 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 *members_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() *members_models.PromptTagResponse { + return o.Payload +} + +func (o *GetPromptTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.PromptTagResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptTagsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 { + AccessControlAllowOrigin string + + Payload *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptTagsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptTagsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptTagsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptTagsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/prompt_tags/post_prompt_tags_parameters.go b/api/members/members_client/prompt_tags/post_prompt_tags_parameters.go new file mode 100644 index 0000000..3dd96b4 --- /dev/null +++ b/api/members/members_client/prompt_tags/post_prompt_tags_parameters.go @@ -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 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 ( + "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/members/members_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 *members_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 *members_models.PromptTagRequest) *PostPromptTagsParams { + o.SetPromptTagRequest(promptTagRequest) + return o +} + +// SetPromptTagRequest adds the promptTagRequest to the post prompt tags params +func (o *PostPromptTagsParams) SetPromptTagRequest(promptTagRequest *members_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 +} diff --git a/api/members/members_client/prompt_tags/post_prompt_tags_responses.go b/api/members/members_client/prompt_tags/post_prompt_tags_responses.go new file mode 100644 index 0000000..ae86ebd --- /dev/null +++ b/api/members/members_client/prompt_tags/post_prompt_tags_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package prompt_tags + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// PostPromptTagsReader is a Reader for the PostPromptTags structure. +type PostPromptTagsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostPromptTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostPromptTagsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostPromptTagsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostPromptTagsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostPromptTagsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostPromptTagsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostPromptTagsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostPromptTagsOK creates a PostPromptTagsOK with default headers values +func NewPostPromptTagsOK() *PostPromptTagsOK { + return &PostPromptTagsOK{} +} + +/* +PostPromptTagsOK describes a response with status code 200, with default header values. + +Response with PromptTag objects +*/ +type PostPromptTagsOK struct { + Payload *members_models.PromptTagResponse +} + +// IsSuccess returns true when this post prompt tags o k response has a 2xx status code +func (o *PostPromptTagsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post prompt tags o k response has a 3xx status code +func (o *PostPromptTagsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post prompt tags o k response has a 4xx status code +func (o *PostPromptTagsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this post prompt tags o k response has a 5xx status code +func (o *PostPromptTagsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this post prompt tags o k response a status code equal to that given +func (o *PostPromptTagsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the post prompt tags o k response +func (o *PostPromptTagsOK) Code() int { + return 200 +} + +func (o *PostPromptTagsOK) Error() string { + return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsOK %+v", 200, o.Payload) +} + +func (o *PostPromptTagsOK) String() string { + return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsOK %+v", 200, o.Payload) +} + +func (o *PostPromptTagsOK) GetPayload() *members_models.PromptTagResponse { + return o.Payload +} + +func (o *PostPromptTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.PromptTagResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPromptTagsUnauthorized creates a PostPromptTagsUnauthorized with default headers values +func NewPostPromptTagsUnauthorized() *PostPromptTagsUnauthorized { + return &PostPromptTagsUnauthorized{} +} + +/* +PostPromptTagsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostPromptTagsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post prompt tags unauthorized response has a 2xx status code +func (o *PostPromptTagsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post prompt tags unauthorized response has a 3xx status code +func (o *PostPromptTagsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post prompt tags unauthorized response has a 4xx status code +func (o *PostPromptTagsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this post prompt tags unauthorized response has a 5xx status code +func (o *PostPromptTagsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this post prompt tags unauthorized response a status code equal to that given +func (o *PostPromptTagsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the post prompt tags unauthorized response +func (o *PostPromptTagsUnauthorized) Code() int { + return 401 +} + +func (o *PostPromptTagsUnauthorized) Error() string { + return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostPromptTagsUnauthorized) String() string { + return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostPromptTagsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostPromptTagsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPromptTagsForbidden creates a PostPromptTagsForbidden with default headers values +func NewPostPromptTagsForbidden() *PostPromptTagsForbidden { + return &PostPromptTagsForbidden{} +} + +/* +PostPromptTagsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PostPromptTagsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this post prompt tags forbidden response has a 2xx status code +func (o *PostPromptTagsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post prompt tags forbidden response has a 3xx status code +func (o *PostPromptTagsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post prompt tags forbidden response has a 4xx status code +func (o *PostPromptTagsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this post prompt tags forbidden response has a 5xx status code +func (o *PostPromptTagsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this post prompt tags forbidden response a status code equal to that given +func (o *PostPromptTagsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the post prompt tags forbidden response +func (o *PostPromptTagsForbidden) Code() int { + return 403 +} + +func (o *PostPromptTagsForbidden) Error() string { + return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsForbidden %+v", 403, o.Payload) +} + +func (o *PostPromptTagsForbidden) String() string { + return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsForbidden %+v", 403, o.Payload) +} + +func (o *PostPromptTagsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostPromptTagsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPromptTagsNotFound creates a PostPromptTagsNotFound with default headers values +func NewPostPromptTagsNotFound() *PostPromptTagsNotFound { + return &PostPromptTagsNotFound{} +} + +/* +PostPromptTagsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PostPromptTagsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post prompt tags not found response has a 2xx status code +func (o *PostPromptTagsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post prompt tags not found response has a 3xx status code +func (o *PostPromptTagsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post prompt tags not found response has a 4xx status code +func (o *PostPromptTagsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this post prompt tags not found response has a 5xx status code +func (o *PostPromptTagsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this post prompt tags not found response a status code equal to that given +func (o *PostPromptTagsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the post prompt tags not found response +func (o *PostPromptTagsNotFound) Code() int { + return 404 +} + +func (o *PostPromptTagsNotFound) Error() string { + return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsNotFound %+v", 404, o.Payload) +} + +func (o *PostPromptTagsNotFound) String() string { + return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsNotFound %+v", 404, o.Payload) +} + +func (o *PostPromptTagsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostPromptTagsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPromptTagsUnprocessableEntity creates a PostPromptTagsUnprocessableEntity with default headers values +func NewPostPromptTagsUnprocessableEntity() *PostPromptTagsUnprocessableEntity { + return &PostPromptTagsUnprocessableEntity{} +} + +/* +PostPromptTagsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostPromptTagsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post prompt tags unprocessable entity response has a 2xx status code +func (o *PostPromptTagsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post prompt tags unprocessable entity response has a 3xx status code +func (o *PostPromptTagsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post prompt tags unprocessable entity response has a 4xx status code +func (o *PostPromptTagsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this post prompt tags unprocessable entity response has a 5xx status code +func (o *PostPromptTagsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this post prompt tags unprocessable entity response a status code equal to that given +func (o *PostPromptTagsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the post prompt tags unprocessable entity response +func (o *PostPromptTagsUnprocessableEntity) Code() int { + return 422 +} + +func (o *PostPromptTagsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostPromptTagsUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostPromptTagsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostPromptTagsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPromptTagsInternalServerError creates a PostPromptTagsInternalServerError with default headers values +func NewPostPromptTagsInternalServerError() *PostPromptTagsInternalServerError { + return &PostPromptTagsInternalServerError{} +} + +/* +PostPromptTagsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PostPromptTagsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post prompt tags internal server error response has a 2xx status code +func (o *PostPromptTagsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post prompt tags internal server error response has a 3xx status code +func (o *PostPromptTagsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post prompt tags internal server error response has a 4xx status code +func (o *PostPromptTagsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this post prompt tags internal server error response has a 5xx status code +func (o *PostPromptTagsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this post prompt tags internal server error response a status code equal to that given +func (o *PostPromptTagsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the post prompt tags internal server error response +func (o *PostPromptTagsInternalServerError) Code() int { + return 500 +} + +func (o *PostPromptTagsInternalServerError) Error() string { + return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostPromptTagsInternalServerError) String() string { + return fmt.Sprintf("[POST /prompttags][%d] postPromptTagsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostPromptTagsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostPromptTagsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/prompt_tags/prompt_tags_client.go b/api/members/members_client/prompt_tags/prompt_tags_client.go new file mode 100644 index 0000000..d00949d --- /dev/null +++ b/api/members/members_client/prompt_tags/prompt_tags_client.go @@ -0,0 +1,172 @@ +// 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 +} diff --git a/api/members/members_client/prompt_tags/put_prompt_tags_parameters.go b/api/members/members_client/prompt_tags/put_prompt_tags_parameters.go new file mode 100644 index 0000000..74c84d9 --- /dev/null +++ b/api/members/members_client/prompt_tags/put_prompt_tags_parameters.go @@ -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 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 ( + "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/members/members_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 *members_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 *members_models.PromptTagRequest) *PutPromptTagsParams { + o.SetPromptTagRequest(promptTagRequest) + return o +} + +// SetPromptTagRequest adds the promptTagRequest to the put prompt tags params +func (o *PutPromptTagsParams) SetPromptTagRequest(promptTagRequest *members_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 +} diff --git a/api/members/members_client/prompt_tags/put_prompt_tags_responses.go b/api/members/members_client/prompt_tags/put_prompt_tags_responses.go new file mode 100644 index 0000000..794d131 --- /dev/null +++ b/api/members/members_client/prompt_tags/put_prompt_tags_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package prompt_tags + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// 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 *members_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() *members_models.PromptTagResponse { + return o.Payload +} + +func (o *PutPromptTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.PromptTagResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *PutPromptTagsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 { + AccessControlAllowOrigin string + + Payload *members_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() *members_models.Error { + return o.Payload +} + +func (o *PutPromptTagsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *PutPromptTagsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *PutPromptTagsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *PutPromptTagsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/prompts/get_prompt_categories_parameters.go b/api/members/members_client/prompts/get_prompt_categories_parameters.go new file mode 100644 index 0000000..b27ea46 --- /dev/null +++ b/api/members/members_client/prompts/get_prompt_categories_parameters.go @@ -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 +} diff --git a/api/members/members_client/prompts/get_prompt_categories_responses.go b/api/members/members_client/prompts/get_prompt_categories_responses.go new file mode 100644 index 0000000..37e4d82 --- /dev/null +++ b/api/members/members_client/prompts/get_prompt_categories_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package prompts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// 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 *members_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() *members_models.PromptCategoryResponse { + return o.Payload +} + +func (o *GetPromptCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.PromptCategoryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptCategoriesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 { + AccessControlAllowOrigin string + + Payload *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptCategoriesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptCategoriesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptCategoriesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptCategoriesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/prompts/get_prompts_parameters.go b/api/members/members_client/prompts/get_prompts_parameters.go new file mode 100644 index 0000000..7982b5b --- /dev/null +++ b/api/members/members_client/prompts/get_prompts_parameters.go @@ -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 +} diff --git a/api/members/members_client/prompts/get_prompts_responses.go b/api/members/members_client/prompts/get_prompts_responses.go new file mode 100644 index 0000000..2684787 --- /dev/null +++ b/api/members/members_client/prompts/get_prompts_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package prompts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// 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 *members_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() *members_models.PromptResponse { + return o.Payload +} + +func (o *GetPromptsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 { + AccessControlAllowOrigin string + + Payload *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *GetPromptsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/prompts/post_prompt_categories_parameters.go b/api/members/members_client/prompts/post_prompt_categories_parameters.go new file mode 100644 index 0000000..fe67b88 --- /dev/null +++ b/api/members/members_client/prompts/post_prompt_categories_parameters.go @@ -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/members/members_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 *members_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 *members_models.PromptCategoryRequest) *PostPromptCategoriesParams { + o.SetPromptCategoryRequest(promptCategoryRequest) + return o +} + +// SetPromptCategoryRequest adds the promptCategoryRequest to the post prompt categories params +func (o *PostPromptCategoriesParams) SetPromptCategoryRequest(promptCategoryRequest *members_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 +} diff --git a/api/members/members_client/prompts/post_prompt_categories_responses.go b/api/members/members_client/prompts/post_prompt_categories_responses.go new file mode 100644 index 0000000..9fa88e6 --- /dev/null +++ b/api/members/members_client/prompts/post_prompt_categories_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package prompts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// PostPromptCategoriesReader is a Reader for the PostPromptCategories structure. +type PostPromptCategoriesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostPromptCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostPromptCategoriesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostPromptCategoriesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostPromptCategoriesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostPromptCategoriesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostPromptCategoriesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostPromptCategoriesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostPromptCategoriesOK creates a PostPromptCategoriesOK with default headers values +func NewPostPromptCategoriesOK() *PostPromptCategoriesOK { + return &PostPromptCategoriesOK{} +} + +/* +PostPromptCategoriesOK describes a response with status code 200, with default header values. + +Response with PromptCategory objects +*/ +type PostPromptCategoriesOK struct { + Payload *members_models.PromptCategoryResponse +} + +// IsSuccess returns true when this post prompt categories o k response has a 2xx status code +func (o *PostPromptCategoriesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post prompt categories o k response has a 3xx status code +func (o *PostPromptCategoriesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post prompt categories o k response has a 4xx status code +func (o *PostPromptCategoriesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this post prompt categories o k response has a 5xx status code +func (o *PostPromptCategoriesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this post prompt categories o k response a status code equal to that given +func (o *PostPromptCategoriesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the post prompt categories o k response +func (o *PostPromptCategoriesOK) Code() int { + return 200 +} + +func (o *PostPromptCategoriesOK) Error() string { + return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesOK %+v", 200, o.Payload) +} + +func (o *PostPromptCategoriesOK) String() string { + return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesOK %+v", 200, o.Payload) +} + +func (o *PostPromptCategoriesOK) GetPayload() *members_models.PromptCategoryResponse { + return o.Payload +} + +func (o *PostPromptCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.PromptCategoryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPromptCategoriesUnauthorized creates a PostPromptCategoriesUnauthorized with default headers values +func NewPostPromptCategoriesUnauthorized() *PostPromptCategoriesUnauthorized { + return &PostPromptCategoriesUnauthorized{} +} + +/* +PostPromptCategoriesUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostPromptCategoriesUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post prompt categories unauthorized response has a 2xx status code +func (o *PostPromptCategoriesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post prompt categories unauthorized response has a 3xx status code +func (o *PostPromptCategoriesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post prompt categories unauthorized response has a 4xx status code +func (o *PostPromptCategoriesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this post prompt categories unauthorized response has a 5xx status code +func (o *PostPromptCategoriesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this post prompt categories unauthorized response a status code equal to that given +func (o *PostPromptCategoriesUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the post prompt categories unauthorized response +func (o *PostPromptCategoriesUnauthorized) Code() int { + return 401 +} + +func (o *PostPromptCategoriesUnauthorized) Error() string { + return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostPromptCategoriesUnauthorized) String() string { + return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostPromptCategoriesUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostPromptCategoriesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPromptCategoriesForbidden creates a PostPromptCategoriesForbidden with default headers values +func NewPostPromptCategoriesForbidden() *PostPromptCategoriesForbidden { + return &PostPromptCategoriesForbidden{} +} + +/* +PostPromptCategoriesForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PostPromptCategoriesForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this post prompt categories forbidden response has a 2xx status code +func (o *PostPromptCategoriesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post prompt categories forbidden response has a 3xx status code +func (o *PostPromptCategoriesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post prompt categories forbidden response has a 4xx status code +func (o *PostPromptCategoriesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this post prompt categories forbidden response has a 5xx status code +func (o *PostPromptCategoriesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this post prompt categories forbidden response a status code equal to that given +func (o *PostPromptCategoriesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the post prompt categories forbidden response +func (o *PostPromptCategoriesForbidden) Code() int { + return 403 +} + +func (o *PostPromptCategoriesForbidden) Error() string { + return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesForbidden %+v", 403, o.Payload) +} + +func (o *PostPromptCategoriesForbidden) String() string { + return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesForbidden %+v", 403, o.Payload) +} + +func (o *PostPromptCategoriesForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostPromptCategoriesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPromptCategoriesNotFound creates a PostPromptCategoriesNotFound with default headers values +func NewPostPromptCategoriesNotFound() *PostPromptCategoriesNotFound { + return &PostPromptCategoriesNotFound{} +} + +/* +PostPromptCategoriesNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PostPromptCategoriesNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post prompt categories not found response has a 2xx status code +func (o *PostPromptCategoriesNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post prompt categories not found response has a 3xx status code +func (o *PostPromptCategoriesNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post prompt categories not found response has a 4xx status code +func (o *PostPromptCategoriesNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this post prompt categories not found response has a 5xx status code +func (o *PostPromptCategoriesNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this post prompt categories not found response a status code equal to that given +func (o *PostPromptCategoriesNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the post prompt categories not found response +func (o *PostPromptCategoriesNotFound) Code() int { + return 404 +} + +func (o *PostPromptCategoriesNotFound) Error() string { + return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesNotFound %+v", 404, o.Payload) +} + +func (o *PostPromptCategoriesNotFound) String() string { + return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesNotFound %+v", 404, o.Payload) +} + +func (o *PostPromptCategoriesNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostPromptCategoriesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPromptCategoriesUnprocessableEntity creates a PostPromptCategoriesUnprocessableEntity with default headers values +func NewPostPromptCategoriesUnprocessableEntity() *PostPromptCategoriesUnprocessableEntity { + return &PostPromptCategoriesUnprocessableEntity{} +} + +/* +PostPromptCategoriesUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostPromptCategoriesUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post prompt categories unprocessable entity response has a 2xx status code +func (o *PostPromptCategoriesUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post prompt categories unprocessable entity response has a 3xx status code +func (o *PostPromptCategoriesUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post prompt categories unprocessable entity response has a 4xx status code +func (o *PostPromptCategoriesUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this post prompt categories unprocessable entity response has a 5xx status code +func (o *PostPromptCategoriesUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this post prompt categories unprocessable entity response a status code equal to that given +func (o *PostPromptCategoriesUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the post prompt categories unprocessable entity response +func (o *PostPromptCategoriesUnprocessableEntity) Code() int { + return 422 +} + +func (o *PostPromptCategoriesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostPromptCategoriesUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostPromptCategoriesUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostPromptCategoriesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPromptCategoriesInternalServerError creates a PostPromptCategoriesInternalServerError with default headers values +func NewPostPromptCategoriesInternalServerError() *PostPromptCategoriesInternalServerError { + return &PostPromptCategoriesInternalServerError{} +} + +/* +PostPromptCategoriesInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PostPromptCategoriesInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post prompt categories internal server error response has a 2xx status code +func (o *PostPromptCategoriesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post prompt categories internal server error response has a 3xx status code +func (o *PostPromptCategoriesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post prompt categories internal server error response has a 4xx status code +func (o *PostPromptCategoriesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this post prompt categories internal server error response has a 5xx status code +func (o *PostPromptCategoriesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this post prompt categories internal server error response a status code equal to that given +func (o *PostPromptCategoriesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the post prompt categories internal server error response +func (o *PostPromptCategoriesInternalServerError) Code() int { + return 500 +} + +func (o *PostPromptCategoriesInternalServerError) Error() string { + return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostPromptCategoriesInternalServerError) String() string { + return fmt.Sprintf("[POST /promptcategories][%d] postPromptCategoriesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostPromptCategoriesInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostPromptCategoriesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/prompts/post_prompts_parameters.go b/api/members/members_client/prompts/post_prompts_parameters.go new file mode 100644 index 0000000..819d884 --- /dev/null +++ b/api/members/members_client/prompts/post_prompts_parameters.go @@ -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/members/members_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 *members_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 *members_models.PromptRequest) *PostPromptsParams { + o.SetPromptRequest(promptRequest) + return o +} + +// SetPromptRequest adds the promptRequest to the post prompts params +func (o *PostPromptsParams) SetPromptRequest(promptRequest *members_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 +} diff --git a/api/members/members_client/prompts/post_prompts_responses.go b/api/members/members_client/prompts/post_prompts_responses.go new file mode 100644 index 0000000..d5c8158 --- /dev/null +++ b/api/members/members_client/prompts/post_prompts_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package prompts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// 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 *members_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() *members_models.PromptResponse { + return o.Payload +} + +func (o *PostPromptsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *PostPromptsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 { + AccessControlAllowOrigin string + + Payload *members_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() *members_models.Error { + return o.Payload +} + +func (o *PostPromptsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *PostPromptsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *PostPromptsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *PostPromptsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/prompts/prompts_client.go b/api/members/members_client/prompts/prompts_client.go new file mode 100644 index 0000000..448f74d --- /dev/null +++ b/api/members/members_client/prompts/prompts_client.go @@ -0,0 +1,301 @@ +// 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) + + GetPrompts(params *GetPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPromptsOK, error) + + PostPromptCategories(params *PostPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptCategoriesOK, error) + + PostPrompts(params *PostPromptsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPromptsOK, error) + + PutPromptCategories(params *PutPromptCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutPromptCategoriesOK, 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) +} + +/* +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) +} + +/* +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) +} + +/* +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 +} diff --git a/api/members/members_client/prompts/put_prompt_categories_parameters.go b/api/members/members_client/prompts/put_prompt_categories_parameters.go new file mode 100644 index 0000000..8616a6d --- /dev/null +++ b/api/members/members_client/prompts/put_prompt_categories_parameters.go @@ -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/members/members_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 *members_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 *members_models.PromptCategoryRequest) *PutPromptCategoriesParams { + o.SetPromptCategoryRequest(promptCategoryRequest) + return o +} + +// SetPromptCategoryRequest adds the promptCategoryRequest to the put prompt categories params +func (o *PutPromptCategoriesParams) SetPromptCategoryRequest(promptCategoryRequest *members_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 +} diff --git a/api/members/members_client/prompts/put_prompt_categories_responses.go b/api/members/members_client/prompts/put_prompt_categories_responses.go new file mode 100644 index 0000000..8898921 --- /dev/null +++ b/api/members/members_client/prompts/put_prompt_categories_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package prompts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// PutPromptCategoriesReader is a Reader for the PutPromptCategories structure. +type PutPromptCategoriesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutPromptCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutPromptCategoriesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutPromptCategoriesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutPromptCategoriesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutPromptCategoriesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutPromptCategoriesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutPromptCategoriesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPutPromptCategoriesOK creates a PutPromptCategoriesOK with default headers values +func NewPutPromptCategoriesOK() *PutPromptCategoriesOK { + return &PutPromptCategoriesOK{} +} + +/* +PutPromptCategoriesOK describes a response with status code 200, with default header values. + +Response with PromptCategory objects +*/ +type PutPromptCategoriesOK struct { + Payload *members_models.PromptCategoryResponse +} + +// IsSuccess returns true when this put prompt categories o k response has a 2xx status code +func (o *PutPromptCategoriesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this put prompt categories o k response has a 3xx status code +func (o *PutPromptCategoriesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put prompt categories o k response has a 4xx status code +func (o *PutPromptCategoriesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this put prompt categories o k response has a 5xx status code +func (o *PutPromptCategoriesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this put prompt categories o k response a status code equal to that given +func (o *PutPromptCategoriesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the put prompt categories o k response +func (o *PutPromptCategoriesOK) Code() int { + return 200 +} + +func (o *PutPromptCategoriesOK) Error() string { + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesOK %+v", 200, o.Payload) +} + +func (o *PutPromptCategoriesOK) String() string { + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesOK %+v", 200, o.Payload) +} + +func (o *PutPromptCategoriesOK) GetPayload() *members_models.PromptCategoryResponse { + return o.Payload +} + +func (o *PutPromptCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.PromptCategoryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPromptCategoriesUnauthorized creates a PutPromptCategoriesUnauthorized with default headers values +func NewPutPromptCategoriesUnauthorized() *PutPromptCategoriesUnauthorized { + return &PutPromptCategoriesUnauthorized{} +} + +/* +PutPromptCategoriesUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutPromptCategoriesUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put prompt categories unauthorized response has a 2xx status code +func (o *PutPromptCategoriesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put prompt categories unauthorized response has a 3xx status code +func (o *PutPromptCategoriesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put prompt categories unauthorized response has a 4xx status code +func (o *PutPromptCategoriesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this put prompt categories unauthorized response has a 5xx status code +func (o *PutPromptCategoriesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this put prompt categories unauthorized response a status code equal to that given +func (o *PutPromptCategoriesUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the put prompt categories unauthorized response +func (o *PutPromptCategoriesUnauthorized) Code() int { + return 401 +} + +func (o *PutPromptCategoriesUnauthorized) Error() string { + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesUnauthorized %+v", 401, o.Payload) +} + +func (o *PutPromptCategoriesUnauthorized) String() string { + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesUnauthorized %+v", 401, o.Payload) +} + +func (o *PutPromptCategoriesUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutPromptCategoriesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPromptCategoriesForbidden creates a PutPromptCategoriesForbidden with default headers values +func NewPutPromptCategoriesForbidden() *PutPromptCategoriesForbidden { + return &PutPromptCategoriesForbidden{} +} + +/* +PutPromptCategoriesForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PutPromptCategoriesForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this put prompt categories forbidden response has a 2xx status code +func (o *PutPromptCategoriesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put prompt categories forbidden response has a 3xx status code +func (o *PutPromptCategoriesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put prompt categories forbidden response has a 4xx status code +func (o *PutPromptCategoriesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this put prompt categories forbidden response has a 5xx status code +func (o *PutPromptCategoriesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this put prompt categories forbidden response a status code equal to that given +func (o *PutPromptCategoriesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the put prompt categories forbidden response +func (o *PutPromptCategoriesForbidden) Code() int { + return 403 +} + +func (o *PutPromptCategoriesForbidden) Error() string { + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesForbidden %+v", 403, o.Payload) +} + +func (o *PutPromptCategoriesForbidden) String() string { + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesForbidden %+v", 403, o.Payload) +} + +func (o *PutPromptCategoriesForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutPromptCategoriesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPromptCategoriesNotFound creates a PutPromptCategoriesNotFound with default headers values +func NewPutPromptCategoriesNotFound() *PutPromptCategoriesNotFound { + return &PutPromptCategoriesNotFound{} +} + +/* +PutPromptCategoriesNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PutPromptCategoriesNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put prompt categories not found response has a 2xx status code +func (o *PutPromptCategoriesNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put prompt categories not found response has a 3xx status code +func (o *PutPromptCategoriesNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put prompt categories not found response has a 4xx status code +func (o *PutPromptCategoriesNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this put prompt categories not found response has a 5xx status code +func (o *PutPromptCategoriesNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this put prompt categories not found response a status code equal to that given +func (o *PutPromptCategoriesNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the put prompt categories not found response +func (o *PutPromptCategoriesNotFound) Code() int { + return 404 +} + +func (o *PutPromptCategoriesNotFound) Error() string { + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesNotFound %+v", 404, o.Payload) +} + +func (o *PutPromptCategoriesNotFound) String() string { + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesNotFound %+v", 404, o.Payload) +} + +func (o *PutPromptCategoriesNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutPromptCategoriesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPromptCategoriesUnprocessableEntity creates a PutPromptCategoriesUnprocessableEntity with default headers values +func NewPutPromptCategoriesUnprocessableEntity() *PutPromptCategoriesUnprocessableEntity { + return &PutPromptCategoriesUnprocessableEntity{} +} + +/* +PutPromptCategoriesUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutPromptCategoriesUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put prompt categories unprocessable entity response has a 2xx status code +func (o *PutPromptCategoriesUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put prompt categories unprocessable entity response has a 3xx status code +func (o *PutPromptCategoriesUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put prompt categories unprocessable entity response has a 4xx status code +func (o *PutPromptCategoriesUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this put prompt categories unprocessable entity response has a 5xx status code +func (o *PutPromptCategoriesUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this put prompt categories unprocessable entity response a status code equal to that given +func (o *PutPromptCategoriesUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the put prompt categories unprocessable entity response +func (o *PutPromptCategoriesUnprocessableEntity) Code() int { + return 422 +} + +func (o *PutPromptCategoriesUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutPromptCategoriesUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutPromptCategoriesUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutPromptCategoriesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPromptCategoriesInternalServerError creates a PutPromptCategoriesInternalServerError with default headers values +func NewPutPromptCategoriesInternalServerError() *PutPromptCategoriesInternalServerError { + return &PutPromptCategoriesInternalServerError{} +} + +/* +PutPromptCategoriesInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PutPromptCategoriesInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put prompt categories internal server error response has a 2xx status code +func (o *PutPromptCategoriesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put prompt categories internal server error response has a 3xx status code +func (o *PutPromptCategoriesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put prompt categories internal server error response has a 4xx status code +func (o *PutPromptCategoriesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this put prompt categories internal server error response has a 5xx status code +func (o *PutPromptCategoriesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this put prompt categories internal server error response a status code equal to that given +func (o *PutPromptCategoriesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the put prompt categories internal server error response +func (o *PutPromptCategoriesInternalServerError) Code() int { + return 500 +} + +func (o *PutPromptCategoriesInternalServerError) Error() string { + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesInternalServerError %+v", 500, o.Payload) +} + +func (o *PutPromptCategoriesInternalServerError) String() string { + return fmt.Sprintf("[PUT /promptcategories][%d] putPromptCategoriesInternalServerError %+v", 500, o.Payload) +} + +func (o *PutPromptCategoriesInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutPromptCategoriesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/prompts/put_prompts_parameters.go b/api/members/members_client/prompts/put_prompts_parameters.go new file mode 100644 index 0000000..d8e4343 --- /dev/null +++ b/api/members/members_client/prompts/put_prompts_parameters.go @@ -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/members/members_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 *members_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 *members_models.PromptRequest) *PutPromptsParams { + o.SetPromptRequest(promptRequest) + return o +} + +// SetPromptRequest adds the promptRequest to the put prompts params +func (o *PutPromptsParams) SetPromptRequest(promptRequest *members_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 +} diff --git a/api/members/members_client/prompts/put_prompts_responses.go b/api/members/members_client/prompts/put_prompts_responses.go new file mode 100644 index 0000000..603966f --- /dev/null +++ b/api/members/members_client/prompts/put_prompts_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package prompts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// 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 *members_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() *members_models.PromptResponse { + return o.Payload +} + +func (o *PutPromptsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *PutPromptsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 { + AccessControlAllowOrigin string + + Payload *members_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() *members_models.Error { + return o.Payload +} + +func (o *PutPromptsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *PutPromptsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *PutPromptsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// 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 *members_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() *members_models.Error { + return o.Payload +} + +func (o *PutPromptsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/tenants/get_tenants_parameters.go b/api/members/members_client/tenants/get_tenants_parameters.go index c91a888..1e684ed 100644 --- a/api/members/members_client/tenants/get_tenants_parameters.go +++ b/api/members/members_client/tenants/get_tenants_parameters.go @@ -66,6 +66,12 @@ GetTenantsParams contains all the parameters to send to the API endpoint */ type GetTenantsParams struct { + /* ID. + + Unique Record ID + */ + ID *string + /* Limit. How many objects to return at one time @@ -82,12 +88,6 @@ type GetTenantsParams struct { */ Offset *int64 - /* TenantID. - - Record Id of a Tenant - */ - TenantID *string - timeout time.Duration Context context.Context HTTPClient *http.Client @@ -141,6 +141,17 @@ func (o *GetTenantsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithID adds the id to the get tenants params +func (o *GetTenantsParams) WithID(id *string) *GetTenantsParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get tenants params +func (o *GetTenantsParams) SetID(id *string) { + o.ID = id +} + // WithLimit adds the limit to the get tenants params func (o *GetTenantsParams) WithLimit(limit *int64) *GetTenantsParams { o.SetLimit(limit) @@ -163,17 +174,6 @@ func (o *GetTenantsParams) SetOffset(offset *int64) { o.Offset = offset } -// WithTenantID adds the tenantID to the get tenants params -func (o *GetTenantsParams) WithTenantID(tenantID *string) *GetTenantsParams { - o.SetTenantID(tenantID) - return o -} - -// SetTenantID adds the tenantId to the get tenants params -func (o *GetTenantsParams) SetTenantID(tenantID *string) { - o.TenantID = tenantID -} - // WriteToRequest writes these params to a swagger request func (o *GetTenantsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -182,6 +182,23 @@ func (o *GetTenantsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } 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 @@ -216,23 +233,6 @@ func (o *GetTenantsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } } - if o.TenantID != nil { - - // query param tenantId - var qrTenantID string - - if o.TenantID != nil { - qrTenantID = *o.TenantID - } - qTenantID := qrTenantID - if qTenantID != "" { - - if err := r.SetQueryParam("tenantId", qTenantID); err != nil { - return err - } - } - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/api/members/members_models/email_message_request.go b/api/members/members_models/email_message_request.go index d170e28..51c9fea 100644 --- a/api/members/members_models/email_message_request.go +++ b/api/members/members_models/email_message_request.go @@ -18,7 +18,7 @@ import ( "github.com/go-openapi/swag" ) -// EmailMessageRequest An array Taxnexus Send Email Message objects +// EmailMessageRequest An array Send Email Message objects // // swagger:model EmailMessageRequest type EmailMessageRequest struct { diff --git a/api/members/members_models/email_messages_response.go b/api/members/members_models/email_messages_response.go index fd7504f..f3acea3 100644 --- a/api/members/members_models/email_messages_response.go +++ b/api/members/members_models/email_messages_response.go @@ -18,7 +18,7 @@ import ( "github.com/go-openapi/swag" ) -// EmailMessagesResponse An array Taxnexus user objects +// EmailMessagesResponse An array user objects // // swagger:model EmailMessagesResponse type EmailMessagesResponse struct { diff --git a/api/members/members_models/outgoing_email_message_request.go b/api/members/members_models/outgoing_email_message_request.go index 0cbad2a..138125a 100644 --- a/api/members/members_models/outgoing_email_message_request.go +++ b/api/members/members_models/outgoing_email_message_request.go @@ -18,7 +18,7 @@ import ( "github.com/go-openapi/swag" ) -// OutgoingEmailMessageRequest An array Taxnexus New Email Message objects +// OutgoingEmailMessageRequest An array New Email Message objects // // swagger:model OutgoingEmailMessageRequest type OutgoingEmailMessageRequest struct { diff --git a/api/members/members_models/outgoing_email_messages_response.go b/api/members/members_models/outgoing_email_messages_response.go index 0ba63d3..2cceddd 100644 --- a/api/members/members_models/outgoing_email_messages_response.go +++ b/api/members/members_models/outgoing_email_messages_response.go @@ -18,7 +18,7 @@ import ( "github.com/go-openapi/swag" ) -// OutgoingEmailMessagesResponse An array Taxnexus New Email Message objects +// OutgoingEmailMessagesResponse An array New Email Message objects // // swagger:model OutgoingEmailMessagesResponse type OutgoingEmailMessagesResponse struct { diff --git a/api/members/members_models/prompt.go b/api/members/members_models/prompt.go new file mode 100644 index 0000000..c6f6865 --- /dev/null +++ b/api/members/members_models/prompt.go @@ -0,0 +1,93 @@ +// 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 members_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 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 prompt text + Text string `json:"Text,omitempty"` + + // The number of times the prompt has been used + UsedCount float64 `json:"UsedCount,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 +} diff --git a/api/members/members_models/prompt_category.go b/api/members/members_models/prompt_category.go new file mode 100644 index 0000000..2fe1af6 --- /dev/null +++ b/api/members/members_models/prompt_category.go @@ -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 members_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 +} diff --git a/api/members/members_models/prompt_category_request.go b/api/members/members_models/prompt_category_request.go new file mode 100644 index 0000000..e7ac68b --- /dev/null +++ b/api/members/members_models/prompt_category_request.go @@ -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 members_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 +} diff --git a/api/members/members_models/prompt_category_response.go b/api/members/members_models/prompt_category_response.go new file mode 100644 index 0000000..3d21ec2 --- /dev/null +++ b/api/members/members_models/prompt_category_response.go @@ -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 members_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 +} diff --git a/api/members/members_models/prompt_request.go b/api/members/members_models/prompt_request.go new file mode 100644 index 0000000..a777466 --- /dev/null +++ b/api/members/members_models/prompt_request.go @@ -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 members_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 +} diff --git a/api/members/members_models/prompt_response.go b/api/members/members_models/prompt_response.go new file mode 100644 index 0000000..0efa850 --- /dev/null +++ b/api/members/members_models/prompt_response.go @@ -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 members_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 +} diff --git a/api/members/members_models/prompt_tag.go b/api/members/members_models/prompt_tag.go new file mode 100644 index 0000000..17cf321 --- /dev/null +++ b/api/members/members_models/prompt_tag.go @@ -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 members_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 +} diff --git a/api/members/members_models/prompt_tag_request.go b/api/members/members_models/prompt_tag_request.go new file mode 100644 index 0000000..3a73e7f --- /dev/null +++ b/api/members/members_models/prompt_tag_request.go @@ -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 members_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 +} diff --git a/api/members/members_models/prompt_tag_response.go b/api/members/members_models/prompt_tag_response.go new file mode 100644 index 0000000..15f76df --- /dev/null +++ b/api/members/members_models/prompt_tag_response.go @@ -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 members_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 +} diff --git a/api/members/members_models/request_meta.go b/api/members/members_models/request_meta.go index f7a763c..f9d1189 100644 --- a/api/members/members_models/request_meta.go +++ b/api/members/members_models/request_meta.go @@ -25,14 +25,14 @@ type RequestMeta struct { // Account Number of the Reseller or OEM // Required: true - TaxnexusAccount *string `json:"TaxnexusAccount"` + ExternalAccount *string `json:"ExternalAccount"` } // Validate validates this request meta func (m *RequestMeta) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateTaxnexusAccount(formats); err != nil { + if err := m.validateExternalAccount(formats); err != nil { res = append(res, err) } @@ -42,9 +42,9 @@ func (m *RequestMeta) Validate(formats strfmt.Registry) error { return nil } -func (m *RequestMeta) validateTaxnexusAccount(formats strfmt.Registry) error { +func (m *RequestMeta) validateExternalAccount(formats strfmt.Registry) error { - if err := validate.Required("TaxnexusAccount", "body", m.TaxnexusAccount); err != nil { + if err := validate.Required("ExternalAccount", "body", m.ExternalAccount); err != nil { return err } diff --git a/api/members/members_models/response_meta.go b/api/members/members_models/response_meta.go index cfea056..d3546b6 100644 --- a/api/members/members_models/response_meta.go +++ b/api/members/members_models/response_meta.go @@ -28,6 +28,9 @@ type ResponseMeta struct { // Copyright Info Copyright string `json:"Copyright,omitempty"` + // Account Number used for recording transactions + ExternalAccount string `json:"ExternalAccount,omitempty"` + // License Information and Restrictions License string `json:"License,omitempty"` @@ -54,9 +57,6 @@ type ResponseMeta struct { // Backend Server Timestamp ServerTimestamp string `json:"ServerTimestamp,omitempty"` - - // Account Number used for recording transactions - TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` } // Validate validates this response meta diff --git a/app/tenantuser.go b/app/tenantuser.go index 87b4996..49abe2c 100644 --- a/app/tenantuser.go +++ b/app/tenantuser.go @@ -17,7 +17,7 @@ type TenantUser struct { Auth0UserID string CompanyName string ContactID string - TaxnexusAccount string + ExternalAccount string TenantActive bool TenantID string TenantName string diff --git a/app/user-helpers.go b/app/user-helpers.go index 0178885..57c48cf 100644 --- a/app/user-helpers.go +++ b/app/user-helpers.go @@ -84,7 +84,7 @@ func MarshalAuthUserToSwagger(obj *auth_models.User) *User { Signature: obj.Signature, SmallPhotoURL: obj.SmallPhotoURL, StartOfDay: obj.StartOfDay, - TaxnexusAccount: obj.TaxnexusAccount, + ExternalAccount: obj.ExternalAccount, TenantID: obj.TenantID, TenantUsers: tenantUsers, TimeZone: obj.TimeZone, @@ -105,7 +105,7 @@ func reMarshalUserRole(s *auth_models.UserRole) *UserRole { RoleDescription: s.RoleDescription, RoleID: s.RoleID, RoleName: s.RoleName, - TaxnexusAccount: s.TaxnexusAccount, + ExternalAccount: s.ExternalAccount, UserEmail: s.UserEmail, UserFullName: s.UserFullName, UserID: s.UserID, @@ -119,7 +119,7 @@ func reMarshalTenantUser(s *auth_models.TenantUser) *TenantUser { Auth0UserID: s.Auth0UserID, CompanyName: s.CompanyName, ContactID: s.ContactID, - TaxnexusAccount: s.TaxnexusAccount, + ExternalAccount: s.ExternalAccount, TenantActive: s.TenantActive, TenantID: s.TenantID, TenantName: s.TenantName, diff --git a/app/user.go b/app/user.go index 63b7c43..a8b052a 100644 --- a/app/user.go +++ b/app/user.go @@ -66,7 +66,7 @@ type User struct { Signature string SmallPhotoURL string StartOfDay string - TaxnexusAccount string + ExternalAccount string TenantID string TenantUsers []*TenantUser TimeZone string diff --git a/app/userrole.go b/app/userrole.go index 85c8450..d4ac4e9 100644 --- a/app/userrole.go +++ b/app/userrole.go @@ -22,7 +22,7 @@ type UserRole struct { ContactID string UserEmail string UserFullName string - TaxnexusAccount string + ExternalAccount string Username string Auth0UserID string } diff --git a/swagger/auth-vernonkeenan.yaml b/swagger/auth-vernonkeenan.yaml index 437dc75..83e4bde 100644 --- a/swagger/auth-vernonkeenan.yaml +++ b/swagger/auth-vernonkeenan.yaml @@ -144,7 +144,7 @@ definitions: ServerTimestamp: description: Backend Server Timestamp type: string - TaxnexusAccount: + ExternalAccount: description: Account Number used for recording transactions type: string type: object @@ -296,7 +296,7 @@ definitions: StartOfDay: description: The time day starts type: string - TaxnexusAccount: + ExternalAccount: description: Account type: string TenantID: @@ -364,7 +364,7 @@ definitions: RoleName: description: Role Name type: string - TaxnexusAccount: + ExternalAccount: description: Account Number type: string UserEmail: @@ -398,7 +398,7 @@ definitions: CompanyName: description: Account Name type: string - TaxnexusAccount: + ExternalAccount: description: Account type: string TenantActive: diff --git a/swagger/defs/prompt-category.yaml b/swagger/defs/prompt-category.yaml new file mode 100644 index 0000000..d4f65ae --- /dev/null +++ b/swagger/defs/prompt-category.yaml @@ -0,0 +1,22 @@ +PromptCategory: + description: A prompt category + properties: + ID: + description: Record Id + type: string + Name: + description: The prompt category name + type: string + CreatedDate: + description: The date the prompt category was created + type: string + CreatedByID: + description: The ID of the user who created the prompt category + type: string + LastModifiedDate: + description: The date the prompt category was last modified + type: string + LastModifiedByID: + description: The ID of the user who last modified the prompt category + type: string + type: object diff --git a/swagger/defs/prompt-tag.yaml b/swagger/defs/prompt-tag.yaml new file mode 100644 index 0000000..8bce720 --- /dev/null +++ b/swagger/defs/prompt-tag.yaml @@ -0,0 +1,22 @@ +PromptTag: + description: A prompt tag + properties: + ID: + description: Record Id + type: string + Name: + description: The prompt tag name + type: string + CreatedDate: + description: The date the prompt tag was created + type: string + CreatedByID: + description: The ID of the user who created the prompt tag + type: string + LastModifiedDate: + description: The date the prompt tag was last modified + type: string + LastModifiedByID: + description: The ID of the user who last modified the prompt tag + type: string + type: object diff --git a/swagger/defs/prompt.yaml b/swagger/defs/prompt.yaml new file mode 100644 index 0000000..692024d --- /dev/null +++ b/swagger/defs/prompt.yaml @@ -0,0 +1,50 @@ +Prompt: + description: A prompt + properties: + 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 + type: string + Icon: + description: The icon for the prompt + type: string + type: object diff --git a/swagger/external/auth-vernonkeenan.yaml b/swagger/external/auth-vernonkeenan.yaml index 10d8d15..47683d6 100644 --- a/swagger/external/auth-vernonkeenan.yaml +++ b/swagger/external/auth-vernonkeenan.yaml @@ -144,7 +144,7 @@ definitions: ServerTimestamp: description: Backend Server Timestamp type: string - TaxnexusAccount: + ExternalAccount: description: Account Number used for recording transactions type: string type: object @@ -296,7 +296,7 @@ definitions: StartOfDay: description: The time day starts type: string - TaxnexusAccount: + ExternalAccount: description: Account type: string TenantID: @@ -364,7 +364,7 @@ definitions: RoleName: description: Role Name type: string - TaxnexusAccount: + ExternalAccount: description: Account Number type: string UserEmail: @@ -398,7 +398,7 @@ definitions: CompanyName: description: Account Name type: string - TaxnexusAccount: + ExternalAccount: description: Account type: string TenantActive: diff --git a/swagger/external/members-vernonkeenan.yaml b/swagger/external/members-vernonkeenan.yaml index 879ae97..24d7d40 100644 --- a/swagger/external/members-vernonkeenan.yaml +++ b/swagger/external/members-vernonkeenan.yaml @@ -146,6 +146,27 @@ parameters: required: true schema: $ref: "#/definitions/PaymentMethodRequest" + 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 @@ -207,13 +228,7 @@ parameters: required: true schema: $ref: "#/definitions/EmailMessageRequest" - tenantIdQuery: - description: Record Id of a Tenant - in: query - name: tenantId - required: false - type: string - tenantRequest: + TenantRequest: description: An array of Tenant records in: body name: TenantRequest @@ -428,6 +443,18 @@ responses: description: PaymentMethod Response Object schema: $ref: "#/definitions/PaymentMethodResponse" + 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" ResearchProjectCompanyResponse: description: ResearchProjectCompany Response Object schema: @@ -1753,6 +1780,222 @@ paths: summary: Update PaymentMethod tags: - PaymentMethods + /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: + - PromptTags + 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: + - PromptTags + 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: + - PromptTags /researchprojectcompanies: get: description: Return a list of ResearchProjectCompany records from the datastore @@ -2209,7 +2452,7 @@ paths: description: Return a list of Tenant records from the datastore operationId: getTenants parameters: - - $ref: "#/parameters/tenantIdQuery" + - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" responses: @@ -2234,7 +2477,7 @@ paths: description: Create Tenants operationId: postTenants parameters: - - $ref: "#/parameters/tenantRequest" + - $ref: "#/parameters/TenantRequest" responses: "200": $ref: "#/responses/TenantResponse" @@ -2257,7 +2500,7 @@ paths: description: Update Tenant operationId: putTenants parameters: - - $ref: "#/parameters/tenantRequest" + - $ref: "#/parameters/TenantRequest" responses: "200": $ref: "#/responses/TenantResponse" @@ -2734,7 +2977,7 @@ definitions: $ref: "#/definitions/ResponseMeta" type: object EmailMessageRequest: - description: An array Taxnexus Send Email Message objects + description: An array Send Email Message objects properties: data: items: @@ -2744,7 +2987,7 @@ definitions: $ref: "#/definitions/RequestMeta" type: object EmailMessagesResponse: - description: An array Taxnexus user objects + description: An array user objects properties: data: items: @@ -2878,7 +3121,7 @@ definitions: type: array type: object OutgoingEmailMessageRequest: - description: An array Taxnexus New Email Message objects + description: An array New Email Message objects properties: data: items: @@ -2886,7 +3129,7 @@ definitions: type: array type: object OutgoingEmailMessagesResponse: - description: An array Taxnexus New Email Message objects + description: An array New Email Message objects properties: data: items: @@ -2944,14 +3187,68 @@ definitions: $ref: "../../lib/swagger/defs/payment-method.yaml#/PaymentMethod" 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 RequestMeta: properties: - TaxnexusAccount: + ExternalAccount: description: Account Number of the Reseller or OEM type: string x-nullable: true required: - - TaxnexusAccount + - ExternalAccount type: object ResearchProjectCompanyRequest: description: An array of ResearchProjectCompany objects @@ -3095,7 +3392,7 @@ definitions: ServerTimestamp: description: Backend Server Timestamp type: string - TaxnexusAccount: + ExternalAccount: description: Account Number used for recording transactions type: string type: object diff --git a/swagger/members-vernonkeenan.yaml b/swagger/members-vernonkeenan.yaml index 113a4af..5be0d21 100644 --- a/swagger/members-vernonkeenan.yaml +++ b/swagger/members-vernonkeenan.yaml @@ -146,6 +146,27 @@ parameters: required: true schema: $ref: "#/definitions/PaymentMethodRequest" + 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 @@ -207,13 +228,7 @@ parameters: required: true schema: $ref: "#/definitions/EmailMessageRequest" - tenantIdQuery: - description: Record Id of a Tenant - in: query - name: tenantId - required: false - type: string - tenantRequest: + TenantRequest: description: An array of Tenant records in: body name: TenantRequest @@ -428,6 +443,18 @@ responses: description: PaymentMethod Response Object schema: $ref: "#/definitions/PaymentMethodResponse" + 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" ResearchProjectCompanyResponse: description: ResearchProjectCompany Response Object schema: @@ -1753,6 +1780,222 @@ paths: summary: Update PaymentMethod tags: - PaymentMethods + /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: + - PromptTags + 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: + - PromptTags + 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: + - PromptTags /researchprojectcompanies: get: description: Return a list of ResearchProjectCompany records from the datastore @@ -2209,7 +2452,7 @@ paths: description: Return a list of Tenant records from the datastore operationId: getTenants parameters: - - $ref: "#/parameters/tenantIdQuery" + - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" responses: @@ -2234,7 +2477,7 @@ paths: description: Create Tenants operationId: postTenants parameters: - - $ref: "#/parameters/tenantRequest" + - $ref: "#/parameters/TenantRequest" responses: "200": $ref: "#/responses/TenantResponse" @@ -2257,7 +2500,7 @@ paths: description: Update Tenant operationId: putTenants parameters: - - $ref: "#/parameters/tenantRequest" + - $ref: "#/parameters/TenantRequest" responses: "200": $ref: "#/responses/TenantResponse" @@ -2734,7 +2977,7 @@ definitions: $ref: "#/definitions/ResponseMeta" type: object EmailMessageRequest: - description: An array Taxnexus Send Email Message objects + description: An array Send Email Message objects properties: data: items: @@ -2744,7 +2987,7 @@ definitions: $ref: "#/definitions/RequestMeta" type: object EmailMessagesResponse: - description: An array Taxnexus user objects + description: An array user objects properties: data: items: @@ -2878,7 +3121,7 @@ definitions: type: array type: object OutgoingEmailMessageRequest: - description: An array Taxnexus New Email Message objects + description: An array New Email Message objects properties: data: items: @@ -2886,7 +3129,7 @@ definitions: type: array type: object OutgoingEmailMessagesResponse: - description: An array Taxnexus New Email Message objects + description: An array New Email Message objects properties: data: items: @@ -2944,14 +3187,68 @@ definitions: $ref: "../../lib/swagger/defs/payment-method.yaml#/PaymentMethod" 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 RequestMeta: properties: - TaxnexusAccount: + ExternalAccount: description: Account Number of the Reseller or OEM type: string x-nullable: true required: - - TaxnexusAccount + - ExternalAccount type: object ResearchProjectCompanyRequest: description: An array of ResearchProjectCompany objects @@ -3095,7 +3392,7 @@ definitions: ServerTimestamp: description: Backend Server Timestamp type: string - TaxnexusAccount: + ExternalAccount: description: Account Number used for recording transactions type: string type: object