event category

v0.5.1 v0.5.1
Vernon Keenan 2023-04-30 17:56:32 +00:00
parent 89192c0a79
commit ef55d7cc8d
36 changed files with 4119 additions and 778 deletions

View File

@ -34,15 +34,56 @@ type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods // ClientService is the interface for Client methods
type ClientService interface { type ClientService interface {
GetEventCategories(params *GetEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventCategoriesOK, error)
GetEvents(params *GetEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventsOK, error) GetEvents(params *GetEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventsOK, error)
PostEventCategories(params *PostEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventCategoriesOK, error)
PostEvents(params *PostEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventsOK, error) PostEvents(params *PostEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventsOK, error)
UpdateEvent(params *UpdateEventParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateEventOK, error)
SetTransport(transport runtime.ClientTransport) SetTransport(transport runtime.ClientTransport)
} }
/*
GetEventCategories gets a list of eventcategories
*/
func (a *Client) GetEventCategories(params *GetEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventCategoriesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetEventCategoriesParams()
}
op := &runtime.ClientOperation{
ID: "getEventCategories",
Method: "GET",
PathPattern: "/eventcategories",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetEventCategoriesReader{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.(*GetEventCategoriesOK)
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 getEventCategories: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/* /*
GetEvents gets a list of events GetEvents gets a list of events
*/ */
@ -82,6 +123,45 @@ func (a *Client) GetEvents(params *GetEventsParams, authInfo runtime.ClientAuthI
panic(msg) panic(msg)
} }
/*
PostEventCategories creates a new event category
*/
func (a *Client) PostEventCategories(params *PostEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventCategoriesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostEventCategoriesParams()
}
op := &runtime.ClientOperation{
ID: "postEventCategories",
Method: "POST",
PathPattern: "/eventcategories",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &PostEventCategoriesReader{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.(*PostEventCategoriesOK)
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 postEventCategories: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/* /*
PostEvents creates a new event PostEvents creates a new event
*/ */
@ -121,45 +201,6 @@ func (a *Client) PostEvents(params *PostEventsParams, authInfo runtime.ClientAut
panic(msg) panic(msg)
} }
/*
UpdateEvent updates an existing event
*/
func (a *Client) UpdateEvent(params *UpdateEventParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateEventOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewUpdateEventParams()
}
op := &runtime.ClientOperation{
ID: "updateEvent",
Method: "PUT",
PathPattern: "/events",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &UpdateEventReader{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.(*UpdateEventOK)
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 updateEvent: 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 // SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) { func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport a.transport = transport

View File

@ -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 events
// 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"
)
// NewGetEventCategoriesParams creates a new GetEventCategoriesParams 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 NewGetEventCategoriesParams() *GetEventCategoriesParams {
return &GetEventCategoriesParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetEventCategoriesParamsWithTimeout creates a new GetEventCategoriesParams object
// with the ability to set a timeout on a request.
func NewGetEventCategoriesParamsWithTimeout(timeout time.Duration) *GetEventCategoriesParams {
return &GetEventCategoriesParams{
timeout: timeout,
}
}
// NewGetEventCategoriesParamsWithContext creates a new GetEventCategoriesParams object
// with the ability to set a context for a request.
func NewGetEventCategoriesParamsWithContext(ctx context.Context) *GetEventCategoriesParams {
return &GetEventCategoriesParams{
Context: ctx,
}
}
// NewGetEventCategoriesParamsWithHTTPClient creates a new GetEventCategoriesParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetEventCategoriesParamsWithHTTPClient(client *http.Client) *GetEventCategoriesParams {
return &GetEventCategoriesParams{
HTTPClient: client,
}
}
/*
GetEventCategoriesParams contains all the parameters to send to the API endpoint
for the get event categories operation.
Typically these are written to a http.Request.
*/
type GetEventCategoriesParams 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 event categories params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetEventCategoriesParams) WithDefaults() *GetEventCategoriesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get event categories params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetEventCategoriesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get event categories params
func (o *GetEventCategoriesParams) WithTimeout(timeout time.Duration) *GetEventCategoriesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get event categories params
func (o *GetEventCategoriesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get event categories params
func (o *GetEventCategoriesParams) WithContext(ctx context.Context) *GetEventCategoriesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get event categories params
func (o *GetEventCategoriesParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get event categories params
func (o *GetEventCategoriesParams) WithHTTPClient(client *http.Client) *GetEventCategoriesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get event categories params
func (o *GetEventCategoriesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithID adds the id to the get event categories params
func (o *GetEventCategoriesParams) WithID(id *string) *GetEventCategoriesParams {
o.SetID(id)
return o
}
// SetID adds the id to the get event categories params
func (o *GetEventCategoriesParams) SetID(id *string) {
o.ID = id
}
// WithLimit adds the limit to the get event categories params
func (o *GetEventCategoriesParams) WithLimit(limit *int64) *GetEventCategoriesParams {
o.SetLimit(limit)
return o
}
// SetLimit adds the limit to the get event categories params
func (o *GetEventCategoriesParams) SetLimit(limit *int64) {
o.Limit = limit
}
// WithOffset adds the offset to the get event categories params
func (o *GetEventCategoriesParams) WithOffset(offset *int64) *GetEventCategoriesParams {
o.SetOffset(offset)
return o
}
// SetOffset adds the offset to the get event categories params
func (o *GetEventCategoriesParams) SetOffset(offset *int64) {
o.Offset = offset
}
// WriteToRequest writes these params to a swagger request
func (o *GetEventCategoriesParams) 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
}

View File

@ -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 events
// 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"
)
// GetEventCategoriesReader is a Reader for the GetEventCategories structure.
type GetEventCategoriesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetEventCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetEventCategoriesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetEventCategoriesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetEventCategoriesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetEventCategoriesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetEventCategoriesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetEventCategoriesInternalServerError()
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())
}
}
// NewGetEventCategoriesOK creates a GetEventCategoriesOK with default headers values
func NewGetEventCategoriesOK() *GetEventCategoriesOK {
return &GetEventCategoriesOK{}
}
/*
GetEventCategoriesOK describes a response with status code 200, with default header values.
Event Response Object
*/
type GetEventCategoriesOK struct {
Payload *members_models.EventCategoryResponse
}
// IsSuccess returns true when this get event categories o k response has a 2xx status code
func (o *GetEventCategoriesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get event categories o k response has a 3xx status code
func (o *GetEventCategoriesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get event categories o k response has a 4xx status code
func (o *GetEventCategoriesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get event categories o k response has a 5xx status code
func (o *GetEventCategoriesOK) IsServerError() bool {
return false
}
// IsCode returns true when this get event categories o k response a status code equal to that given
func (o *GetEventCategoriesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get event categories o k response
func (o *GetEventCategoriesOK) Code() int {
return 200
}
func (o *GetEventCategoriesOK) Error() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesOK %+v", 200, o.Payload)
}
func (o *GetEventCategoriesOK) String() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesOK %+v", 200, o.Payload)
}
func (o *GetEventCategoriesOK) GetPayload() *members_models.EventCategoryResponse {
return o.Payload
}
func (o *GetEventCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.EventCategoryResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetEventCategoriesUnauthorized creates a GetEventCategoriesUnauthorized with default headers values
func NewGetEventCategoriesUnauthorized() *GetEventCategoriesUnauthorized {
return &GetEventCategoriesUnauthorized{}
}
/*
GetEventCategoriesUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetEventCategoriesUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get event categories unauthorized response has a 2xx status code
func (o *GetEventCategoriesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get event categories unauthorized response has a 3xx status code
func (o *GetEventCategoriesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get event categories unauthorized response has a 4xx status code
func (o *GetEventCategoriesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get event categories unauthorized response has a 5xx status code
func (o *GetEventCategoriesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get event categories unauthorized response a status code equal to that given
func (o *GetEventCategoriesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get event categories unauthorized response
func (o *GetEventCategoriesUnauthorized) Code() int {
return 401
}
func (o *GetEventCategoriesUnauthorized) Error() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesUnauthorized %+v", 401, o.Payload)
}
func (o *GetEventCategoriesUnauthorized) String() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesUnauthorized %+v", 401, o.Payload)
}
func (o *GetEventCategoriesUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetEventCategoriesUnauthorized) 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
}
// NewGetEventCategoriesForbidden creates a GetEventCategoriesForbidden with default headers values
func NewGetEventCategoriesForbidden() *GetEventCategoriesForbidden {
return &GetEventCategoriesForbidden{}
}
/*
GetEventCategoriesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetEventCategoriesForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this get event categories forbidden response has a 2xx status code
func (o *GetEventCategoriesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get event categories forbidden response has a 3xx status code
func (o *GetEventCategoriesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get event categories forbidden response has a 4xx status code
func (o *GetEventCategoriesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get event categories forbidden response has a 5xx status code
func (o *GetEventCategoriesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get event categories forbidden response a status code equal to that given
func (o *GetEventCategoriesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get event categories forbidden response
func (o *GetEventCategoriesForbidden) Code() int {
return 403
}
func (o *GetEventCategoriesForbidden) Error() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesForbidden %+v", 403, o.Payload)
}
func (o *GetEventCategoriesForbidden) String() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesForbidden %+v", 403, o.Payload)
}
func (o *GetEventCategoriesForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetEventCategoriesForbidden) 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
}
// NewGetEventCategoriesNotFound creates a GetEventCategoriesNotFound with default headers values
func NewGetEventCategoriesNotFound() *GetEventCategoriesNotFound {
return &GetEventCategoriesNotFound{}
}
/*
GetEventCategoriesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetEventCategoriesNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get event categories not found response has a 2xx status code
func (o *GetEventCategoriesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get event categories not found response has a 3xx status code
func (o *GetEventCategoriesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get event categories not found response has a 4xx status code
func (o *GetEventCategoriesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get event categories not found response has a 5xx status code
func (o *GetEventCategoriesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get event categories not found response a status code equal to that given
func (o *GetEventCategoriesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get event categories not found response
func (o *GetEventCategoriesNotFound) Code() int {
return 404
}
func (o *GetEventCategoriesNotFound) Error() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesNotFound %+v", 404, o.Payload)
}
func (o *GetEventCategoriesNotFound) String() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesNotFound %+v", 404, o.Payload)
}
func (o *GetEventCategoriesNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetEventCategoriesNotFound) 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
}
// NewGetEventCategoriesUnprocessableEntity creates a GetEventCategoriesUnprocessableEntity with default headers values
func NewGetEventCategoriesUnprocessableEntity() *GetEventCategoriesUnprocessableEntity {
return &GetEventCategoriesUnprocessableEntity{}
}
/*
GetEventCategoriesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetEventCategoriesUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get event categories unprocessable entity response has a 2xx status code
func (o *GetEventCategoriesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get event categories unprocessable entity response has a 3xx status code
func (o *GetEventCategoriesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get event categories unprocessable entity response has a 4xx status code
func (o *GetEventCategoriesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get event categories unprocessable entity response has a 5xx status code
func (o *GetEventCategoriesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get event categories unprocessable entity response a status code equal to that given
func (o *GetEventCategoriesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get event categories unprocessable entity response
func (o *GetEventCategoriesUnprocessableEntity) Code() int {
return 422
}
func (o *GetEventCategoriesUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetEventCategoriesUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetEventCategoriesUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetEventCategoriesUnprocessableEntity) 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
}
// NewGetEventCategoriesInternalServerError creates a GetEventCategoriesInternalServerError with default headers values
func NewGetEventCategoriesInternalServerError() *GetEventCategoriesInternalServerError {
return &GetEventCategoriesInternalServerError{}
}
/*
GetEventCategoriesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetEventCategoriesInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get event categories internal server error response has a 2xx status code
func (o *GetEventCategoriesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get event categories internal server error response has a 3xx status code
func (o *GetEventCategoriesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get event categories internal server error response has a 4xx status code
func (o *GetEventCategoriesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get event categories internal server error response has a 5xx status code
func (o *GetEventCategoriesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get event categories internal server error response a status code equal to that given
func (o *GetEventCategoriesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get event categories internal server error response
func (o *GetEventCategoriesInternalServerError) Code() int {
return 500
}
func (o *GetEventCategoriesInternalServerError) Error() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesInternalServerError %+v", 500, o.Payload)
}
func (o *GetEventCategoriesInternalServerError) String() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesInternalServerError %+v", 500, o.Payload)
}
func (o *GetEventCategoriesInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetEventCategoriesInternalServerError) 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
}

View File

@ -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 events
// 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"
)
// NewPostEventCategoriesParams creates a new PostEventCategoriesParams 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 NewPostEventCategoriesParams() *PostEventCategoriesParams {
return &PostEventCategoriesParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostEventCategoriesParamsWithTimeout creates a new PostEventCategoriesParams object
// with the ability to set a timeout on a request.
func NewPostEventCategoriesParamsWithTimeout(timeout time.Duration) *PostEventCategoriesParams {
return &PostEventCategoriesParams{
timeout: timeout,
}
}
// NewPostEventCategoriesParamsWithContext creates a new PostEventCategoriesParams object
// with the ability to set a context for a request.
func NewPostEventCategoriesParamsWithContext(ctx context.Context) *PostEventCategoriesParams {
return &PostEventCategoriesParams{
Context: ctx,
}
}
// NewPostEventCategoriesParamsWithHTTPClient creates a new PostEventCategoriesParams object
// with the ability to set a custom HTTPClient for a request.
func NewPostEventCategoriesParamsWithHTTPClient(client *http.Client) *PostEventCategoriesParams {
return &PostEventCategoriesParams{
HTTPClient: client,
}
}
/*
PostEventCategoriesParams contains all the parameters to send to the API endpoint
for the post event categories operation.
Typically these are written to a http.Request.
*/
type PostEventCategoriesParams struct {
/* EventCategoryRequest.
An array of new Event records
*/
EventCategoryRequest *members_models.EventCategoryRequest
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the post event categories params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostEventCategoriesParams) WithDefaults() *PostEventCategoriesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the post event categories params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostEventCategoriesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the post event categories params
func (o *PostEventCategoriesParams) WithTimeout(timeout time.Duration) *PostEventCategoriesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the post event categories params
func (o *PostEventCategoriesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the post event categories params
func (o *PostEventCategoriesParams) WithContext(ctx context.Context) *PostEventCategoriesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the post event categories params
func (o *PostEventCategoriesParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the post event categories params
func (o *PostEventCategoriesParams) WithHTTPClient(client *http.Client) *PostEventCategoriesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the post event categories params
func (o *PostEventCategoriesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithEventCategoryRequest adds the eventCategoryRequest to the post event categories params
func (o *PostEventCategoriesParams) WithEventCategoryRequest(eventCategoryRequest *members_models.EventCategoryRequest) *PostEventCategoriesParams {
o.SetEventCategoryRequest(eventCategoryRequest)
return o
}
// SetEventCategoryRequest adds the eventCategoryRequest to the post event categories params
func (o *PostEventCategoriesParams) SetEventCategoryRequest(eventCategoryRequest *members_models.EventCategoryRequest) {
o.EventCategoryRequest = eventCategoryRequest
}
// WriteToRequest writes these params to a swagger request
func (o *PostEventCategoriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.EventCategoryRequest != nil {
if err := r.SetBodyParam(o.EventCategoryRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -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 events
// 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"
)
// PostEventCategoriesReader is a Reader for the PostEventCategories structure.
type PostEventCategoriesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostEventCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPostEventCategoriesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostEventCategoriesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostEventCategoriesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostEventCategoriesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostEventCategoriesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostEventCategoriesInternalServerError()
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())
}
}
// NewPostEventCategoriesOK creates a PostEventCategoriesOK with default headers values
func NewPostEventCategoriesOK() *PostEventCategoriesOK {
return &PostEventCategoriesOK{}
}
/*
PostEventCategoriesOK describes a response with status code 200, with default header values.
Event Response Object
*/
type PostEventCategoriesOK struct {
Payload *members_models.EventCategoryResponse
}
// IsSuccess returns true when this post event categories o k response has a 2xx status code
func (o *PostEventCategoriesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post event categories o k response has a 3xx status code
func (o *PostEventCategoriesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this post event categories o k response has a 4xx status code
func (o *PostEventCategoriesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this post event categories o k response has a 5xx status code
func (o *PostEventCategoriesOK) IsServerError() bool {
return false
}
// IsCode returns true when this post event categories o k response a status code equal to that given
func (o *PostEventCategoriesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the post event categories o k response
func (o *PostEventCategoriesOK) Code() int {
return 200
}
func (o *PostEventCategoriesOK) Error() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesOK %+v", 200, o.Payload)
}
func (o *PostEventCategoriesOK) String() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesOK %+v", 200, o.Payload)
}
func (o *PostEventCategoriesOK) GetPayload() *members_models.EventCategoryResponse {
return o.Payload
}
func (o *PostEventCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.EventCategoryResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostEventCategoriesUnauthorized creates a PostEventCategoriesUnauthorized with default headers values
func NewPostEventCategoriesUnauthorized() *PostEventCategoriesUnauthorized {
return &PostEventCategoriesUnauthorized{}
}
/*
PostEventCategoriesUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type PostEventCategoriesUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post event categories unauthorized response has a 2xx status code
func (o *PostEventCategoriesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post event categories unauthorized response has a 3xx status code
func (o *PostEventCategoriesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post event categories unauthorized response has a 4xx status code
func (o *PostEventCategoriesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post event categories unauthorized response has a 5xx status code
func (o *PostEventCategoriesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post event categories unauthorized response a status code equal to that given
func (o *PostEventCategoriesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post event categories unauthorized response
func (o *PostEventCategoriesUnauthorized) Code() int {
return 401
}
func (o *PostEventCategoriesUnauthorized) Error() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesUnauthorized %+v", 401, o.Payload)
}
func (o *PostEventCategoriesUnauthorized) String() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesUnauthorized %+v", 401, o.Payload)
}
func (o *PostEventCategoriesUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostEventCategoriesUnauthorized) 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
}
// NewPostEventCategoriesForbidden creates a PostEventCategoriesForbidden with default headers values
func NewPostEventCategoriesForbidden() *PostEventCategoriesForbidden {
return &PostEventCategoriesForbidden{}
}
/*
PostEventCategoriesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PostEventCategoriesForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this post event categories forbidden response has a 2xx status code
func (o *PostEventCategoriesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post event categories forbidden response has a 3xx status code
func (o *PostEventCategoriesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post event categories forbidden response has a 4xx status code
func (o *PostEventCategoriesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post event categories forbidden response has a 5xx status code
func (o *PostEventCategoriesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post event categories forbidden response a status code equal to that given
func (o *PostEventCategoriesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post event categories forbidden response
func (o *PostEventCategoriesForbidden) Code() int {
return 403
}
func (o *PostEventCategoriesForbidden) Error() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesForbidden %+v", 403, o.Payload)
}
func (o *PostEventCategoriesForbidden) String() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesForbidden %+v", 403, o.Payload)
}
func (o *PostEventCategoriesForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostEventCategoriesForbidden) 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
}
// NewPostEventCategoriesNotFound creates a PostEventCategoriesNotFound with default headers values
func NewPostEventCategoriesNotFound() *PostEventCategoriesNotFound {
return &PostEventCategoriesNotFound{}
}
/*
PostEventCategoriesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PostEventCategoriesNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post event categories not found response has a 2xx status code
func (o *PostEventCategoriesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post event categories not found response has a 3xx status code
func (o *PostEventCategoriesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post event categories not found response has a 4xx status code
func (o *PostEventCategoriesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post event categories not found response has a 5xx status code
func (o *PostEventCategoriesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post event categories not found response a status code equal to that given
func (o *PostEventCategoriesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post event categories not found response
func (o *PostEventCategoriesNotFound) Code() int {
return 404
}
func (o *PostEventCategoriesNotFound) Error() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesNotFound %+v", 404, o.Payload)
}
func (o *PostEventCategoriesNotFound) String() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesNotFound %+v", 404, o.Payload)
}
func (o *PostEventCategoriesNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostEventCategoriesNotFound) 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
}
// NewPostEventCategoriesUnprocessableEntity creates a PostEventCategoriesUnprocessableEntity with default headers values
func NewPostEventCategoriesUnprocessableEntity() *PostEventCategoriesUnprocessableEntity {
return &PostEventCategoriesUnprocessableEntity{}
}
/*
PostEventCategoriesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PostEventCategoriesUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post event categories unprocessable entity response has a 2xx status code
func (o *PostEventCategoriesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post event categories unprocessable entity response has a 3xx status code
func (o *PostEventCategoriesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post event categories unprocessable entity response has a 4xx status code
func (o *PostEventCategoriesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post event categories unprocessable entity response has a 5xx status code
func (o *PostEventCategoriesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post event categories unprocessable entity response a status code equal to that given
func (o *PostEventCategoriesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post event categories unprocessable entity response
func (o *PostEventCategoriesUnprocessableEntity) Code() int {
return 422
}
func (o *PostEventCategoriesUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostEventCategoriesUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostEventCategoriesUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostEventCategoriesUnprocessableEntity) 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
}
// NewPostEventCategoriesInternalServerError creates a PostEventCategoriesInternalServerError with default headers values
func NewPostEventCategoriesInternalServerError() *PostEventCategoriesInternalServerError {
return &PostEventCategoriesInternalServerError{}
}
/*
PostEventCategoriesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PostEventCategoriesInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post event categories internal server error response has a 2xx status code
func (o *PostEventCategoriesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post event categories internal server error response has a 3xx status code
func (o *PostEventCategoriesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post event categories internal server error response has a 4xx status code
func (o *PostEventCategoriesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post event categories internal server error response has a 5xx status code
func (o *PostEventCategoriesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post event categories internal server error response a status code equal to that given
func (o *PostEventCategoriesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post event categories internal server error response
func (o *PostEventCategoriesInternalServerError) Code() int {
return 500
}
func (o *PostEventCategoriesInternalServerError) Error() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesInternalServerError %+v", 500, o.Payload)
}
func (o *PostEventCategoriesInternalServerError) String() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesInternalServerError %+v", 500, o.Payload)
}
func (o *PostEventCategoriesInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostEventCategoriesInternalServerError) 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
}

View File

@ -1,167 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package events
// 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"
)
// NewUpdateEventParams creates a new UpdateEventParams 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 NewUpdateEventParams() *UpdateEventParams {
return &UpdateEventParams{
timeout: cr.DefaultTimeout,
}
}
// NewUpdateEventParamsWithTimeout creates a new UpdateEventParams object
// with the ability to set a timeout on a request.
func NewUpdateEventParamsWithTimeout(timeout time.Duration) *UpdateEventParams {
return &UpdateEventParams{
timeout: timeout,
}
}
// NewUpdateEventParamsWithContext creates a new UpdateEventParams object
// with the ability to set a context for a request.
func NewUpdateEventParamsWithContext(ctx context.Context) *UpdateEventParams {
return &UpdateEventParams{
Context: ctx,
}
}
// NewUpdateEventParamsWithHTTPClient creates a new UpdateEventParams object
// with the ability to set a custom HTTPClient for a request.
func NewUpdateEventParamsWithHTTPClient(client *http.Client) *UpdateEventParams {
return &UpdateEventParams{
HTTPClient: client,
}
}
/*
UpdateEventParams contains all the parameters to send to the API endpoint
for the update event operation.
Typically these are written to a http.Request.
*/
type UpdateEventParams struct {
/* ID.
Unique Record ID
*/
ID *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the update event params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *UpdateEventParams) WithDefaults() *UpdateEventParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the update event params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *UpdateEventParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the update event params
func (o *UpdateEventParams) WithTimeout(timeout time.Duration) *UpdateEventParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the update event params
func (o *UpdateEventParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the update event params
func (o *UpdateEventParams) WithContext(ctx context.Context) *UpdateEventParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the update event params
func (o *UpdateEventParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the update event params
func (o *UpdateEventParams) WithHTTPClient(client *http.Client) *UpdateEventParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the update event params
func (o *UpdateEventParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithID adds the id to the update event params
func (o *UpdateEventParams) WithID(id *string) *UpdateEventParams {
o.SetID(id)
return o
}
// SetID adds the id to the update event params
func (o *UpdateEventParams) SetID(id *string) {
o.ID = id
}
// WriteToRequest writes these params to a swagger request
func (o *UpdateEventParams) 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 len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -1,486 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package events
// 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"
)
// UpdateEventReader is a Reader for the UpdateEvent structure.
type UpdateEventReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *UpdateEventReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewUpdateEventOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewUpdateEventUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewUpdateEventForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewUpdateEventNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewUpdateEventUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewUpdateEventInternalServerError()
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())
}
}
// NewUpdateEventOK creates a UpdateEventOK with default headers values
func NewUpdateEventOK() *UpdateEventOK {
return &UpdateEventOK{}
}
/*
UpdateEventOK describes a response with status code 200, with default header values.
Event Response Object
*/
type UpdateEventOK struct {
Payload *members_models.EventResponse
}
// IsSuccess returns true when this update event o k response has a 2xx status code
func (o *UpdateEventOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this update event o k response has a 3xx status code
func (o *UpdateEventOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this update event o k response has a 4xx status code
func (o *UpdateEventOK) IsClientError() bool {
return false
}
// IsServerError returns true when this update event o k response has a 5xx status code
func (o *UpdateEventOK) IsServerError() bool {
return false
}
// IsCode returns true when this update event o k response a status code equal to that given
func (o *UpdateEventOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the update event o k response
func (o *UpdateEventOK) Code() int {
return 200
}
func (o *UpdateEventOK) Error() string {
return fmt.Sprintf("[PUT /events][%d] updateEventOK %+v", 200, o.Payload)
}
func (o *UpdateEventOK) String() string {
return fmt.Sprintf("[PUT /events][%d] updateEventOK %+v", 200, o.Payload)
}
func (o *UpdateEventOK) GetPayload() *members_models.EventResponse {
return o.Payload
}
func (o *UpdateEventOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.EventResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewUpdateEventUnauthorized creates a UpdateEventUnauthorized with default headers values
func NewUpdateEventUnauthorized() *UpdateEventUnauthorized {
return &UpdateEventUnauthorized{}
}
/*
UpdateEventUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type UpdateEventUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this update event unauthorized response has a 2xx status code
func (o *UpdateEventUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update event unauthorized response has a 3xx status code
func (o *UpdateEventUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this update event unauthorized response has a 4xx status code
func (o *UpdateEventUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this update event unauthorized response has a 5xx status code
func (o *UpdateEventUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this update event unauthorized response a status code equal to that given
func (o *UpdateEventUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the update event unauthorized response
func (o *UpdateEventUnauthorized) Code() int {
return 401
}
func (o *UpdateEventUnauthorized) Error() string {
return fmt.Sprintf("[PUT /events][%d] updateEventUnauthorized %+v", 401, o.Payload)
}
func (o *UpdateEventUnauthorized) String() string {
return fmt.Sprintf("[PUT /events][%d] updateEventUnauthorized %+v", 401, o.Payload)
}
func (o *UpdateEventUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateEventUnauthorized) 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
}
// NewUpdateEventForbidden creates a UpdateEventForbidden with default headers values
func NewUpdateEventForbidden() *UpdateEventForbidden {
return &UpdateEventForbidden{}
}
/*
UpdateEventForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type UpdateEventForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this update event forbidden response has a 2xx status code
func (o *UpdateEventForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update event forbidden response has a 3xx status code
func (o *UpdateEventForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this update event forbidden response has a 4xx status code
func (o *UpdateEventForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this update event forbidden response has a 5xx status code
func (o *UpdateEventForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this update event forbidden response a status code equal to that given
func (o *UpdateEventForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the update event forbidden response
func (o *UpdateEventForbidden) Code() int {
return 403
}
func (o *UpdateEventForbidden) Error() string {
return fmt.Sprintf("[PUT /events][%d] updateEventForbidden %+v", 403, o.Payload)
}
func (o *UpdateEventForbidden) String() string {
return fmt.Sprintf("[PUT /events][%d] updateEventForbidden %+v", 403, o.Payload)
}
func (o *UpdateEventForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateEventForbidden) 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
}
// NewUpdateEventNotFound creates a UpdateEventNotFound with default headers values
func NewUpdateEventNotFound() *UpdateEventNotFound {
return &UpdateEventNotFound{}
}
/*
UpdateEventNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type UpdateEventNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this update event not found response has a 2xx status code
func (o *UpdateEventNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update event not found response has a 3xx status code
func (o *UpdateEventNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this update event not found response has a 4xx status code
func (o *UpdateEventNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this update event not found response has a 5xx status code
func (o *UpdateEventNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this update event not found response a status code equal to that given
func (o *UpdateEventNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the update event not found response
func (o *UpdateEventNotFound) Code() int {
return 404
}
func (o *UpdateEventNotFound) Error() string {
return fmt.Sprintf("[PUT /events][%d] updateEventNotFound %+v", 404, o.Payload)
}
func (o *UpdateEventNotFound) String() string {
return fmt.Sprintf("[PUT /events][%d] updateEventNotFound %+v", 404, o.Payload)
}
func (o *UpdateEventNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateEventNotFound) 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
}
// NewUpdateEventUnprocessableEntity creates a UpdateEventUnprocessableEntity with default headers values
func NewUpdateEventUnprocessableEntity() *UpdateEventUnprocessableEntity {
return &UpdateEventUnprocessableEntity{}
}
/*
UpdateEventUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type UpdateEventUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this update event unprocessable entity response has a 2xx status code
func (o *UpdateEventUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update event unprocessable entity response has a 3xx status code
func (o *UpdateEventUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this update event unprocessable entity response has a 4xx status code
func (o *UpdateEventUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this update event unprocessable entity response has a 5xx status code
func (o *UpdateEventUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this update event unprocessable entity response a status code equal to that given
func (o *UpdateEventUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the update event unprocessable entity response
func (o *UpdateEventUnprocessableEntity) Code() int {
return 422
}
func (o *UpdateEventUnprocessableEntity) Error() string {
return fmt.Sprintf("[PUT /events][%d] updateEventUnprocessableEntity %+v", 422, o.Payload)
}
func (o *UpdateEventUnprocessableEntity) String() string {
return fmt.Sprintf("[PUT /events][%d] updateEventUnprocessableEntity %+v", 422, o.Payload)
}
func (o *UpdateEventUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateEventUnprocessableEntity) 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
}
// NewUpdateEventInternalServerError creates a UpdateEventInternalServerError with default headers values
func NewUpdateEventInternalServerError() *UpdateEventInternalServerError {
return &UpdateEventInternalServerError{}
}
/*
UpdateEventInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type UpdateEventInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this update event internal server error response has a 2xx status code
func (o *UpdateEventInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update event internal server error response has a 3xx status code
func (o *UpdateEventInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this update event internal server error response has a 4xx status code
func (o *UpdateEventInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this update event internal server error response has a 5xx status code
func (o *UpdateEventInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this update event internal server error response a status code equal to that given
func (o *UpdateEventInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the update event internal server error response
func (o *UpdateEventInternalServerError) Code() int {
return 500
}
func (o *UpdateEventInternalServerError) Error() string {
return fmt.Sprintf("[PUT /events][%d] updateEventInternalServerError %+v", 500, o.Payload)
}
func (o *UpdateEventInternalServerError) String() string {
return fmt.Sprintf("[PUT /events][%d] updateEventInternalServerError %+v", 500, o.Payload)
}
func (o *UpdateEventInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateEventInternalServerError) 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
}

View File

@ -12,6 +12,7 @@ package members_models
import ( import (
"context" "context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt" "github.com/go-openapi/strfmt"
"github.com/go-openapi/swag" "github.com/go-openapi/swag"
) )
@ -39,6 +40,9 @@ type Event struct {
// end date // end date
EndDate *string `json:"EndDate,omitempty"` EndDate *string `json:"EndDate,omitempty"`
// event category
EventCategory *EventCategory `json:"EventCategory,omitempty"`
// ID // ID
ID string `json:"ID,omitempty"` ID string `json:"ID,omitempty"`
@ -81,11 +85,64 @@ type Event struct {
// Validate validates this event // Validate validates this event
func (m *Event) Validate(formats strfmt.Registry) error { func (m *Event) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateEventCategory(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil return nil
} }
// ContextValidate validates this event based on context it is used func (m *Event) validateEventCategory(formats strfmt.Registry) error {
if swag.IsZero(m.EventCategory) { // not required
return nil
}
if m.EventCategory != nil {
if err := m.EventCategory.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("EventCategory")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("EventCategory")
}
return err
}
}
return nil
}
// ContextValidate validate this event based on the context it is used
func (m *Event) ContextValidate(ctx context.Context, formats strfmt.Registry) error { func (m *Event) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateEventCategory(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *Event) contextValidateEventCategory(ctx context.Context, formats strfmt.Registry) error {
if m.EventCategory != nil {
if err := m.EventCategory.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("EventCategory")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("EventCategory")
}
return err
}
}
return nil return nil
} }

View File

@ -0,0 +1,84 @@
// 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"
)
// EventCategory event category
//
// swagger:model eventCategory
type EventCategory struct {
// created by ID
CreatedByID *string `json:"CreatedByID,omitempty"`
// created date
CreatedDate *string `json:"CreatedDate,omitempty"`
// description
Description *string `json:"Description,omitempty"`
// ID
ID string `json:"ID,omitempty"`
// image alt text
ImageAltText *string `json:"ImageAltText,omitempty"`
// image URL
ImageURL *string `json:"ImageURL,omitempty"`
// last modified by ID
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
// last modified date
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
// logo
Logo *string `json:"Logo,omitempty"`
// name
Name *string `json:"Name,omitempty"`
// slug
Slug *string `json:"Slug,omitempty"`
}
// Validate validates this event category
func (m *EventCategory) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this event category based on context it is used
func (m *EventCategory) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *EventCategory) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *EventCategory) UnmarshalBinary(b []byte) error {
var res EventCategory
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -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"
)
// EventCategoryRequest An array of EventCategory objects
//
// swagger:model EventCategoryRequest
type EventCategoryRequest struct {
// data
Data []*EventCategory `json:"Data"`
}
// Validate validates this event category request
func (m *EventCategoryRequest) 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 *EventCategoryRequest) 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 event category request based on the context it is used
func (m *EventCategoryRequest) 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 *EventCategoryRequest) 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 *EventCategoryRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *EventCategoryRequest) UnmarshalBinary(b []byte) error {
var res EventCategoryRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -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"
)
// EventCategoryResponse An array of EventCategory objects
//
// swagger:model EventCategoryResponse
type EventCategoryResponse struct {
// data
Data []*EventCategory `json:"Data"`
// meta
Meta *ResponseMeta `json:"Meta,omitempty"`
}
// Validate validates this event category response
func (m *EventCategoryResponse) 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 *EventCategoryResponse) 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 *EventCategoryResponse) 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 event category response based on the context it is used
func (m *EventCategoryResponse) 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 *EventCategoryResponse) 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 *EventCategoryResponse) 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 *EventCategoryResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *EventCategoryResponse) UnmarshalBinary(b []byte) error {
var res EventCategoryResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -128,7 +128,7 @@ func (a *Client) GetAccounts(params *GetAccountsParams, authInfo runtime.ClientA
} }
/* /*
PostAccounts adds a new account to taxnexus PostAccounts adds a new account
Account record to be added Account record to be added
*/ */

View File

@ -83,7 +83,7 @@ func (a *Client) GetAssets(params *GetAssetsParams, authInfo runtime.ClientAuthI
} }
/* /*
PostAssets adds a new asset to taxnexus PostAssets adds a new asset
Industry record to be added Industry record to be added
*/ */

View File

@ -83,7 +83,7 @@ func (a *Client) GetCompanyProducts(params *GetCompanyProductsParams, authInfo r
} }
/* /*
PostCompanyProducts adds a new companyproduct to taxnexus PostCompanyProducts adds a new companyproduct
Industry record to be added Industry record to be added
*/ */

View File

@ -128,7 +128,7 @@ func (a *Client) GetContacts(params *GetContactsParams, authInfo runtime.ClientA
} }
/* /*
PostContacts adds a new contacts to taxnexus PostContacts adds a new contacts
Contacts record to be added Contacts record to be added
*/ */

View File

@ -36,8 +36,12 @@ type ClientOption func(*runtime.ClientOperation)
type ClientService interface { type ClientService interface {
DeleteEvent(params *DeleteEventParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteEventNoContent, error) DeleteEvent(params *DeleteEventParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteEventNoContent, error)
GetEventCategories(params *GetEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventCategoriesOK, error)
GetEvents(params *GetEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventsOK, error) GetEvents(params *GetEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventsOK, error)
PostEventCategories(params *PostEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventCategoriesOK, error)
UpdateEvent(params *UpdateEventParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateEventOK, error) UpdateEvent(params *UpdateEventParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateEventOK, error)
SetTransport(transport runtime.ClientTransport) SetTransport(transport runtime.ClientTransport)
@ -82,6 +86,45 @@ func (a *Client) DeleteEvent(params *DeleteEventParams, authInfo runtime.ClientA
panic(msg) panic(msg)
} }
/*
GetEventCategories gets a list of eventcategories
*/
func (a *Client) GetEventCategories(params *GetEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventCategoriesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetEventCategoriesParams()
}
op := &runtime.ClientOperation{
ID: "getEventCategories",
Method: "GET",
PathPattern: "/eventcategories",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetEventCategoriesReader{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.(*GetEventCategoriesOK)
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 getEventCategories: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/* /*
GetEvents gets a list of events GetEvents gets a list of events
*/ */
@ -121,6 +164,45 @@ func (a *Client) GetEvents(params *GetEventsParams, authInfo runtime.ClientAuthI
panic(msg) panic(msg)
} }
/*
PostEventCategories creates a new event category
*/
func (a *Client) PostEventCategories(params *PostEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventCategoriesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostEventCategoriesParams()
}
op := &runtime.ClientOperation{
ID: "postEventCategories",
Method: "POST",
PathPattern: "/eventcategories",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &PostEventCategoriesReader{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.(*PostEventCategoriesOK)
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 postEventCategories: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/* /*
UpdateEvent updates an existing event UpdateEvent updates an existing event
*/ */

View File

@ -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 events
// 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"
)
// NewGetEventCategoriesParams creates a new GetEventCategoriesParams 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 NewGetEventCategoriesParams() *GetEventCategoriesParams {
return &GetEventCategoriesParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetEventCategoriesParamsWithTimeout creates a new GetEventCategoriesParams object
// with the ability to set a timeout on a request.
func NewGetEventCategoriesParamsWithTimeout(timeout time.Duration) *GetEventCategoriesParams {
return &GetEventCategoriesParams{
timeout: timeout,
}
}
// NewGetEventCategoriesParamsWithContext creates a new GetEventCategoriesParams object
// with the ability to set a context for a request.
func NewGetEventCategoriesParamsWithContext(ctx context.Context) *GetEventCategoriesParams {
return &GetEventCategoriesParams{
Context: ctx,
}
}
// NewGetEventCategoriesParamsWithHTTPClient creates a new GetEventCategoriesParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetEventCategoriesParamsWithHTTPClient(client *http.Client) *GetEventCategoriesParams {
return &GetEventCategoriesParams{
HTTPClient: client,
}
}
/*
GetEventCategoriesParams contains all the parameters to send to the API endpoint
for the get event categories operation.
Typically these are written to a http.Request.
*/
type GetEventCategoriesParams 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 event categories params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetEventCategoriesParams) WithDefaults() *GetEventCategoriesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get event categories params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetEventCategoriesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get event categories params
func (o *GetEventCategoriesParams) WithTimeout(timeout time.Duration) *GetEventCategoriesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get event categories params
func (o *GetEventCategoriesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get event categories params
func (o *GetEventCategoriesParams) WithContext(ctx context.Context) *GetEventCategoriesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get event categories params
func (o *GetEventCategoriesParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get event categories params
func (o *GetEventCategoriesParams) WithHTTPClient(client *http.Client) *GetEventCategoriesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get event categories params
func (o *GetEventCategoriesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithID adds the id to the get event categories params
func (o *GetEventCategoriesParams) WithID(id *string) *GetEventCategoriesParams {
o.SetID(id)
return o
}
// SetID adds the id to the get event categories params
func (o *GetEventCategoriesParams) SetID(id *string) {
o.ID = id
}
// WithLimit adds the limit to the get event categories params
func (o *GetEventCategoriesParams) WithLimit(limit *int64) *GetEventCategoriesParams {
o.SetLimit(limit)
return o
}
// SetLimit adds the limit to the get event categories params
func (o *GetEventCategoriesParams) SetLimit(limit *int64) {
o.Limit = limit
}
// WithOffset adds the offset to the get event categories params
func (o *GetEventCategoriesParams) WithOffset(offset *int64) *GetEventCategoriesParams {
o.SetOffset(offset)
return o
}
// SetOffset adds the offset to the get event categories params
func (o *GetEventCategoriesParams) SetOffset(offset *int64) {
o.Offset = offset
}
// WriteToRequest writes these params to a swagger request
func (o *GetEventCategoriesParams) 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
}

View File

@ -0,0 +1,477 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package events
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
)
// GetEventCategoriesReader is a Reader for the GetEventCategories structure.
type GetEventCategoriesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetEventCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetEventCategoriesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetEventCategoriesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetEventCategoriesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetEventCategoriesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetEventCategoriesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetEventCategoriesInternalServerError()
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())
}
}
// NewGetEventCategoriesOK creates a GetEventCategoriesOK with default headers values
func NewGetEventCategoriesOK() *GetEventCategoriesOK {
return &GetEventCategoriesOK{}
}
/*
GetEventCategoriesOK describes a response with status code 200, with default header values.
Event Response Object
*/
type GetEventCategoriesOK struct {
Payload *sfgate_models.EventCategoryResponse
}
// IsSuccess returns true when this get event categories o k response has a 2xx status code
func (o *GetEventCategoriesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get event categories o k response has a 3xx status code
func (o *GetEventCategoriesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get event categories o k response has a 4xx status code
func (o *GetEventCategoriesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get event categories o k response has a 5xx status code
func (o *GetEventCategoriesOK) IsServerError() bool {
return false
}
// IsCode returns true when this get event categories o k response a status code equal to that given
func (o *GetEventCategoriesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get event categories o k response
func (o *GetEventCategoriesOK) Code() int {
return 200
}
func (o *GetEventCategoriesOK) Error() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesOK %+v", 200, o.Payload)
}
func (o *GetEventCategoriesOK) String() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesOK %+v", 200, o.Payload)
}
func (o *GetEventCategoriesOK) GetPayload() *sfgate_models.EventCategoryResponse {
return o.Payload
}
func (o *GetEventCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.EventCategoryResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetEventCategoriesUnauthorized creates a GetEventCategoriesUnauthorized with default headers values
func NewGetEventCategoriesUnauthorized() *GetEventCategoriesUnauthorized {
return &GetEventCategoriesUnauthorized{}
}
/*
GetEventCategoriesUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type GetEventCategoriesUnauthorized struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this get event categories unauthorized response has a 2xx status code
func (o *GetEventCategoriesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get event categories unauthorized response has a 3xx status code
func (o *GetEventCategoriesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get event categories unauthorized response has a 4xx status code
func (o *GetEventCategoriesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get event categories unauthorized response has a 5xx status code
func (o *GetEventCategoriesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get event categories unauthorized response a status code equal to that given
func (o *GetEventCategoriesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get event categories unauthorized response
func (o *GetEventCategoriesUnauthorized) Code() int {
return 401
}
func (o *GetEventCategoriesUnauthorized) Error() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesUnauthorized %+v", 401, o.Payload)
}
func (o *GetEventCategoriesUnauthorized) String() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesUnauthorized %+v", 401, o.Payload)
}
func (o *GetEventCategoriesUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetEventCategoriesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetEventCategoriesForbidden creates a GetEventCategoriesForbidden with default headers values
func NewGetEventCategoriesForbidden() *GetEventCategoriesForbidden {
return &GetEventCategoriesForbidden{}
}
/*
GetEventCategoriesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetEventCategoriesForbidden struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this get event categories forbidden response has a 2xx status code
func (o *GetEventCategoriesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get event categories forbidden response has a 3xx status code
func (o *GetEventCategoriesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get event categories forbidden response has a 4xx status code
func (o *GetEventCategoriesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get event categories forbidden response has a 5xx status code
func (o *GetEventCategoriesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get event categories forbidden response a status code equal to that given
func (o *GetEventCategoriesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get event categories forbidden response
func (o *GetEventCategoriesForbidden) Code() int {
return 403
}
func (o *GetEventCategoriesForbidden) Error() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesForbidden %+v", 403, o.Payload)
}
func (o *GetEventCategoriesForbidden) String() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesForbidden %+v", 403, o.Payload)
}
func (o *GetEventCategoriesForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetEventCategoriesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetEventCategoriesNotFound creates a GetEventCategoriesNotFound with default headers values
func NewGetEventCategoriesNotFound() *GetEventCategoriesNotFound {
return &GetEventCategoriesNotFound{}
}
/*
GetEventCategoriesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetEventCategoriesNotFound struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this get event categories not found response has a 2xx status code
func (o *GetEventCategoriesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get event categories not found response has a 3xx status code
func (o *GetEventCategoriesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get event categories not found response has a 4xx status code
func (o *GetEventCategoriesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get event categories not found response has a 5xx status code
func (o *GetEventCategoriesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get event categories not found response a status code equal to that given
func (o *GetEventCategoriesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get event categories not found response
func (o *GetEventCategoriesNotFound) Code() int {
return 404
}
func (o *GetEventCategoriesNotFound) Error() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesNotFound %+v", 404, o.Payload)
}
func (o *GetEventCategoriesNotFound) String() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesNotFound %+v", 404, o.Payload)
}
func (o *GetEventCategoriesNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetEventCategoriesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetEventCategoriesUnprocessableEntity creates a GetEventCategoriesUnprocessableEntity with default headers values
func NewGetEventCategoriesUnprocessableEntity() *GetEventCategoriesUnprocessableEntity {
return &GetEventCategoriesUnprocessableEntity{}
}
/*
GetEventCategoriesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetEventCategoriesUnprocessableEntity struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this get event categories unprocessable entity response has a 2xx status code
func (o *GetEventCategoriesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get event categories unprocessable entity response has a 3xx status code
func (o *GetEventCategoriesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get event categories unprocessable entity response has a 4xx status code
func (o *GetEventCategoriesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get event categories unprocessable entity response has a 5xx status code
func (o *GetEventCategoriesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get event categories unprocessable entity response a status code equal to that given
func (o *GetEventCategoriesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get event categories unprocessable entity response
func (o *GetEventCategoriesUnprocessableEntity) Code() int {
return 422
}
func (o *GetEventCategoriesUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetEventCategoriesUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetEventCategoriesUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetEventCategoriesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetEventCategoriesInternalServerError creates a GetEventCategoriesInternalServerError with default headers values
func NewGetEventCategoriesInternalServerError() *GetEventCategoriesInternalServerError {
return &GetEventCategoriesInternalServerError{}
}
/*
GetEventCategoriesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetEventCategoriesInternalServerError struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this get event categories internal server error response has a 2xx status code
func (o *GetEventCategoriesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get event categories internal server error response has a 3xx status code
func (o *GetEventCategoriesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get event categories internal server error response has a 4xx status code
func (o *GetEventCategoriesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get event categories internal server error response has a 5xx status code
func (o *GetEventCategoriesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get event categories internal server error response a status code equal to that given
func (o *GetEventCategoriesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get event categories internal server error response
func (o *GetEventCategoriesInternalServerError) Code() int {
return 500
}
func (o *GetEventCategoriesInternalServerError) Error() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesInternalServerError %+v", 500, o.Payload)
}
func (o *GetEventCategoriesInternalServerError) String() string {
return fmt.Sprintf("[GET /eventcategories][%d] getEventCategoriesInternalServerError %+v", 500, o.Payload)
}
func (o *GetEventCategoriesInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *GetEventCategoriesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}

View File

@ -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 events
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
)
// NewPostEventCategoriesParams creates a new PostEventCategoriesParams 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 NewPostEventCategoriesParams() *PostEventCategoriesParams {
return &PostEventCategoriesParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostEventCategoriesParamsWithTimeout creates a new PostEventCategoriesParams object
// with the ability to set a timeout on a request.
func NewPostEventCategoriesParamsWithTimeout(timeout time.Duration) *PostEventCategoriesParams {
return &PostEventCategoriesParams{
timeout: timeout,
}
}
// NewPostEventCategoriesParamsWithContext creates a new PostEventCategoriesParams object
// with the ability to set a context for a request.
func NewPostEventCategoriesParamsWithContext(ctx context.Context) *PostEventCategoriesParams {
return &PostEventCategoriesParams{
Context: ctx,
}
}
// NewPostEventCategoriesParamsWithHTTPClient creates a new PostEventCategoriesParams object
// with the ability to set a custom HTTPClient for a request.
func NewPostEventCategoriesParamsWithHTTPClient(client *http.Client) *PostEventCategoriesParams {
return &PostEventCategoriesParams{
HTTPClient: client,
}
}
/*
PostEventCategoriesParams contains all the parameters to send to the API endpoint
for the post event categories operation.
Typically these are written to a http.Request.
*/
type PostEventCategoriesParams struct {
/* EventCategoryRequest.
An array of new Event records
*/
EventCategoryRequest *sfgate_models.EventCategoryRequest
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the post event categories params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostEventCategoriesParams) WithDefaults() *PostEventCategoriesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the post event categories params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostEventCategoriesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the post event categories params
func (o *PostEventCategoriesParams) WithTimeout(timeout time.Duration) *PostEventCategoriesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the post event categories params
func (o *PostEventCategoriesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the post event categories params
func (o *PostEventCategoriesParams) WithContext(ctx context.Context) *PostEventCategoriesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the post event categories params
func (o *PostEventCategoriesParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the post event categories params
func (o *PostEventCategoriesParams) WithHTTPClient(client *http.Client) *PostEventCategoriesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the post event categories params
func (o *PostEventCategoriesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithEventCategoryRequest adds the eventCategoryRequest to the post event categories params
func (o *PostEventCategoriesParams) WithEventCategoryRequest(eventCategoryRequest *sfgate_models.EventCategoryRequest) *PostEventCategoriesParams {
o.SetEventCategoryRequest(eventCategoryRequest)
return o
}
// SetEventCategoryRequest adds the eventCategoryRequest to the post event categories params
func (o *PostEventCategoriesParams) SetEventCategoryRequest(eventCategoryRequest *sfgate_models.EventCategoryRequest) {
o.EventCategoryRequest = eventCategoryRequest
}
// WriteToRequest writes these params to a swagger request
func (o *PostEventCategoriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.EventCategoryRequest != nil {
if err := r.SetBodyParam(o.EventCategoryRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -0,0 +1,477 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package events
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
)
// PostEventCategoriesReader is a Reader for the PostEventCategories structure.
type PostEventCategoriesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostEventCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPostEventCategoriesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostEventCategoriesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostEventCategoriesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostEventCategoriesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostEventCategoriesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostEventCategoriesInternalServerError()
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())
}
}
// NewPostEventCategoriesOK creates a PostEventCategoriesOK with default headers values
func NewPostEventCategoriesOK() *PostEventCategoriesOK {
return &PostEventCategoriesOK{}
}
/*
PostEventCategoriesOK describes a response with status code 200, with default header values.
Event Response Object
*/
type PostEventCategoriesOK struct {
Payload *sfgate_models.EventCategoryResponse
}
// IsSuccess returns true when this post event categories o k response has a 2xx status code
func (o *PostEventCategoriesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post event categories o k response has a 3xx status code
func (o *PostEventCategoriesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this post event categories o k response has a 4xx status code
func (o *PostEventCategoriesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this post event categories o k response has a 5xx status code
func (o *PostEventCategoriesOK) IsServerError() bool {
return false
}
// IsCode returns true when this post event categories o k response a status code equal to that given
func (o *PostEventCategoriesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the post event categories o k response
func (o *PostEventCategoriesOK) Code() int {
return 200
}
func (o *PostEventCategoriesOK) Error() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesOK %+v", 200, o.Payload)
}
func (o *PostEventCategoriesOK) String() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesOK %+v", 200, o.Payload)
}
func (o *PostEventCategoriesOK) GetPayload() *sfgate_models.EventCategoryResponse {
return o.Payload
}
func (o *PostEventCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.EventCategoryResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostEventCategoriesUnauthorized creates a PostEventCategoriesUnauthorized with default headers values
func NewPostEventCategoriesUnauthorized() *PostEventCategoriesUnauthorized {
return &PostEventCategoriesUnauthorized{}
}
/*
PostEventCategoriesUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type PostEventCategoriesUnauthorized struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post event categories unauthorized response has a 2xx status code
func (o *PostEventCategoriesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post event categories unauthorized response has a 3xx status code
func (o *PostEventCategoriesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post event categories unauthorized response has a 4xx status code
func (o *PostEventCategoriesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post event categories unauthorized response has a 5xx status code
func (o *PostEventCategoriesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post event categories unauthorized response a status code equal to that given
func (o *PostEventCategoriesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post event categories unauthorized response
func (o *PostEventCategoriesUnauthorized) Code() int {
return 401
}
func (o *PostEventCategoriesUnauthorized) Error() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesUnauthorized %+v", 401, o.Payload)
}
func (o *PostEventCategoriesUnauthorized) String() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesUnauthorized %+v", 401, o.Payload)
}
func (o *PostEventCategoriesUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostEventCategoriesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostEventCategoriesForbidden creates a PostEventCategoriesForbidden with default headers values
func NewPostEventCategoriesForbidden() *PostEventCategoriesForbidden {
return &PostEventCategoriesForbidden{}
}
/*
PostEventCategoriesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PostEventCategoriesForbidden struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post event categories forbidden response has a 2xx status code
func (o *PostEventCategoriesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post event categories forbidden response has a 3xx status code
func (o *PostEventCategoriesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post event categories forbidden response has a 4xx status code
func (o *PostEventCategoriesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post event categories forbidden response has a 5xx status code
func (o *PostEventCategoriesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post event categories forbidden response a status code equal to that given
func (o *PostEventCategoriesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post event categories forbidden response
func (o *PostEventCategoriesForbidden) Code() int {
return 403
}
func (o *PostEventCategoriesForbidden) Error() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesForbidden %+v", 403, o.Payload)
}
func (o *PostEventCategoriesForbidden) String() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesForbidden %+v", 403, o.Payload)
}
func (o *PostEventCategoriesForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostEventCategoriesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostEventCategoriesNotFound creates a PostEventCategoriesNotFound with default headers values
func NewPostEventCategoriesNotFound() *PostEventCategoriesNotFound {
return &PostEventCategoriesNotFound{}
}
/*
PostEventCategoriesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PostEventCategoriesNotFound struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post event categories not found response has a 2xx status code
func (o *PostEventCategoriesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post event categories not found response has a 3xx status code
func (o *PostEventCategoriesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post event categories not found response has a 4xx status code
func (o *PostEventCategoriesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post event categories not found response has a 5xx status code
func (o *PostEventCategoriesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post event categories not found response a status code equal to that given
func (o *PostEventCategoriesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post event categories not found response
func (o *PostEventCategoriesNotFound) Code() int {
return 404
}
func (o *PostEventCategoriesNotFound) Error() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesNotFound %+v", 404, o.Payload)
}
func (o *PostEventCategoriesNotFound) String() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesNotFound %+v", 404, o.Payload)
}
func (o *PostEventCategoriesNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostEventCategoriesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostEventCategoriesUnprocessableEntity creates a PostEventCategoriesUnprocessableEntity with default headers values
func NewPostEventCategoriesUnprocessableEntity() *PostEventCategoriesUnprocessableEntity {
return &PostEventCategoriesUnprocessableEntity{}
}
/*
PostEventCategoriesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PostEventCategoriesUnprocessableEntity struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post event categories unprocessable entity response has a 2xx status code
func (o *PostEventCategoriesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post event categories unprocessable entity response has a 3xx status code
func (o *PostEventCategoriesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post event categories unprocessable entity response has a 4xx status code
func (o *PostEventCategoriesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post event categories unprocessable entity response has a 5xx status code
func (o *PostEventCategoriesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post event categories unprocessable entity response a status code equal to that given
func (o *PostEventCategoriesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post event categories unprocessable entity response
func (o *PostEventCategoriesUnprocessableEntity) Code() int {
return 422
}
func (o *PostEventCategoriesUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostEventCategoriesUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostEventCategoriesUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostEventCategoriesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostEventCategoriesInternalServerError creates a PostEventCategoriesInternalServerError with default headers values
func NewPostEventCategoriesInternalServerError() *PostEventCategoriesInternalServerError {
return &PostEventCategoriesInternalServerError{}
}
/*
PostEventCategoriesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PostEventCategoriesInternalServerError struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post event categories internal server error response has a 2xx status code
func (o *PostEventCategoriesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post event categories internal server error response has a 3xx status code
func (o *PostEventCategoriesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post event categories internal server error response has a 4xx status code
func (o *PostEventCategoriesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post event categories internal server error response has a 5xx status code
func (o *PostEventCategoriesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post event categories internal server error response a status code equal to that given
func (o *PostEventCategoriesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post event categories internal server error response
func (o *PostEventCategoriesInternalServerError) Code() int {
return 500
}
func (o *PostEventCategoriesInternalServerError) Error() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesInternalServerError %+v", 500, o.Payload)
}
func (o *PostEventCategoriesInternalServerError) String() string {
return fmt.Sprintf("[POST /eventcategories][%d] postEventCategoriesInternalServerError %+v", 500, o.Payload)
}
func (o *PostEventCategoriesInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostEventCategoriesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}

View File

@ -83,7 +83,7 @@ func (a *Client) GetFactors(params *GetFactorsParams, authInfo runtime.ClientAut
} }
/* /*
PostFactors adds a new factor to taxnexus PostFactors adds a new factor
Factor record to be added Factor record to be added
*/ */

View File

@ -83,7 +83,7 @@ func (a *Client) GetFinancialStatements(params *GetFinancialStatementsParams, au
} }
/* /*
PostFinancialStatements adds a new financial statement to taxnexus PostFinancialStatements adds a new financial statement
FinancialStatement record to be added FinancialStatement record to be added
*/ */

View File

@ -83,7 +83,7 @@ func (a *Client) GetIndustries(params *GetIndustriesParams, authInfo runtime.Cli
} }
/* /*
PostIndustries adds a new industry to taxnexus PostIndustries adds a new industry
Industry record to be added Industry record to be added
*/ */

View File

@ -83,7 +83,7 @@ func (a *Client) GetIndustryCompanies(params *GetIndustryCompaniesParams, authIn
} }
/* /*
PostIndustryCompanies adds a new industry company to taxnexus PostIndustryCompanies adds a new industry company
IndustryCompany record to be added IndustryCompany record to be added
*/ */

View File

@ -83,7 +83,7 @@ func (a *Client) GetIndustryProducts(params *GetIndustryProductsParams, authInfo
} }
/* /*
PostIndustryproducts adds a new industryproduct to taxnexus PostIndustryproducts adds a new industryproduct
Industry record to be added Industry record to be added
*/ */

View File

@ -83,7 +83,7 @@ func (a *Client) GetObservations(params *GetObservationsParams, authInfo runtime
} }
/* /*
PostObservations adds a new observation to taxnexus PostObservations adds a new observation
Observation record to be added Observation record to be added
*/ */

View File

@ -12,6 +12,7 @@ package sfgate_models
import ( import (
"context" "context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt" "github.com/go-openapi/strfmt"
"github.com/go-openapi/swag" "github.com/go-openapi/swag"
) )
@ -39,6 +40,9 @@ type Event struct {
// end date // end date
EndDate *string `json:"EndDate,omitempty"` EndDate *string `json:"EndDate,omitempty"`
// event category
EventCategory *EventCategory `json:"EventCategory,omitempty"`
// ID // ID
ID string `json:"ID,omitempty"` ID string `json:"ID,omitempty"`
@ -81,11 +85,64 @@ type Event struct {
// Validate validates this event // Validate validates this event
func (m *Event) Validate(formats strfmt.Registry) error { func (m *Event) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateEventCategory(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil return nil
} }
// ContextValidate validates this event based on context it is used func (m *Event) validateEventCategory(formats strfmt.Registry) error {
if swag.IsZero(m.EventCategory) { // not required
return nil
}
if m.EventCategory != nil {
if err := m.EventCategory.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("EventCategory")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("EventCategory")
}
return err
}
}
return nil
}
// ContextValidate validate this event based on the context it is used
func (m *Event) ContextValidate(ctx context.Context, formats strfmt.Registry) error { func (m *Event) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateEventCategory(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *Event) contextValidateEventCategory(ctx context.Context, formats strfmt.Registry) error {
if m.EventCategory != nil {
if err := m.EventCategory.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("EventCategory")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("EventCategory")
}
return err
}
}
return nil return nil
} }

View File

@ -0,0 +1,84 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package sfgate_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// EventCategory event category
//
// swagger:model eventCategory
type EventCategory struct {
// created by ID
CreatedByID *string `json:"CreatedByID,omitempty"`
// created date
CreatedDate *string `json:"CreatedDate,omitempty"`
// description
Description *string `json:"Description,omitempty"`
// ID
ID string `json:"ID,omitempty"`
// image alt text
ImageAltText *string `json:"ImageAltText,omitempty"`
// image URL
ImageURL *string `json:"ImageURL,omitempty"`
// last modified by ID
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
// last modified date
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
// logo
Logo *string `json:"Logo,omitempty"`
// name
Name *string `json:"Name,omitempty"`
// slug
Slug *string `json:"Slug,omitempty"`
}
// Validate validates this event category
func (m *EventCategory) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this event category based on context it is used
func (m *EventCategory) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *EventCategory) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *EventCategory) UnmarshalBinary(b []byte) error {
var res EventCategory
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,120 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package sfgate_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// EventCategoryRequest An array of EventCategory objects
//
// swagger:model EventCategoryRequest
type EventCategoryRequest struct {
// data
Data []*EventCategory `json:"Data"`
}
// Validate validates this event category request
func (m *EventCategoryRequest) 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 *EventCategoryRequest) 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 event category request based on the context it is used
func (m *EventCategoryRequest) 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 *EventCategoryRequest) 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 *EventCategoryRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *EventCategoryRequest) UnmarshalBinary(b []byte) error {
var res EventCategoryRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,166 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package sfgate_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// EventCategoryResponse An array of EventCategory objects
//
// swagger:model EventCategoryResponse
type EventCategoryResponse struct {
// data
Data []*EventCategory `json:"Data"`
// meta
Meta *ResponseMeta `json:"Meta,omitempty"`
}
// Validate validates this event category response
func (m *EventCategoryResponse) 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 *EventCategoryResponse) 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 *EventCategoryResponse) 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 event category response based on the context it is used
func (m *EventCategoryResponse) 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 *EventCategoryResponse) 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 *EventCategoryResponse) 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 *EventCategoryResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *EventCategoryResponse) UnmarshalBinary(b []byte) error {
var res EventCategoryResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,35 @@
EventCategory:
type: object
properties:
ID:
type: string
CreatedByID:
type: string
x-nullable: true
CreatedDate:
type: string
x-nullable: true
Description:
type: string
x-nullable: true
ImageAltText:
type: string
x-nullable: true
ImageURL:
type: string
x-nullable: true
LastModifiedByID:
type: string
x-nullable: true
LastModifiedDate:
type: string
x-nullable: true
Name:
type: string
x-nullable: true
Logo:
type: string
x-nullable: true
Slug:
type: string
x-nullable: true

View File

@ -14,6 +14,8 @@ Event:
CreatedDate: CreatedDate:
type: string type: string
x-nullable: true x-nullable: true
EventCategory:
$ref: "./event-category.yaml#/EventCategory"
Description: Description:
type: string type: string
x-nullable: true x-nullable: true

View File

@ -91,6 +91,13 @@ parameters:
required: true required: true
schema: schema:
$ref: "#/definitions/EventRequest" $ref: "#/definitions/EventRequest"
EventCategoryRequest:
description: An array of new Event records
in: body
name: eventCategoryRequest
required: true
schema:
$ref: "#/definitions/EventCategoryRequest"
FavoriteRequest: FavoriteRequest:
description: An array of new Favorite records description: An array of new Favorite records
in: body in: body
@ -345,6 +352,10 @@ responses:
description: Event Response Object description: Event Response Object
schema: schema:
$ref: "#/definitions/EventResponse" $ref: "#/definitions/EventResponse"
EventCategoryResponse:
description: Event Response Object
schema:
$ref: "#/definitions/EventCategoryResponse"
FavoriteResponse: FavoriteResponse:
description: Favorite Response Object description: Favorite Response Object
schema: schema:
@ -1034,6 +1045,53 @@ paths:
summary: Update an existing Enrollment summary: Update an existing Enrollment
tags: tags:
- Enrollments - Enrollments
/eventcategories:
get:
security:
- ApiKeyAuth: []
operationId: getEventCategories
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/idQuery"
responses:
"200":
$ref: "#/responses/EventCategoryResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Get a list of Eventcategories
tags:
- Events
post:
security:
- ApiKeyAuth: []
operationId: postEventCategories
parameters:
- $ref: "#/parameters/EventCategoryRequest"
responses:
"200":
$ref: "#/responses/EventCategoryResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Create a new EventCategory
tags:
- Events
/events: /events:
get: get:
security: security:
@ -1081,28 +1139,6 @@ paths:
summary: Create a new Event summary: Create a new Event
tags: tags:
- Events - Events
put:
security:
- ApiKeyAuth: []
operationId: updateEvent
parameters:
- $ref: "#/parameters/idQuery"
responses:
"200":
$ref: "#/responses/EventResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Update an existing Event
tags:
- Events
/favorites: /favorites:
delete: delete:
security: security:
@ -2398,6 +2434,24 @@ definitions:
$ref: "../../lib/swagger/defs/event.yaml#/Event" $ref: "../../lib/swagger/defs/event.yaml#/Event"
type: array type: array
type: object type: object
EventCategoryRequest:
description: An array of EventCategory objects
properties:
Data:
items:
$ref: "../../lib/swagger/defs/event-category.yaml#/EventCategory"
type: array
type: object
EventCategoryResponse:
description: An array of EventCategory objects
properties:
Meta:
$ref: "#/definitions/ResponseMeta"
Data:
items:
$ref: "../../lib/swagger/defs/event-category.yaml#/EventCategory"
type: array
type: object
Favorite: Favorite:
properties: properties:
ID: ID:

View File

@ -2,12 +2,12 @@ swagger: "2.0"
info: info:
version: 0.2.0 version: 0.2.0
title: "sf-gate" title: "sf-gate"
description: "Customer Information Microservice" description: "Salesforce Gateway Microservice"
termsOfService: "http://taxnexus.net/terms/" termsOfService: "https://salesforcedevops.net/terms/"
contact: contact:
email: "noc@taxnexus.net" email: "vern@salesforcedevops.net"
license: license:
name: "Proprietary - Copyright (c) 2018-2021 by Taxnexus, Inc." name: "Proprietary - Copyright (c) 2018-2023 by Vernon Keenan"
securityDefinitions: securityDefinitions:
ApiKeyAuth: ApiKeyAuth:
type: "apiKey" type: "apiKey"
@ -185,6 +185,13 @@ parameters:
required: true required: true
schema: schema:
$ref: "#/definitions/EventRequest" $ref: "#/definitions/EventRequest"
EventCategoryRequest:
description: An array of new Event records
in: body
name: eventCategoryRequest
required: true
schema:
$ref: "#/definitions/EventCategoryRequest"
factorIdQuery: factorIdQuery:
description: Record Id of a Factor description: Record Id of a Factor
in: query in: query
@ -334,6 +341,10 @@ responses:
description: Event Response Object description: Event Response Object
schema: schema:
$ref: "#/definitions/EventResponse" $ref: "#/definitions/EventResponse"
EventCategoryResponse:
description: Event Response Object
schema:
$ref: "#/definitions/EventCategoryResponse"
IndustryCompanyResponse: IndustryCompanyResponse:
description: Response with IndustryCompany objects description: Response with IndustryCompany objects
schema: schema:
@ -515,7 +526,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new account to Taxnexus summary: Add a new account
tags: tags:
- Accounts - Accounts
put: put:
@ -588,7 +599,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new asset to Taxnexus summary: Add a new asset
tags: tags:
- Assets - Assets
/clusters: /clusters:
@ -710,7 +721,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new companyproduct to Taxnexus summary: Add a new companyproduct
tags: tags:
- CompanyProducts - CompanyProducts
/contacts: /contacts:
@ -784,7 +795,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new Contacts to Taxnexus summary: Add a new Contacts
tags: tags:
- Contacts - Contacts
put: put:
@ -1119,6 +1130,53 @@ paths:
summary: Update Databases summary: Update Databases
tags: tags:
- Databases - Databases
/eventcategories:
get:
security:
- ApiKeyAuth: []
operationId: getEventCategories
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/idQuery"
responses:
"200":
$ref: "#/responses/EventCategoryResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Get a list of Eventcategories
tags:
- Events
post:
security:
- ApiKeyAuth: []
operationId: postEventCategories
parameters:
- $ref: "#/parameters/EventCategoryRequest"
responses:
"200":
$ref: "#/responses/EventCategoryResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Create a new EventCategory
tags:
- Events
/events: /events:
delete: delete:
security: security:
@ -1225,7 +1283,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new Factor to Taxnexus summary: Add a new Factor
tags: tags:
- Factors - Factors
/financialstatements: /financialstatements:
@ -1275,7 +1333,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new FinancialStatement to Taxnexus summary: Add a new FinancialStatement
tags: tags:
- FinancialStatements - FinancialStatements
/industries: /industries:
@ -1325,7 +1383,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new industry to Taxnexus summary: Add a new industry
tags: tags:
- Industries - Industries
/industrycompanies: /industrycompanies:
@ -1375,7 +1433,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new IndustryCompany to Taxnexus summary: Add a new IndustryCompany
tags: tags:
- IndustryCompanies - IndustryCompanies
/industryproducts: /industryproducts:
@ -1425,7 +1483,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new industryproduct to Taxnexus summary: Add a new industryproduct
tags: tags:
- IndustryProducts - IndustryProducts
/observations: /observations:
@ -1475,7 +1533,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new Observation to Taxnexus summary: Add a new Observation
tags: tags:
- Observations - Observations
/roles: /roles:
@ -3950,6 +4008,24 @@ definitions:
$ref: "../../lib/swagger/defs/event.yaml#/Event" $ref: "../../lib/swagger/defs/event.yaml#/Event"
type: array type: array
type: object type: object
EventCategoryRequest:
description: An array of EventCategory objects
properties:
Data:
items:
$ref: "../../lib/swagger/defs/event-category.yaml#/EventCategory"
type: array
type: object
EventCategoryResponse:
description: An array of EventCategory objects
properties:
Meta:
$ref: "#/definitions/ResponseMeta"
Data:
items:
$ref: "../../lib/swagger/defs/event-category.yaml#/EventCategory"
type: array
type: object
CourseLessonRequest: CourseLessonRequest:
description: An array of CourseLesson objects description: An array of CourseLesson objects
properties: properties:

View File

@ -91,6 +91,13 @@ parameters:
required: true required: true
schema: schema:
$ref: "#/definitions/EventRequest" $ref: "#/definitions/EventRequest"
EventCategoryRequest:
description: An array of new Event records
in: body
name: eventCategoryRequest
required: true
schema:
$ref: "#/definitions/EventCategoryRequest"
FavoriteRequest: FavoriteRequest:
description: An array of new Favorite records description: An array of new Favorite records
in: body in: body
@ -345,6 +352,10 @@ responses:
description: Event Response Object description: Event Response Object
schema: schema:
$ref: "#/definitions/EventResponse" $ref: "#/definitions/EventResponse"
EventCategoryResponse:
description: Event Response Object
schema:
$ref: "#/definitions/EventCategoryResponse"
FavoriteResponse: FavoriteResponse:
description: Favorite Response Object description: Favorite Response Object
schema: schema:
@ -1034,6 +1045,53 @@ paths:
summary: Update an existing Enrollment summary: Update an existing Enrollment
tags: tags:
- Enrollments - Enrollments
/eventcategories:
get:
security:
- ApiKeyAuth: []
operationId: getEventCategories
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/idQuery"
responses:
"200":
$ref: "#/responses/EventCategoryResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Get a list of Eventcategories
tags:
- Events
post:
security:
- ApiKeyAuth: []
operationId: postEventCategories
parameters:
- $ref: "#/parameters/EventCategoryRequest"
responses:
"200":
$ref: "#/responses/EventCategoryResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Create a new EventCategory
tags:
- Events
/events: /events:
get: get:
security: security:
@ -1081,28 +1139,6 @@ paths:
summary: Create a new Event summary: Create a new Event
tags: tags:
- Events - Events
put:
security:
- ApiKeyAuth: []
operationId: updateEvent
parameters:
- $ref: "#/parameters/idQuery"
responses:
"200":
$ref: "#/responses/EventResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Update an existing Event
tags:
- Events
/favorites: /favorites:
delete: delete:
security: security:
@ -2398,6 +2434,24 @@ definitions:
$ref: "../../lib/swagger/defs/event.yaml#/Event" $ref: "../../lib/swagger/defs/event.yaml#/Event"
type: array type: array
type: object type: object
EventCategoryRequest:
description: An array of EventCategory objects
properties:
Data:
items:
$ref: "../../lib/swagger/defs/event-category.yaml#/EventCategory"
type: array
type: object
EventCategoryResponse:
description: An array of EventCategory objects
properties:
Meta:
$ref: "#/definitions/ResponseMeta"
Data:
items:
$ref: "../../lib/swagger/defs/event-category.yaml#/EventCategory"
type: array
type: object
Favorite: Favorite:
properties: properties:
ID: ID:

View File

@ -2,12 +2,12 @@ swagger: "2.0"
info: info:
version: 0.2.0 version: 0.2.0
title: "sf-gate" title: "sf-gate"
description: "Customer Information Microservice" description: "Salesforce Gateway Microservice"
termsOfService: "http://taxnexus.net/terms/" termsOfService: "https://salesforcedevops.net/terms/"
contact: contact:
email: "noc@taxnexus.net" email: "vern@salesforcedevops.net"
license: license:
name: "Proprietary - Copyright (c) 2018-2021 by Taxnexus, Inc." name: "Proprietary - Copyright (c) 2018-2023 by Vernon Keenan"
securityDefinitions: securityDefinitions:
ApiKeyAuth: ApiKeyAuth:
type: "apiKey" type: "apiKey"
@ -185,6 +185,13 @@ parameters:
required: true required: true
schema: schema:
$ref: "#/definitions/EventRequest" $ref: "#/definitions/EventRequest"
EventCategoryRequest:
description: An array of new Event records
in: body
name: eventCategoryRequest
required: true
schema:
$ref: "#/definitions/EventCategoryRequest"
factorIdQuery: factorIdQuery:
description: Record Id of a Factor description: Record Id of a Factor
in: query in: query
@ -334,6 +341,10 @@ responses:
description: Event Response Object description: Event Response Object
schema: schema:
$ref: "#/definitions/EventResponse" $ref: "#/definitions/EventResponse"
EventCategoryResponse:
description: Event Response Object
schema:
$ref: "#/definitions/EventCategoryResponse"
IndustryCompanyResponse: IndustryCompanyResponse:
description: Response with IndustryCompany objects description: Response with IndustryCompany objects
schema: schema:
@ -515,7 +526,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new account to Taxnexus summary: Add a new account
tags: tags:
- Accounts - Accounts
put: put:
@ -588,7 +599,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new asset to Taxnexus summary: Add a new asset
tags: tags:
- Assets - Assets
/clusters: /clusters:
@ -710,7 +721,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new companyproduct to Taxnexus summary: Add a new companyproduct
tags: tags:
- CompanyProducts - CompanyProducts
/contacts: /contacts:
@ -784,7 +795,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new Contacts to Taxnexus summary: Add a new Contacts
tags: tags:
- Contacts - Contacts
put: put:
@ -1119,6 +1130,53 @@ paths:
summary: Update Databases summary: Update Databases
tags: tags:
- Databases - Databases
/eventcategories:
get:
security:
- ApiKeyAuth: []
operationId: getEventCategories
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/idQuery"
responses:
"200":
$ref: "#/responses/EventCategoryResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Get a list of Eventcategories
tags:
- Events
post:
security:
- ApiKeyAuth: []
operationId: postEventCategories
parameters:
- $ref: "#/parameters/EventCategoryRequest"
responses:
"200":
$ref: "#/responses/EventCategoryResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Create a new EventCategory
tags:
- Events
/events: /events:
delete: delete:
security: security:
@ -1225,7 +1283,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new Factor to Taxnexus summary: Add a new Factor
tags: tags:
- Factors - Factors
/financialstatements: /financialstatements:
@ -1275,7 +1333,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new FinancialStatement to Taxnexus summary: Add a new FinancialStatement
tags: tags:
- FinancialStatements - FinancialStatements
/industries: /industries:
@ -1325,7 +1383,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new industry to Taxnexus summary: Add a new industry
tags: tags:
- Industries - Industries
/industrycompanies: /industrycompanies:
@ -1375,7 +1433,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new IndustryCompany to Taxnexus summary: Add a new IndustryCompany
tags: tags:
- IndustryCompanies - IndustryCompanies
/industryproducts: /industryproducts:
@ -1425,7 +1483,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new industryproduct to Taxnexus summary: Add a new industryproduct
tags: tags:
- IndustryProducts - IndustryProducts
/observations: /observations:
@ -1475,7 +1533,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: Add a new Observation to Taxnexus summary: Add a new Observation
tags: tags:
- Observations - Observations
/roles: /roles:
@ -3950,6 +4008,24 @@ definitions:
$ref: "../../lib/swagger/defs/event.yaml#/Event" $ref: "../../lib/swagger/defs/event.yaml#/Event"
type: array type: array
type: object type: object
EventCategoryRequest:
description: An array of EventCategory objects
properties:
Data:
items:
$ref: "../../lib/swagger/defs/event-category.yaml#/EventCategory"
type: array
type: object
EventCategoryResponse:
description: An array of EventCategory objects
properties:
Meta:
$ref: "#/definitions/ResponseMeta"
Data:
items:
$ref: "../../lib/swagger/defs/event-category.yaml#/EventCategory"
type: array
type: object
CourseLessonRequest: CourseLessonRequest:
description: An array of CourseLesson objects description: An array of CourseLesson objects
properties: properties: