feat(members): add governed Event Management clients

agent/lib-members-track-clients v0.7.16
Vernon Keenan 2026-07-23 23:07:12 -07:00 committed by GitHub
parent e771f8ac65
commit 36a1e8b9f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 2196 additions and 2730 deletions

View File

@ -83,7 +83,7 @@ type ClientService interface {
// GetAttendees gets a list attendees. // GetAttendees gets a list attendees.
// //
// Return a list of Attendee records from the datastore. // List or get attendees associated with events managed by the configured Keenan Vision tenant. Requires members:attendee:read and compound machine plus native-user authentication. Owners and Managers can read tenant-bounded attendees; Contributors can read only their own attendance..
// //
// This method does not support injected context. // This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled. // However, timeout and opentracing contexts are honored whenever enabled.
@ -102,7 +102,7 @@ func (a *Client) GetAttendees(params *GetAttendeesParams, authInfo runtime.Clien
// GetAttendeesContext gets a list attendees. // GetAttendeesContext gets a list attendees.
// //
// Return a list of Attendee records from the datastore. // List or get attendees associated with events managed by the configured Keenan Vision tenant. Requires members:attendee:read and compound machine plus native-user authentication. Owners and Managers can read tenant-bounded attendees; Contributors can read only their own attendance..
// //
// Do not use the deprecated [GetAttendeesParams.Context] with this method: it would be ignored. // Do not use the deprecated [GetAttendeesParams.Context] with this method: it would be ignored.
func (a *Client) GetAttendeesContext(ctx context.Context, params *GetAttendeesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAttendeesOK, error) { func (a *Client) GetAttendeesContext(ctx context.Context, params *GetAttendeesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAttendeesOK, error) {
@ -150,7 +150,7 @@ func (a *Client) GetAttendeesContext(ctx context.Context, params *GetAttendeesPa
// PostAttendees creates new attendees. // PostAttendees creates new attendees.
// //
// Create Attendees. // Create one attendee for an event managed by the configured Keenan Vision tenant. Requires members:attendee:create and Keenan Vision Owner or Manager access. ID and timestamps are server-owned; event, user, and optional ticket relationships are validated..
// //
// This method does not support injected context. // This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled. // However, timeout and opentracing contexts are honored whenever enabled.
@ -169,7 +169,7 @@ func (a *Client) PostAttendees(params *PostAttendeesParams, authInfo runtime.Cli
// PostAttendeesContext creates new attendees. // PostAttendeesContext creates new attendees.
// //
// Create Attendees. // Create one attendee for an event managed by the configured Keenan Vision tenant. Requires members:attendee:create and Keenan Vision Owner or Manager access. ID and timestamps are server-owned; event, user, and optional ticket relationships are validated..
// //
// Do not use the deprecated [PostAttendeesParams.Context] with this method: it would be ignored. // Do not use the deprecated [PostAttendeesParams.Context] with this method: it would be ignored.
func (a *Client) PostAttendeesContext(ctx context.Context, params *PostAttendeesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostAttendeesOK, error) { func (a *Client) PostAttendeesContext(ctx context.Context, params *PostAttendeesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostAttendeesOK, error) {
@ -217,7 +217,7 @@ func (a *Client) PostAttendeesContext(ctx context.Context, params *PostAttendees
// PutAttendees updates attendee. // PutAttendees updates attendee.
// //
// Update Attendee. // CAS-update one attendee check-in status. Requires members:attendee:update and Keenan Vision Owner or Manager access. EventID, TicketID, and UserID are immutable; delete is unavailable..
// //
// This method does not support injected context. // This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled. // However, timeout and opentracing contexts are honored whenever enabled.
@ -236,7 +236,7 @@ func (a *Client) PutAttendees(params *PutAttendeesParams, authInfo runtime.Clien
// PutAttendeesContext updates attendee. // PutAttendeesContext updates attendee.
// //
// Update Attendee. // CAS-update one attendee check-in status. Requires members:attendee:update and Keenan Vision Owner or Manager access. EventID, TicketID, and UserID are immutable; delete is unavailable..
// //
// Do not use the deprecated [PutAttendeesParams.Context] with this method: it would be ignored. // Do not use the deprecated [PutAttendeesParams.Context] with this method: it would be ignored.
func (a *Client) PutAttendeesContext(ctx context.Context, params *PutAttendeesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutAttendeesOK, error) { func (a *Client) PutAttendeesContext(ctx context.Context, params *PutAttendeesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutAttendeesOK, error) {

View File

@ -49,6 +49,12 @@ func (o *PutAttendeesReader) ReadResponse(response runtime.ClientResponse, consu
return nil, err return nil, err
} }
return nil, result return nil, result
case 409:
result := NewPutAttendeesConflict()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422: case 422:
result := NewPutAttendeesUnprocessableEntity() result := NewPutAttendeesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil { if err := result.readResponse(response, consumer, o.formats); err != nil {
@ -347,6 +353,74 @@ func (o *PutAttendeesNotFound) readResponse(response runtime.ClientResponse, con
return nil return nil
} }
// NewPutAttendeesConflict creates a PutAttendeesConflict with default headers values
func NewPutAttendeesConflict() *PutAttendeesConflict {
return &PutAttendeesConflict{}
}
// PutAttendeesConflict describes a response with status code 409, with default header values.
//
// The supplied LastModifiedDate is stale; reload the record before retrying.
type PutAttendeesConflict struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put attendees conflict response has a 2xx status code
func (o *PutAttendeesConflict) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put attendees conflict response has a 3xx status code
func (o *PutAttendeesConflict) IsRedirect() bool {
return false
}
// IsClientError returns true when this put attendees conflict response has a 4xx status code
func (o *PutAttendeesConflict) IsClientError() bool {
return true
}
// IsServerError returns true when this put attendees conflict response has a 5xx status code
func (o *PutAttendeesConflict) IsServerError() bool {
return false
}
// IsCode returns true when this put attendees conflict response a status code equal to that given
func (o *PutAttendeesConflict) IsCode(code int) bool {
return code == 409
}
// Code gets the status code for the put attendees conflict response
func (o *PutAttendeesConflict) Code() int {
return 409
}
func (o *PutAttendeesConflict) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesConflict %s", 409, payload)
}
func (o *PutAttendeesConflict) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /attendees][%d] putAttendeesConflict %s", 409, payload)
}
func (o *PutAttendeesConflict) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutAttendeesConflict) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutAttendeesUnprocessableEntity creates a PutAttendeesUnprocessableEntity with default headers values // NewPutAttendeesUnprocessableEntity creates a PutAttendeesUnprocessableEntity with default headers values
func NewPutAttendeesUnprocessableEntity() *PutAttendeesUnprocessableEntity { func NewPutAttendeesUnprocessableEntity() *PutAttendeesUnprocessableEntity {
return &PutAttendeesUnprocessableEntity{} return &PutAttendeesUnprocessableEntity{}

View File

@ -0,0 +1,362 @@
package members_client_test
import (
"context"
"os"
"path/filepath"
"reflect"
"regexp"
"strings"
"testing"
"code.tnxs.net/vernonkeenan/lib/api/members/members_client"
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/attendees"
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/events"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
openapiruntime "github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
var eventManagementTestAuth = openapiruntime.ClientAuthInfoWriterFunc(
func(openapiruntime.ClientRequest, strfmt.Registry) error { return nil },
)
type eventManagementCaptureTransport struct {
operation *openapiruntime.ClientOperation
}
func (transport *eventManagementCaptureTransport) Submit(
operation *openapiruntime.ClientOperation,
) (any, error) {
return transport.SubmitContext(context.Background(), operation)
}
func (transport *eventManagementCaptureTransport) SubmitContext(
_ context.Context,
operation *openapiruntime.ClientOperation,
) (any, error) {
transport.operation = operation
switch operation.ID {
case "getEventCategories":
return events.NewGetEventCategoriesOK(), nil
case "postEventCategories":
return events.NewPostEventCategoriesOK(), nil
case "putEventCategories":
return events.NewPutEventCategoriesOK(), nil
case "getEvents":
return events.NewGetEventsOK(), nil
case "postEvents":
return events.NewPostEventsOK(), nil
case "putEvents":
return events.NewPutEventsOK(), nil
case "getAttendees":
return attendees.NewGetAttendeesOK(), nil
case "postAttendees":
return attendees.NewPostAttendeesOK(), nil
case "putAttendees":
return attendees.NewPutAttendeesOK(), nil
default:
panic("unexpected generated Event Management operation: " + operation.ID)
}
}
func TestGeneratedEventManagementOperationContract(t *testing.T) {
type operationCall func(openapiruntime.ContextualTransport) error
tests := []struct {
name string
wantID string
wantMethod string
wantPath string
call operationCall
}{
{
name: "list or get event categories", wantID: "getEventCategories",
wantMethod: "GET", wantPath: "/eventcategories",
call: func(transport openapiruntime.ContextualTransport) error {
_, err := events.New(transport, strfmt.Default).GetEventCategories(
events.NewGetEventCategoriesParams(), eventManagementTestAuth,
)
return err
},
},
{
name: "create event category", wantID: "postEventCategories",
wantMethod: "POST", wantPath: "/eventcategories",
call: func(transport openapiruntime.ContextualTransport) error {
_, err := events.New(transport, strfmt.Default).PostEventCategories(
events.NewPostEventCategoriesParams(), eventManagementTestAuth,
)
return err
},
},
{
name: "update event category", wantID: "putEventCategories",
wantMethod: "PUT", wantPath: "/eventcategories",
call: func(transport openapiruntime.ContextualTransport) error {
_, err := events.New(transport, strfmt.Default).PutEventCategories(
events.NewPutEventCategoriesParams(), eventManagementTestAuth,
)
return err
},
},
{
name: "list or get events", wantID: "getEvents",
wantMethod: "GET", wantPath: "/events",
call: func(transport openapiruntime.ContextualTransport) error {
_, err := events.New(transport, strfmt.Default).GetEvents(
events.NewGetEventsParams(), eventManagementTestAuth,
)
return err
},
},
{
name: "create event", wantID: "postEvents",
wantMethod: "POST", wantPath: "/events",
call: func(transport openapiruntime.ContextualTransport) error {
_, err := events.New(transport, strfmt.Default).PostEvents(
events.NewPostEventsParams(), eventManagementTestAuth,
)
return err
},
},
{
name: "update event", wantID: "putEvents",
wantMethod: "PUT", wantPath: "/events",
call: func(transport openapiruntime.ContextualTransport) error {
_, err := events.New(transport, strfmt.Default).PutEvents(
events.NewPutEventsParams(), eventManagementTestAuth,
)
return err
},
},
{
name: "list or get attendees", wantID: "getAttendees",
wantMethod: "GET", wantPath: "/attendees",
call: func(transport openapiruntime.ContextualTransport) error {
_, err := attendees.New(transport, strfmt.Default).GetAttendees(
attendees.NewGetAttendeesParams(), eventManagementTestAuth,
)
return err
},
},
{
name: "create attendee", wantID: "postAttendees",
wantMethod: "POST", wantPath: "/attendees",
call: func(transport openapiruntime.ContextualTransport) error {
_, err := attendees.New(transport, strfmt.Default).PostAttendees(
attendees.NewPostAttendeesParams(), eventManagementTestAuth,
)
return err
},
},
{
name: "update attendee", wantID: "putAttendees",
wantMethod: "PUT", wantPath: "/attendees",
call: func(transport openapiruntime.ContextualTransport) error {
_, err := attendees.New(transport, strfmt.Default).PutAttendees(
attendees.NewPutAttendeesParams(), eventManagementTestAuth,
)
return err
},
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
transport := &eventManagementCaptureTransport{}
if err := test.call(transport); err != nil {
t.Fatalf("generated client operation failed: %v", err)
}
if transport.operation == nil {
t.Fatal("generated client did not submit an operation")
}
if transport.operation.ID != test.wantID {
t.Errorf("operation ID = %q, want %q", transport.operation.ID, test.wantID)
}
if transport.operation.Method != test.wantMethod {
t.Errorf("method = %q, want %q", transport.operation.Method, test.wantMethod)
}
if transport.operation.PathPattern != test.wantPath {
t.Errorf("path = %q, want %q", transport.operation.PathPattern, test.wantPath)
}
if transport.operation.AuthInfo == nil {
t.Error("generated operation discarded its auth-info writer")
}
})
}
}
func TestEventManagementSpecRequiresCompoundAuthenticationAndExactPaths(t *testing.T) {
specText := readMembersLearningSpec(t)
operations := map[string]map[string]string{
"/eventcategories": {
"get": "getEventCategories", "post": "postEventCategories",
"put": "putEventCategories",
},
"/events": {
"get": "getEvents", "post": "postEvents", "put": "putEvents",
},
"/attendees": {
"get": "getAttendees", "post": "postAttendees", "put": "putAttendees",
},
}
const compoundSecurity = " security:\n - ApiKeyAuth: []\n kvSessionCookie: []"
for path, methods := range operations {
pathBlock := learningSpecPathBlock(t, specText, path)
for _, forbidden := range []string{" delete:", " patch:"} {
if strings.Contains(pathBlock, forbidden) {
t.Errorf("%s exposes unsupported %s", path, strings.TrimSpace(forbidden))
}
}
for method, operationID := range methods {
operation := learningSpecOperationBlock(t, specText, path, method)
if !strings.Contains(operation, " operationId: "+operationID+"\n") {
t.Errorf("%s %s lost operationId %q", strings.ToUpper(method), path, operationID)
}
if strings.Count(operation, compoundSecurity) != 1 {
t.Errorf("%s %s does not preserve compound authentication", strings.ToUpper(method), path)
}
}
}
}
func TestEventManagementGetByIDAndCASContracts(t *testing.T) {
recordID := "record-id"
filters := []struct {
name string
got *string
}{
{name: "EventCategory", got: events.NewGetEventCategoriesParams().WithID(&recordID).ID},
{name: "Event", got: events.NewGetEventsParams().WithID(&recordID).ID},
{name: "Attendee", got: attendees.NewGetAttendeesParams().WithID(&recordID).ID},
}
for _, filter := range filters {
if filter.got == nil || *filter.got != recordID {
t.Errorf("%s get-by-ID filter is absent", filter.name)
}
}
conflicts := []interface{ IsCode(int) bool }{
events.NewPutEventCategoriesConflict(),
events.NewPutEventsConflict(),
attendees.NewPutAttendeesConflict(),
}
for _, conflict := range conflicts {
if !conflict.IsCode(409) {
t.Errorf("%T does not preserve optimistic concurrency conflict", conflict)
}
}
}
func TestEventManagementModelsAreBoundedToProviderContract(t *testing.T) {
assertExactModelFields(t, members_models.EventCategory{}, map[string]string{
"CreatedByID": "*string", "CreatedDate": "*string", "Description": "*string",
"ID": "string", "ImageAltText": "*string", "ImageURL": "*string",
"LastModifiedByID": "*string", "LastModifiedDate": "*string",
"Logo": "*string", "Name": "*string", "Slug": "*string",
})
assertExactModelFields(t, members_models.Event{}, map[string]string{
"AccountID": "*string", "Capacity": "*int64", "CreatedByID": "*string",
"CreatedDate": "*string", "Description": "*string", "EndDate": "*string",
"EventCategory": "*members_models.EventCategory", "EventCategoryID": "*string",
"ID": "string", "ImageAltText": "*string", "ImageURL": "*string",
"LastModifiedByID": "*string", "LastModifiedDate": "*string",
"Location": "*string", "Logo": "*string", "Online": "*bool",
"OrganizerUserID": "*string", "RegURL": "*string", "Slug": "*string",
"StartDate": "*string", "Title": "*string",
})
assertExactModelFields(t, members_models.Attendee{}, map[string]string{
"CheckinStatus": "int64", "CreatedDate": "*string", "EventID": "*string",
"ID": "string", "LastModifiedDate": "*string", "TicketID": "*string",
"UserID": "*string",
})
}
func TestEventManagementOmitsTicketAndDeleteClients(t *testing.T) {
contracts := []struct {
name string
typ reflect.Type
}{
{name: "Events", typ: reflect.TypeOf((*events.ClientService)(nil)).Elem()},
{name: "Attendees", typ: reflect.TypeOf((*attendees.ClientService)(nil)).Elem()},
}
for _, contract := range contracts {
for index := 0; index < contract.typ.NumMethod(); index++ {
method := contract.typ.Method(index).Name
if strings.HasPrefix(method, "Delete") || strings.Contains(method, "Ticket") {
t.Errorf("%s client exposes unsafe alias %s", contract.name, method)
}
}
}
root := reflect.TypeOf(members_client.Members{})
if _, exists := root.FieldByName("Tickets"); exists {
t.Fatal("root Members client exposes provider-pending Tickets")
}
repoRoot := learningRepoRoot(t)
removed := []string{
filepath.Join(repoRoot, "api", "members", "members_client", "tickets"),
filepath.Join(repoRoot, "api", "members", "members_models", "ticket.go"),
filepath.Join(repoRoot, "api", "members", "members_models", "ticket_request.go"),
filepath.Join(repoRoot, "api", "members", "members_models", "ticket_response.go"),
}
for _, path := range removed {
if _, err := os.Stat(path); !os.IsNotExist(err) {
t.Errorf("provider-pending Ticket artifact still exists: %s", path)
}
}
ticketPath := learningSpecPathBlock(t, readMembersLearningSpec(t), "/tickets")
if !strings.Contains(ticketPath, "x-provider-state: pending") {
t.Fatal("authoritative spec lost the Ticket provider-pending marker")
}
if strings.Contains(ticketPath, " delete:") {
t.Fatal("authoritative pending Ticket path exposes delete")
}
}
func TestGeneratedEventManagementSurfaceHasNoExternalBypassOrSecrets(t *testing.T) {
repoRoot := learningRepoRoot(t)
targets := []string{
filepath.Join(repoRoot, "api", "members", "members_client", "events"),
filepath.Join(repoRoot, "api", "members", "members_client", "attendees"),
filepath.Join(repoRoot, "api", "members", "members_models", "event.go"),
filepath.Join(repoRoot, "api", "members", "members_models", "event_category.go"),
filepath.Join(repoRoot, "api", "members", "members_models", "attendee.go"),
}
credentialLiteral := regexp.MustCompile(
`(?i)(api[_-]?key|password|secret)\s*[:=]\s*["'][^"']+["']`,
)
for _, target := range targets {
err := filepath.WalkDir(target, func(path string, entry os.DirEntry, walkErr error) error {
if walkErr != nil {
return walkErr
}
if entry.IsDir() || !strings.HasSuffix(path, ".go") ||
strings.HasSuffix(path, "_test.go") {
return nil
}
content, err := os.ReadFile(path)
if err != nil {
return err
}
lower := strings.ToLower(string(content))
for _, forbidden := range []string{
"salesforce", "sf-gate", "go-force", "private key-----",
} {
if strings.Contains(lower, forbidden) {
t.Errorf("%s contains forbidden boundary %q", path, forbidden)
}
}
if credentialLiteral.Match(content) {
t.Errorf("%s contains a credential-shaped literal", path)
}
return nil
})
if err != nil {
t.Fatalf("scan generated Event Management target %s: %v", target, err)
}
}
}

View File

@ -84,11 +84,25 @@ type ClientService interface {
// PostEventsContext create a new event. // PostEventsContext create a new event.
PostEventsContext(ctx context.Context, params *PostEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventsOK, error) PostEventsContext(ctx context.Context, params *PostEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventsOK, error)
// PutEventCategories update an event category.
PutEventCategories(params *PutEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutEventCategoriesOK, error)
// PutEventCategoriesContext update an event category.
PutEventCategoriesContext(ctx context.Context, params *PutEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutEventCategoriesOK, error)
// PutEvents update an event.
PutEvents(params *PutEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutEventsOK, error)
// PutEventsContext update an event.
PutEventsContext(ctx context.Context, params *PutEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutEventsOK, error)
SetTransport(transport runtime.ContextualTransport) SetTransport(transport runtime.ContextualTransport)
} }
// GetEventCategories gets a list of eventcategories. // GetEventCategories gets a list of eventcategories.
// //
// List or get estate-global event categories for an active member of the configured Keenan Vision tenant. Requires members:event-category:read and compound machine plus native-user authentication..
//
// This method does not support injected context. // This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled. // However, timeout and opentracing contexts are honored whenever enabled.
// //
@ -106,6 +120,8 @@ func (a *Client) GetEventCategories(params *GetEventCategoriesParams, authInfo r
// GetEventCategoriesContext gets a list of eventcategories. // GetEventCategoriesContext gets a list of eventcategories.
// //
// List or get estate-global event categories for an active member of the configured Keenan Vision tenant. Requires members:event-category:read and compound machine plus native-user authentication..
//
// Do not use the deprecated [GetEventCategoriesParams.Context] with this method: it would be ignored. // Do not use the deprecated [GetEventCategoriesParams.Context] with this method: it would be ignored.
func (a *Client) GetEventCategoriesContext(ctx context.Context, params *GetEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventCategoriesOK, error) { func (a *Client) GetEventCategoriesContext(ctx context.Context, params *GetEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventCategoriesOK, error) {
// NOTE: parameters are not validated before sending // NOTE: parameters are not validated before sending
@ -152,6 +168,8 @@ func (a *Client) GetEventCategoriesContext(ctx context.Context, params *GetEvent
// GetEvents gets a list of events. // GetEvents gets a list of events.
// //
// List or get events owned by active members of the configured Keenan Vision tenant. Requires members:event:read and compound machine plus native-user authentication. Owners and Managers can read tenant-owned events; Contributors can read only events they organize..
//
// This method does not support injected context. // This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled. // However, timeout and opentracing contexts are honored whenever enabled.
// //
@ -169,6 +187,8 @@ func (a *Client) GetEvents(params *GetEventsParams, authInfo runtime.ClientAuthI
// GetEventsContext gets a list of events. // GetEventsContext gets a list of events.
// //
// List or get events owned by active members of the configured Keenan Vision tenant. Requires members:event:read and compound machine plus native-user authentication. Owners and Managers can read tenant-owned events; Contributors can read only events they organize..
//
// Do not use the deprecated [GetEventsParams.Context] with this method: it would be ignored. // Do not use the deprecated [GetEventsParams.Context] with this method: it would be ignored.
func (a *Client) GetEventsContext(ctx context.Context, params *GetEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventsOK, error) { func (a *Client) GetEventsContext(ctx context.Context, params *GetEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventsOK, error) {
// NOTE: parameters are not validated before sending // NOTE: parameters are not validated before sending
@ -215,6 +235,8 @@ func (a *Client) GetEventsContext(ctx context.Context, params *GetEventsParams,
// PostEventCategories creates a new event category. // PostEventCategories creates a new event category.
// //
// Create one estate-global event category. Requires members:event-category:create and Keenan Vision Owner or Manager access. ID and audit fields are server-owned..
//
// This method does not support injected context. // This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled. // However, timeout and opentracing contexts are honored whenever enabled.
// //
@ -232,6 +254,8 @@ func (a *Client) PostEventCategories(params *PostEventCategoriesParams, authInfo
// PostEventCategoriesContext creates a new event category. // PostEventCategoriesContext creates a new event category.
// //
// Create one estate-global event category. Requires members:event-category:create and Keenan Vision Owner or Manager access. ID and audit fields are server-owned..
//
// Do not use the deprecated [PostEventCategoriesParams.Context] with this method: it would be ignored. // Do not use the deprecated [PostEventCategoriesParams.Context] with this method: it would be ignored.
func (a *Client) PostEventCategoriesContext(ctx context.Context, params *PostEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventCategoriesOK, error) { func (a *Client) PostEventCategoriesContext(ctx context.Context, params *PostEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventCategoriesOK, error) {
// NOTE: parameters are not validated before sending // NOTE: parameters are not validated before sending
@ -278,6 +302,8 @@ func (a *Client) PostEventCategoriesContext(ctx context.Context, params *PostEve
// PostEvents creates a new event. // PostEvents creates a new event.
// //
// Create one event owned by an active organizer in the configured Keenan Vision tenant. Requires members:event:create and Keenan Vision Owner or Manager access. AccountID remains read-only until a governed CRM relationship is available..
//
// This method does not support injected context. // This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled. // However, timeout and opentracing contexts are honored whenever enabled.
// //
@ -295,6 +321,8 @@ func (a *Client) PostEvents(params *PostEventsParams, authInfo runtime.ClientAut
// PostEventsContext creates a new event. // PostEventsContext creates a new event.
// //
// Create one event owned by an active organizer in the configured Keenan Vision tenant. Requires members:event:create and Keenan Vision Owner or Manager access. AccountID remains read-only until a governed CRM relationship is available..
//
// Do not use the deprecated [PostEventsParams.Context] with this method: it would be ignored. // Do not use the deprecated [PostEventsParams.Context] with this method: it would be ignored.
func (a *Client) PostEventsContext(ctx context.Context, params *PostEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventsOK, error) { func (a *Client) PostEventsContext(ctx context.Context, params *PostEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventsOK, error) {
// NOTE: parameters are not validated before sending // NOTE: parameters are not validated before sending
@ -339,6 +367,140 @@ func (a *Client) PostEventsContext(ctx context.Context, params *PostEventsParams
panic(msg) panic(msg)
} }
// PutEventCategories updates an event category.
//
// CAS-update one estate-global event category. Requires members:event-category:update and Keenan Vision Owner or Manager access. ID and audit fields are server-owned; delete is unavailable..
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.PutEventCategoriesContext] instead.
func (a *Client) PutEventCategories(params *PutEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutEventCategoriesOK, error) {
var ctx context.Context
if params.inner.ctx != nil {
ctx = params.inner.ctx
} else {
ctx = context.Background()
}
return a.PutEventCategoriesContext(ctx, params, authInfo, opts...)
}
// PutEventCategoriesContext updates an event category.
//
// CAS-update one estate-global event category. Requires members:event-category:update and Keenan Vision Owner or Manager access. ID and audit fields are server-owned; delete is unavailable..
//
// Do not use the deprecated [PutEventCategoriesParams.Context] with this method: it would be ignored.
func (a *Client) PutEventCategoriesContext(ctx context.Context, params *PutEventCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutEventCategoriesOK, error) {
// NOTE: parameters are not validated before sending
if params == nil {
params = NewPutEventCategoriesParams()
}
op := &runtime.ClientOperation{
ID: "putEventCategories",
Method: "PUT",
PathPattern: "/eventcategories",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &PutEventCategoriesReader{formats: a.formats},
AuthInfo: authInfo,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.SubmitContext(ctx, op)
if err != nil {
return nil, err
}
// only one success response has to be checked
success, ok := result.(*PutEventCategoriesOK)
if ok {
return success, nil
}
// unexpected success response.
// no default response is defined.
//
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for putEventCategories: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
// PutEvents updates an event.
//
// CAS-update one event already owned by the configured Keenan Vision tenant. Requires members:event:update and Keenan Vision Owner or Manager access. AccountID and audit fields are server-owned or read-only; delete is unavailable..
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.PutEventsContext] instead.
func (a *Client) PutEvents(params *PutEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutEventsOK, error) {
var ctx context.Context
if params.inner.ctx != nil {
ctx = params.inner.ctx
} else {
ctx = context.Background()
}
return a.PutEventsContext(ctx, params, authInfo, opts...)
}
// PutEventsContext updates an event.
//
// CAS-update one event already owned by the configured Keenan Vision tenant. Requires members:event:update and Keenan Vision Owner or Manager access. AccountID and audit fields are server-owned or read-only; delete is unavailable..
//
// Do not use the deprecated [PutEventsParams.Context] with this method: it would be ignored.
func (a *Client) PutEventsContext(ctx context.Context, params *PutEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutEventsOK, error) {
// NOTE: parameters are not validated before sending
if params == nil {
params = NewPutEventsParams()
}
op := &runtime.ClientOperation{
ID: "putEvents",
Method: "PUT",
PathPattern: "/events",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &PutEventsReader{formats: a.formats},
AuthInfo: authInfo,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.SubmitContext(ctx, op)
if err != nil {
return nil, err
}
// only one success response has to be checked
success, ok := result.(*PutEventsOK)
if ok {
return success, nil
}
// unexpected success response.
// no default response is defined.
//
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for putEvents: 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.ContextualTransport) { func (a *Client) SetTransport(transport runtime.ContextualTransport) {
a.transport = transport a.transport = transport

View File

@ -0,0 +1,159 @@
// 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
import (
"context"
"net/http"
"time"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
// NewPutEventCategoriesParams creates a new PutEventCategoriesParams 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 NewPutEventCategoriesParams() *PutEventCategoriesParams {
return NewPutEventCategoriesParamsWithTimeout(cr.DefaultTimeout)
}
// NewPutEventCategoriesParamsWithTimeout creates a new PutEventCategoriesParams object
// with the ability to set a timeout on a request.
func NewPutEventCategoriesParamsWithTimeout(timeout time.Duration) *PutEventCategoriesParams {
return &PutEventCategoriesParams{
inner: innerParams{
timeout: timeout,
},
}
}
// NewPutEventCategoriesParamsWithContext creates a new PutEventCategoriesParams object
// with the ability to set a context for a request.
//
// Deprecated: use the operation call with context to pass the context instead of [PutEventCategoriesParams].
func NewPutEventCategoriesParamsWithContext(ctx context.Context) *PutEventCategoriesParams {
return &PutEventCategoriesParams{
inner: innerParams{
ctx: ctx,
},
}
}
// NewPutEventCategoriesParamsWithHTTPClient creates a new PutEventCategoriesParams object
// with the ability to set a custom HTTPClient for a request.
func NewPutEventCategoriesParamsWithHTTPClient(client *http.Client) *PutEventCategoriesParams {
return &PutEventCategoriesParams{
HTTPClient: client,
}
}
/*
PutEventCategoriesParams contains all the parameters to send to the API endpoint
for the put event categories operation.
Typically these are written to a http.Request.
*/
type PutEventCategoriesParams struct {
// EventCategoryRequest.
//
// An array of new Event records
EventCategoryRequest *members_models.EventCategoryRequest
HTTPClient *http.Client
inner innerParams
}
// WithDefaults hydrates default values in the put event categories params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PutEventCategoriesParams) WithDefaults() *PutEventCategoriesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the put event categories params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PutEventCategoriesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the put event categories params.
func (o *PutEventCategoriesParams) WithTimeout(timeout time.Duration) *PutEventCategoriesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the put event categories params.
func (o *PutEventCategoriesParams) SetTimeout(timeout time.Duration) {
o.inner.timeout = timeout
}
// WithContext adds the context to the put event categories params.
//
// Deprecated: use the operation call with context to pass the context instead of [PutEventCategoriesParams].
func (o *PutEventCategoriesParams) WithContext(ctx context.Context) *PutEventCategoriesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the put event categories params.
//
// Deprecated: use the operation call with context to pass the context instead of [PutEventCategoriesParams].
func (o *PutEventCategoriesParams) SetContext(ctx context.Context) {
o.inner.ctx = ctx
}
// WithHTTPClient adds the HTTPClient to the put event categories params.
func (o *PutEventCategoriesParams) WithHTTPClient(client *http.Client) *PutEventCategoriesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the put event categories params.
func (o *PutEventCategoriesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithEventCategoryRequest adds the eventCategoryRequest to the put event categories params.
func (o *PutEventCategoriesParams) WithEventCategoryRequest(eventCategoryRequest *members_models.EventCategoryRequest) *PutEventCategoriesParams {
o.SetEventCategoryRequest(eventCategoryRequest)
return o
}
// SetEventCategoryRequest adds the eventCategoryRequest to the put event categories params.
func (o *PutEventCategoriesParams) SetEventCategoryRequest(eventCategoryRequest *members_models.EventCategoryRequest) {
o.EventCategoryRequest = eventCategoryRequest
}
// WriteToRequest writes these params to a [runtime.ClientRequest].
func (o *PutEventCategoriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.inner.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,558 @@
// 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
import (
"encoding/json"
stderrors "errors"
"fmt"
"io"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// PutEventCategoriesReader is a Reader for the PutEventCategories structure.
type PutEventCategoriesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PutEventCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) {
switch response.Code() {
case 200:
result := NewPutEventCategoriesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPutEventCategoriesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPutEventCategoriesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPutEventCategoriesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 409:
result := NewPutEventCategoriesConflict()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPutEventCategoriesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPutEventCategoriesInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[PUT /eventcategories] putEventCategories", response, response.Code())
}
}
// NewPutEventCategoriesOK creates a PutEventCategoriesOK with default headers values
func NewPutEventCategoriesOK() *PutEventCategoriesOK {
return &PutEventCategoriesOK{}
}
// PutEventCategoriesOK describes a response with status code 200, with default header values.
//
// Event Response Object
type PutEventCategoriesOK struct {
Payload *members_models.EventCategoryResponse
}
// IsSuccess returns true when this put event categories o k response has a 2xx status code
func (o *PutEventCategoriesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this put event categories o k response has a 3xx status code
func (o *PutEventCategoriesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this put event categories o k response has a 4xx status code
func (o *PutEventCategoriesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this put event categories o k response has a 5xx status code
func (o *PutEventCategoriesOK) IsServerError() bool {
return false
}
// IsCode returns true when this put event categories o k response a status code equal to that given
func (o *PutEventCategoriesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the put event categories o k response
func (o *PutEventCategoriesOK) Code() int {
return 200
}
func (o *PutEventCategoriesOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesOK %s", 200, payload)
}
func (o *PutEventCategoriesOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesOK %s", 200, payload)
}
func (o *PutEventCategoriesOK) GetPayload() *members_models.EventCategoryResponse {
return o.Payload
}
func (o *PutEventCategoriesOK) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutEventCategoriesUnauthorized creates a PutEventCategoriesUnauthorized with default headers values
func NewPutEventCategoriesUnauthorized() *PutEventCategoriesUnauthorized {
return &PutEventCategoriesUnauthorized{}
}
// PutEventCategoriesUnauthorized describes a response with status code 401, with default header values.
//
// Access Unauthorized, invalid API-KEY was used
type PutEventCategoriesUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put event categories unauthorized response has a 2xx status code
func (o *PutEventCategoriesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put event categories unauthorized response has a 3xx status code
func (o *PutEventCategoriesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this put event categories unauthorized response has a 4xx status code
func (o *PutEventCategoriesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this put event categories unauthorized response has a 5xx status code
func (o *PutEventCategoriesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this put event categories unauthorized response a status code equal to that given
func (o *PutEventCategoriesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the put event categories unauthorized response
func (o *PutEventCategoriesUnauthorized) Code() int {
return 401
}
func (o *PutEventCategoriesUnauthorized) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesUnauthorized %s", 401, payload)
}
func (o *PutEventCategoriesUnauthorized) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesUnauthorized %s", 401, payload)
}
func (o *PutEventCategoriesUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutEventCategoriesUnauthorized) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutEventCategoriesForbidden creates a PutEventCategoriesForbidden with default headers values
func NewPutEventCategoriesForbidden() *PutEventCategoriesForbidden {
return &PutEventCategoriesForbidden{}
}
// PutEventCategoriesForbidden describes a response with status code 403, with default header values.
//
// Access forbidden, account lacks access
type PutEventCategoriesForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this put event categories forbidden response has a 2xx status code
func (o *PutEventCategoriesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put event categories forbidden response has a 3xx status code
func (o *PutEventCategoriesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this put event categories forbidden response has a 4xx status code
func (o *PutEventCategoriesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this put event categories forbidden response has a 5xx status code
func (o *PutEventCategoriesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this put event categories forbidden response a status code equal to that given
func (o *PutEventCategoriesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the put event categories forbidden response
func (o *PutEventCategoriesForbidden) Code() int {
return 403
}
func (o *PutEventCategoriesForbidden) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesForbidden %s", 403, payload)
}
func (o *PutEventCategoriesForbidden) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesForbidden %s", 403, payload)
}
func (o *PutEventCategoriesForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutEventCategoriesForbidden) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutEventCategoriesNotFound creates a PutEventCategoriesNotFound with default headers values
func NewPutEventCategoriesNotFound() *PutEventCategoriesNotFound {
return &PutEventCategoriesNotFound{}
}
// PutEventCategoriesNotFound describes a response with status code 404, with default header values.
//
// Resource was not found
type PutEventCategoriesNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put event categories not found response has a 2xx status code
func (o *PutEventCategoriesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put event categories not found response has a 3xx status code
func (o *PutEventCategoriesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this put event categories not found response has a 4xx status code
func (o *PutEventCategoriesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this put event categories not found response has a 5xx status code
func (o *PutEventCategoriesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this put event categories not found response a status code equal to that given
func (o *PutEventCategoriesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the put event categories not found response
func (o *PutEventCategoriesNotFound) Code() int {
return 404
}
func (o *PutEventCategoriesNotFound) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesNotFound %s", 404, payload)
}
func (o *PutEventCategoriesNotFound) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesNotFound %s", 404, payload)
}
func (o *PutEventCategoriesNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutEventCategoriesNotFound) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutEventCategoriesConflict creates a PutEventCategoriesConflict with default headers values
func NewPutEventCategoriesConflict() *PutEventCategoriesConflict {
return &PutEventCategoriesConflict{}
}
// PutEventCategoriesConflict describes a response with status code 409, with default header values.
//
// The supplied LastModifiedDate is stale; reload the record before retrying.
type PutEventCategoriesConflict struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put event categories conflict response has a 2xx status code
func (o *PutEventCategoriesConflict) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put event categories conflict response has a 3xx status code
func (o *PutEventCategoriesConflict) IsRedirect() bool {
return false
}
// IsClientError returns true when this put event categories conflict response has a 4xx status code
func (o *PutEventCategoriesConflict) IsClientError() bool {
return true
}
// IsServerError returns true when this put event categories conflict response has a 5xx status code
func (o *PutEventCategoriesConflict) IsServerError() bool {
return false
}
// IsCode returns true when this put event categories conflict response a status code equal to that given
func (o *PutEventCategoriesConflict) IsCode(code int) bool {
return code == 409
}
// Code gets the status code for the put event categories conflict response
func (o *PutEventCategoriesConflict) Code() int {
return 409
}
func (o *PutEventCategoriesConflict) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesConflict %s", 409, payload)
}
func (o *PutEventCategoriesConflict) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesConflict %s", 409, payload)
}
func (o *PutEventCategoriesConflict) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutEventCategoriesConflict) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutEventCategoriesUnprocessableEntity creates a PutEventCategoriesUnprocessableEntity with default headers values
func NewPutEventCategoriesUnprocessableEntity() *PutEventCategoriesUnprocessableEntity {
return &PutEventCategoriesUnprocessableEntity{}
}
// PutEventCategoriesUnprocessableEntity describes a response with status code 422, with default header values.
//
// Unprocessable Entity, likely a bad parameter
type PutEventCategoriesUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put event categories unprocessable entity response has a 2xx status code
func (o *PutEventCategoriesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put event categories unprocessable entity response has a 3xx status code
func (o *PutEventCategoriesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this put event categories unprocessable entity response has a 4xx status code
func (o *PutEventCategoriesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this put event categories unprocessable entity response has a 5xx status code
func (o *PutEventCategoriesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this put event categories unprocessable entity response a status code equal to that given
func (o *PutEventCategoriesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the put event categories unprocessable entity response
func (o *PutEventCategoriesUnprocessableEntity) Code() int {
return 422
}
func (o *PutEventCategoriesUnprocessableEntity) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesUnprocessableEntity %s", 422, payload)
}
func (o *PutEventCategoriesUnprocessableEntity) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesUnprocessableEntity %s", 422, payload)
}
func (o *PutEventCategoriesUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutEventCategoriesUnprocessableEntity) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutEventCategoriesInternalServerError creates a PutEventCategoriesInternalServerError with default headers values
func NewPutEventCategoriesInternalServerError() *PutEventCategoriesInternalServerError {
return &PutEventCategoriesInternalServerError{}
}
// PutEventCategoriesInternalServerError describes a response with status code 500, with default header values.
//
// Server Internal Error
type PutEventCategoriesInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put event categories internal server error response has a 2xx status code
func (o *PutEventCategoriesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put event categories internal server error response has a 3xx status code
func (o *PutEventCategoriesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this put event categories internal server error response has a 4xx status code
func (o *PutEventCategoriesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this put event categories internal server error response has a 5xx status code
func (o *PutEventCategoriesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this put event categories internal server error response a status code equal to that given
func (o *PutEventCategoriesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the put event categories internal server error response
func (o *PutEventCategoriesInternalServerError) Code() int {
return 500
}
func (o *PutEventCategoriesInternalServerError) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesInternalServerError %s", 500, payload)
}
func (o *PutEventCategoriesInternalServerError) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /eventcategories][%d] putEventCategoriesInternalServerError %s", 500, payload)
}
func (o *PutEventCategoriesInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutEventCategoriesInternalServerError) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}

View File

@ -0,0 +1,159 @@
// 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
import (
"context"
"net/http"
"time"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
// NewPutEventsParams creates a new PutEventsParams 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 NewPutEventsParams() *PutEventsParams {
return NewPutEventsParamsWithTimeout(cr.DefaultTimeout)
}
// NewPutEventsParamsWithTimeout creates a new PutEventsParams object
// with the ability to set a timeout on a request.
func NewPutEventsParamsWithTimeout(timeout time.Duration) *PutEventsParams {
return &PutEventsParams{
inner: innerParams{
timeout: timeout,
},
}
}
// NewPutEventsParamsWithContext creates a new PutEventsParams object
// with the ability to set a context for a request.
//
// Deprecated: use the operation call with context to pass the context instead of [PutEventsParams].
func NewPutEventsParamsWithContext(ctx context.Context) *PutEventsParams {
return &PutEventsParams{
inner: innerParams{
ctx: ctx,
},
}
}
// NewPutEventsParamsWithHTTPClient creates a new PutEventsParams object
// with the ability to set a custom HTTPClient for a request.
func NewPutEventsParamsWithHTTPClient(client *http.Client) *PutEventsParams {
return &PutEventsParams{
HTTPClient: client,
}
}
/*
PutEventsParams contains all the parameters to send to the API endpoint
for the put events operation.
Typically these are written to a http.Request.
*/
type PutEventsParams struct {
// EventRequest.
//
// An array of new Event records
EventRequest *members_models.EventRequest
HTTPClient *http.Client
inner innerParams
}
// WithDefaults hydrates default values in the put events params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PutEventsParams) WithDefaults() *PutEventsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the put events params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PutEventsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the put events params.
func (o *PutEventsParams) WithTimeout(timeout time.Duration) *PutEventsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the put events params.
func (o *PutEventsParams) SetTimeout(timeout time.Duration) {
o.inner.timeout = timeout
}
// WithContext adds the context to the put events params.
//
// Deprecated: use the operation call with context to pass the context instead of [PutEventsParams].
func (o *PutEventsParams) WithContext(ctx context.Context) *PutEventsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the put events params.
//
// Deprecated: use the operation call with context to pass the context instead of [PutEventsParams].
func (o *PutEventsParams) SetContext(ctx context.Context) {
o.inner.ctx = ctx
}
// WithHTTPClient adds the HTTPClient to the put events params.
func (o *PutEventsParams) WithHTTPClient(client *http.Client) *PutEventsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the put events params.
func (o *PutEventsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithEventRequest adds the eventRequest to the put events params.
func (o *PutEventsParams) WithEventRequest(eventRequest *members_models.EventRequest) *PutEventsParams {
o.SetEventRequest(eventRequest)
return o
}
// SetEventRequest adds the eventRequest to the put events params.
func (o *PutEventsParams) SetEventRequest(eventRequest *members_models.EventRequest) {
o.EventRequest = eventRequest
}
// WriteToRequest writes these params to a [runtime.ClientRequest].
func (o *PutEventsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.inner.timeout); err != nil {
return err
}
var res []error
if o.EventRequest != nil {
if err := r.SetBodyParam(o.EventRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -0,0 +1,558 @@
// 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
import (
"encoding/json"
stderrors "errors"
"fmt"
"io"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// PutEventsReader is a Reader for the PutEvents structure.
type PutEventsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PutEventsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) {
switch response.Code() {
case 200:
result := NewPutEventsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPutEventsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPutEventsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPutEventsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 409:
result := NewPutEventsConflict()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPutEventsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPutEventsInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[PUT /events] putEvents", response, response.Code())
}
}
// NewPutEventsOK creates a PutEventsOK with default headers values
func NewPutEventsOK() *PutEventsOK {
return &PutEventsOK{}
}
// PutEventsOK describes a response with status code 200, with default header values.
//
// Event Response Object
type PutEventsOK struct {
Payload *members_models.EventResponse
}
// IsSuccess returns true when this put events o k response has a 2xx status code
func (o *PutEventsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this put events o k response has a 3xx status code
func (o *PutEventsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this put events o k response has a 4xx status code
func (o *PutEventsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this put events o k response has a 5xx status code
func (o *PutEventsOK) IsServerError() bool {
return false
}
// IsCode returns true when this put events o k response a status code equal to that given
func (o *PutEventsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the put events o k response
func (o *PutEventsOK) Code() int {
return 200
}
func (o *PutEventsOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsOK %s", 200, payload)
}
func (o *PutEventsOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsOK %s", 200, payload)
}
func (o *PutEventsOK) GetPayload() *members_models.EventResponse {
return o.Payload
}
func (o *PutEventsOK) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutEventsUnauthorized creates a PutEventsUnauthorized with default headers values
func NewPutEventsUnauthorized() *PutEventsUnauthorized {
return &PutEventsUnauthorized{}
}
// PutEventsUnauthorized describes a response with status code 401, with default header values.
//
// Access Unauthorized, invalid API-KEY was used
type PutEventsUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put events unauthorized response has a 2xx status code
func (o *PutEventsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put events unauthorized response has a 3xx status code
func (o *PutEventsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this put events unauthorized response has a 4xx status code
func (o *PutEventsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this put events unauthorized response has a 5xx status code
func (o *PutEventsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this put events unauthorized response a status code equal to that given
func (o *PutEventsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the put events unauthorized response
func (o *PutEventsUnauthorized) Code() int {
return 401
}
func (o *PutEventsUnauthorized) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsUnauthorized %s", 401, payload)
}
func (o *PutEventsUnauthorized) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsUnauthorized %s", 401, payload)
}
func (o *PutEventsUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutEventsUnauthorized) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutEventsForbidden creates a PutEventsForbidden with default headers values
func NewPutEventsForbidden() *PutEventsForbidden {
return &PutEventsForbidden{}
}
// PutEventsForbidden describes a response with status code 403, with default header values.
//
// Access forbidden, account lacks access
type PutEventsForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this put events forbidden response has a 2xx status code
func (o *PutEventsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put events forbidden response has a 3xx status code
func (o *PutEventsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this put events forbidden response has a 4xx status code
func (o *PutEventsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this put events forbidden response has a 5xx status code
func (o *PutEventsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this put events forbidden response a status code equal to that given
func (o *PutEventsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the put events forbidden response
func (o *PutEventsForbidden) Code() int {
return 403
}
func (o *PutEventsForbidden) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsForbidden %s", 403, payload)
}
func (o *PutEventsForbidden) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsForbidden %s", 403, payload)
}
func (o *PutEventsForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutEventsForbidden) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutEventsNotFound creates a PutEventsNotFound with default headers values
func NewPutEventsNotFound() *PutEventsNotFound {
return &PutEventsNotFound{}
}
// PutEventsNotFound describes a response with status code 404, with default header values.
//
// Resource was not found
type PutEventsNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put events not found response has a 2xx status code
func (o *PutEventsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put events not found response has a 3xx status code
func (o *PutEventsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this put events not found response has a 4xx status code
func (o *PutEventsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this put events not found response has a 5xx status code
func (o *PutEventsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this put events not found response a status code equal to that given
func (o *PutEventsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the put events not found response
func (o *PutEventsNotFound) Code() int {
return 404
}
func (o *PutEventsNotFound) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsNotFound %s", 404, payload)
}
func (o *PutEventsNotFound) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsNotFound %s", 404, payload)
}
func (o *PutEventsNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutEventsNotFound) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutEventsConflict creates a PutEventsConflict with default headers values
func NewPutEventsConflict() *PutEventsConflict {
return &PutEventsConflict{}
}
// PutEventsConflict describes a response with status code 409, with default header values.
//
// The supplied LastModifiedDate is stale; reload the record before retrying.
type PutEventsConflict struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put events conflict response has a 2xx status code
func (o *PutEventsConflict) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put events conflict response has a 3xx status code
func (o *PutEventsConflict) IsRedirect() bool {
return false
}
// IsClientError returns true when this put events conflict response has a 4xx status code
func (o *PutEventsConflict) IsClientError() bool {
return true
}
// IsServerError returns true when this put events conflict response has a 5xx status code
func (o *PutEventsConflict) IsServerError() bool {
return false
}
// IsCode returns true when this put events conflict response a status code equal to that given
func (o *PutEventsConflict) IsCode(code int) bool {
return code == 409
}
// Code gets the status code for the put events conflict response
func (o *PutEventsConflict) Code() int {
return 409
}
func (o *PutEventsConflict) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsConflict %s", 409, payload)
}
func (o *PutEventsConflict) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsConflict %s", 409, payload)
}
func (o *PutEventsConflict) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutEventsConflict) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutEventsUnprocessableEntity creates a PutEventsUnprocessableEntity with default headers values
func NewPutEventsUnprocessableEntity() *PutEventsUnprocessableEntity {
return &PutEventsUnprocessableEntity{}
}
// PutEventsUnprocessableEntity describes a response with status code 422, with default header values.
//
// Unprocessable Entity, likely a bad parameter
type PutEventsUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put events unprocessable entity response has a 2xx status code
func (o *PutEventsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put events unprocessable entity response has a 3xx status code
func (o *PutEventsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this put events unprocessable entity response has a 4xx status code
func (o *PutEventsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this put events unprocessable entity response has a 5xx status code
func (o *PutEventsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this put events unprocessable entity response a status code equal to that given
func (o *PutEventsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the put events unprocessable entity response
func (o *PutEventsUnprocessableEntity) Code() int {
return 422
}
func (o *PutEventsUnprocessableEntity) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsUnprocessableEntity %s", 422, payload)
}
func (o *PutEventsUnprocessableEntity) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsUnprocessableEntity %s", 422, payload)
}
func (o *PutEventsUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutEventsUnprocessableEntity) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutEventsInternalServerError creates a PutEventsInternalServerError with default headers values
func NewPutEventsInternalServerError() *PutEventsInternalServerError {
return &PutEventsInternalServerError{}
}
// PutEventsInternalServerError describes a response with status code 500, with default header values.
//
// Server Internal Error
type PutEventsInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put events internal server error response has a 2xx status code
func (o *PutEventsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put events internal server error response has a 3xx status code
func (o *PutEventsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this put events internal server error response has a 4xx status code
func (o *PutEventsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this put events internal server error response has a 5xx status code
func (o *PutEventsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this put events internal server error response a status code equal to that given
func (o *PutEventsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the put events internal server error response
func (o *PutEventsInternalServerError) Code() int {
return 500
}
func (o *PutEventsInternalServerError) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsInternalServerError %s", 500, payload)
}
func (o *PutEventsInternalServerError) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /events][%d] putEventsInternalServerError %s", 500, payload)
}
func (o *PutEventsInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutEventsInternalServerError) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}

View File

@ -23,7 +23,7 @@ import (
"github.com/go-openapi/strfmt" "github.com/go-openapi/strfmt"
) )
const membersLearningSpecSHA256 = "546c86af359490c898a2ab4fad2e0e96e9051fd854a5fcd07a56093a4121a891" const membersProviderSpecSHA256 = "9a62406c00a8591e5a29abee4ceab9108461438b0a1729d8ce5a846fdb614af5"
var learningTestAuth = openapiruntime.ClientAuthInfoWriterFunc(func(openapiruntime.ClientRequest, strfmt.Registry) error { var learningTestAuth = openapiruntime.ClientAuthInfoWriterFunc(func(openapiruntime.ClientRequest, strfmt.Registry) error {
return nil return nil
@ -509,15 +509,15 @@ func TestLearningSurfaceOmitsUnsafeCertificateAndDeleteOperations(t *testing.T)
} }
} }
func TestMembersSpecIsPinnedToLearningProviderSource(t *testing.T) { func TestMembersSpecIsPinnedToProviderSource(t *testing.T) {
repoRoot := learningRepoRoot(t) repoRoot := learningRepoRoot(t)
mainSpec, err := os.ReadFile(filepath.Join(repoRoot, "swagger", "members-vernonkeenan.yaml")) mainSpec, err := os.ReadFile(filepath.Join(repoRoot, "swagger", "members-vernonkeenan.yaml"))
if err != nil { if err != nil {
t.Fatalf("read Members spec: %v", err) t.Fatalf("read Members spec: %v", err)
} }
sum := sha256.Sum256(mainSpec) sum := sha256.Sum256(mainSpec)
if got := hex.EncodeToString(sum[:]); got != membersLearningSpecSHA256 { if got := hex.EncodeToString(sum[:]); got != membersProviderSpecSHA256 {
t.Fatalf("Members spec drifted from Learning merge fb25d140: SHA-256 = %s, want %s", got, membersLearningSpecSHA256) t.Fatalf("Members spec drifted from provider commit c0f7905: SHA-256 = %s, want %s", got, membersProviderSpecSHA256)
} }
externalSpec, err := os.ReadFile(filepath.Join(repoRoot, "swagger", "external", "members-vernonkeenan.yaml")) externalSpec, err := os.ReadFile(filepath.Join(repoRoot, "swagger", "external", "members-vernonkeenan.yaml"))

View File

@ -34,7 +34,6 @@ import (
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/sessions" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/sessions"
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/templates" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/templates"
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/tenants" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/tenants"
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/tickets"
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/transactions" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/transactions"
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/users" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/users"
"github.com/go-openapi/runtime" "github.com/go-openapi/runtime"
@ -110,7 +109,6 @@ func New(transport runtime.ContextualTransport, formats strfmt.Registry) *Member
cli.Sessions = sessions.New(transport, formats) cli.Sessions = sessions.New(transport, formats)
cli.Templates = templates.New(transport, formats) cli.Templates = templates.New(transport, formats)
cli.Tenants = tenants.New(transport, formats) cli.Tenants = tenants.New(transport, formats)
cli.Tickets = tickets.New(transport, formats)
cli.Transactions = transactions.New(transport, formats) cli.Transactions = transactions.New(transport, formats)
cli.Users = users.New(transport, formats) cli.Users = users.New(transport, formats)
@ -222,8 +220,6 @@ type Members struct {
Tenants tenants.ClientService Tenants tenants.ClientService
Tickets tickets.ClientService
Transactions transactions.ClientService Transactions transactions.ClientService
Users users.ClientService Users users.ClientService
@ -259,7 +255,6 @@ func (c *Members) SetTransport(transport runtime.ContextualTransport) {
c.Sessions.SetTransport(transport) c.Sessions.SetTransport(transport)
c.Templates.SetTransport(transport) c.Templates.SetTransport(transport)
c.Tenants.SetTransport(transport) c.Tenants.SetTransport(transport)
c.Tickets.SetTransport(transport)
c.Transactions.SetTransport(transport) c.Transactions.SetTransport(transport)
c.Users.SetTransport(transport) c.Users.SetTransport(transport)
} }

View File

@ -1,241 +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 tickets
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/conv"
)
// NewGetTicketsParams creates a new GetTicketsParams 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 NewGetTicketsParams() *GetTicketsParams {
return NewGetTicketsParamsWithTimeout(cr.DefaultTimeout)
}
// NewGetTicketsParamsWithTimeout creates a new GetTicketsParams object
// with the ability to set a timeout on a request.
func NewGetTicketsParamsWithTimeout(timeout time.Duration) *GetTicketsParams {
return &GetTicketsParams{
inner: innerParams{
timeout: timeout,
},
}
}
// NewGetTicketsParamsWithContext creates a new GetTicketsParams object
// with the ability to set a context for a request.
//
// Deprecated: use the operation call with context to pass the context instead of [GetTicketsParams].
func NewGetTicketsParamsWithContext(ctx context.Context) *GetTicketsParams {
return &GetTicketsParams{
inner: innerParams{
ctx: ctx,
},
}
}
// NewGetTicketsParamsWithHTTPClient creates a new GetTicketsParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetTicketsParamsWithHTTPClient(client *http.Client) *GetTicketsParams {
return &GetTicketsParams{
HTTPClient: client,
}
}
/*
GetTicketsParams contains all the parameters to send to the API endpoint
for the get tickets operation.
Typically these are written to a http.Request.
*/
type GetTicketsParams 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
HTTPClient *http.Client
inner innerParams
}
// WithDefaults hydrates default values in the get tickets params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTicketsParams) WithDefaults() *GetTicketsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get tickets params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTicketsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get tickets params.
func (o *GetTicketsParams) WithTimeout(timeout time.Duration) *GetTicketsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get tickets params.
func (o *GetTicketsParams) SetTimeout(timeout time.Duration) {
o.inner.timeout = timeout
}
// WithContext adds the context to the get tickets params.
//
// Deprecated: use the operation call with context to pass the context instead of [GetTicketsParams].
func (o *GetTicketsParams) WithContext(ctx context.Context) *GetTicketsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get tickets params.
//
// Deprecated: use the operation call with context to pass the context instead of [GetTicketsParams].
func (o *GetTicketsParams) SetContext(ctx context.Context) {
o.inner.ctx = ctx
}
// WithHTTPClient adds the HTTPClient to the get tickets params.
func (o *GetTicketsParams) WithHTTPClient(client *http.Client) *GetTicketsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get tickets params.
func (o *GetTicketsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithID adds the id to the get tickets params.
func (o *GetTicketsParams) WithID(id *string) *GetTicketsParams {
o.SetID(id)
return o
}
// SetID adds the id to the get tickets params.
func (o *GetTicketsParams) SetID(id *string) {
o.ID = id
}
// WithLimit adds the limit to the get tickets params.
func (o *GetTicketsParams) WithLimit(limit *int64) *GetTicketsParams {
o.SetLimit(limit)
return o
}
// SetLimit adds the limit to the get tickets params.
func (o *GetTicketsParams) SetLimit(limit *int64) {
o.Limit = limit
}
// WithOffset adds the offset to the get tickets params.
func (o *GetTicketsParams) WithOffset(offset *int64) *GetTicketsParams {
o.SetOffset(offset)
return o
}
// SetOffset adds the offset to the get tickets params.
func (o *GetTicketsParams) SetOffset(offset *int64) {
o.Offset = offset
}
// WriteToRequest writes these params to a [runtime.ClientRequest].
func (o *GetTicketsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.inner.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 := conv.FormatInteger(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 := conv.FormatInteger(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

@ -1,484 +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 tickets
import (
"encoding/json"
stderrors "errors"
"fmt"
"io"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// GetTicketsReader is a Reader for the GetTickets structure.
type GetTicketsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetTicketsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) {
switch response.Code() {
case 200:
result := NewGetTicketsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetTicketsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetTicketsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetTicketsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetTicketsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetTicketsInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[GET /tickets] getTickets", response, response.Code())
}
}
// NewGetTicketsOK creates a GetTicketsOK with default headers values
func NewGetTicketsOK() *GetTicketsOK {
return &GetTicketsOK{}
}
// GetTicketsOK describes a response with status code 200, with default header values.
//
// Ticket Response Object
type GetTicketsOK struct {
Payload *members_models.TicketResponse
}
// IsSuccess returns true when this get tickets o k response has a 2xx status code
func (o *GetTicketsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get tickets o k response has a 3xx status code
func (o *GetTicketsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tickets o k response has a 4xx status code
func (o *GetTicketsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get tickets o k response has a 5xx status code
func (o *GetTicketsOK) IsServerError() bool {
return false
}
// IsCode returns true when this get tickets o k response a status code equal to that given
func (o *GetTicketsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get tickets o k response
func (o *GetTicketsOK) Code() int {
return 200
}
func (o *GetTicketsOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /tickets][%d] getTicketsOK %s", 200, payload)
}
func (o *GetTicketsOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /tickets][%d] getTicketsOK %s", 200, payload)
}
func (o *GetTicketsOK) GetPayload() *members_models.TicketResponse {
return o.Payload
}
func (o *GetTicketsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.TicketResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewGetTicketsUnauthorized creates a GetTicketsUnauthorized with default headers values
func NewGetTicketsUnauthorized() *GetTicketsUnauthorized {
return &GetTicketsUnauthorized{}
}
// GetTicketsUnauthorized describes a response with status code 401, with default header values.
//
// Access Unauthorized, invalid API-KEY was used
type GetTicketsUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get tickets unauthorized response has a 2xx status code
func (o *GetTicketsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tickets unauthorized response has a 3xx status code
func (o *GetTicketsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tickets unauthorized response has a 4xx status code
func (o *GetTicketsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get tickets unauthorized response has a 5xx status code
func (o *GetTicketsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get tickets unauthorized response a status code equal to that given
func (o *GetTicketsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get tickets unauthorized response
func (o *GetTicketsUnauthorized) Code() int {
return 401
}
func (o *GetTicketsUnauthorized) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /tickets][%d] getTicketsUnauthorized %s", 401, payload)
}
func (o *GetTicketsUnauthorized) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /tickets][%d] getTicketsUnauthorized %s", 401, payload)
}
func (o *GetTicketsUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetTicketsUnauthorized) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewGetTicketsForbidden creates a GetTicketsForbidden with default headers values
func NewGetTicketsForbidden() *GetTicketsForbidden {
return &GetTicketsForbidden{}
}
// GetTicketsForbidden describes a response with status code 403, with default header values.
//
// Access forbidden, account lacks access
type GetTicketsForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this get tickets forbidden response has a 2xx status code
func (o *GetTicketsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tickets forbidden response has a 3xx status code
func (o *GetTicketsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tickets forbidden response has a 4xx status code
func (o *GetTicketsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get tickets forbidden response has a 5xx status code
func (o *GetTicketsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get tickets forbidden response a status code equal to that given
func (o *GetTicketsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get tickets forbidden response
func (o *GetTicketsForbidden) Code() int {
return 403
}
func (o *GetTicketsForbidden) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /tickets][%d] getTicketsForbidden %s", 403, payload)
}
func (o *GetTicketsForbidden) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /tickets][%d] getTicketsForbidden %s", 403, payload)
}
func (o *GetTicketsForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetTicketsForbidden) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewGetTicketsNotFound creates a GetTicketsNotFound with default headers values
func NewGetTicketsNotFound() *GetTicketsNotFound {
return &GetTicketsNotFound{}
}
// GetTicketsNotFound describes a response with status code 404, with default header values.
//
// Resource was not found
type GetTicketsNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get tickets not found response has a 2xx status code
func (o *GetTicketsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tickets not found response has a 3xx status code
func (o *GetTicketsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tickets not found response has a 4xx status code
func (o *GetTicketsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get tickets not found response has a 5xx status code
func (o *GetTicketsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get tickets not found response a status code equal to that given
func (o *GetTicketsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get tickets not found response
func (o *GetTicketsNotFound) Code() int {
return 404
}
func (o *GetTicketsNotFound) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /tickets][%d] getTicketsNotFound %s", 404, payload)
}
func (o *GetTicketsNotFound) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /tickets][%d] getTicketsNotFound %s", 404, payload)
}
func (o *GetTicketsNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetTicketsNotFound) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewGetTicketsUnprocessableEntity creates a GetTicketsUnprocessableEntity with default headers values
func NewGetTicketsUnprocessableEntity() *GetTicketsUnprocessableEntity {
return &GetTicketsUnprocessableEntity{}
}
// GetTicketsUnprocessableEntity describes a response with status code 422, with default header values.
//
// Unprocessable Entity, likely a bad parameter
type GetTicketsUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get tickets unprocessable entity response has a 2xx status code
func (o *GetTicketsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tickets unprocessable entity response has a 3xx status code
func (o *GetTicketsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tickets unprocessable entity response has a 4xx status code
func (o *GetTicketsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get tickets unprocessable entity response has a 5xx status code
func (o *GetTicketsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get tickets unprocessable entity response a status code equal to that given
func (o *GetTicketsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get tickets unprocessable entity response
func (o *GetTicketsUnprocessableEntity) Code() int {
return 422
}
func (o *GetTicketsUnprocessableEntity) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /tickets][%d] getTicketsUnprocessableEntity %s", 422, payload)
}
func (o *GetTicketsUnprocessableEntity) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /tickets][%d] getTicketsUnprocessableEntity %s", 422, payload)
}
func (o *GetTicketsUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetTicketsUnprocessableEntity) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewGetTicketsInternalServerError creates a GetTicketsInternalServerError with default headers values
func NewGetTicketsInternalServerError() *GetTicketsInternalServerError {
return &GetTicketsInternalServerError{}
}
// GetTicketsInternalServerError describes a response with status code 500, with default header values.
//
// Server Internal Error
type GetTicketsInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this get tickets internal server error response has a 2xx status code
func (o *GetTicketsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get tickets internal server error response has a 3xx status code
func (o *GetTicketsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get tickets internal server error response has a 4xx status code
func (o *GetTicketsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get tickets internal server error response has a 5xx status code
func (o *GetTicketsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get tickets internal server error response a status code equal to that given
func (o *GetTicketsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get tickets internal server error response
func (o *GetTicketsInternalServerError) Code() int {
return 500
}
func (o *GetTicketsInternalServerError) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /tickets][%d] getTicketsInternalServerError %s", 500, payload)
}
func (o *GetTicketsInternalServerError) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[GET /tickets][%d] getTicketsInternalServerError %s", 500, payload)
}
func (o *GetTicketsInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *GetTicketsInternalServerError) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}

View File

@ -1,159 +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 tickets
import (
"context"
"net/http"
"time"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
// NewPostTicketsParams creates a new PostTicketsParams 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 NewPostTicketsParams() *PostTicketsParams {
return NewPostTicketsParamsWithTimeout(cr.DefaultTimeout)
}
// NewPostTicketsParamsWithTimeout creates a new PostTicketsParams object
// with the ability to set a timeout on a request.
func NewPostTicketsParamsWithTimeout(timeout time.Duration) *PostTicketsParams {
return &PostTicketsParams{
inner: innerParams{
timeout: timeout,
},
}
}
// NewPostTicketsParamsWithContext creates a new PostTicketsParams object
// with the ability to set a context for a request.
//
// Deprecated: use the operation call with context to pass the context instead of [PostTicketsParams].
func NewPostTicketsParamsWithContext(ctx context.Context) *PostTicketsParams {
return &PostTicketsParams{
inner: innerParams{
ctx: ctx,
},
}
}
// NewPostTicketsParamsWithHTTPClient creates a new PostTicketsParams object
// with the ability to set a custom HTTPClient for a request.
func NewPostTicketsParamsWithHTTPClient(client *http.Client) *PostTicketsParams {
return &PostTicketsParams{
HTTPClient: client,
}
}
/*
PostTicketsParams contains all the parameters to send to the API endpoint
for the post tickets operation.
Typically these are written to a http.Request.
*/
type PostTicketsParams struct {
// TicketRequest.
//
// An array of new Ticket records
TicketRequest *members_models.TicketRequest
HTTPClient *http.Client
inner innerParams
}
// WithDefaults hydrates default values in the post tickets params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostTicketsParams) WithDefaults() *PostTicketsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the post tickets params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostTicketsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the post tickets params.
func (o *PostTicketsParams) WithTimeout(timeout time.Duration) *PostTicketsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the post tickets params.
func (o *PostTicketsParams) SetTimeout(timeout time.Duration) {
o.inner.timeout = timeout
}
// WithContext adds the context to the post tickets params.
//
// Deprecated: use the operation call with context to pass the context instead of [PostTicketsParams].
func (o *PostTicketsParams) WithContext(ctx context.Context) *PostTicketsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the post tickets params.
//
// Deprecated: use the operation call with context to pass the context instead of [PostTicketsParams].
func (o *PostTicketsParams) SetContext(ctx context.Context) {
o.inner.ctx = ctx
}
// WithHTTPClient adds the HTTPClient to the post tickets params.
func (o *PostTicketsParams) WithHTTPClient(client *http.Client) *PostTicketsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the post tickets params.
func (o *PostTicketsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithTicketRequest adds the ticketRequest to the post tickets params.
func (o *PostTicketsParams) WithTicketRequest(ticketRequest *members_models.TicketRequest) *PostTicketsParams {
o.SetTicketRequest(ticketRequest)
return o
}
// SetTicketRequest adds the ticketRequest to the post tickets params.
func (o *PostTicketsParams) SetTicketRequest(ticketRequest *members_models.TicketRequest) {
o.TicketRequest = ticketRequest
}
// WriteToRequest writes these params to a [runtime.ClientRequest].
func (o *PostTicketsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.inner.timeout); err != nil {
return err
}
var res []error
if o.TicketRequest != nil {
if err := r.SetBodyParam(o.TicketRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -1,484 +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 tickets
import (
"encoding/json"
stderrors "errors"
"fmt"
"io"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// PostTicketsReader is a Reader for the PostTickets structure.
type PostTicketsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostTicketsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) {
switch response.Code() {
case 200:
result := NewPostTicketsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostTicketsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostTicketsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostTicketsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostTicketsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostTicketsInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[POST /tickets] postTickets", response, response.Code())
}
}
// NewPostTicketsOK creates a PostTicketsOK with default headers values
func NewPostTicketsOK() *PostTicketsOK {
return &PostTicketsOK{}
}
// PostTicketsOK describes a response with status code 200, with default header values.
//
// Ticket Response Object
type PostTicketsOK struct {
Payload *members_models.TicketResponse
}
// IsSuccess returns true when this post tickets o k response has a 2xx status code
func (o *PostTicketsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post tickets o k response has a 3xx status code
func (o *PostTicketsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this post tickets o k response has a 4xx status code
func (o *PostTicketsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this post tickets o k response has a 5xx status code
func (o *PostTicketsOK) IsServerError() bool {
return false
}
// IsCode returns true when this post tickets o k response a status code equal to that given
func (o *PostTicketsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the post tickets o k response
func (o *PostTicketsOK) Code() int {
return 200
}
func (o *PostTicketsOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /tickets][%d] postTicketsOK %s", 200, payload)
}
func (o *PostTicketsOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /tickets][%d] postTicketsOK %s", 200, payload)
}
func (o *PostTicketsOK) GetPayload() *members_models.TicketResponse {
return o.Payload
}
func (o *PostTicketsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.TicketResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPostTicketsUnauthorized creates a PostTicketsUnauthorized with default headers values
func NewPostTicketsUnauthorized() *PostTicketsUnauthorized {
return &PostTicketsUnauthorized{}
}
// PostTicketsUnauthorized describes a response with status code 401, with default header values.
//
// Access Unauthorized, invalid API-KEY was used
type PostTicketsUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post tickets unauthorized response has a 2xx status code
func (o *PostTicketsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post tickets unauthorized response has a 3xx status code
func (o *PostTicketsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post tickets unauthorized response has a 4xx status code
func (o *PostTicketsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post tickets unauthorized response has a 5xx status code
func (o *PostTicketsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post tickets unauthorized response a status code equal to that given
func (o *PostTicketsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post tickets unauthorized response
func (o *PostTicketsUnauthorized) Code() int {
return 401
}
func (o *PostTicketsUnauthorized) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /tickets][%d] postTicketsUnauthorized %s", 401, payload)
}
func (o *PostTicketsUnauthorized) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /tickets][%d] postTicketsUnauthorized %s", 401, payload)
}
func (o *PostTicketsUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostTicketsUnauthorized) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPostTicketsForbidden creates a PostTicketsForbidden with default headers values
func NewPostTicketsForbidden() *PostTicketsForbidden {
return &PostTicketsForbidden{}
}
// PostTicketsForbidden describes a response with status code 403, with default header values.
//
// Access forbidden, account lacks access
type PostTicketsForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this post tickets forbidden response has a 2xx status code
func (o *PostTicketsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post tickets forbidden response has a 3xx status code
func (o *PostTicketsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post tickets forbidden response has a 4xx status code
func (o *PostTicketsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post tickets forbidden response has a 5xx status code
func (o *PostTicketsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post tickets forbidden response a status code equal to that given
func (o *PostTicketsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post tickets forbidden response
func (o *PostTicketsForbidden) Code() int {
return 403
}
func (o *PostTicketsForbidden) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /tickets][%d] postTicketsForbidden %s", 403, payload)
}
func (o *PostTicketsForbidden) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /tickets][%d] postTicketsForbidden %s", 403, payload)
}
func (o *PostTicketsForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostTicketsForbidden) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPostTicketsNotFound creates a PostTicketsNotFound with default headers values
func NewPostTicketsNotFound() *PostTicketsNotFound {
return &PostTicketsNotFound{}
}
// PostTicketsNotFound describes a response with status code 404, with default header values.
//
// Resource was not found
type PostTicketsNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post tickets not found response has a 2xx status code
func (o *PostTicketsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post tickets not found response has a 3xx status code
func (o *PostTicketsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post tickets not found response has a 4xx status code
func (o *PostTicketsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post tickets not found response has a 5xx status code
func (o *PostTicketsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post tickets not found response a status code equal to that given
func (o *PostTicketsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post tickets not found response
func (o *PostTicketsNotFound) Code() int {
return 404
}
func (o *PostTicketsNotFound) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /tickets][%d] postTicketsNotFound %s", 404, payload)
}
func (o *PostTicketsNotFound) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /tickets][%d] postTicketsNotFound %s", 404, payload)
}
func (o *PostTicketsNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostTicketsNotFound) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPostTicketsUnprocessableEntity creates a PostTicketsUnprocessableEntity with default headers values
func NewPostTicketsUnprocessableEntity() *PostTicketsUnprocessableEntity {
return &PostTicketsUnprocessableEntity{}
}
// PostTicketsUnprocessableEntity describes a response with status code 422, with default header values.
//
// Unprocessable Entity, likely a bad parameter
type PostTicketsUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post tickets unprocessable entity response has a 2xx status code
func (o *PostTicketsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post tickets unprocessable entity response has a 3xx status code
func (o *PostTicketsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post tickets unprocessable entity response has a 4xx status code
func (o *PostTicketsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post tickets unprocessable entity response has a 5xx status code
func (o *PostTicketsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post tickets unprocessable entity response a status code equal to that given
func (o *PostTicketsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post tickets unprocessable entity response
func (o *PostTicketsUnprocessableEntity) Code() int {
return 422
}
func (o *PostTicketsUnprocessableEntity) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /tickets][%d] postTicketsUnprocessableEntity %s", 422, payload)
}
func (o *PostTicketsUnprocessableEntity) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /tickets][%d] postTicketsUnprocessableEntity %s", 422, payload)
}
func (o *PostTicketsUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostTicketsUnprocessableEntity) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPostTicketsInternalServerError creates a PostTicketsInternalServerError with default headers values
func NewPostTicketsInternalServerError() *PostTicketsInternalServerError {
return &PostTicketsInternalServerError{}
}
// PostTicketsInternalServerError describes a response with status code 500, with default header values.
//
// Server Internal Error
type PostTicketsInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post tickets internal server error response has a 2xx status code
func (o *PostTicketsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post tickets internal server error response has a 3xx status code
func (o *PostTicketsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post tickets internal server error response has a 4xx status code
func (o *PostTicketsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post tickets internal server error response has a 5xx status code
func (o *PostTicketsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post tickets internal server error response a status code equal to that given
func (o *PostTicketsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post tickets internal server error response
func (o *PostTicketsInternalServerError) Code() int {
return 500
}
func (o *PostTicketsInternalServerError) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /tickets][%d] postTicketsInternalServerError %s", 500, payload)
}
func (o *PostTicketsInternalServerError) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[POST /tickets][%d] postTicketsInternalServerError %s", 500, payload)
}
func (o *PostTicketsInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostTicketsInternalServerError) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}

View File

@ -1,159 +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 tickets
import (
"context"
"net/http"
"time"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
// NewPutTicketsParams creates a new PutTicketsParams 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 NewPutTicketsParams() *PutTicketsParams {
return NewPutTicketsParamsWithTimeout(cr.DefaultTimeout)
}
// NewPutTicketsParamsWithTimeout creates a new PutTicketsParams object
// with the ability to set a timeout on a request.
func NewPutTicketsParamsWithTimeout(timeout time.Duration) *PutTicketsParams {
return &PutTicketsParams{
inner: innerParams{
timeout: timeout,
},
}
}
// NewPutTicketsParamsWithContext creates a new PutTicketsParams object
// with the ability to set a context for a request.
//
// Deprecated: use the operation call with context to pass the context instead of [PutTicketsParams].
func NewPutTicketsParamsWithContext(ctx context.Context) *PutTicketsParams {
return &PutTicketsParams{
inner: innerParams{
ctx: ctx,
},
}
}
// NewPutTicketsParamsWithHTTPClient creates a new PutTicketsParams object
// with the ability to set a custom HTTPClient for a request.
func NewPutTicketsParamsWithHTTPClient(client *http.Client) *PutTicketsParams {
return &PutTicketsParams{
HTTPClient: client,
}
}
/*
PutTicketsParams contains all the parameters to send to the API endpoint
for the put tickets operation.
Typically these are written to a http.Request.
*/
type PutTicketsParams struct {
// TicketRequest.
//
// An array of new Ticket records
TicketRequest *members_models.TicketRequest
HTTPClient *http.Client
inner innerParams
}
// WithDefaults hydrates default values in the put tickets params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PutTicketsParams) WithDefaults() *PutTicketsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the put tickets params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PutTicketsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the put tickets params.
func (o *PutTicketsParams) WithTimeout(timeout time.Duration) *PutTicketsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the put tickets params.
func (o *PutTicketsParams) SetTimeout(timeout time.Duration) {
o.inner.timeout = timeout
}
// WithContext adds the context to the put tickets params.
//
// Deprecated: use the operation call with context to pass the context instead of [PutTicketsParams].
func (o *PutTicketsParams) WithContext(ctx context.Context) *PutTicketsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the put tickets params.
//
// Deprecated: use the operation call with context to pass the context instead of [PutTicketsParams].
func (o *PutTicketsParams) SetContext(ctx context.Context) {
o.inner.ctx = ctx
}
// WithHTTPClient adds the HTTPClient to the put tickets params.
func (o *PutTicketsParams) WithHTTPClient(client *http.Client) *PutTicketsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the put tickets params.
func (o *PutTicketsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithTicketRequest adds the ticketRequest to the put tickets params.
func (o *PutTicketsParams) WithTicketRequest(ticketRequest *members_models.TicketRequest) *PutTicketsParams {
o.SetTicketRequest(ticketRequest)
return o
}
// SetTicketRequest adds the ticketRequest to the put tickets params.
func (o *PutTicketsParams) SetTicketRequest(ticketRequest *members_models.TicketRequest) {
o.TicketRequest = ticketRequest
}
// WriteToRequest writes these params to a [runtime.ClientRequest].
func (o *PutTicketsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.inner.timeout); err != nil {
return err
}
var res []error
if o.TicketRequest != nil {
if err := r.SetBodyParam(o.TicketRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -1,484 +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 tickets
import (
"encoding/json"
stderrors "errors"
"fmt"
"io"
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// PutTicketsReader is a Reader for the PutTickets structure.
type PutTicketsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PutTicketsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) {
switch response.Code() {
case 200:
result := NewPutTicketsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPutTicketsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPutTicketsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPutTicketsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPutTicketsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPutTicketsInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[PUT /tickets] putTickets", response, response.Code())
}
}
// NewPutTicketsOK creates a PutTicketsOK with default headers values
func NewPutTicketsOK() *PutTicketsOK {
return &PutTicketsOK{}
}
// PutTicketsOK describes a response with status code 200, with default header values.
//
// Ticket Response Object
type PutTicketsOK struct {
Payload *members_models.TicketResponse
}
// IsSuccess returns true when this put tickets o k response has a 2xx status code
func (o *PutTicketsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this put tickets o k response has a 3xx status code
func (o *PutTicketsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this put tickets o k response has a 4xx status code
func (o *PutTicketsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this put tickets o k response has a 5xx status code
func (o *PutTicketsOK) IsServerError() bool {
return false
}
// IsCode returns true when this put tickets o k response a status code equal to that given
func (o *PutTicketsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the put tickets o k response
func (o *PutTicketsOK) Code() int {
return 200
}
func (o *PutTicketsOK) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /tickets][%d] putTicketsOK %s", 200, payload)
}
func (o *PutTicketsOK) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /tickets][%d] putTicketsOK %s", 200, payload)
}
func (o *PutTicketsOK) GetPayload() *members_models.TicketResponse {
return o.Payload
}
func (o *PutTicketsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.TicketResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutTicketsUnauthorized creates a PutTicketsUnauthorized with default headers values
func NewPutTicketsUnauthorized() *PutTicketsUnauthorized {
return &PutTicketsUnauthorized{}
}
// PutTicketsUnauthorized describes a response with status code 401, with default header values.
//
// Access Unauthorized, invalid API-KEY was used
type PutTicketsUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put tickets unauthorized response has a 2xx status code
func (o *PutTicketsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put tickets unauthorized response has a 3xx status code
func (o *PutTicketsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this put tickets unauthorized response has a 4xx status code
func (o *PutTicketsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this put tickets unauthorized response has a 5xx status code
func (o *PutTicketsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this put tickets unauthorized response a status code equal to that given
func (o *PutTicketsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the put tickets unauthorized response
func (o *PutTicketsUnauthorized) Code() int {
return 401
}
func (o *PutTicketsUnauthorized) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /tickets][%d] putTicketsUnauthorized %s", 401, payload)
}
func (o *PutTicketsUnauthorized) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /tickets][%d] putTicketsUnauthorized %s", 401, payload)
}
func (o *PutTicketsUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutTicketsUnauthorized) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutTicketsForbidden creates a PutTicketsForbidden with default headers values
func NewPutTicketsForbidden() *PutTicketsForbidden {
return &PutTicketsForbidden{}
}
// PutTicketsForbidden describes a response with status code 403, with default header values.
//
// Access forbidden, account lacks access
type PutTicketsForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this put tickets forbidden response has a 2xx status code
func (o *PutTicketsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put tickets forbidden response has a 3xx status code
func (o *PutTicketsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this put tickets forbidden response has a 4xx status code
func (o *PutTicketsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this put tickets forbidden response has a 5xx status code
func (o *PutTicketsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this put tickets forbidden response a status code equal to that given
func (o *PutTicketsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the put tickets forbidden response
func (o *PutTicketsForbidden) Code() int {
return 403
}
func (o *PutTicketsForbidden) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /tickets][%d] putTicketsForbidden %s", 403, payload)
}
func (o *PutTicketsForbidden) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /tickets][%d] putTicketsForbidden %s", 403, payload)
}
func (o *PutTicketsForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutTicketsForbidden) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutTicketsNotFound creates a PutTicketsNotFound with default headers values
func NewPutTicketsNotFound() *PutTicketsNotFound {
return &PutTicketsNotFound{}
}
// PutTicketsNotFound describes a response with status code 404, with default header values.
//
// Resource was not found
type PutTicketsNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put tickets not found response has a 2xx status code
func (o *PutTicketsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put tickets not found response has a 3xx status code
func (o *PutTicketsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this put tickets not found response has a 4xx status code
func (o *PutTicketsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this put tickets not found response has a 5xx status code
func (o *PutTicketsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this put tickets not found response a status code equal to that given
func (o *PutTicketsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the put tickets not found response
func (o *PutTicketsNotFound) Code() int {
return 404
}
func (o *PutTicketsNotFound) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /tickets][%d] putTicketsNotFound %s", 404, payload)
}
func (o *PutTicketsNotFound) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /tickets][%d] putTicketsNotFound %s", 404, payload)
}
func (o *PutTicketsNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutTicketsNotFound) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutTicketsUnprocessableEntity creates a PutTicketsUnprocessableEntity with default headers values
func NewPutTicketsUnprocessableEntity() *PutTicketsUnprocessableEntity {
return &PutTicketsUnprocessableEntity{}
}
// PutTicketsUnprocessableEntity describes a response with status code 422, with default header values.
//
// Unprocessable Entity, likely a bad parameter
type PutTicketsUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put tickets unprocessable entity response has a 2xx status code
func (o *PutTicketsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put tickets unprocessable entity response has a 3xx status code
func (o *PutTicketsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this put tickets unprocessable entity response has a 4xx status code
func (o *PutTicketsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this put tickets unprocessable entity response has a 5xx status code
func (o *PutTicketsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this put tickets unprocessable entity response a status code equal to that given
func (o *PutTicketsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the put tickets unprocessable entity response
func (o *PutTicketsUnprocessableEntity) Code() int {
return 422
}
func (o *PutTicketsUnprocessableEntity) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /tickets][%d] putTicketsUnprocessableEntity %s", 422, payload)
}
func (o *PutTicketsUnprocessableEntity) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /tickets][%d] putTicketsUnprocessableEntity %s", 422, payload)
}
func (o *PutTicketsUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutTicketsUnprocessableEntity) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}
// NewPutTicketsInternalServerError creates a PutTicketsInternalServerError with default headers values
func NewPutTicketsInternalServerError() *PutTicketsInternalServerError {
return &PutTicketsInternalServerError{}
}
// PutTicketsInternalServerError describes a response with status code 500, with default header values.
//
// Server Internal Error
type PutTicketsInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this put tickets internal server error response has a 2xx status code
func (o *PutTicketsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this put tickets internal server error response has a 3xx status code
func (o *PutTicketsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this put tickets internal server error response has a 4xx status code
func (o *PutTicketsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this put tickets internal server error response has a 5xx status code
func (o *PutTicketsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this put tickets internal server error response a status code equal to that given
func (o *PutTicketsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the put tickets internal server error response
func (o *PutTicketsInternalServerError) Code() int {
return 500
}
func (o *PutTicketsInternalServerError) Error() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /tickets][%d] putTicketsInternalServerError %s", 500, payload)
}
func (o *PutTicketsInternalServerError) String() string {
payload, _ := json.Marshal(o.Payload)
return fmt.Sprintf("[PUT /tickets][%d] putTicketsInternalServerError %s", 500, payload)
}
func (o *PutTicketsInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PutTicketsInternalServerError) 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 && !stderrors.Is(err, io.EOF) {
return err
}
return nil
}

View File

@ -1,296 +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 tickets
import (
"context"
"fmt"
"time"
"github.com/go-openapi/runtime"
httptransport "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
// New creates a new tickets API client.
func New(transport runtime.ContextualTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
// New creates a new tickets API client with basic auth credentials.
//
// It takes the following parameters:
// - host: http host (github.com).
// - basePath: any base path for the API client ("/v1", "/v3").
// - scheme: http scheme ("http", "https").
// - user: user for basic authentication header.
// - password: password for basic authentication header.
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService {
transport := httptransport.New(host, basePath, []string{scheme})
transport.DefaultAuthentication = httptransport.BasicAuth(user, password)
return &Client{transport: transport, formats: strfmt.Default}
}
// New creates a new tickets API client with a bearer token for authentication.
//
// It takes the following parameters:
// - host: http host (github.com).
// - basePath: any base path for the API client ("/v1", "/v3").
// - scheme: http scheme ("http", "https").
// - bearerToken: bearer token for Bearer authentication header.
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService {
transport := httptransport.New(host, basePath, []string{scheme})
transport.DefaultAuthentication = httptransport.BearerToken(bearerToken)
return &Client{transport: transport, formats: strfmt.Default}
}
// Client for tickets API.
type Client struct {
transport runtime.ContextualTransport
formats strfmt.Registry
}
// ClientOption may be used to customize the behavior of Client methods.
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods.
type ClientService interface {
// GetTickets get a list tickets.
GetTickets(params *GetTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTicketsOK, error)
// GetTicketsContext get a list tickets.
GetTicketsContext(ctx context.Context, params *GetTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTicketsOK, error)
// PostTickets create new tickets.
PostTickets(params *PostTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostTicketsOK, error)
// PostTicketsContext create new tickets.
PostTicketsContext(ctx context.Context, params *PostTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostTicketsOK, error)
// PutTickets update ticket.
PutTickets(params *PutTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutTicketsOK, error)
// PutTicketsContext update ticket.
PutTicketsContext(ctx context.Context, params *PutTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutTicketsOK, error)
SetTransport(transport runtime.ContextualTransport)
}
// GetTickets gets a list tickets.
//
// Return a list of Ticket records from the datastore.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.GetTicketsContext] instead.
func (a *Client) GetTickets(params *GetTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTicketsOK, error) {
var ctx context.Context
if params.inner.ctx != nil {
ctx = params.inner.ctx
} else {
ctx = context.Background()
}
return a.GetTicketsContext(ctx, params, authInfo, opts...)
}
// GetTicketsContext gets a list tickets.
//
// Return a list of Ticket records from the datastore.
//
// Do not use the deprecated [GetTicketsParams.Context] with this method: it would be ignored.
func (a *Client) GetTicketsContext(ctx context.Context, params *GetTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTicketsOK, error) {
// NOTE: parameters are not validated before sending
if params == nil {
params = NewGetTicketsParams()
}
op := &runtime.ClientOperation{
ID: "getTickets",
Method: "GET",
PathPattern: "/tickets",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetTicketsReader{formats: a.formats},
AuthInfo: authInfo,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.SubmitContext(ctx, op)
if err != nil {
return nil, err
}
// only one success response has to be checked
success, ok := result.(*GetTicketsOK)
if ok {
return success, nil
}
// unexpected success response.
// no default response is defined.
//
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for getTickets: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
// PostTickets creates new tickets.
//
// Create Tickets.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.PostTicketsContext] instead.
func (a *Client) PostTickets(params *PostTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostTicketsOK, error) {
var ctx context.Context
if params.inner.ctx != nil {
ctx = params.inner.ctx
} else {
ctx = context.Background()
}
return a.PostTicketsContext(ctx, params, authInfo, opts...)
}
// PostTicketsContext creates new tickets.
//
// Create Tickets.
//
// Do not use the deprecated [PostTicketsParams.Context] with this method: it would be ignored.
func (a *Client) PostTicketsContext(ctx context.Context, params *PostTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostTicketsOK, error) {
// NOTE: parameters are not validated before sending
if params == nil {
params = NewPostTicketsParams()
}
op := &runtime.ClientOperation{
ID: "postTickets",
Method: "POST",
PathPattern: "/tickets",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &PostTicketsReader{formats: a.formats},
AuthInfo: authInfo,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.SubmitContext(ctx, op)
if err != nil {
return nil, err
}
// only one success response has to be checked
success, ok := result.(*PostTicketsOK)
if ok {
return success, nil
}
// unexpected success response.
// no default response is defined.
//
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for postTickets: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
// PutTickets updates ticket.
//
// Update Ticket.
//
// This method does not support injected context.
// However, timeout and opentracing contexts are honored whenever enabled.
//
// If you need to pass a specific context, use [Client.PutTicketsContext] instead.
func (a *Client) PutTickets(params *PutTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutTicketsOK, error) {
var ctx context.Context
if params.inner.ctx != nil {
ctx = params.inner.ctx
} else {
ctx = context.Background()
}
return a.PutTicketsContext(ctx, params, authInfo, opts...)
}
// PutTicketsContext updates ticket.
//
// Update Ticket.
//
// Do not use the deprecated [PutTicketsParams.Context] with this method: it would be ignored.
func (a *Client) PutTicketsContext(ctx context.Context, params *PutTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutTicketsOK, error) {
// NOTE: parameters are not validated before sending
if params == nil {
params = NewPutTicketsParams()
}
op := &runtime.ClientOperation{
ID: "putTickets",
Method: "PUT",
PathPattern: "/tickets",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &PutTicketsReader{formats: a.formats},
AuthInfo: authInfo,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.SubmitContext(ctx, op)
if err != nil {
return nil, err
}
// only one success response has to be checked
success, ok := result.(*PutTicketsOK)
if ok {
return success, nil
}
// unexpected success response.
// no default response is defined.
//
// safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for putTickets: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ContextualTransport) {
a.transport = transport
}
// innerParams captures internal fields so they don't conflict with user-supplied parameters.
type innerParams struct {
timeout time.Duration
// Deprecated: use the operation call with context to pass the context instead of [TicketsParams].
ctx context.Context
}

View File

@ -1,69 +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 members_models
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag/jsonutils"
)
// Ticket ticket
//
// swagger:model ticket
type Ticket struct {
// created date
CreatedDate *string `json:"CreatedDate,omitempty"`
// event ID
EventID *string `json:"EventID,omitempty"`
// ID
ID string `json:"ID,omitempty"`
// last modified date
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
// price
Price *float64 `json:"Price,omitempty"`
// quantity
Quantity int64 `json:"Quantity,omitempty"`
// tickettype
Tickettype *string `json:"Tickettype,omitempty"`
}
// Validate validates this ticket
func (m *Ticket) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this ticket based on context it is used
func (m *Ticket) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *Ticket) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return jsonutils.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *Ticket) UnmarshalBinary(b []byte) error {
var res Ticket
if err := jsonutils.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -1,132 +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 members_models
import (
"context"
stderrors "errors"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag/jsonutils"
"github.com/go-openapi/swag/typeutils"
)
// TicketRequest An array of Ticket objects
//
// swagger:model TicketRequest
type TicketRequest struct {
// data
Data []*Ticket `json:"Data"`
}
// Validate validates this ticket request
func (m *TicketRequest) 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 *TicketRequest) validateData(formats strfmt.Registry) error {
if typeutils.IsZero(m.Data) { // not required
return nil
}
for i := 0; i < len(m.Data); i++ {
if typeutils.IsZero(m.Data[i]) { // not required
continue
}
if m.Data[i] != nil {
if err := m.Data[i].Validate(formats); err != nil {
ve := new(errors.Validation)
if stderrors.As(err, &ve) {
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
}
ce := new(errors.CompositeError)
if stderrors.As(err, &ce) {
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this ticket request based on the context it is used
func (m *TicketRequest) 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 *TicketRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Data); i++ {
if m.Data[i] != nil {
if typeutils.IsZero(m.Data[i]) { // not required
return nil
}
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
ve := new(errors.Validation)
if stderrors.As(err, &ve) {
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
}
ce := new(errors.CompositeError)
if stderrors.As(err, &ce) {
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *TicketRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return jsonutils.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *TicketRequest) UnmarshalBinary(b []byte) error {
var res TicketRequest
if err := jsonutils.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -1,191 +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 members_models
import (
"context"
stderrors "errors"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag/jsonutils"
"github.com/go-openapi/swag/typeutils"
)
// TicketResponse An array of Ticket objects
//
// swagger:model TicketResponse
type TicketResponse struct {
// data
Data []*Ticket `json:"Data"`
// meta
Meta *ResponseMeta `json:"Meta,omitempty"`
}
// Validate validates this ticket response
func (m *TicketResponse) 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 *TicketResponse) validateData(formats strfmt.Registry) error {
if typeutils.IsZero(m.Data) { // not required
return nil
}
for i := 0; i < len(m.Data); i++ {
if typeutils.IsZero(m.Data[i]) { // not required
continue
}
if m.Data[i] != nil {
if err := m.Data[i].Validate(formats); err != nil {
ve := new(errors.Validation)
if stderrors.As(err, &ve) {
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
}
ce := new(errors.CompositeError)
if stderrors.As(err, &ce) {
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *TicketResponse) validateMeta(formats strfmt.Registry) error {
if typeutils.IsZero(m.Meta) { // not required
return nil
}
if m.Meta != nil {
if err := m.Meta.Validate(formats); err != nil {
ve := new(errors.Validation)
if stderrors.As(err, &ve) {
return ve.ValidateName("Meta")
}
ce := new(errors.CompositeError)
if stderrors.As(err, &ce) {
return ce.ValidateName("Meta")
}
return err
}
}
return nil
}
// ContextValidate validate this ticket response based on the context it is used
func (m *TicketResponse) 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 *TicketResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Data); i++ {
if m.Data[i] != nil {
if typeutils.IsZero(m.Data[i]) { // not required
return nil
}
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
ve := new(errors.Validation)
if stderrors.As(err, &ve) {
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
}
ce := new(errors.CompositeError)
if stderrors.As(err, &ce) {
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *TicketResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
if m.Meta != nil {
if typeutils.IsZero(m.Meta) { // not required
return nil
}
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
ve := new(errors.Validation)
if stderrors.As(err, &ve) {
return ve.ValidateName("Meta")
}
ce := new(errors.CompositeError)
if stderrors.As(err, &ce) {
return ce.ValidateName("Meta")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *TicketResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return jsonutils.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *TicketResponse) UnmarshalBinary(b []byte) error {
var res TicketResponse
if err := jsonutils.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -1719,7 +1719,7 @@ paths:
/attendees: /attendees:
get: get:
description: Return a list of Attendee records from the datastore description: List or get attendees associated with events managed by the configured Keenan Vision tenant. Requires members:attendee:read and compound machine plus native-user authentication. Owners and Managers can read tenant-bounded attendees; Contributors can read only their own attendance.
operationId: getAttendees operationId: getAttendees
parameters: parameters:
- $ref: "#/parameters/idQuery" - $ref: "#/parameters/idQuery"
@ -1740,11 +1740,12 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
summary: Get a list Attendees summary: Get a list Attendees
tags: tags:
- Attendees - Attendees
post: post:
description: Create Attendees description: Create one attendee for an event managed by the configured Keenan Vision tenant. Requires members:attendee:create and Keenan Vision Owner or Manager access. ID and timestamps are server-owned; event, user, and optional ticket relationships are validated.
operationId: postAttendees operationId: postAttendees
parameters: parameters:
- $ref: "#/parameters/AttendeeRequest" - $ref: "#/parameters/AttendeeRequest"
@ -1763,11 +1764,12 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
summary: Create new Attendees summary: Create new Attendees
tags: tags:
- Attendees - Attendees
put: put:
description: Update Attendee description: CAS-update one attendee check-in status. Requires members:attendee:update and Keenan Vision Owner or Manager access. EventID, TicketID, and UserID are immutable; delete is unavailable.
operationId: putAttendees operationId: putAttendees
parameters: parameters:
- $ref: "#/parameters/AttendeeRequest" - $ref: "#/parameters/AttendeeRequest"
@ -1778,6 +1780,8 @@ paths:
$ref: "#/responses/Unauthorized" $ref: "#/responses/Unauthorized"
"403": "403":
$ref: "#/responses/AccessForbidden" $ref: "#/responses/AccessForbidden"
"409":
$ref: "#/responses/Conflict"
"404": "404":
$ref: "#/responses/NotFound" $ref: "#/responses/NotFound"
"422": "422":
@ -1786,6 +1790,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
summary: Update Attendee summary: Update Attendee
tags: tags:
- Attendees - Attendees
@ -2572,8 +2577,10 @@ paths:
- Enrollments - Enrollments
/eventcategories: /eventcategories:
get: get:
description: List or get estate-global event categories for an active member of the configured Keenan Vision tenant. Requires members:event-category:read and compound machine plus native-user authentication.
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
operationId: getEventCategories operationId: getEventCategories
parameters: parameters:
- $ref: "#/parameters/limitQuery" - $ref: "#/parameters/limitQuery"
@ -2596,8 +2603,10 @@ paths:
tags: tags:
- Events - Events
post: post:
description: Create one estate-global event category. Requires members:event-category:create and Keenan Vision Owner or Manager access. ID and audit fields are server-owned.
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
operationId: postEventCategories operationId: postEventCategories
parameters: parameters:
- $ref: "#/parameters/EventCategoryRequest" - $ref: "#/parameters/EventCategoryRequest"
@ -2617,10 +2626,38 @@ paths:
summary: Create a new EventCategory summary: Create a new EventCategory
tags: tags:
- Events - Events
/events: put:
get: description: CAS-update one estate-global event category. Requires members:event-category:update and Keenan Vision Owner or Manager access. ID and audit fields are server-owned; delete is unavailable.
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
operationId: putEventCategories
parameters:
- $ref: "#/parameters/EventCategoryRequest"
responses:
"200":
$ref: "#/responses/EventCategoryResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"409":
$ref: "#/responses/Conflict"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Update an EventCategory
tags:
- Events
/events:
get:
description: List or get events owned by active members of the configured Keenan Vision tenant. Requires members:event:read and compound machine plus native-user authentication. Owners and Managers can read tenant-owned events; Contributors can read only events they organize.
security:
- ApiKeyAuth: []
kvSessionCookie: []
operationId: getEvents operationId: getEvents
parameters: parameters:
- $ref: "#/parameters/limitQuery" - $ref: "#/parameters/limitQuery"
@ -2643,8 +2680,10 @@ paths:
tags: tags:
- Events - Events
post: post:
description: Create one event owned by an active organizer in the configured Keenan Vision tenant. Requires members:event:create and Keenan Vision Owner or Manager access. AccountID remains read-only until a governed CRM relationship is available.
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
operationId: postEvents operationId: postEvents
parameters: parameters:
- $ref: "#/parameters/EventRequest" - $ref: "#/parameters/EventRequest"
@ -2664,6 +2703,32 @@ paths:
summary: Create a new Event summary: Create a new Event
tags: tags:
- Events - Events
put:
description: CAS-update one event already owned by the configured Keenan Vision tenant. Requires members:event:update and Keenan Vision Owner or Manager access. AccountID and audit fields are server-owned or read-only; delete is unavailable.
security:
- ApiKeyAuth: []
kvSessionCookie: []
operationId: putEvents
parameters:
- $ref: "#/parameters/EventRequest"
responses:
"200":
$ref: "#/responses/EventResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"409":
$ref: "#/responses/Conflict"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Update an Event
tags:
- Events
/favorites: /favorites:
get: get:
description: Tenant/user-scoped favorite read. Requires members:favorite:read plus an active native member session. Managers can read favorites for their managed tenants; other members can read only their own records. description: Tenant/user-scoped favorite read. Requires members:favorite:read plus an active native member session. Managers can read favorites for their managed tenants; other members can read only their own records.
@ -3961,8 +4026,9 @@ paths:
tags: tags:
- Templates - Templates
/tickets: /tickets:
x-provider-state: pending
get: get:
description: Return a list of Ticket records from the datastore description: Provider pending. Ticket tenancy and UserID ownership semantics are not authoritative, and Price is DECIMAL(10,2) while the legacy generated model uses float64. No runtime handler is wired.
operationId: getTickets operationId: getTickets
parameters: parameters:
- $ref: "#/parameters/idQuery" - $ref: "#/parameters/idQuery"
@ -3983,11 +4049,12 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
summary: Get a list Tickets summary: Get a list Tickets
tags: tags:
- Tickets - Tickets
post: post:
description: Create Tickets description: Provider pending. Monetary precision, inventory lifecycle, and tenant ownership must be governed before Ticket creation is wired.
operationId: postTickets operationId: postTickets
parameters: parameters:
- $ref: "#/parameters/TicketRequest" - $ref: "#/parameters/TicketRequest"
@ -4006,11 +4073,12 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
summary: Create new Tickets summary: Create new Tickets
tags: tags:
- Tickets - Tickets
put: put:
description: Update Ticket description: Provider pending. Monetary precision, inventory lifecycle, and tenant ownership must be governed before Ticket update is wired.
operationId: putTickets operationId: putTickets
parameters: parameters:
- $ref: "#/parameters/TicketRequest" - $ref: "#/parameters/TicketRequest"
@ -4029,6 +4097,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
summary: Update Ticket summary: Update Ticket
tags: tags:
- Tickets - Tickets

View File

@ -1719,7 +1719,7 @@ paths:
/attendees: /attendees:
get: get:
description: Return a list of Attendee records from the datastore description: List or get attendees associated with events managed by the configured Keenan Vision tenant. Requires members:attendee:read and compound machine plus native-user authentication. Owners and Managers can read tenant-bounded attendees; Contributors can read only their own attendance.
operationId: getAttendees operationId: getAttendees
parameters: parameters:
- $ref: "#/parameters/idQuery" - $ref: "#/parameters/idQuery"
@ -1740,11 +1740,12 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
summary: Get a list Attendees summary: Get a list Attendees
tags: tags:
- Attendees - Attendees
post: post:
description: Create Attendees description: Create one attendee for an event managed by the configured Keenan Vision tenant. Requires members:attendee:create and Keenan Vision Owner or Manager access. ID and timestamps are server-owned; event, user, and optional ticket relationships are validated.
operationId: postAttendees operationId: postAttendees
parameters: parameters:
- $ref: "#/parameters/AttendeeRequest" - $ref: "#/parameters/AttendeeRequest"
@ -1763,11 +1764,12 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
summary: Create new Attendees summary: Create new Attendees
tags: tags:
- Attendees - Attendees
put: put:
description: Update Attendee description: CAS-update one attendee check-in status. Requires members:attendee:update and Keenan Vision Owner or Manager access. EventID, TicketID, and UserID are immutable; delete is unavailable.
operationId: putAttendees operationId: putAttendees
parameters: parameters:
- $ref: "#/parameters/AttendeeRequest" - $ref: "#/parameters/AttendeeRequest"
@ -1778,6 +1780,8 @@ paths:
$ref: "#/responses/Unauthorized" $ref: "#/responses/Unauthorized"
"403": "403":
$ref: "#/responses/AccessForbidden" $ref: "#/responses/AccessForbidden"
"409":
$ref: "#/responses/Conflict"
"404": "404":
$ref: "#/responses/NotFound" $ref: "#/responses/NotFound"
"422": "422":
@ -1786,6 +1790,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
summary: Update Attendee summary: Update Attendee
tags: tags:
- Attendees - Attendees
@ -2572,8 +2577,10 @@ paths:
- Enrollments - Enrollments
/eventcategories: /eventcategories:
get: get:
description: List or get estate-global event categories for an active member of the configured Keenan Vision tenant. Requires members:event-category:read and compound machine plus native-user authentication.
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
operationId: getEventCategories operationId: getEventCategories
parameters: parameters:
- $ref: "#/parameters/limitQuery" - $ref: "#/parameters/limitQuery"
@ -2596,8 +2603,10 @@ paths:
tags: tags:
- Events - Events
post: post:
description: Create one estate-global event category. Requires members:event-category:create and Keenan Vision Owner or Manager access. ID and audit fields are server-owned.
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
operationId: postEventCategories operationId: postEventCategories
parameters: parameters:
- $ref: "#/parameters/EventCategoryRequest" - $ref: "#/parameters/EventCategoryRequest"
@ -2617,10 +2626,38 @@ paths:
summary: Create a new EventCategory summary: Create a new EventCategory
tags: tags:
- Events - Events
/events: put:
get: description: CAS-update one estate-global event category. Requires members:event-category:update and Keenan Vision Owner or Manager access. ID and audit fields are server-owned; delete is unavailable.
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
operationId: putEventCategories
parameters:
- $ref: "#/parameters/EventCategoryRequest"
responses:
"200":
$ref: "#/responses/EventCategoryResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"409":
$ref: "#/responses/Conflict"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Update an EventCategory
tags:
- Events
/events:
get:
description: List or get events owned by active members of the configured Keenan Vision tenant. Requires members:event:read and compound machine plus native-user authentication. Owners and Managers can read tenant-owned events; Contributors can read only events they organize.
security:
- ApiKeyAuth: []
kvSessionCookie: []
operationId: getEvents operationId: getEvents
parameters: parameters:
- $ref: "#/parameters/limitQuery" - $ref: "#/parameters/limitQuery"
@ -2643,8 +2680,10 @@ paths:
tags: tags:
- Events - Events
post: post:
description: Create one event owned by an active organizer in the configured Keenan Vision tenant. Requires members:event:create and Keenan Vision Owner or Manager access. AccountID remains read-only until a governed CRM relationship is available.
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
operationId: postEvents operationId: postEvents
parameters: parameters:
- $ref: "#/parameters/EventRequest" - $ref: "#/parameters/EventRequest"
@ -2664,6 +2703,32 @@ paths:
summary: Create a new Event summary: Create a new Event
tags: tags:
- Events - Events
put:
description: CAS-update one event already owned by the configured Keenan Vision tenant. Requires members:event:update and Keenan Vision Owner or Manager access. AccountID and audit fields are server-owned or read-only; delete is unavailable.
security:
- ApiKeyAuth: []
kvSessionCookie: []
operationId: putEvents
parameters:
- $ref: "#/parameters/EventRequest"
responses:
"200":
$ref: "#/responses/EventResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"409":
$ref: "#/responses/Conflict"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Update an Event
tags:
- Events
/favorites: /favorites:
get: get:
description: Tenant/user-scoped favorite read. Requires members:favorite:read plus an active native member session. Managers can read favorites for their managed tenants; other members can read only their own records. description: Tenant/user-scoped favorite read. Requires members:favorite:read plus an active native member session. Managers can read favorites for their managed tenants; other members can read only their own records.
@ -3961,8 +4026,9 @@ paths:
tags: tags:
- Templates - Templates
/tickets: /tickets:
x-provider-state: pending
get: get:
description: Return a list of Ticket records from the datastore description: Provider pending. Ticket tenancy and UserID ownership semantics are not authoritative, and Price is DECIMAL(10,2) while the legacy generated model uses float64. No runtime handler is wired.
operationId: getTickets operationId: getTickets
parameters: parameters:
- $ref: "#/parameters/idQuery" - $ref: "#/parameters/idQuery"
@ -3983,11 +4049,12 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
summary: Get a list Tickets summary: Get a list Tickets
tags: tags:
- Tickets - Tickets
post: post:
description: Create Tickets description: Provider pending. Monetary precision, inventory lifecycle, and tenant ownership must be governed before Ticket creation is wired.
operationId: postTickets operationId: postTickets
parameters: parameters:
- $ref: "#/parameters/TicketRequest" - $ref: "#/parameters/TicketRequest"
@ -4006,11 +4073,12 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
summary: Create new Tickets summary: Create new Tickets
tags: tags:
- Tickets - Tickets
put: put:
description: Update Ticket description: Provider pending. Monetary precision, inventory lifecycle, and tenant ownership must be governed before Ticket update is wired.
operationId: putTickets operationId: putTickets
parameters: parameters:
- $ref: "#/parameters/TicketRequest" - $ref: "#/parameters/TicketRequest"
@ -4029,6 +4097,7 @@ paths:
$ref: "#/responses/ServerError" $ref: "#/responses/ServerError"
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
kvSessionCookie: []
summary: Update Ticket summary: Update Ticket
tags: tags:
- Tickets - Tickets