diff --git a/api/members/members_client/attendees/attendees_client.go b/api/members/members_client/attendees/attendees_client.go index 20573bd..e740c37 100644 --- a/api/members/members_client/attendees/attendees_client.go +++ b/api/members/members_client/attendees/attendees_client.go @@ -34,13 +34,13 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateAttendee(params *CreateAttendeeParams, opts ...ClientOption) (*CreateAttendeeCreated, error) + CreateAttendee(params *CreateAttendeeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAttendeeCreated, error) - DeleteAttendee(params *DeleteAttendeeParams, opts ...ClientOption) (*DeleteAttendeeNoContent, error) + DeleteAttendee(params *DeleteAttendeeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAttendeeNoContent, error) - GetAttendees(params *GetAttendeesParams, opts ...ClientOption) (*GetAttendeesOK, error) + GetAttendees(params *GetAttendeesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAttendeesOK, error) - UpdateAttendee(params *UpdateAttendeeParams, opts ...ClientOption) (*UpdateAttendeeOK, error) + UpdateAttendee(params *UpdateAttendeeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAttendeeOK, error) SetTransport(transport runtime.ClientTransport) } @@ -48,7 +48,7 @@ type ClientService interface { /* CreateAttendee creates a new attendee */ -func (a *Client) CreateAttendee(params *CreateAttendeeParams, opts ...ClientOption) (*CreateAttendeeCreated, error) { +func (a *Client) CreateAttendee(params *CreateAttendeeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAttendeeCreated, error) { // TODO: Validate the params before sending if params == nil { params = NewCreateAttendeeParams() @@ -62,6 +62,7 @@ func (a *Client) CreateAttendee(params *CreateAttendeeParams, opts ...ClientOpti Schemes: []string{"http"}, Params: params, Reader: &CreateAttendeeReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -86,7 +87,7 @@ func (a *Client) CreateAttendee(params *CreateAttendeeParams, opts ...ClientOpti /* DeleteAttendee deletes a attendee */ -func (a *Client) DeleteAttendee(params *DeleteAttendeeParams, opts ...ClientOption) (*DeleteAttendeeNoContent, error) { +func (a *Client) DeleteAttendee(params *DeleteAttendeeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAttendeeNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeleteAttendeeParams() @@ -100,6 +101,7 @@ func (a *Client) DeleteAttendee(params *DeleteAttendeeParams, opts ...ClientOpti Schemes: []string{"http"}, Params: params, Reader: &DeleteAttendeeReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +126,7 @@ func (a *Client) DeleteAttendee(params *DeleteAttendeeParams, opts ...ClientOpti /* GetAttendees gets a list of attendees */ -func (a *Client) GetAttendees(params *GetAttendeesParams, opts ...ClientOption) (*GetAttendeesOK, error) { +func (a *Client) GetAttendees(params *GetAttendeesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAttendeesOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetAttendeesParams() @@ -138,6 +140,7 @@ func (a *Client) GetAttendees(params *GetAttendeesParams, opts ...ClientOption) Schemes: []string{"http"}, Params: params, Reader: &GetAttendeesReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -162,7 +165,7 @@ func (a *Client) GetAttendees(params *GetAttendeesParams, opts ...ClientOption) /* UpdateAttendee updates an existing attendee */ -func (a *Client) UpdateAttendee(params *UpdateAttendeeParams, opts ...ClientOption) (*UpdateAttendeeOK, error) { +func (a *Client) UpdateAttendee(params *UpdateAttendeeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateAttendeeOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateAttendeeParams() @@ -176,6 +179,7 @@ func (a *Client) UpdateAttendee(params *UpdateAttendeeParams, opts ...ClientOpti Schemes: []string{"http"}, Params: params, Reader: &UpdateAttendeeReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/certificates/certificates_client.go b/api/members/members_client/certificates/certificates_client.go index 418a957..2fc5501 100644 --- a/api/members/members_client/certificates/certificates_client.go +++ b/api/members/members_client/certificates/certificates_client.go @@ -34,13 +34,13 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateCertificate(params *CreateCertificateParams, opts ...ClientOption) (*CreateCertificateCreated, error) + CreateCertificate(params *CreateCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCertificateCreated, error) - DeleteCertificate(params *DeleteCertificateParams, opts ...ClientOption) (*DeleteCertificateNoContent, error) + DeleteCertificate(params *DeleteCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteCertificateNoContent, error) - GetCertificates(params *GetCertificatesParams, opts ...ClientOption) (*GetCertificatesOK, error) + GetCertificates(params *GetCertificatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCertificatesOK, error) - UpdateCertificate(params *UpdateCertificateParams, opts ...ClientOption) (*UpdateCertificateOK, error) + UpdateCertificate(params *UpdateCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCertificateOK, error) SetTransport(transport runtime.ClientTransport) } @@ -48,7 +48,7 @@ type ClientService interface { /* CreateCertificate creates a new certificate */ -func (a *Client) CreateCertificate(params *CreateCertificateParams, opts ...ClientOption) (*CreateCertificateCreated, error) { +func (a *Client) CreateCertificate(params *CreateCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCertificateCreated, error) { // TODO: Validate the params before sending if params == nil { params = NewCreateCertificateParams() @@ -62,6 +62,7 @@ func (a *Client) CreateCertificate(params *CreateCertificateParams, opts ...Clie Schemes: []string{"http"}, Params: params, Reader: &CreateCertificateReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -86,7 +87,7 @@ func (a *Client) CreateCertificate(params *CreateCertificateParams, opts ...Clie /* DeleteCertificate deletes a certificate */ -func (a *Client) DeleteCertificate(params *DeleteCertificateParams, opts ...ClientOption) (*DeleteCertificateNoContent, error) { +func (a *Client) DeleteCertificate(params *DeleteCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteCertificateNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeleteCertificateParams() @@ -100,6 +101,7 @@ func (a *Client) DeleteCertificate(params *DeleteCertificateParams, opts ...Clie Schemes: []string{"http"}, Params: params, Reader: &DeleteCertificateReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +126,7 @@ func (a *Client) DeleteCertificate(params *DeleteCertificateParams, opts ...Clie /* GetCertificates gets a list of certificates */ -func (a *Client) GetCertificates(params *GetCertificatesParams, opts ...ClientOption) (*GetCertificatesOK, error) { +func (a *Client) GetCertificates(params *GetCertificatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCertificatesOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetCertificatesParams() @@ -138,6 +140,7 @@ func (a *Client) GetCertificates(params *GetCertificatesParams, opts ...ClientOp Schemes: []string{"http"}, Params: params, Reader: &GetCertificatesReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -162,7 +165,7 @@ func (a *Client) GetCertificates(params *GetCertificatesParams, opts ...ClientOp /* UpdateCertificate updates an existing certificate */ -func (a *Client) UpdateCertificate(params *UpdateCertificateParams, opts ...ClientOption) (*UpdateCertificateOK, error) { +func (a *Client) UpdateCertificate(params *UpdateCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCertificateOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateCertificateParams() @@ -176,6 +179,7 @@ func (a *Client) UpdateCertificate(params *UpdateCertificateParams, opts ...Clie Schemes: []string{"http"}, Params: params, Reader: &UpdateCertificateReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/clusters/get_clusters_responses.go b/api/members/members_client/clusters/get_clusters_responses.go index 35caf33..3b4b30d 100644 --- a/api/members/members_client/clusters/get_clusters_responses.go +++ b/api/members/members_client/clusters/get_clusters_responses.go @@ -292,8 +292,6 @@ GetClustersNotFound describes a response with status code 404, with default head Resource was not found */ type GetClustersNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -341,13 +339,6 @@ func (o *GetClustersNotFound) GetPayload() *members_models.Error { func (o *GetClustersNotFound) 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 @@ -437,8 +428,6 @@ GetClustersInternalServerError describes a response with status code 500, with d Server Internal Error */ type GetClustersInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -486,13 +475,6 @@ func (o *GetClustersInternalServerError) GetPayload() *members_models.Error { func (o *GetClustersInternalServerError) 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 diff --git a/api/members/members_client/clusters/post_clusters_responses.go b/api/members/members_client/clusters/post_clusters_responses.go index 5fbecf6..1a32b08 100644 --- a/api/members/members_client/clusters/post_clusters_responses.go +++ b/api/members/members_client/clusters/post_clusters_responses.go @@ -292,8 +292,6 @@ PostClustersNotFound describes a response with status code 404, with default hea Resource was not found */ type PostClustersNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -341,13 +339,6 @@ func (o *PostClustersNotFound) GetPayload() *members_models.Error { func (o *PostClustersNotFound) 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 @@ -437,8 +428,6 @@ PostClustersInternalServerError describes a response with status code 500, with Server Internal Error */ type PostClustersInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -486,13 +475,6 @@ func (o *PostClustersInternalServerError) GetPayload() *members_models.Error { func (o *PostClustersInternalServerError) 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 diff --git a/api/members/members_client/clusters/put_clusters_responses.go b/api/members/members_client/clusters/put_clusters_responses.go index 9cb59bf..c4f7782 100644 --- a/api/members/members_client/clusters/put_clusters_responses.go +++ b/api/members/members_client/clusters/put_clusters_responses.go @@ -292,8 +292,6 @@ PutClustersNotFound describes a response with status code 404, with default head Resource was not found */ type PutClustersNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -341,13 +339,6 @@ func (o *PutClustersNotFound) GetPayload() *members_models.Error { func (o *PutClustersNotFound) 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 @@ -437,8 +428,6 @@ PutClustersInternalServerError describes a response with status code 500, with d Server Internal Error */ type PutClustersInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -486,13 +475,6 @@ func (o *PutClustersInternalServerError) GetPayload() *members_models.Error { func (o *PutClustersInternalServerError) 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 diff --git a/api/members/members_client/course_lessons/course_lessons_client.go b/api/members/members_client/course_lessons/course_lessons_client.go deleted file mode 100644 index 701f624..0000000 --- a/api/members/members_client/course_lessons/course_lessons_client.go +++ /dev/null @@ -1,203 +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 course_lessons - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new course lessons API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for course lessons API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateCourseLesson(params *CreateCourseLessonParams, opts ...ClientOption) (*CreateCourseLessonCreated, error) - - DeleteCourseLesson(params *DeleteCourseLessonParams, opts ...ClientOption) (*DeleteCourseLessonNoContent, error) - - GetCourseLessons(params *GetCourseLessonsParams, opts ...ClientOption) (*GetCourseLessonsOK, error) - - UpdateCourseLesson(params *UpdateCourseLessonParams, opts ...ClientOption) (*UpdateCourseLessonOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateCourseLesson creates a new course lesson -*/ -func (a *Client) CreateCourseLesson(params *CreateCourseLessonParams, opts ...ClientOption) (*CreateCourseLessonCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateCourseLessonParams() - } - op := &runtime.ClientOperation{ - ID: "createCourseLesson", - Method: "POST", - PathPattern: "/courselessons", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateCourseLessonReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateCourseLessonCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createCourseLesson: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -DeleteCourseLesson deletes a course lesson -*/ -func (a *Client) DeleteCourseLesson(params *DeleteCourseLessonParams, opts ...ClientOption) (*DeleteCourseLessonNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteCourseLessonParams() - } - op := &runtime.ClientOperation{ - ID: "deleteCourseLesson", - Method: "DELETE", - PathPattern: "/courselessons", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteCourseLessonReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteCourseLessonNoContent) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for deleteCourseLesson: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetCourseLessons gets a list of course lessons -*/ -func (a *Client) GetCourseLessons(params *GetCourseLessonsParams, opts ...ClientOption) (*GetCourseLessonsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetCourseLessonsParams() - } - op := &runtime.ClientOperation{ - ID: "getCourseLessons", - Method: "GET", - PathPattern: "/courselessons", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetCourseLessonsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetCourseLessonsOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for getCourseLessons: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -UpdateCourseLesson updates an existing course lesson -*/ -func (a *Client) UpdateCourseLesson(params *UpdateCourseLessonParams, opts ...ClientOption) (*UpdateCourseLessonOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateCourseLessonParams() - } - op := &runtime.ClientOperation{ - ID: "updateCourseLesson", - Method: "PUT", - PathPattern: "/courselessons", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &UpdateCourseLessonReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*UpdateCourseLessonOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for updateCourseLesson: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/members/members_client/course_lessons/create_course_lesson_parameters.go b/api/members/members_client/course_lessons/create_course_lesson_parameters.go deleted file mode 100644 index 022903a..0000000 --- a/api/members/members_client/course_lessons/create_course_lesson_parameters.go +++ /dev/null @@ -1,157 +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 course_lessons - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateCourseLessonParams creates a new CreateCourseLessonParams 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 NewCreateCourseLessonParams() *CreateCourseLessonParams { - return &CreateCourseLessonParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateCourseLessonParamsWithTimeout creates a new CreateCourseLessonParams object -// with the ability to set a timeout on a request. -func NewCreateCourseLessonParamsWithTimeout(timeout time.Duration) *CreateCourseLessonParams { - return &CreateCourseLessonParams{ - timeout: timeout, - } -} - -// NewCreateCourseLessonParamsWithContext creates a new CreateCourseLessonParams object -// with the ability to set a context for a request. -func NewCreateCourseLessonParamsWithContext(ctx context.Context) *CreateCourseLessonParams { - return &CreateCourseLessonParams{ - Context: ctx, - } -} - -// NewCreateCourseLessonParamsWithHTTPClient creates a new CreateCourseLessonParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateCourseLessonParamsWithHTTPClient(client *http.Client) *CreateCourseLessonParams { - return &CreateCourseLessonParams{ - HTTPClient: client, - } -} - -/* -CreateCourseLessonParams contains all the parameters to send to the API endpoint - - for the create course lesson operation. - - Typically these are written to a http.Request. -*/ -type CreateCourseLessonParams struct { - - /* CourselessonRequest. - - An array of new CourseLesson records - */ - CourselessonRequest *members_models.CourseLessonRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create course lesson params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCourseLessonParams) WithDefaults() *CreateCourseLessonParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create course lesson params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCourseLessonParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create course lesson params -func (o *CreateCourseLessonParams) WithTimeout(timeout time.Duration) *CreateCourseLessonParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create course lesson params -func (o *CreateCourseLessonParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create course lesson params -func (o *CreateCourseLessonParams) WithContext(ctx context.Context) *CreateCourseLessonParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create course lesson params -func (o *CreateCourseLessonParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create course lesson params -func (o *CreateCourseLessonParams) WithHTTPClient(client *http.Client) *CreateCourseLessonParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create course lesson params -func (o *CreateCourseLessonParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCourselessonRequest adds the courselessonRequest to the create course lesson params -func (o *CreateCourseLessonParams) WithCourselessonRequest(courselessonRequest *members_models.CourseLessonRequest) *CreateCourseLessonParams { - o.SetCourselessonRequest(courselessonRequest) - return o -} - -// SetCourselessonRequest adds the courselessonRequest to the create course lesson params -func (o *CreateCourseLessonParams) SetCourselessonRequest(courselessonRequest *members_models.CourseLessonRequest) { - o.CourselessonRequest = courselessonRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateCourseLessonParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.CourselessonRequest != nil { - if err := r.SetBodyParam(o.CourselessonRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/course_lessons/create_course_lesson_responses.go b/api/members/members_client/course_lessons/create_course_lesson_responses.go deleted file mode 100644 index d6dae13..0000000 --- a/api/members/members_client/course_lessons/create_course_lesson_responses.go +++ /dev/null @@ -1,92 +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 course_lessons - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateCourseLessonReader is a Reader for the CreateCourseLesson structure. -type CreateCourseLessonReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateCourseLessonReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateCourseLessonCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateCourseLessonCreated creates a CreateCourseLessonCreated with default headers values -func NewCreateCourseLessonCreated() *CreateCourseLessonCreated { - return &CreateCourseLessonCreated{} -} - -/* -CreateCourseLessonCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateCourseLessonCreated struct { -} - -// IsSuccess returns true when this create course lesson created response has a 2xx status code -func (o *CreateCourseLessonCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create course lesson created response has a 3xx status code -func (o *CreateCourseLessonCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create course lesson created response has a 4xx status code -func (o *CreateCourseLessonCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create course lesson created response has a 5xx status code -func (o *CreateCourseLessonCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create course lesson created response a status code equal to that given -func (o *CreateCourseLessonCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create course lesson created response -func (o *CreateCourseLessonCreated) Code() int { - return 201 -} - -func (o *CreateCourseLessonCreated) Error() string { - return fmt.Sprintf("[POST /courselessons][%d] createCourseLessonCreated ", 201) -} - -func (o *CreateCourseLessonCreated) String() string { - return fmt.Sprintf("[POST /courselessons][%d] createCourseLessonCreated ", 201) -} - -func (o *CreateCourseLessonCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/course_lessons/delete_course_lesson_parameters.go b/api/members/members_client/course_lessons/delete_course_lesson_parameters.go deleted file mode 100644 index d94eae7..0000000 --- a/api/members/members_client/course_lessons/delete_course_lesson_parameters.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// (c) 2012-2020 by Taxnexus, Inc. -// All rights reserved worldwide. -// Proprietary product; unlicensed use is not allowed - -package course_lessons - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteCourseLessonParams creates a new DeleteCourseLessonParams 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 NewDeleteCourseLessonParams() *DeleteCourseLessonParams { - return &DeleteCourseLessonParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteCourseLessonParamsWithTimeout creates a new DeleteCourseLessonParams object -// with the ability to set a timeout on a request. -func NewDeleteCourseLessonParamsWithTimeout(timeout time.Duration) *DeleteCourseLessonParams { - return &DeleteCourseLessonParams{ - timeout: timeout, - } -} - -// NewDeleteCourseLessonParamsWithContext creates a new DeleteCourseLessonParams object -// with the ability to set a context for a request. -func NewDeleteCourseLessonParamsWithContext(ctx context.Context) *DeleteCourseLessonParams { - return &DeleteCourseLessonParams{ - Context: ctx, - } -} - -// NewDeleteCourseLessonParamsWithHTTPClient creates a new DeleteCourseLessonParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteCourseLessonParamsWithHTTPClient(client *http.Client) *DeleteCourseLessonParams { - return &DeleteCourseLessonParams{ - HTTPClient: client, - } -} - -/* -DeleteCourseLessonParams contains all the parameters to send to the API endpoint - - for the delete course lesson operation. - - Typically these are written to a http.Request. -*/ -type DeleteCourseLessonParams struct { - - /* ID. - - Unique Record ID - */ - ID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete course lesson params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteCourseLessonParams) WithDefaults() *DeleteCourseLessonParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete course lesson params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteCourseLessonParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete course lesson params -func (o *DeleteCourseLessonParams) WithTimeout(timeout time.Duration) *DeleteCourseLessonParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete course lesson params -func (o *DeleteCourseLessonParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete course lesson params -func (o *DeleteCourseLessonParams) WithContext(ctx context.Context) *DeleteCourseLessonParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete course lesson params -func (o *DeleteCourseLessonParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete course lesson params -func (o *DeleteCourseLessonParams) WithHTTPClient(client *http.Client) *DeleteCourseLessonParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete course lesson params -func (o *DeleteCourseLessonParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete course lesson params -func (o *DeleteCourseLessonParams) WithID(id *string) *DeleteCourseLessonParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete course lesson params -func (o *DeleteCourseLessonParams) SetID(id *string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteCourseLessonParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ID != nil { - - // query param id - var qrID string - - if o.ID != nil { - qrID = *o.ID - } - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/course_lessons/delete_course_lesson_responses.go b/api/members/members_client/course_lessons/delete_course_lesson_responses.go deleted file mode 100644 index 2e46212..0000000 --- a/api/members/members_client/course_lessons/delete_course_lesson_responses.go +++ /dev/null @@ -1,92 +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 course_lessons - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// DeleteCourseLessonReader is a Reader for the DeleteCourseLesson structure. -type DeleteCourseLessonReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteCourseLessonReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteCourseLessonNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeleteCourseLessonNoContent creates a DeleteCourseLessonNoContent with default headers values -func NewDeleteCourseLessonNoContent() *DeleteCourseLessonNoContent { - return &DeleteCourseLessonNoContent{} -} - -/* -DeleteCourseLessonNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteCourseLessonNoContent struct { -} - -// IsSuccess returns true when this delete course lesson no content response has a 2xx status code -func (o *DeleteCourseLessonNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete course lesson no content response has a 3xx status code -func (o *DeleteCourseLessonNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete course lesson no content response has a 4xx status code -func (o *DeleteCourseLessonNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete course lesson no content response has a 5xx status code -func (o *DeleteCourseLessonNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete course lesson no content response a status code equal to that given -func (o *DeleteCourseLessonNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete course lesson no content response -func (o *DeleteCourseLessonNoContent) Code() int { - return 204 -} - -func (o *DeleteCourseLessonNoContent) Error() string { - return fmt.Sprintf("[DELETE /courselessons][%d] deleteCourseLessonNoContent ", 204) -} - -func (o *DeleteCourseLessonNoContent) String() string { - return fmt.Sprintf("[DELETE /courselessons][%d] deleteCourseLessonNoContent ", 204) -} - -func (o *DeleteCourseLessonNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/course_lessons/get_course_lessons_responses.go b/api/members/members_client/course_lessons/get_course_lessons_responses.go deleted file mode 100644 index ee1e2ad..0000000 --- a/api/members/members_client/course_lessons/get_course_lessons_responses.go +++ /dev/null @@ -1,92 +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 course_lessons - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// GetCourseLessonsReader is a Reader for the GetCourseLessons structure. -type GetCourseLessonsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCourseLessonsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCourseLessonsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetCourseLessonsOK creates a GetCourseLessonsOK with default headers values -func NewGetCourseLessonsOK() *GetCourseLessonsOK { - return &GetCourseLessonsOK{} -} - -/* -GetCourseLessonsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetCourseLessonsOK struct { -} - -// IsSuccess returns true when this get course lessons o k response has a 2xx status code -func (o *GetCourseLessonsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get course lessons o k response has a 3xx status code -func (o *GetCourseLessonsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get course lessons o k response has a 4xx status code -func (o *GetCourseLessonsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get course lessons o k response has a 5xx status code -func (o *GetCourseLessonsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get course lessons o k response a status code equal to that given -func (o *GetCourseLessonsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get course lessons o k response -func (o *GetCourseLessonsOK) Code() int { - return 200 -} - -func (o *GetCourseLessonsOK) Error() string { - return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsOK ", 200) -} - -func (o *GetCourseLessonsOK) String() string { - return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsOK ", 200) -} - -func (o *GetCourseLessonsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/course_lessons/update_course_lesson_responses.go b/api/members/members_client/course_lessons/update_course_lesson_responses.go deleted file mode 100644 index 6145f17..0000000 --- a/api/members/members_client/course_lessons/update_course_lesson_responses.go +++ /dev/null @@ -1,92 +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 course_lessons - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// UpdateCourseLessonReader is a Reader for the UpdateCourseLesson structure. -type UpdateCourseLessonReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateCourseLessonReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateCourseLessonOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewUpdateCourseLessonOK creates a UpdateCourseLessonOK with default headers values -func NewUpdateCourseLessonOK() *UpdateCourseLessonOK { - return &UpdateCourseLessonOK{} -} - -/* -UpdateCourseLessonOK describes a response with status code 200, with default header values. - -OK -*/ -type UpdateCourseLessonOK struct { -} - -// IsSuccess returns true when this update course lesson o k response has a 2xx status code -func (o *UpdateCourseLessonOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update course lesson o k response has a 3xx status code -func (o *UpdateCourseLessonOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update course lesson o k response has a 4xx status code -func (o *UpdateCourseLessonOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update course lesson o k response has a 5xx status code -func (o *UpdateCourseLessonOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update course lesson o k response a status code equal to that given -func (o *UpdateCourseLessonOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update course lesson o k response -func (o *UpdateCourseLessonOK) Code() int { - return 200 -} - -func (o *UpdateCourseLessonOK) Error() string { - return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonOK ", 200) -} - -func (o *UpdateCourseLessonOK) String() string { - return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonOK ", 200) -} - -func (o *UpdateCourseLessonOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/course_sections/course_sections_client.go b/api/members/members_client/course_sections/course_sections_client.go deleted file mode 100644 index 40f1938..0000000 --- a/api/members/members_client/course_sections/course_sections_client.go +++ /dev/null @@ -1,203 +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 course_sections - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new course sections API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for course sections API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateCourseSection(params *CreateCourseSectionParams, opts ...ClientOption) (*CreateCourseSectionCreated, error) - - DeleteCourseSection(params *DeleteCourseSectionParams, opts ...ClientOption) (*DeleteCourseSectionNoContent, error) - - GetCourseSections(params *GetCourseSectionsParams, opts ...ClientOption) (*GetCourseSectionsOK, error) - - UpdateCourseSection(params *UpdateCourseSectionParams, opts ...ClientOption) (*UpdateCourseSectionOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateCourseSection creates a new course section -*/ -func (a *Client) CreateCourseSection(params *CreateCourseSectionParams, opts ...ClientOption) (*CreateCourseSectionCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateCourseSectionParams() - } - op := &runtime.ClientOperation{ - ID: "createCourseSection", - Method: "POST", - PathPattern: "/coursesections", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateCourseSectionReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateCourseSectionCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createCourseSection: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -DeleteCourseSection deletes a course section -*/ -func (a *Client) DeleteCourseSection(params *DeleteCourseSectionParams, opts ...ClientOption) (*DeleteCourseSectionNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteCourseSectionParams() - } - op := &runtime.ClientOperation{ - ID: "deleteCourseSection", - Method: "DELETE", - PathPattern: "/coursesections", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteCourseSectionReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteCourseSectionNoContent) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for deleteCourseSection: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetCourseSections gets a list of course sections -*/ -func (a *Client) GetCourseSections(params *GetCourseSectionsParams, opts ...ClientOption) (*GetCourseSectionsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetCourseSectionsParams() - } - op := &runtime.ClientOperation{ - ID: "getCourseSections", - Method: "GET", - PathPattern: "/coursesections", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetCourseSectionsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetCourseSectionsOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for getCourseSections: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -UpdateCourseSection updates an existing course section -*/ -func (a *Client) UpdateCourseSection(params *UpdateCourseSectionParams, opts ...ClientOption) (*UpdateCourseSectionOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateCourseSectionParams() - } - op := &runtime.ClientOperation{ - ID: "updateCourseSection", - Method: "PUT", - PathPattern: "/coursesections", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &UpdateCourseSectionReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*UpdateCourseSectionOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for updateCourseSection: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/members/members_client/course_sections/create_course_section_parameters.go b/api/members/members_client/course_sections/create_course_section_parameters.go deleted file mode 100644 index fdbdf2b..0000000 --- a/api/members/members_client/course_sections/create_course_section_parameters.go +++ /dev/null @@ -1,157 +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 course_sections - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateCourseSectionParams creates a new CreateCourseSectionParams 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 NewCreateCourseSectionParams() *CreateCourseSectionParams { - return &CreateCourseSectionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateCourseSectionParamsWithTimeout creates a new CreateCourseSectionParams object -// with the ability to set a timeout on a request. -func NewCreateCourseSectionParamsWithTimeout(timeout time.Duration) *CreateCourseSectionParams { - return &CreateCourseSectionParams{ - timeout: timeout, - } -} - -// NewCreateCourseSectionParamsWithContext creates a new CreateCourseSectionParams object -// with the ability to set a context for a request. -func NewCreateCourseSectionParamsWithContext(ctx context.Context) *CreateCourseSectionParams { - return &CreateCourseSectionParams{ - Context: ctx, - } -} - -// NewCreateCourseSectionParamsWithHTTPClient creates a new CreateCourseSectionParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateCourseSectionParamsWithHTTPClient(client *http.Client) *CreateCourseSectionParams { - return &CreateCourseSectionParams{ - HTTPClient: client, - } -} - -/* -CreateCourseSectionParams contains all the parameters to send to the API endpoint - - for the create course section operation. - - Typically these are written to a http.Request. -*/ -type CreateCourseSectionParams struct { - - /* CoursesectionRequest. - - An array of new CourseSection records - */ - CoursesectionRequest *members_models.CourseSectionRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create course section params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCourseSectionParams) WithDefaults() *CreateCourseSectionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create course section params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCourseSectionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create course section params -func (o *CreateCourseSectionParams) WithTimeout(timeout time.Duration) *CreateCourseSectionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create course section params -func (o *CreateCourseSectionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create course section params -func (o *CreateCourseSectionParams) WithContext(ctx context.Context) *CreateCourseSectionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create course section params -func (o *CreateCourseSectionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create course section params -func (o *CreateCourseSectionParams) WithHTTPClient(client *http.Client) *CreateCourseSectionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create course section params -func (o *CreateCourseSectionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCoursesectionRequest adds the coursesectionRequest to the create course section params -func (o *CreateCourseSectionParams) WithCoursesectionRequest(coursesectionRequest *members_models.CourseSectionRequest) *CreateCourseSectionParams { - o.SetCoursesectionRequest(coursesectionRequest) - return o -} - -// SetCoursesectionRequest adds the coursesectionRequest to the create course section params -func (o *CreateCourseSectionParams) SetCoursesectionRequest(coursesectionRequest *members_models.CourseSectionRequest) { - o.CoursesectionRequest = coursesectionRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateCourseSectionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.CoursesectionRequest != nil { - if err := r.SetBodyParam(o.CoursesectionRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/course_sections/create_course_section_responses.go b/api/members/members_client/course_sections/create_course_section_responses.go deleted file mode 100644 index 9033879..0000000 --- a/api/members/members_client/course_sections/create_course_section_responses.go +++ /dev/null @@ -1,92 +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 course_sections - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateCourseSectionReader is a Reader for the CreateCourseSection structure. -type CreateCourseSectionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateCourseSectionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateCourseSectionCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateCourseSectionCreated creates a CreateCourseSectionCreated with default headers values -func NewCreateCourseSectionCreated() *CreateCourseSectionCreated { - return &CreateCourseSectionCreated{} -} - -/* -CreateCourseSectionCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateCourseSectionCreated struct { -} - -// IsSuccess returns true when this create course section created response has a 2xx status code -func (o *CreateCourseSectionCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create course section created response has a 3xx status code -func (o *CreateCourseSectionCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create course section created response has a 4xx status code -func (o *CreateCourseSectionCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create course section created response has a 5xx status code -func (o *CreateCourseSectionCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create course section created response a status code equal to that given -func (o *CreateCourseSectionCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create course section created response -func (o *CreateCourseSectionCreated) Code() int { - return 201 -} - -func (o *CreateCourseSectionCreated) Error() string { - return fmt.Sprintf("[POST /coursesections][%d] createCourseSectionCreated ", 201) -} - -func (o *CreateCourseSectionCreated) String() string { - return fmt.Sprintf("[POST /coursesections][%d] createCourseSectionCreated ", 201) -} - -func (o *CreateCourseSectionCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/course_sections/delete_course_section_parameters.go b/api/members/members_client/course_sections/delete_course_section_parameters.go deleted file mode 100644 index 3e35658..0000000 --- a/api/members/members_client/course_sections/delete_course_section_parameters.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// (c) 2012-2020 by Taxnexus, Inc. -// All rights reserved worldwide. -// Proprietary product; unlicensed use is not allowed - -package course_sections - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteCourseSectionParams creates a new DeleteCourseSectionParams 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 NewDeleteCourseSectionParams() *DeleteCourseSectionParams { - return &DeleteCourseSectionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteCourseSectionParamsWithTimeout creates a new DeleteCourseSectionParams object -// with the ability to set a timeout on a request. -func NewDeleteCourseSectionParamsWithTimeout(timeout time.Duration) *DeleteCourseSectionParams { - return &DeleteCourseSectionParams{ - timeout: timeout, - } -} - -// NewDeleteCourseSectionParamsWithContext creates a new DeleteCourseSectionParams object -// with the ability to set a context for a request. -func NewDeleteCourseSectionParamsWithContext(ctx context.Context) *DeleteCourseSectionParams { - return &DeleteCourseSectionParams{ - Context: ctx, - } -} - -// NewDeleteCourseSectionParamsWithHTTPClient creates a new DeleteCourseSectionParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteCourseSectionParamsWithHTTPClient(client *http.Client) *DeleteCourseSectionParams { - return &DeleteCourseSectionParams{ - HTTPClient: client, - } -} - -/* -DeleteCourseSectionParams contains all the parameters to send to the API endpoint - - for the delete course section operation. - - Typically these are written to a http.Request. -*/ -type DeleteCourseSectionParams struct { - - /* ID. - - Unique Record ID - */ - ID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete course section params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteCourseSectionParams) WithDefaults() *DeleteCourseSectionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete course section params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteCourseSectionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete course section params -func (o *DeleteCourseSectionParams) WithTimeout(timeout time.Duration) *DeleteCourseSectionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete course section params -func (o *DeleteCourseSectionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete course section params -func (o *DeleteCourseSectionParams) WithContext(ctx context.Context) *DeleteCourseSectionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete course section params -func (o *DeleteCourseSectionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete course section params -func (o *DeleteCourseSectionParams) WithHTTPClient(client *http.Client) *DeleteCourseSectionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete course section params -func (o *DeleteCourseSectionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete course section params -func (o *DeleteCourseSectionParams) WithID(id *string) *DeleteCourseSectionParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete course section params -func (o *DeleteCourseSectionParams) SetID(id *string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteCourseSectionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ID != nil { - - // query param id - var qrID string - - if o.ID != nil { - qrID = *o.ID - } - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/course_sections/delete_course_section_responses.go b/api/members/members_client/course_sections/delete_course_section_responses.go deleted file mode 100644 index 8d72a93..0000000 --- a/api/members/members_client/course_sections/delete_course_section_responses.go +++ /dev/null @@ -1,92 +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 course_sections - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// DeleteCourseSectionReader is a Reader for the DeleteCourseSection structure. -type DeleteCourseSectionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteCourseSectionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteCourseSectionNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeleteCourseSectionNoContent creates a DeleteCourseSectionNoContent with default headers values -func NewDeleteCourseSectionNoContent() *DeleteCourseSectionNoContent { - return &DeleteCourseSectionNoContent{} -} - -/* -DeleteCourseSectionNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteCourseSectionNoContent struct { -} - -// IsSuccess returns true when this delete course section no content response has a 2xx status code -func (o *DeleteCourseSectionNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete course section no content response has a 3xx status code -func (o *DeleteCourseSectionNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete course section no content response has a 4xx status code -func (o *DeleteCourseSectionNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete course section no content response has a 5xx status code -func (o *DeleteCourseSectionNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete course section no content response a status code equal to that given -func (o *DeleteCourseSectionNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete course section no content response -func (o *DeleteCourseSectionNoContent) Code() int { - return 204 -} - -func (o *DeleteCourseSectionNoContent) Error() string { - return fmt.Sprintf("[DELETE /coursesections][%d] deleteCourseSectionNoContent ", 204) -} - -func (o *DeleteCourseSectionNoContent) String() string { - return fmt.Sprintf("[DELETE /coursesections][%d] deleteCourseSectionNoContent ", 204) -} - -func (o *DeleteCourseSectionNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/course_sections/get_course_sections_responses.go b/api/members/members_client/course_sections/get_course_sections_responses.go deleted file mode 100644 index 625d837..0000000 --- a/api/members/members_client/course_sections/get_course_sections_responses.go +++ /dev/null @@ -1,92 +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 course_sections - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// GetCourseSectionsReader is a Reader for the GetCourseSections structure. -type GetCourseSectionsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCourseSectionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCourseSectionsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetCourseSectionsOK creates a GetCourseSectionsOK with default headers values -func NewGetCourseSectionsOK() *GetCourseSectionsOK { - return &GetCourseSectionsOK{} -} - -/* -GetCourseSectionsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetCourseSectionsOK struct { -} - -// IsSuccess returns true when this get course sections o k response has a 2xx status code -func (o *GetCourseSectionsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get course sections o k response has a 3xx status code -func (o *GetCourseSectionsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get course sections o k response has a 4xx status code -func (o *GetCourseSectionsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get course sections o k response has a 5xx status code -func (o *GetCourseSectionsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get course sections o k response a status code equal to that given -func (o *GetCourseSectionsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get course sections o k response -func (o *GetCourseSectionsOK) Code() int { - return 200 -} - -func (o *GetCourseSectionsOK) Error() string { - return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsOK ", 200) -} - -func (o *GetCourseSectionsOK) String() string { - return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsOK ", 200) -} - -func (o *GetCourseSectionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/course_sections/update_course_section_responses.go b/api/members/members_client/course_sections/update_course_section_responses.go deleted file mode 100644 index 1e9f6e4..0000000 --- a/api/members/members_client/course_sections/update_course_section_responses.go +++ /dev/null @@ -1,92 +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 course_sections - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// UpdateCourseSectionReader is a Reader for the UpdateCourseSection structure. -type UpdateCourseSectionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateCourseSectionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateCourseSectionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewUpdateCourseSectionOK creates a UpdateCourseSectionOK with default headers values -func NewUpdateCourseSectionOK() *UpdateCourseSectionOK { - return &UpdateCourseSectionOK{} -} - -/* -UpdateCourseSectionOK describes a response with status code 200, with default header values. - -OK -*/ -type UpdateCourseSectionOK struct { -} - -// IsSuccess returns true when this update course section o k response has a 2xx status code -func (o *UpdateCourseSectionOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update course section o k response has a 3xx status code -func (o *UpdateCourseSectionOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update course section o k response has a 4xx status code -func (o *UpdateCourseSectionOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update course section o k response has a 5xx status code -func (o *UpdateCourseSectionOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update course section o k response a status code equal to that given -func (o *UpdateCourseSectionOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update course section o k response -func (o *UpdateCourseSectionOK) Code() int { - return 200 -} - -func (o *UpdateCourseSectionOK) Error() string { - return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionOK ", 200) -} - -func (o *UpdateCourseSectionOK) String() string { - return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionOK ", 200) -} - -func (o *UpdateCourseSectionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/courses/courses_client.go b/api/members/members_client/courses/courses_client.go index 7fab222..25e7fbc 100644 --- a/api/members/members_client/courses/courses_client.go +++ b/api/members/members_client/courses/courses_client.go @@ -34,34 +34,45 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateCourse(params *CreateCourseParams, opts ...ClientOption) (*CreateCourseCreated, error) + GetCourseLessons(params *GetCourseLessonsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCourseLessonsOK, error) - DeleteCourse(params *DeleteCourseParams, opts ...ClientOption) (*DeleteCourseNoContent, error) + GetCourseSections(params *GetCourseSectionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCourseSectionsOK, error) - GetCourses(params *GetCoursesParams, opts ...ClientOption) (*GetCoursesOK, error) + GetCourses(params *GetCoursesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCoursesOK, error) - UpdateCourse(params *UpdateCourseParams, opts ...ClientOption) (*UpdateCourseOK, error) + PostCourseLessons(params *PostCourseLessonsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCourseLessonsOK, error) + + PostCourseSections(params *PostCourseSectionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCourseSectionsOK, error) + + PostCourses(params *PostCoursesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCoursesOK, error) + + UpdateCourseLessons(params *UpdateCourseLessonsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCourseLessonsOK, error) + + UpdateCourseSections(params *UpdateCourseSectionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCourseSectionsOK, error) + + UpdateCourses(params *UpdateCoursesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCoursesOK, error) SetTransport(transport runtime.ClientTransport) } /* -CreateCourse creates a new course +GetCourseLessons gets a list of course lessons */ -func (a *Client) CreateCourse(params *CreateCourseParams, opts ...ClientOption) (*CreateCourseCreated, error) { +func (a *Client) GetCourseLessons(params *GetCourseLessonsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCourseLessonsOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewCreateCourseParams() + params = NewGetCourseLessonsParams() } op := &runtime.ClientOperation{ - ID: "createCourse", - Method: "POST", - PathPattern: "/courses", + ID: "getCourseLessons", + Method: "GET", + PathPattern: "/courselessons", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &CreateCourseReader{formats: a.formats}, + Reader: &GetCourseLessonsReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -73,33 +84,34 @@ func (a *Client) CreateCourse(params *CreateCourseParams, opts ...ClientOption) if err != nil { return nil, err } - success, ok := result.(*CreateCourseCreated) + success, ok := result.(*GetCourseLessonsOK) if ok { return success, nil } // unexpected success response // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createCourse: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for getCourseLessons: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* -DeleteCourse deletes a course +GetCourseSections gets a list of course sections */ -func (a *Client) DeleteCourse(params *DeleteCourseParams, opts ...ClientOption) (*DeleteCourseNoContent, error) { +func (a *Client) GetCourseSections(params *GetCourseSectionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCourseSectionsOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDeleteCourseParams() + params = NewGetCourseSectionsParams() } op := &runtime.ClientOperation{ - ID: "deleteCourse", - Method: "DELETE", - PathPattern: "/courses", + ID: "getCourseSections", + Method: "GET", + PathPattern: "/coursesections", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &DeleteCourseReader{formats: a.formats}, + Reader: &GetCourseSectionsReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -111,20 +123,20 @@ func (a *Client) DeleteCourse(params *DeleteCourseParams, opts ...ClientOption) if err != nil { return nil, err } - success, ok := result.(*DeleteCourseNoContent) + success, ok := result.(*GetCourseSectionsOK) if ok { return success, nil } // unexpected success response // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for deleteCourse: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for getCourseSections: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* GetCourses gets a list of courses */ -func (a *Client) GetCourses(params *GetCoursesParams, opts ...ClientOption) (*GetCoursesOK, error) { +func (a *Client) GetCourses(params *GetCoursesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCoursesOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetCoursesParams() @@ -138,6 +150,7 @@ func (a *Client) GetCourses(params *GetCoursesParams, opts ...ClientOption) (*Ge Schemes: []string{"http"}, Params: params, Reader: &GetCoursesReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -160,22 +173,23 @@ func (a *Client) GetCourses(params *GetCoursesParams, opts ...ClientOption) (*Ge } /* -UpdateCourse updates an existing course +PostCourseLessons creates a new course lesson */ -func (a *Client) UpdateCourse(params *UpdateCourseParams, opts ...ClientOption) (*UpdateCourseOK, error) { +func (a *Client) PostCourseLessons(params *PostCourseLessonsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCourseLessonsOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewUpdateCourseParams() + params = NewPostCourseLessonsParams() } op := &runtime.ClientOperation{ - ID: "updateCourse", - Method: "PUT", - PathPattern: "/courses", + ID: "postCourseLessons", + Method: "POST", + PathPattern: "/courselessons", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &UpdateCourseReader{formats: a.formats}, + Reader: &PostCourseLessonsReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -187,13 +201,208 @@ func (a *Client) UpdateCourse(params *UpdateCourseParams, opts ...ClientOption) if err != nil { return nil, err } - success, ok := result.(*UpdateCourseOK) + success, ok := result.(*PostCourseLessonsOK) if ok { return success, nil } // unexpected success response // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for updateCourse: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for postCourseLessons: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PostCourseSections creates a new course section +*/ +func (a *Client) PostCourseSections(params *PostCourseSectionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCourseSectionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostCourseSectionsParams() + } + op := &runtime.ClientOperation{ + ID: "postCourseSections", + Method: "POST", + PathPattern: "/coursesections", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostCourseSectionsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostCourseSectionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postCourseSections: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PostCourses creates a new course +*/ +func (a *Client) PostCourses(params *PostCoursesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCoursesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostCoursesParams() + } + op := &runtime.ClientOperation{ + ID: "postCourses", + Method: "POST", + PathPattern: "/courses", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostCoursesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostCoursesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postCourses: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +UpdateCourseLessons updates an existing course lesson +*/ +func (a *Client) UpdateCourseLessons(params *UpdateCourseLessonsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCourseLessonsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUpdateCourseLessonsParams() + } + op := &runtime.ClientOperation{ + ID: "updateCourseLessons", + Method: "PUT", + PathPattern: "/courselessons", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UpdateCourseLessonsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UpdateCourseLessonsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for updateCourseLessons: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +UpdateCourseSections updates an existing course section +*/ +func (a *Client) UpdateCourseSections(params *UpdateCourseSectionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCourseSectionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUpdateCourseSectionsParams() + } + op := &runtime.ClientOperation{ + ID: "updateCourseSections", + Method: "PUT", + PathPattern: "/coursesections", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UpdateCourseSectionsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UpdateCourseSectionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for updateCourseSections: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +UpdateCourses updates an existing course +*/ +func (a *Client) UpdateCourses(params *UpdateCoursesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCoursesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUpdateCoursesParams() + } + op := &runtime.ClientOperation{ + ID: "updateCourses", + Method: "PUT", + PathPattern: "/courses", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UpdateCoursesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UpdateCoursesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for updateCourses: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/api/members/members_client/courses/create_course_parameters.go b/api/members/members_client/courses/create_course_parameters.go deleted file mode 100644 index e9890e6..0000000 --- a/api/members/members_client/courses/create_course_parameters.go +++ /dev/null @@ -1,157 +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 courses - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateCourseParams creates a new CreateCourseParams 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 NewCreateCourseParams() *CreateCourseParams { - return &CreateCourseParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateCourseParamsWithTimeout creates a new CreateCourseParams object -// with the ability to set a timeout on a request. -func NewCreateCourseParamsWithTimeout(timeout time.Duration) *CreateCourseParams { - return &CreateCourseParams{ - timeout: timeout, - } -} - -// NewCreateCourseParamsWithContext creates a new CreateCourseParams object -// with the ability to set a context for a request. -func NewCreateCourseParamsWithContext(ctx context.Context) *CreateCourseParams { - return &CreateCourseParams{ - Context: ctx, - } -} - -// NewCreateCourseParamsWithHTTPClient creates a new CreateCourseParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateCourseParamsWithHTTPClient(client *http.Client) *CreateCourseParams { - return &CreateCourseParams{ - HTTPClient: client, - } -} - -/* -CreateCourseParams contains all the parameters to send to the API endpoint - - for the create course operation. - - Typically these are written to a http.Request. -*/ -type CreateCourseParams struct { - - /* CourseRequest. - - An array of new Course records - */ - CourseRequest *members_models.CourseRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create course params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCourseParams) WithDefaults() *CreateCourseParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create course params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateCourseParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create course params -func (o *CreateCourseParams) WithTimeout(timeout time.Duration) *CreateCourseParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create course params -func (o *CreateCourseParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create course params -func (o *CreateCourseParams) WithContext(ctx context.Context) *CreateCourseParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create course params -func (o *CreateCourseParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create course params -func (o *CreateCourseParams) WithHTTPClient(client *http.Client) *CreateCourseParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create course params -func (o *CreateCourseParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCourseRequest adds the courseRequest to the create course params -func (o *CreateCourseParams) WithCourseRequest(courseRequest *members_models.CourseRequest) *CreateCourseParams { - o.SetCourseRequest(courseRequest) - return o -} - -// SetCourseRequest adds the courseRequest to the create course params -func (o *CreateCourseParams) SetCourseRequest(courseRequest *members_models.CourseRequest) { - o.CourseRequest = courseRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateCourseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.CourseRequest != nil { - if err := r.SetBodyParam(o.CourseRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/courses/create_course_responses.go b/api/members/members_client/courses/create_course_responses.go deleted file mode 100644 index 613d8aa..0000000 --- a/api/members/members_client/courses/create_course_responses.go +++ /dev/null @@ -1,92 +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 courses - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateCourseReader is a Reader for the CreateCourse structure. -type CreateCourseReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateCourseReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateCourseCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateCourseCreated creates a CreateCourseCreated with default headers values -func NewCreateCourseCreated() *CreateCourseCreated { - return &CreateCourseCreated{} -} - -/* -CreateCourseCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateCourseCreated struct { -} - -// IsSuccess returns true when this create course created response has a 2xx status code -func (o *CreateCourseCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create course created response has a 3xx status code -func (o *CreateCourseCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create course created response has a 4xx status code -func (o *CreateCourseCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create course created response has a 5xx status code -func (o *CreateCourseCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create course created response a status code equal to that given -func (o *CreateCourseCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create course created response -func (o *CreateCourseCreated) Code() int { - return 201 -} - -func (o *CreateCourseCreated) Error() string { - return fmt.Sprintf("[POST /courses][%d] createCourseCreated ", 201) -} - -func (o *CreateCourseCreated) String() string { - return fmt.Sprintf("[POST /courses][%d] createCourseCreated ", 201) -} - -func (o *CreateCourseCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/courses/delete_course_parameters.go b/api/members/members_client/courses/delete_course_parameters.go deleted file mode 100644 index c2df771..0000000 --- a/api/members/members_client/courses/delete_course_parameters.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// (c) 2012-2020 by Taxnexus, Inc. -// All rights reserved worldwide. -// Proprietary product; unlicensed use is not allowed - -package courses - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteCourseParams creates a new DeleteCourseParams 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 NewDeleteCourseParams() *DeleteCourseParams { - return &DeleteCourseParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteCourseParamsWithTimeout creates a new DeleteCourseParams object -// with the ability to set a timeout on a request. -func NewDeleteCourseParamsWithTimeout(timeout time.Duration) *DeleteCourseParams { - return &DeleteCourseParams{ - timeout: timeout, - } -} - -// NewDeleteCourseParamsWithContext creates a new DeleteCourseParams object -// with the ability to set a context for a request. -func NewDeleteCourseParamsWithContext(ctx context.Context) *DeleteCourseParams { - return &DeleteCourseParams{ - Context: ctx, - } -} - -// NewDeleteCourseParamsWithHTTPClient creates a new DeleteCourseParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteCourseParamsWithHTTPClient(client *http.Client) *DeleteCourseParams { - return &DeleteCourseParams{ - HTTPClient: client, - } -} - -/* -DeleteCourseParams contains all the parameters to send to the API endpoint - - for the delete course operation. - - Typically these are written to a http.Request. -*/ -type DeleteCourseParams struct { - - /* ID. - - Unique Record ID - */ - ID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete course params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteCourseParams) WithDefaults() *DeleteCourseParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete course params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteCourseParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete course params -func (o *DeleteCourseParams) WithTimeout(timeout time.Duration) *DeleteCourseParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete course params -func (o *DeleteCourseParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete course params -func (o *DeleteCourseParams) WithContext(ctx context.Context) *DeleteCourseParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete course params -func (o *DeleteCourseParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete course params -func (o *DeleteCourseParams) WithHTTPClient(client *http.Client) *DeleteCourseParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete course params -func (o *DeleteCourseParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete course params -func (o *DeleteCourseParams) WithID(id *string) *DeleteCourseParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete course params -func (o *DeleteCourseParams) SetID(id *string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteCourseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ID != nil { - - // query param id - var qrID string - - if o.ID != nil { - qrID = *o.ID - } - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/courses/delete_course_responses.go b/api/members/members_client/courses/delete_course_responses.go deleted file mode 100644 index ef56fca..0000000 --- a/api/members/members_client/courses/delete_course_responses.go +++ /dev/null @@ -1,92 +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 courses - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// DeleteCourseReader is a Reader for the DeleteCourse structure. -type DeleteCourseReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteCourseReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteCourseNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeleteCourseNoContent creates a DeleteCourseNoContent with default headers values -func NewDeleteCourseNoContent() *DeleteCourseNoContent { - return &DeleteCourseNoContent{} -} - -/* -DeleteCourseNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteCourseNoContent struct { -} - -// IsSuccess returns true when this delete course no content response has a 2xx status code -func (o *DeleteCourseNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete course no content response has a 3xx status code -func (o *DeleteCourseNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete course no content response has a 4xx status code -func (o *DeleteCourseNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete course no content response has a 5xx status code -func (o *DeleteCourseNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete course no content response a status code equal to that given -func (o *DeleteCourseNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete course no content response -func (o *DeleteCourseNoContent) Code() int { - return 204 -} - -func (o *DeleteCourseNoContent) Error() string { - return fmt.Sprintf("[DELETE /courses][%d] deleteCourseNoContent ", 204) -} - -func (o *DeleteCourseNoContent) String() string { - return fmt.Sprintf("[DELETE /courses][%d] deleteCourseNoContent ", 204) -} - -func (o *DeleteCourseNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/course_lessons/get_course_lessons_parameters.go b/api/members/members_client/courses/get_course_lessons_parameters.go similarity index 99% rename from api/members/members_client/course_lessons/get_course_lessons_parameters.go rename to api/members/members_client/courses/get_course_lessons_parameters.go index 19cb1e8..ac5cde0 100644 --- a/api/members/members_client/course_lessons/get_course_lessons_parameters.go +++ b/api/members/members_client/courses/get_course_lessons_parameters.go @@ -4,7 +4,7 @@ // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed -package course_lessons +package courses // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/members/members_client/courses/get_course_lessons_responses.go b/api/members/members_client/courses/get_course_lessons_responses.go new file mode 100644 index 0000000..890f784 --- /dev/null +++ b/api/members/members_client/courses/get_course_lessons_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// GetCourseLessonsReader is a Reader for the GetCourseLessons structure. +type GetCourseLessonsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCourseLessonsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCourseLessonsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCourseLessonsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCourseLessonsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCourseLessonsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCourseLessonsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCourseLessonsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGetCourseLessonsOK creates a GetCourseLessonsOK with default headers values +func NewGetCourseLessonsOK() *GetCourseLessonsOK { + return &GetCourseLessonsOK{} +} + +/* +GetCourseLessonsOK describes a response with status code 200, with default header values. + +CourseLesson Response Object +*/ +type GetCourseLessonsOK struct { + Payload *members_models.CourseLessonResponse +} + +// IsSuccess returns true when this get course lessons o k response has a 2xx status code +func (o *GetCourseLessonsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get course lessons o k response has a 3xx status code +func (o *GetCourseLessonsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course lessons o k response has a 4xx status code +func (o *GetCourseLessonsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get course lessons o k response has a 5xx status code +func (o *GetCourseLessonsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get course lessons o k response a status code equal to that given +func (o *GetCourseLessonsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get course lessons o k response +func (o *GetCourseLessonsOK) Code() int { + return 200 +} + +func (o *GetCourseLessonsOK) Error() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsOK %+v", 200, o.Payload) +} + +func (o *GetCourseLessonsOK) String() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsOK %+v", 200, o.Payload) +} + +func (o *GetCourseLessonsOK) GetPayload() *members_models.CourseLessonResponse { + return o.Payload +} + +func (o *GetCourseLessonsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.CourseLessonResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseLessonsUnauthorized creates a GetCourseLessonsUnauthorized with default headers values +func NewGetCourseLessonsUnauthorized() *GetCourseLessonsUnauthorized { + return &GetCourseLessonsUnauthorized{} +} + +/* +GetCourseLessonsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetCourseLessonsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get course lessons unauthorized response has a 2xx status code +func (o *GetCourseLessonsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course lessons unauthorized response has a 3xx status code +func (o *GetCourseLessonsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course lessons unauthorized response has a 4xx status code +func (o *GetCourseLessonsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course lessons unauthorized response has a 5xx status code +func (o *GetCourseLessonsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get course lessons unauthorized response a status code equal to that given +func (o *GetCourseLessonsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get course lessons unauthorized response +func (o *GetCourseLessonsUnauthorized) Code() int { + return 401 +} + +func (o *GetCourseLessonsUnauthorized) Error() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCourseLessonsUnauthorized) String() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCourseLessonsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCourseLessonsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseLessonsForbidden creates a GetCourseLessonsForbidden with default headers values +func NewGetCourseLessonsForbidden() *GetCourseLessonsForbidden { + return &GetCourseLessonsForbidden{} +} + +/* +GetCourseLessonsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type GetCourseLessonsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this get course lessons forbidden response has a 2xx status code +func (o *GetCourseLessonsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course lessons forbidden response has a 3xx status code +func (o *GetCourseLessonsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course lessons forbidden response has a 4xx status code +func (o *GetCourseLessonsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course lessons forbidden response has a 5xx status code +func (o *GetCourseLessonsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get course lessons forbidden response a status code equal to that given +func (o *GetCourseLessonsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get course lessons forbidden response +func (o *GetCourseLessonsForbidden) Code() int { + return 403 +} + +func (o *GetCourseLessonsForbidden) Error() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsForbidden %+v", 403, o.Payload) +} + +func (o *GetCourseLessonsForbidden) String() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsForbidden %+v", 403, o.Payload) +} + +func (o *GetCourseLessonsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCourseLessonsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseLessonsNotFound creates a GetCourseLessonsNotFound with default headers values +func NewGetCourseLessonsNotFound() *GetCourseLessonsNotFound { + return &GetCourseLessonsNotFound{} +} + +/* +GetCourseLessonsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type GetCourseLessonsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get course lessons not found response has a 2xx status code +func (o *GetCourseLessonsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course lessons not found response has a 3xx status code +func (o *GetCourseLessonsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course lessons not found response has a 4xx status code +func (o *GetCourseLessonsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course lessons not found response has a 5xx status code +func (o *GetCourseLessonsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get course lessons not found response a status code equal to that given +func (o *GetCourseLessonsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get course lessons not found response +func (o *GetCourseLessonsNotFound) Code() int { + return 404 +} + +func (o *GetCourseLessonsNotFound) Error() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsNotFound %+v", 404, o.Payload) +} + +func (o *GetCourseLessonsNotFound) String() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsNotFound %+v", 404, o.Payload) +} + +func (o *GetCourseLessonsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCourseLessonsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseLessonsUnprocessableEntity creates a GetCourseLessonsUnprocessableEntity with default headers values +func NewGetCourseLessonsUnprocessableEntity() *GetCourseLessonsUnprocessableEntity { + return &GetCourseLessonsUnprocessableEntity{} +} + +/* +GetCourseLessonsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCourseLessonsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get course lessons unprocessable entity response has a 2xx status code +func (o *GetCourseLessonsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course lessons unprocessable entity response has a 3xx status code +func (o *GetCourseLessonsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course lessons unprocessable entity response has a 4xx status code +func (o *GetCourseLessonsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course lessons unprocessable entity response has a 5xx status code +func (o *GetCourseLessonsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this get course lessons unprocessable entity response a status code equal to that given +func (o *GetCourseLessonsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the get course lessons unprocessable entity response +func (o *GetCourseLessonsUnprocessableEntity) Code() int { + return 422 +} + +func (o *GetCourseLessonsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCourseLessonsUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCourseLessonsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCourseLessonsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseLessonsInternalServerError creates a GetCourseLessonsInternalServerError with default headers values +func NewGetCourseLessonsInternalServerError() *GetCourseLessonsInternalServerError { + return &GetCourseLessonsInternalServerError{} +} + +/* +GetCourseLessonsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type GetCourseLessonsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get course lessons internal server error response has a 2xx status code +func (o *GetCourseLessonsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course lessons internal server error response has a 3xx status code +func (o *GetCourseLessonsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course lessons internal server error response has a 4xx status code +func (o *GetCourseLessonsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get course lessons internal server error response has a 5xx status code +func (o *GetCourseLessonsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get course lessons internal server error response a status code equal to that given +func (o *GetCourseLessonsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get course lessons internal server error response +func (o *GetCourseLessonsInternalServerError) Code() int { + return 500 +} + +func (o *GetCourseLessonsInternalServerError) Error() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCourseLessonsInternalServerError) String() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCourseLessonsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCourseLessonsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/course_sections/get_course_sections_parameters.go b/api/members/members_client/courses/get_course_sections_parameters.go similarity index 99% rename from api/members/members_client/course_sections/get_course_sections_parameters.go rename to api/members/members_client/courses/get_course_sections_parameters.go index efffdc5..8f944fb 100644 --- a/api/members/members_client/course_sections/get_course_sections_parameters.go +++ b/api/members/members_client/courses/get_course_sections_parameters.go @@ -4,7 +4,7 @@ // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed -package course_sections +package courses // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/members/members_client/courses/get_course_sections_responses.go b/api/members/members_client/courses/get_course_sections_responses.go new file mode 100644 index 0000000..add6d91 --- /dev/null +++ b/api/members/members_client/courses/get_course_sections_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// GetCourseSectionsReader is a Reader for the GetCourseSections structure. +type GetCourseSectionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCourseSectionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCourseSectionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCourseSectionsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCourseSectionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCourseSectionsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCourseSectionsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCourseSectionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGetCourseSectionsOK creates a GetCourseSectionsOK with default headers values +func NewGetCourseSectionsOK() *GetCourseSectionsOK { + return &GetCourseSectionsOK{} +} + +/* +GetCourseSectionsOK describes a response with status code 200, with default header values. + +CourseSection Response Object +*/ +type GetCourseSectionsOK struct { + Payload *members_models.CourseSectionResponse +} + +// IsSuccess returns true when this get course sections o k response has a 2xx status code +func (o *GetCourseSectionsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get course sections o k response has a 3xx status code +func (o *GetCourseSectionsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course sections o k response has a 4xx status code +func (o *GetCourseSectionsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get course sections o k response has a 5xx status code +func (o *GetCourseSectionsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get course sections o k response a status code equal to that given +func (o *GetCourseSectionsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get course sections o k response +func (o *GetCourseSectionsOK) Code() int { + return 200 +} + +func (o *GetCourseSectionsOK) Error() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsOK %+v", 200, o.Payload) +} + +func (o *GetCourseSectionsOK) String() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsOK %+v", 200, o.Payload) +} + +func (o *GetCourseSectionsOK) GetPayload() *members_models.CourseSectionResponse { + return o.Payload +} + +func (o *GetCourseSectionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.CourseSectionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseSectionsUnauthorized creates a GetCourseSectionsUnauthorized with default headers values +func NewGetCourseSectionsUnauthorized() *GetCourseSectionsUnauthorized { + return &GetCourseSectionsUnauthorized{} +} + +/* +GetCourseSectionsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetCourseSectionsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get course sections unauthorized response has a 2xx status code +func (o *GetCourseSectionsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course sections unauthorized response has a 3xx status code +func (o *GetCourseSectionsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course sections unauthorized response has a 4xx status code +func (o *GetCourseSectionsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course sections unauthorized response has a 5xx status code +func (o *GetCourseSectionsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get course sections unauthorized response a status code equal to that given +func (o *GetCourseSectionsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get course sections unauthorized response +func (o *GetCourseSectionsUnauthorized) Code() int { + return 401 +} + +func (o *GetCourseSectionsUnauthorized) Error() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCourseSectionsUnauthorized) String() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCourseSectionsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCourseSectionsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseSectionsForbidden creates a GetCourseSectionsForbidden with default headers values +func NewGetCourseSectionsForbidden() *GetCourseSectionsForbidden { + return &GetCourseSectionsForbidden{} +} + +/* +GetCourseSectionsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type GetCourseSectionsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this get course sections forbidden response has a 2xx status code +func (o *GetCourseSectionsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course sections forbidden response has a 3xx status code +func (o *GetCourseSectionsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course sections forbidden response has a 4xx status code +func (o *GetCourseSectionsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course sections forbidden response has a 5xx status code +func (o *GetCourseSectionsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get course sections forbidden response a status code equal to that given +func (o *GetCourseSectionsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get course sections forbidden response +func (o *GetCourseSectionsForbidden) Code() int { + return 403 +} + +func (o *GetCourseSectionsForbidden) Error() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsForbidden %+v", 403, o.Payload) +} + +func (o *GetCourseSectionsForbidden) String() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsForbidden %+v", 403, o.Payload) +} + +func (o *GetCourseSectionsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCourseSectionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseSectionsNotFound creates a GetCourseSectionsNotFound with default headers values +func NewGetCourseSectionsNotFound() *GetCourseSectionsNotFound { + return &GetCourseSectionsNotFound{} +} + +/* +GetCourseSectionsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type GetCourseSectionsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get course sections not found response has a 2xx status code +func (o *GetCourseSectionsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course sections not found response has a 3xx status code +func (o *GetCourseSectionsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course sections not found response has a 4xx status code +func (o *GetCourseSectionsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course sections not found response has a 5xx status code +func (o *GetCourseSectionsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get course sections not found response a status code equal to that given +func (o *GetCourseSectionsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get course sections not found response +func (o *GetCourseSectionsNotFound) Code() int { + return 404 +} + +func (o *GetCourseSectionsNotFound) Error() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsNotFound %+v", 404, o.Payload) +} + +func (o *GetCourseSectionsNotFound) String() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsNotFound %+v", 404, o.Payload) +} + +func (o *GetCourseSectionsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCourseSectionsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseSectionsUnprocessableEntity creates a GetCourseSectionsUnprocessableEntity with default headers values +func NewGetCourseSectionsUnprocessableEntity() *GetCourseSectionsUnprocessableEntity { + return &GetCourseSectionsUnprocessableEntity{} +} + +/* +GetCourseSectionsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCourseSectionsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get course sections unprocessable entity response has a 2xx status code +func (o *GetCourseSectionsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course sections unprocessable entity response has a 3xx status code +func (o *GetCourseSectionsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course sections unprocessable entity response has a 4xx status code +func (o *GetCourseSectionsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course sections unprocessable entity response has a 5xx status code +func (o *GetCourseSectionsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this get course sections unprocessable entity response a status code equal to that given +func (o *GetCourseSectionsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the get course sections unprocessable entity response +func (o *GetCourseSectionsUnprocessableEntity) Code() int { + return 422 +} + +func (o *GetCourseSectionsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCourseSectionsUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCourseSectionsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCourseSectionsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseSectionsInternalServerError creates a GetCourseSectionsInternalServerError with default headers values +func NewGetCourseSectionsInternalServerError() *GetCourseSectionsInternalServerError { + return &GetCourseSectionsInternalServerError{} +} + +/* +GetCourseSectionsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type GetCourseSectionsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get course sections internal server error response has a 2xx status code +func (o *GetCourseSectionsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course sections internal server error response has a 3xx status code +func (o *GetCourseSectionsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course sections internal server error response has a 4xx status code +func (o *GetCourseSectionsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get course sections internal server error response has a 5xx status code +func (o *GetCourseSectionsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get course sections internal server error response a status code equal to that given +func (o *GetCourseSectionsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get course sections internal server error response +func (o *GetCourseSectionsInternalServerError) Code() int { + return 500 +} + +func (o *GetCourseSectionsInternalServerError) Error() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCourseSectionsInternalServerError) String() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCourseSectionsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCourseSectionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/courses/get_courses_responses.go b/api/members/members_client/courses/get_courses_responses.go index 6e22007..4e78fee 100644 --- a/api/members/members_client/courses/get_courses_responses.go +++ b/api/members/members_client/courses/get_courses_responses.go @@ -11,9 +11,12 @@ package courses import ( "fmt" + "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" ) // GetCoursesReader is a Reader for the GetCourses structure. @@ -30,6 +33,36 @@ func (o *GetCoursesReader) ReadResponse(response runtime.ClientResponse, consume return nil, err } return result, nil + case 401: + result := NewGetCoursesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCoursesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCoursesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCoursesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCoursesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } @@ -43,9 +76,10 @@ func NewGetCoursesOK() *GetCoursesOK { /* GetCoursesOK describes a response with status code 200, with default header values. -OK +Course Response Object */ type GetCoursesOK struct { + Payload *members_models.CourseResponse } // IsSuccess returns true when this get courses o k response has a 2xx status code @@ -79,14 +113,374 @@ func (o *GetCoursesOK) Code() int { } func (o *GetCoursesOK) Error() string { - return fmt.Sprintf("[GET /courses][%d] getCoursesOK ", 200) + return fmt.Sprintf("[GET /courses][%d] getCoursesOK %+v", 200, o.Payload) } func (o *GetCoursesOK) String() string { - return fmt.Sprintf("[GET /courses][%d] getCoursesOK ", 200) + return fmt.Sprintf("[GET /courses][%d] getCoursesOK %+v", 200, o.Payload) +} + +func (o *GetCoursesOK) GetPayload() *members_models.CourseResponse { + return o.Payload } func (o *GetCoursesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(members_models.CourseResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoursesUnauthorized creates a GetCoursesUnauthorized with default headers values +func NewGetCoursesUnauthorized() *GetCoursesUnauthorized { + return &GetCoursesUnauthorized{} +} + +/* +GetCoursesUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetCoursesUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get courses unauthorized response has a 2xx status code +func (o *GetCoursesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get courses unauthorized response has a 3xx status code +func (o *GetCoursesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get courses unauthorized response has a 4xx status code +func (o *GetCoursesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get courses unauthorized response has a 5xx status code +func (o *GetCoursesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get courses unauthorized response a status code equal to that given +func (o *GetCoursesUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get courses unauthorized response +func (o *GetCoursesUnauthorized) Code() int { + return 401 +} + +func (o *GetCoursesUnauthorized) Error() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCoursesUnauthorized) String() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCoursesUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCoursesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoursesForbidden creates a GetCoursesForbidden with default headers values +func NewGetCoursesForbidden() *GetCoursesForbidden { + return &GetCoursesForbidden{} +} + +/* +GetCoursesForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type GetCoursesForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this get courses forbidden response has a 2xx status code +func (o *GetCoursesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get courses forbidden response has a 3xx status code +func (o *GetCoursesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get courses forbidden response has a 4xx status code +func (o *GetCoursesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get courses forbidden response has a 5xx status code +func (o *GetCoursesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get courses forbidden response a status code equal to that given +func (o *GetCoursesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get courses forbidden response +func (o *GetCoursesForbidden) Code() int { + return 403 +} + +func (o *GetCoursesForbidden) Error() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesForbidden %+v", 403, o.Payload) +} + +func (o *GetCoursesForbidden) String() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesForbidden %+v", 403, o.Payload) +} + +func (o *GetCoursesForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCoursesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoursesNotFound creates a GetCoursesNotFound with default headers values +func NewGetCoursesNotFound() *GetCoursesNotFound { + return &GetCoursesNotFound{} +} + +/* +GetCoursesNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type GetCoursesNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get courses not found response has a 2xx status code +func (o *GetCoursesNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get courses not found response has a 3xx status code +func (o *GetCoursesNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get courses not found response has a 4xx status code +func (o *GetCoursesNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get courses not found response has a 5xx status code +func (o *GetCoursesNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get courses not found response a status code equal to that given +func (o *GetCoursesNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get courses not found response +func (o *GetCoursesNotFound) Code() int { + return 404 +} + +func (o *GetCoursesNotFound) Error() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesNotFound %+v", 404, o.Payload) +} + +func (o *GetCoursesNotFound) String() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesNotFound %+v", 404, o.Payload) +} + +func (o *GetCoursesNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCoursesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoursesUnprocessableEntity creates a GetCoursesUnprocessableEntity with default headers values +func NewGetCoursesUnprocessableEntity() *GetCoursesUnprocessableEntity { + return &GetCoursesUnprocessableEntity{} +} + +/* +GetCoursesUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCoursesUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get courses unprocessable entity response has a 2xx status code +func (o *GetCoursesUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get courses unprocessable entity response has a 3xx status code +func (o *GetCoursesUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get courses unprocessable entity response has a 4xx status code +func (o *GetCoursesUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this get courses unprocessable entity response has a 5xx status code +func (o *GetCoursesUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this get courses unprocessable entity response a status code equal to that given +func (o *GetCoursesUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the get courses unprocessable entity response +func (o *GetCoursesUnprocessableEntity) Code() int { + return 422 +} + +func (o *GetCoursesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCoursesUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCoursesUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCoursesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoursesInternalServerError creates a GetCoursesInternalServerError with default headers values +func NewGetCoursesInternalServerError() *GetCoursesInternalServerError { + return &GetCoursesInternalServerError{} +} + +/* +GetCoursesInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type GetCoursesInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get courses internal server error response has a 2xx status code +func (o *GetCoursesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get courses internal server error response has a 3xx status code +func (o *GetCoursesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get courses internal server error response has a 4xx status code +func (o *GetCoursesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get courses internal server error response has a 5xx status code +func (o *GetCoursesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get courses internal server error response a status code equal to that given +func (o *GetCoursesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get courses internal server error response +func (o *GetCoursesInternalServerError) Code() int { + return 500 +} + +func (o *GetCoursesInternalServerError) Error() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCoursesInternalServerError) String() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCoursesInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetCoursesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + return nil } diff --git a/api/members/members_client/courses/post_course_lessons_parameters.go b/api/members/members_client/courses/post_course_lessons_parameters.go new file mode 100644 index 0000000..f5e7356 --- /dev/null +++ b/api/members/members_client/courses/post_course_lessons_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostCourseLessonsParams creates a new PostCourseLessonsParams 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 NewPostCourseLessonsParams() *PostCourseLessonsParams { + return &PostCourseLessonsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostCourseLessonsParamsWithTimeout creates a new PostCourseLessonsParams object +// with the ability to set a timeout on a request. +func NewPostCourseLessonsParamsWithTimeout(timeout time.Duration) *PostCourseLessonsParams { + return &PostCourseLessonsParams{ + timeout: timeout, + } +} + +// NewPostCourseLessonsParamsWithContext creates a new PostCourseLessonsParams object +// with the ability to set a context for a request. +func NewPostCourseLessonsParamsWithContext(ctx context.Context) *PostCourseLessonsParams { + return &PostCourseLessonsParams{ + Context: ctx, + } +} + +// NewPostCourseLessonsParamsWithHTTPClient creates a new PostCourseLessonsParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostCourseLessonsParamsWithHTTPClient(client *http.Client) *PostCourseLessonsParams { + return &PostCourseLessonsParams{ + HTTPClient: client, + } +} + +/* +PostCourseLessonsParams contains all the parameters to send to the API endpoint + + for the post course lessons operation. + + Typically these are written to a http.Request. +*/ +type PostCourseLessonsParams struct { + + /* CourselessonRequest. + + An array of new CourseLesson records + */ + CourselessonRequest *members_models.CourseLessonRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post course lessons params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostCourseLessonsParams) WithDefaults() *PostCourseLessonsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post course lessons params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostCourseLessonsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post course lessons params +func (o *PostCourseLessonsParams) WithTimeout(timeout time.Duration) *PostCourseLessonsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post course lessons params +func (o *PostCourseLessonsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post course lessons params +func (o *PostCourseLessonsParams) WithContext(ctx context.Context) *PostCourseLessonsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post course lessons params +func (o *PostCourseLessonsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post course lessons params +func (o *PostCourseLessonsParams) WithHTTPClient(client *http.Client) *PostCourseLessonsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post course lessons params +func (o *PostCourseLessonsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCourselessonRequest adds the courselessonRequest to the post course lessons params +func (o *PostCourseLessonsParams) WithCourselessonRequest(courselessonRequest *members_models.CourseLessonRequest) *PostCourseLessonsParams { + o.SetCourselessonRequest(courselessonRequest) + return o +} + +// SetCourselessonRequest adds the courselessonRequest to the post course lessons params +func (o *PostCourseLessonsParams) SetCourselessonRequest(courselessonRequest *members_models.CourseLessonRequest) { + o.CourselessonRequest = courselessonRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostCourseLessonsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.CourselessonRequest != nil { + if err := r.SetBodyParam(o.CourselessonRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/courses/post_course_lessons_responses.go b/api/members/members_client/courses/post_course_lessons_responses.go new file mode 100644 index 0000000..02abbed --- /dev/null +++ b/api/members/members_client/courses/post_course_lessons_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// PostCourseLessonsReader is a Reader for the PostCourseLessons structure. +type PostCourseLessonsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostCourseLessonsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostCourseLessonsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostCourseLessonsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostCourseLessonsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostCourseLessonsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostCourseLessonsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostCourseLessonsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostCourseLessonsOK creates a PostCourseLessonsOK with default headers values +func NewPostCourseLessonsOK() *PostCourseLessonsOK { + return &PostCourseLessonsOK{} +} + +/* +PostCourseLessonsOK describes a response with status code 200, with default header values. + +CourseLesson Response Object +*/ +type PostCourseLessonsOK struct { + Payload *members_models.CourseLessonResponse +} + +// IsSuccess returns true when this post course lessons o k response has a 2xx status code +func (o *PostCourseLessonsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post course lessons o k response has a 3xx status code +func (o *PostCourseLessonsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course lessons o k response has a 4xx status code +func (o *PostCourseLessonsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this post course lessons o k response has a 5xx status code +func (o *PostCourseLessonsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this post course lessons o k response a status code equal to that given +func (o *PostCourseLessonsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the post course lessons o k response +func (o *PostCourseLessonsOK) Code() int { + return 200 +} + +func (o *PostCourseLessonsOK) Error() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonsOK %+v", 200, o.Payload) +} + +func (o *PostCourseLessonsOK) String() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonsOK %+v", 200, o.Payload) +} + +func (o *PostCourseLessonsOK) GetPayload() *members_models.CourseLessonResponse { + return o.Payload +} + +func (o *PostCourseLessonsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.CourseLessonResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseLessonsUnauthorized creates a PostCourseLessonsUnauthorized with default headers values +func NewPostCourseLessonsUnauthorized() *PostCourseLessonsUnauthorized { + return &PostCourseLessonsUnauthorized{} +} + +/* +PostCourseLessonsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostCourseLessonsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post course lessons unauthorized response has a 2xx status code +func (o *PostCourseLessonsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course lessons unauthorized response has a 3xx status code +func (o *PostCourseLessonsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course lessons unauthorized response has a 4xx status code +func (o *PostCourseLessonsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course lessons unauthorized response has a 5xx status code +func (o *PostCourseLessonsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this post course lessons unauthorized response a status code equal to that given +func (o *PostCourseLessonsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the post course lessons unauthorized response +func (o *PostCourseLessonsUnauthorized) Code() int { + return 401 +} + +func (o *PostCourseLessonsUnauthorized) Error() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCourseLessonsUnauthorized) String() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCourseLessonsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCourseLessonsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseLessonsForbidden creates a PostCourseLessonsForbidden with default headers values +func NewPostCourseLessonsForbidden() *PostCourseLessonsForbidden { + return &PostCourseLessonsForbidden{} +} + +/* +PostCourseLessonsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PostCourseLessonsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this post course lessons forbidden response has a 2xx status code +func (o *PostCourseLessonsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course lessons forbidden response has a 3xx status code +func (o *PostCourseLessonsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course lessons forbidden response has a 4xx status code +func (o *PostCourseLessonsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course lessons forbidden response has a 5xx status code +func (o *PostCourseLessonsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this post course lessons forbidden response a status code equal to that given +func (o *PostCourseLessonsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the post course lessons forbidden response +func (o *PostCourseLessonsForbidden) Code() int { + return 403 +} + +func (o *PostCourseLessonsForbidden) Error() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonsForbidden %+v", 403, o.Payload) +} + +func (o *PostCourseLessonsForbidden) String() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonsForbidden %+v", 403, o.Payload) +} + +func (o *PostCourseLessonsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCourseLessonsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseLessonsNotFound creates a PostCourseLessonsNotFound with default headers values +func NewPostCourseLessonsNotFound() *PostCourseLessonsNotFound { + return &PostCourseLessonsNotFound{} +} + +/* +PostCourseLessonsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PostCourseLessonsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post course lessons not found response has a 2xx status code +func (o *PostCourseLessonsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course lessons not found response has a 3xx status code +func (o *PostCourseLessonsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course lessons not found response has a 4xx status code +func (o *PostCourseLessonsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course lessons not found response has a 5xx status code +func (o *PostCourseLessonsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this post course lessons not found response a status code equal to that given +func (o *PostCourseLessonsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the post course lessons not found response +func (o *PostCourseLessonsNotFound) Code() int { + return 404 +} + +func (o *PostCourseLessonsNotFound) Error() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonsNotFound %+v", 404, o.Payload) +} + +func (o *PostCourseLessonsNotFound) String() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonsNotFound %+v", 404, o.Payload) +} + +func (o *PostCourseLessonsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCourseLessonsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseLessonsUnprocessableEntity creates a PostCourseLessonsUnprocessableEntity with default headers values +func NewPostCourseLessonsUnprocessableEntity() *PostCourseLessonsUnprocessableEntity { + return &PostCourseLessonsUnprocessableEntity{} +} + +/* +PostCourseLessonsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostCourseLessonsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post course lessons unprocessable entity response has a 2xx status code +func (o *PostCourseLessonsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course lessons unprocessable entity response has a 3xx status code +func (o *PostCourseLessonsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course lessons unprocessable entity response has a 4xx status code +func (o *PostCourseLessonsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course lessons unprocessable entity response has a 5xx status code +func (o *PostCourseLessonsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this post course lessons unprocessable entity response a status code equal to that given +func (o *PostCourseLessonsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the post course lessons unprocessable entity response +func (o *PostCourseLessonsUnprocessableEntity) Code() int { + return 422 +} + +func (o *PostCourseLessonsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCourseLessonsUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCourseLessonsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCourseLessonsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseLessonsInternalServerError creates a PostCourseLessonsInternalServerError with default headers values +func NewPostCourseLessonsInternalServerError() *PostCourseLessonsInternalServerError { + return &PostCourseLessonsInternalServerError{} +} + +/* +PostCourseLessonsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PostCourseLessonsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post course lessons internal server error response has a 2xx status code +func (o *PostCourseLessonsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course lessons internal server error response has a 3xx status code +func (o *PostCourseLessonsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course lessons internal server error response has a 4xx status code +func (o *PostCourseLessonsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this post course lessons internal server error response has a 5xx status code +func (o *PostCourseLessonsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this post course lessons internal server error response a status code equal to that given +func (o *PostCourseLessonsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the post course lessons internal server error response +func (o *PostCourseLessonsInternalServerError) Code() int { + return 500 +} + +func (o *PostCourseLessonsInternalServerError) Error() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCourseLessonsInternalServerError) String() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCourseLessonsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCourseLessonsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/courses/post_course_sections_parameters.go b/api/members/members_client/courses/post_course_sections_parameters.go new file mode 100644 index 0000000..fb66262 --- /dev/null +++ b/api/members/members_client/courses/post_course_sections_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostCourseSectionsParams creates a new PostCourseSectionsParams 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 NewPostCourseSectionsParams() *PostCourseSectionsParams { + return &PostCourseSectionsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostCourseSectionsParamsWithTimeout creates a new PostCourseSectionsParams object +// with the ability to set a timeout on a request. +func NewPostCourseSectionsParamsWithTimeout(timeout time.Duration) *PostCourseSectionsParams { + return &PostCourseSectionsParams{ + timeout: timeout, + } +} + +// NewPostCourseSectionsParamsWithContext creates a new PostCourseSectionsParams object +// with the ability to set a context for a request. +func NewPostCourseSectionsParamsWithContext(ctx context.Context) *PostCourseSectionsParams { + return &PostCourseSectionsParams{ + Context: ctx, + } +} + +// NewPostCourseSectionsParamsWithHTTPClient creates a new PostCourseSectionsParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostCourseSectionsParamsWithHTTPClient(client *http.Client) *PostCourseSectionsParams { + return &PostCourseSectionsParams{ + HTTPClient: client, + } +} + +/* +PostCourseSectionsParams contains all the parameters to send to the API endpoint + + for the post course sections operation. + + Typically these are written to a http.Request. +*/ +type PostCourseSectionsParams struct { + + /* CoursesectionRequest. + + An array of new CourseSection records + */ + CoursesectionRequest *members_models.CourseSectionRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post course sections params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostCourseSectionsParams) WithDefaults() *PostCourseSectionsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post course sections params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostCourseSectionsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post course sections params +func (o *PostCourseSectionsParams) WithTimeout(timeout time.Duration) *PostCourseSectionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post course sections params +func (o *PostCourseSectionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post course sections params +func (o *PostCourseSectionsParams) WithContext(ctx context.Context) *PostCourseSectionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post course sections params +func (o *PostCourseSectionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post course sections params +func (o *PostCourseSectionsParams) WithHTTPClient(client *http.Client) *PostCourseSectionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post course sections params +func (o *PostCourseSectionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCoursesectionRequest adds the coursesectionRequest to the post course sections params +func (o *PostCourseSectionsParams) WithCoursesectionRequest(coursesectionRequest *members_models.CourseSectionRequest) *PostCourseSectionsParams { + o.SetCoursesectionRequest(coursesectionRequest) + return o +} + +// SetCoursesectionRequest adds the coursesectionRequest to the post course sections params +func (o *PostCourseSectionsParams) SetCoursesectionRequest(coursesectionRequest *members_models.CourseSectionRequest) { + o.CoursesectionRequest = coursesectionRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostCourseSectionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.CoursesectionRequest != nil { + if err := r.SetBodyParam(o.CoursesectionRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/courses/post_course_sections_responses.go b/api/members/members_client/courses/post_course_sections_responses.go new file mode 100644 index 0000000..588083d --- /dev/null +++ b/api/members/members_client/courses/post_course_sections_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// PostCourseSectionsReader is a Reader for the PostCourseSections structure. +type PostCourseSectionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostCourseSectionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostCourseSectionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostCourseSectionsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostCourseSectionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostCourseSectionsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostCourseSectionsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostCourseSectionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostCourseSectionsOK creates a PostCourseSectionsOK with default headers values +func NewPostCourseSectionsOK() *PostCourseSectionsOK { + return &PostCourseSectionsOK{} +} + +/* +PostCourseSectionsOK describes a response with status code 200, with default header values. + +CourseSection Response Object +*/ +type PostCourseSectionsOK struct { + Payload *members_models.CourseSectionResponse +} + +// IsSuccess returns true when this post course sections o k response has a 2xx status code +func (o *PostCourseSectionsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post course sections o k response has a 3xx status code +func (o *PostCourseSectionsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course sections o k response has a 4xx status code +func (o *PostCourseSectionsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this post course sections o k response has a 5xx status code +func (o *PostCourseSectionsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this post course sections o k response a status code equal to that given +func (o *PostCourseSectionsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the post course sections o k response +func (o *PostCourseSectionsOK) Code() int { + return 200 +} + +func (o *PostCourseSectionsOK) Error() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionsOK %+v", 200, o.Payload) +} + +func (o *PostCourseSectionsOK) String() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionsOK %+v", 200, o.Payload) +} + +func (o *PostCourseSectionsOK) GetPayload() *members_models.CourseSectionResponse { + return o.Payload +} + +func (o *PostCourseSectionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.CourseSectionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseSectionsUnauthorized creates a PostCourseSectionsUnauthorized with default headers values +func NewPostCourseSectionsUnauthorized() *PostCourseSectionsUnauthorized { + return &PostCourseSectionsUnauthorized{} +} + +/* +PostCourseSectionsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostCourseSectionsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post course sections unauthorized response has a 2xx status code +func (o *PostCourseSectionsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course sections unauthorized response has a 3xx status code +func (o *PostCourseSectionsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course sections unauthorized response has a 4xx status code +func (o *PostCourseSectionsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course sections unauthorized response has a 5xx status code +func (o *PostCourseSectionsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this post course sections unauthorized response a status code equal to that given +func (o *PostCourseSectionsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the post course sections unauthorized response +func (o *PostCourseSectionsUnauthorized) Code() int { + return 401 +} + +func (o *PostCourseSectionsUnauthorized) Error() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCourseSectionsUnauthorized) String() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCourseSectionsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCourseSectionsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseSectionsForbidden creates a PostCourseSectionsForbidden with default headers values +func NewPostCourseSectionsForbidden() *PostCourseSectionsForbidden { + return &PostCourseSectionsForbidden{} +} + +/* +PostCourseSectionsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PostCourseSectionsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this post course sections forbidden response has a 2xx status code +func (o *PostCourseSectionsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course sections forbidden response has a 3xx status code +func (o *PostCourseSectionsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course sections forbidden response has a 4xx status code +func (o *PostCourseSectionsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course sections forbidden response has a 5xx status code +func (o *PostCourseSectionsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this post course sections forbidden response a status code equal to that given +func (o *PostCourseSectionsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the post course sections forbidden response +func (o *PostCourseSectionsForbidden) Code() int { + return 403 +} + +func (o *PostCourseSectionsForbidden) Error() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionsForbidden %+v", 403, o.Payload) +} + +func (o *PostCourseSectionsForbidden) String() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionsForbidden %+v", 403, o.Payload) +} + +func (o *PostCourseSectionsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCourseSectionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseSectionsNotFound creates a PostCourseSectionsNotFound with default headers values +func NewPostCourseSectionsNotFound() *PostCourseSectionsNotFound { + return &PostCourseSectionsNotFound{} +} + +/* +PostCourseSectionsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PostCourseSectionsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post course sections not found response has a 2xx status code +func (o *PostCourseSectionsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course sections not found response has a 3xx status code +func (o *PostCourseSectionsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course sections not found response has a 4xx status code +func (o *PostCourseSectionsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course sections not found response has a 5xx status code +func (o *PostCourseSectionsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this post course sections not found response a status code equal to that given +func (o *PostCourseSectionsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the post course sections not found response +func (o *PostCourseSectionsNotFound) Code() int { + return 404 +} + +func (o *PostCourseSectionsNotFound) Error() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionsNotFound %+v", 404, o.Payload) +} + +func (o *PostCourseSectionsNotFound) String() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionsNotFound %+v", 404, o.Payload) +} + +func (o *PostCourseSectionsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCourseSectionsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseSectionsUnprocessableEntity creates a PostCourseSectionsUnprocessableEntity with default headers values +func NewPostCourseSectionsUnprocessableEntity() *PostCourseSectionsUnprocessableEntity { + return &PostCourseSectionsUnprocessableEntity{} +} + +/* +PostCourseSectionsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostCourseSectionsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post course sections unprocessable entity response has a 2xx status code +func (o *PostCourseSectionsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course sections unprocessable entity response has a 3xx status code +func (o *PostCourseSectionsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course sections unprocessable entity response has a 4xx status code +func (o *PostCourseSectionsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course sections unprocessable entity response has a 5xx status code +func (o *PostCourseSectionsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this post course sections unprocessable entity response a status code equal to that given +func (o *PostCourseSectionsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the post course sections unprocessable entity response +func (o *PostCourseSectionsUnprocessableEntity) Code() int { + return 422 +} + +func (o *PostCourseSectionsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCourseSectionsUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCourseSectionsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCourseSectionsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseSectionsInternalServerError creates a PostCourseSectionsInternalServerError with default headers values +func NewPostCourseSectionsInternalServerError() *PostCourseSectionsInternalServerError { + return &PostCourseSectionsInternalServerError{} +} + +/* +PostCourseSectionsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PostCourseSectionsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post course sections internal server error response has a 2xx status code +func (o *PostCourseSectionsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course sections internal server error response has a 3xx status code +func (o *PostCourseSectionsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course sections internal server error response has a 4xx status code +func (o *PostCourseSectionsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this post course sections internal server error response has a 5xx status code +func (o *PostCourseSectionsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this post course sections internal server error response a status code equal to that given +func (o *PostCourseSectionsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the post course sections internal server error response +func (o *PostCourseSectionsInternalServerError) Code() int { + return 500 +} + +func (o *PostCourseSectionsInternalServerError) Error() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCourseSectionsInternalServerError) String() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCourseSectionsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCourseSectionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/courses/post_courses_parameters.go b/api/members/members_client/courses/post_courses_parameters.go new file mode 100644 index 0000000..39cafda --- /dev/null +++ b/api/members/members_client/courses/post_courses_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostCoursesParams creates a new PostCoursesParams 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 NewPostCoursesParams() *PostCoursesParams { + return &PostCoursesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostCoursesParamsWithTimeout creates a new PostCoursesParams object +// with the ability to set a timeout on a request. +func NewPostCoursesParamsWithTimeout(timeout time.Duration) *PostCoursesParams { + return &PostCoursesParams{ + timeout: timeout, + } +} + +// NewPostCoursesParamsWithContext creates a new PostCoursesParams object +// with the ability to set a context for a request. +func NewPostCoursesParamsWithContext(ctx context.Context) *PostCoursesParams { + return &PostCoursesParams{ + Context: ctx, + } +} + +// NewPostCoursesParamsWithHTTPClient creates a new PostCoursesParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostCoursesParamsWithHTTPClient(client *http.Client) *PostCoursesParams { + return &PostCoursesParams{ + HTTPClient: client, + } +} + +/* +PostCoursesParams contains all the parameters to send to the API endpoint + + for the post courses operation. + + Typically these are written to a http.Request. +*/ +type PostCoursesParams struct { + + /* CourseRequest. + + An array of new Course records + */ + CourseRequest *members_models.CourseRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post courses params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostCoursesParams) WithDefaults() *PostCoursesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post courses params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostCoursesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post courses params +func (o *PostCoursesParams) WithTimeout(timeout time.Duration) *PostCoursesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post courses params +func (o *PostCoursesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post courses params +func (o *PostCoursesParams) WithContext(ctx context.Context) *PostCoursesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post courses params +func (o *PostCoursesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post courses params +func (o *PostCoursesParams) WithHTTPClient(client *http.Client) *PostCoursesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post courses params +func (o *PostCoursesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCourseRequest adds the courseRequest to the post courses params +func (o *PostCoursesParams) WithCourseRequest(courseRequest *members_models.CourseRequest) *PostCoursesParams { + o.SetCourseRequest(courseRequest) + return o +} + +// SetCourseRequest adds the courseRequest to the post courses params +func (o *PostCoursesParams) SetCourseRequest(courseRequest *members_models.CourseRequest) { + o.CourseRequest = courseRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostCoursesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.CourseRequest != nil { + if err := r.SetBodyParam(o.CourseRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/courses/post_courses_responses.go b/api/members/members_client/courses/post_courses_responses.go new file mode 100644 index 0000000..e9596ce --- /dev/null +++ b/api/members/members_client/courses/post_courses_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// PostCoursesReader is a Reader for the PostCourses structure. +type PostCoursesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostCoursesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostCoursesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostCoursesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostCoursesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostCoursesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostCoursesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostCoursesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostCoursesOK creates a PostCoursesOK with default headers values +func NewPostCoursesOK() *PostCoursesOK { + return &PostCoursesOK{} +} + +/* +PostCoursesOK describes a response with status code 200, with default header values. + +Course Response Object +*/ +type PostCoursesOK struct { + Payload *members_models.CourseResponse +} + +// IsSuccess returns true when this post courses o k response has a 2xx status code +func (o *PostCoursesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post courses o k response has a 3xx status code +func (o *PostCoursesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post courses o k response has a 4xx status code +func (o *PostCoursesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this post courses o k response has a 5xx status code +func (o *PostCoursesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this post courses o k response a status code equal to that given +func (o *PostCoursesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the post courses o k response +func (o *PostCoursesOK) Code() int { + return 200 +} + +func (o *PostCoursesOK) Error() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesOK %+v", 200, o.Payload) +} + +func (o *PostCoursesOK) String() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesOK %+v", 200, o.Payload) +} + +func (o *PostCoursesOK) GetPayload() *members_models.CourseResponse { + return o.Payload +} + +func (o *PostCoursesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.CourseResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoursesUnauthorized creates a PostCoursesUnauthorized with default headers values +func NewPostCoursesUnauthorized() *PostCoursesUnauthorized { + return &PostCoursesUnauthorized{} +} + +/* +PostCoursesUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostCoursesUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post courses unauthorized response has a 2xx status code +func (o *PostCoursesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post courses unauthorized response has a 3xx status code +func (o *PostCoursesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post courses unauthorized response has a 4xx status code +func (o *PostCoursesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this post courses unauthorized response has a 5xx status code +func (o *PostCoursesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this post courses unauthorized response a status code equal to that given +func (o *PostCoursesUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the post courses unauthorized response +func (o *PostCoursesUnauthorized) Code() int { + return 401 +} + +func (o *PostCoursesUnauthorized) Error() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCoursesUnauthorized) String() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCoursesUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCoursesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoursesForbidden creates a PostCoursesForbidden with default headers values +func NewPostCoursesForbidden() *PostCoursesForbidden { + return &PostCoursesForbidden{} +} + +/* +PostCoursesForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PostCoursesForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this post courses forbidden response has a 2xx status code +func (o *PostCoursesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post courses forbidden response has a 3xx status code +func (o *PostCoursesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post courses forbidden response has a 4xx status code +func (o *PostCoursesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this post courses forbidden response has a 5xx status code +func (o *PostCoursesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this post courses forbidden response a status code equal to that given +func (o *PostCoursesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the post courses forbidden response +func (o *PostCoursesForbidden) Code() int { + return 403 +} + +func (o *PostCoursesForbidden) Error() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesForbidden %+v", 403, o.Payload) +} + +func (o *PostCoursesForbidden) String() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesForbidden %+v", 403, o.Payload) +} + +func (o *PostCoursesForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCoursesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoursesNotFound creates a PostCoursesNotFound with default headers values +func NewPostCoursesNotFound() *PostCoursesNotFound { + return &PostCoursesNotFound{} +} + +/* +PostCoursesNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PostCoursesNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post courses not found response has a 2xx status code +func (o *PostCoursesNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post courses not found response has a 3xx status code +func (o *PostCoursesNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post courses not found response has a 4xx status code +func (o *PostCoursesNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this post courses not found response has a 5xx status code +func (o *PostCoursesNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this post courses not found response a status code equal to that given +func (o *PostCoursesNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the post courses not found response +func (o *PostCoursesNotFound) Code() int { + return 404 +} + +func (o *PostCoursesNotFound) Error() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesNotFound %+v", 404, o.Payload) +} + +func (o *PostCoursesNotFound) String() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesNotFound %+v", 404, o.Payload) +} + +func (o *PostCoursesNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCoursesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoursesUnprocessableEntity creates a PostCoursesUnprocessableEntity with default headers values +func NewPostCoursesUnprocessableEntity() *PostCoursesUnprocessableEntity { + return &PostCoursesUnprocessableEntity{} +} + +/* +PostCoursesUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostCoursesUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post courses unprocessable entity response has a 2xx status code +func (o *PostCoursesUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post courses unprocessable entity response has a 3xx status code +func (o *PostCoursesUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post courses unprocessable entity response has a 4xx status code +func (o *PostCoursesUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this post courses unprocessable entity response has a 5xx status code +func (o *PostCoursesUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this post courses unprocessable entity response a status code equal to that given +func (o *PostCoursesUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the post courses unprocessable entity response +func (o *PostCoursesUnprocessableEntity) Code() int { + return 422 +} + +func (o *PostCoursesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCoursesUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCoursesUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCoursesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoursesInternalServerError creates a PostCoursesInternalServerError with default headers values +func NewPostCoursesInternalServerError() *PostCoursesInternalServerError { + return &PostCoursesInternalServerError{} +} + +/* +PostCoursesInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PostCoursesInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post courses internal server error response has a 2xx status code +func (o *PostCoursesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post courses internal server error response has a 3xx status code +func (o *PostCoursesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post courses internal server error response has a 4xx status code +func (o *PostCoursesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this post courses internal server error response has a 5xx status code +func (o *PostCoursesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this post courses internal server error response a status code equal to that given +func (o *PostCoursesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the post courses internal server error response +func (o *PostCoursesInternalServerError) Code() int { + return 500 +} + +func (o *PostCoursesInternalServerError) Error() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCoursesInternalServerError) String() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCoursesInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostCoursesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/courses/update_course_lessons_parameters.go b/api/members/members_client/courses/update_course_lessons_parameters.go new file mode 100644 index 0000000..6a6bf63 --- /dev/null +++ b/api/members/members_client/courses/update_course_lessons_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewUpdateCourseLessonsParams creates a new UpdateCourseLessonsParams 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 NewUpdateCourseLessonsParams() *UpdateCourseLessonsParams { + return &UpdateCourseLessonsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUpdateCourseLessonsParamsWithTimeout creates a new UpdateCourseLessonsParams object +// with the ability to set a timeout on a request. +func NewUpdateCourseLessonsParamsWithTimeout(timeout time.Duration) *UpdateCourseLessonsParams { + return &UpdateCourseLessonsParams{ + timeout: timeout, + } +} + +// NewUpdateCourseLessonsParamsWithContext creates a new UpdateCourseLessonsParams object +// with the ability to set a context for a request. +func NewUpdateCourseLessonsParamsWithContext(ctx context.Context) *UpdateCourseLessonsParams { + return &UpdateCourseLessonsParams{ + Context: ctx, + } +} + +// NewUpdateCourseLessonsParamsWithHTTPClient creates a new UpdateCourseLessonsParams object +// with the ability to set a custom HTTPClient for a request. +func NewUpdateCourseLessonsParamsWithHTTPClient(client *http.Client) *UpdateCourseLessonsParams { + return &UpdateCourseLessonsParams{ + HTTPClient: client, + } +} + +/* +UpdateCourseLessonsParams contains all the parameters to send to the API endpoint + + for the update course lessons operation. + + Typically these are written to a http.Request. +*/ +type UpdateCourseLessonsParams struct { + + /* CourselessonRequest. + + An array of new CourseLesson records + */ + CourselessonRequest *members_models.CourseLessonRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the update course lessons params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateCourseLessonsParams) WithDefaults() *UpdateCourseLessonsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the update course lessons params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateCourseLessonsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the update course lessons params +func (o *UpdateCourseLessonsParams) WithTimeout(timeout time.Duration) *UpdateCourseLessonsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the update course lessons params +func (o *UpdateCourseLessonsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the update course lessons params +func (o *UpdateCourseLessonsParams) WithContext(ctx context.Context) *UpdateCourseLessonsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the update course lessons params +func (o *UpdateCourseLessonsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the update course lessons params +func (o *UpdateCourseLessonsParams) WithHTTPClient(client *http.Client) *UpdateCourseLessonsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the update course lessons params +func (o *UpdateCourseLessonsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCourselessonRequest adds the courselessonRequest to the update course lessons params +func (o *UpdateCourseLessonsParams) WithCourselessonRequest(courselessonRequest *members_models.CourseLessonRequest) *UpdateCourseLessonsParams { + o.SetCourselessonRequest(courselessonRequest) + return o +} + +// SetCourselessonRequest adds the courselessonRequest to the update course lessons params +func (o *UpdateCourseLessonsParams) SetCourselessonRequest(courselessonRequest *members_models.CourseLessonRequest) { + o.CourselessonRequest = courselessonRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *UpdateCourseLessonsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.CourselessonRequest != nil { + if err := r.SetBodyParam(o.CourselessonRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/courses/update_course_lessons_responses.go b/api/members/members_client/courses/update_course_lessons_responses.go new file mode 100644 index 0000000..0a240d2 --- /dev/null +++ b/api/members/members_client/courses/update_course_lessons_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// UpdateCourseLessonsReader is a Reader for the UpdateCourseLessons structure. +type UpdateCourseLessonsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdateCourseLessonsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUpdateCourseLessonsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewUpdateCourseLessonsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewUpdateCourseLessonsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewUpdateCourseLessonsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewUpdateCourseLessonsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUpdateCourseLessonsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewUpdateCourseLessonsOK creates a UpdateCourseLessonsOK with default headers values +func NewUpdateCourseLessonsOK() *UpdateCourseLessonsOK { + return &UpdateCourseLessonsOK{} +} + +/* +UpdateCourseLessonsOK describes a response with status code 200, with default header values. + +CourseLesson Response Object +*/ +type UpdateCourseLessonsOK struct { + Payload *members_models.CourseLessonResponse +} + +// IsSuccess returns true when this update course lessons o k response has a 2xx status code +func (o *UpdateCourseLessonsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update course lessons o k response has a 3xx status code +func (o *UpdateCourseLessonsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course lessons o k response has a 4xx status code +func (o *UpdateCourseLessonsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update course lessons o k response has a 5xx status code +func (o *UpdateCourseLessonsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update course lessons o k response a status code equal to that given +func (o *UpdateCourseLessonsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the update course lessons o k response +func (o *UpdateCourseLessonsOK) Code() int { + return 200 +} + +func (o *UpdateCourseLessonsOK) Error() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsOK %+v", 200, o.Payload) +} + +func (o *UpdateCourseLessonsOK) String() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsOK %+v", 200, o.Payload) +} + +func (o *UpdateCourseLessonsOK) GetPayload() *members_models.CourseLessonResponse { + return o.Payload +} + +func (o *UpdateCourseLessonsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.CourseLessonResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseLessonsUnauthorized creates a UpdateCourseLessonsUnauthorized with default headers values +func NewUpdateCourseLessonsUnauthorized() *UpdateCourseLessonsUnauthorized { + return &UpdateCourseLessonsUnauthorized{} +} + +/* +UpdateCourseLessonsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type UpdateCourseLessonsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update course lessons unauthorized response has a 2xx status code +func (o *UpdateCourseLessonsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course lessons unauthorized response has a 3xx status code +func (o *UpdateCourseLessonsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course lessons unauthorized response has a 4xx status code +func (o *UpdateCourseLessonsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course lessons unauthorized response has a 5xx status code +func (o *UpdateCourseLessonsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this update course lessons unauthorized response a status code equal to that given +func (o *UpdateCourseLessonsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the update course lessons unauthorized response +func (o *UpdateCourseLessonsUnauthorized) Code() int { + return 401 +} + +func (o *UpdateCourseLessonsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateCourseLessonsUnauthorized) String() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateCourseLessonsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCourseLessonsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseLessonsForbidden creates a UpdateCourseLessonsForbidden with default headers values +func NewUpdateCourseLessonsForbidden() *UpdateCourseLessonsForbidden { + return &UpdateCourseLessonsForbidden{} +} + +/* +UpdateCourseLessonsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type UpdateCourseLessonsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this update course lessons forbidden response has a 2xx status code +func (o *UpdateCourseLessonsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course lessons forbidden response has a 3xx status code +func (o *UpdateCourseLessonsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course lessons forbidden response has a 4xx status code +func (o *UpdateCourseLessonsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course lessons forbidden response has a 5xx status code +func (o *UpdateCourseLessonsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this update course lessons forbidden response a status code equal to that given +func (o *UpdateCourseLessonsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the update course lessons forbidden response +func (o *UpdateCourseLessonsForbidden) Code() int { + return 403 +} + +func (o *UpdateCourseLessonsForbidden) Error() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsForbidden %+v", 403, o.Payload) +} + +func (o *UpdateCourseLessonsForbidden) String() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsForbidden %+v", 403, o.Payload) +} + +func (o *UpdateCourseLessonsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCourseLessonsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseLessonsNotFound creates a UpdateCourseLessonsNotFound with default headers values +func NewUpdateCourseLessonsNotFound() *UpdateCourseLessonsNotFound { + return &UpdateCourseLessonsNotFound{} +} + +/* +UpdateCourseLessonsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type UpdateCourseLessonsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update course lessons not found response has a 2xx status code +func (o *UpdateCourseLessonsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course lessons not found response has a 3xx status code +func (o *UpdateCourseLessonsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course lessons not found response has a 4xx status code +func (o *UpdateCourseLessonsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course lessons not found response has a 5xx status code +func (o *UpdateCourseLessonsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this update course lessons not found response a status code equal to that given +func (o *UpdateCourseLessonsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the update course lessons not found response +func (o *UpdateCourseLessonsNotFound) Code() int { + return 404 +} + +func (o *UpdateCourseLessonsNotFound) Error() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsNotFound %+v", 404, o.Payload) +} + +func (o *UpdateCourseLessonsNotFound) String() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsNotFound %+v", 404, o.Payload) +} + +func (o *UpdateCourseLessonsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCourseLessonsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseLessonsUnprocessableEntity creates a UpdateCourseLessonsUnprocessableEntity with default headers values +func NewUpdateCourseLessonsUnprocessableEntity() *UpdateCourseLessonsUnprocessableEntity { + return &UpdateCourseLessonsUnprocessableEntity{} +} + +/* +UpdateCourseLessonsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type UpdateCourseLessonsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update course lessons unprocessable entity response has a 2xx status code +func (o *UpdateCourseLessonsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course lessons unprocessable entity response has a 3xx status code +func (o *UpdateCourseLessonsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course lessons unprocessable entity response has a 4xx status code +func (o *UpdateCourseLessonsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course lessons unprocessable entity response has a 5xx status code +func (o *UpdateCourseLessonsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this update course lessons unprocessable entity response a status code equal to that given +func (o *UpdateCourseLessonsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the update course lessons unprocessable entity response +func (o *UpdateCourseLessonsUnprocessableEntity) Code() int { + return 422 +} + +func (o *UpdateCourseLessonsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateCourseLessonsUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateCourseLessonsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCourseLessonsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseLessonsInternalServerError creates a UpdateCourseLessonsInternalServerError with default headers values +func NewUpdateCourseLessonsInternalServerError() *UpdateCourseLessonsInternalServerError { + return &UpdateCourseLessonsInternalServerError{} +} + +/* +UpdateCourseLessonsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type UpdateCourseLessonsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update course lessons internal server error response has a 2xx status code +func (o *UpdateCourseLessonsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course lessons internal server error response has a 3xx status code +func (o *UpdateCourseLessonsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course lessons internal server error response has a 4xx status code +func (o *UpdateCourseLessonsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this update course lessons internal server error response has a 5xx status code +func (o *UpdateCourseLessonsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this update course lessons internal server error response a status code equal to that given +func (o *UpdateCourseLessonsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the update course lessons internal server error response +func (o *UpdateCourseLessonsInternalServerError) Code() int { + return 500 +} + +func (o *UpdateCourseLessonsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateCourseLessonsInternalServerError) String() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateCourseLessonsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCourseLessonsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/courses/update_course_parameters.go b/api/members/members_client/courses/update_course_parameters.go deleted file mode 100644 index 991ed2e..0000000 --- a/api/members/members_client/courses/update_course_parameters.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// (c) 2012-2020 by Taxnexus, Inc. -// All rights reserved worldwide. -// Proprietary product; unlicensed use is not allowed - -package courses - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewUpdateCourseParams creates a new UpdateCourseParams 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 NewUpdateCourseParams() *UpdateCourseParams { - return &UpdateCourseParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateCourseParamsWithTimeout creates a new UpdateCourseParams object -// with the ability to set a timeout on a request. -func NewUpdateCourseParamsWithTimeout(timeout time.Duration) *UpdateCourseParams { - return &UpdateCourseParams{ - timeout: timeout, - } -} - -// NewUpdateCourseParamsWithContext creates a new UpdateCourseParams object -// with the ability to set a context for a request. -func NewUpdateCourseParamsWithContext(ctx context.Context) *UpdateCourseParams { - return &UpdateCourseParams{ - Context: ctx, - } -} - -// NewUpdateCourseParamsWithHTTPClient creates a new UpdateCourseParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateCourseParamsWithHTTPClient(client *http.Client) *UpdateCourseParams { - return &UpdateCourseParams{ - HTTPClient: client, - } -} - -/* -UpdateCourseParams contains all the parameters to send to the API endpoint - - for the update course operation. - - Typically these are written to a http.Request. -*/ -type UpdateCourseParams struct { - - /* ID. - - Unique Record ID - */ - ID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update course params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateCourseParams) WithDefaults() *UpdateCourseParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update course params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateCourseParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update course params -func (o *UpdateCourseParams) WithTimeout(timeout time.Duration) *UpdateCourseParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update course params -func (o *UpdateCourseParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update course params -func (o *UpdateCourseParams) WithContext(ctx context.Context) *UpdateCourseParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update course params -func (o *UpdateCourseParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update course params -func (o *UpdateCourseParams) WithHTTPClient(client *http.Client) *UpdateCourseParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update course params -func (o *UpdateCourseParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the update course params -func (o *UpdateCourseParams) WithID(id *string) *UpdateCourseParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update course params -func (o *UpdateCourseParams) SetID(id *string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateCourseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ID != nil { - - // query param id - var qrID string - - if o.ID != nil { - qrID = *o.ID - } - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/courses/update_course_responses.go b/api/members/members_client/courses/update_course_responses.go deleted file mode 100644 index 285785b..0000000 --- a/api/members/members_client/courses/update_course_responses.go +++ /dev/null @@ -1,92 +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 courses - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// UpdateCourseReader is a Reader for the UpdateCourse structure. -type UpdateCourseReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateCourseReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateCourseOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewUpdateCourseOK creates a UpdateCourseOK with default headers values -func NewUpdateCourseOK() *UpdateCourseOK { - return &UpdateCourseOK{} -} - -/* -UpdateCourseOK describes a response with status code 200, with default header values. - -OK -*/ -type UpdateCourseOK struct { -} - -// IsSuccess returns true when this update course o k response has a 2xx status code -func (o *UpdateCourseOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update course o k response has a 3xx status code -func (o *UpdateCourseOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update course o k response has a 4xx status code -func (o *UpdateCourseOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update course o k response has a 5xx status code -func (o *UpdateCourseOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update course o k response a status code equal to that given -func (o *UpdateCourseOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update course o k response -func (o *UpdateCourseOK) Code() int { - return 200 -} - -func (o *UpdateCourseOK) Error() string { - return fmt.Sprintf("[PUT /courses][%d] updateCourseOK ", 200) -} - -func (o *UpdateCourseOK) String() string { - return fmt.Sprintf("[PUT /courses][%d] updateCourseOK ", 200) -} - -func (o *UpdateCourseOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/courses/update_course_sections_parameters.go b/api/members/members_client/courses/update_course_sections_parameters.go new file mode 100644 index 0000000..f801b7c --- /dev/null +++ b/api/members/members_client/courses/update_course_sections_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewUpdateCourseSectionsParams creates a new UpdateCourseSectionsParams 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 NewUpdateCourseSectionsParams() *UpdateCourseSectionsParams { + return &UpdateCourseSectionsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUpdateCourseSectionsParamsWithTimeout creates a new UpdateCourseSectionsParams object +// with the ability to set a timeout on a request. +func NewUpdateCourseSectionsParamsWithTimeout(timeout time.Duration) *UpdateCourseSectionsParams { + return &UpdateCourseSectionsParams{ + timeout: timeout, + } +} + +// NewUpdateCourseSectionsParamsWithContext creates a new UpdateCourseSectionsParams object +// with the ability to set a context for a request. +func NewUpdateCourseSectionsParamsWithContext(ctx context.Context) *UpdateCourseSectionsParams { + return &UpdateCourseSectionsParams{ + Context: ctx, + } +} + +// NewUpdateCourseSectionsParamsWithHTTPClient creates a new UpdateCourseSectionsParams object +// with the ability to set a custom HTTPClient for a request. +func NewUpdateCourseSectionsParamsWithHTTPClient(client *http.Client) *UpdateCourseSectionsParams { + return &UpdateCourseSectionsParams{ + HTTPClient: client, + } +} + +/* +UpdateCourseSectionsParams contains all the parameters to send to the API endpoint + + for the update course sections operation. + + Typically these are written to a http.Request. +*/ +type UpdateCourseSectionsParams struct { + + /* CoursesectionRequest. + + An array of new CourseSection records + */ + CoursesectionRequest *members_models.CourseSectionRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the update course sections params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateCourseSectionsParams) WithDefaults() *UpdateCourseSectionsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the update course sections params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateCourseSectionsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the update course sections params +func (o *UpdateCourseSectionsParams) WithTimeout(timeout time.Duration) *UpdateCourseSectionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the update course sections params +func (o *UpdateCourseSectionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the update course sections params +func (o *UpdateCourseSectionsParams) WithContext(ctx context.Context) *UpdateCourseSectionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the update course sections params +func (o *UpdateCourseSectionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the update course sections params +func (o *UpdateCourseSectionsParams) WithHTTPClient(client *http.Client) *UpdateCourseSectionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the update course sections params +func (o *UpdateCourseSectionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCoursesectionRequest adds the coursesectionRequest to the update course sections params +func (o *UpdateCourseSectionsParams) WithCoursesectionRequest(coursesectionRequest *members_models.CourseSectionRequest) *UpdateCourseSectionsParams { + o.SetCoursesectionRequest(coursesectionRequest) + return o +} + +// SetCoursesectionRequest adds the coursesectionRequest to the update course sections params +func (o *UpdateCourseSectionsParams) SetCoursesectionRequest(coursesectionRequest *members_models.CourseSectionRequest) { + o.CoursesectionRequest = coursesectionRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *UpdateCourseSectionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.CoursesectionRequest != nil { + if err := r.SetBodyParam(o.CoursesectionRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/courses/update_course_sections_responses.go b/api/members/members_client/courses/update_course_sections_responses.go new file mode 100644 index 0000000..16edcd6 --- /dev/null +++ b/api/members/members_client/courses/update_course_sections_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// UpdateCourseSectionsReader is a Reader for the UpdateCourseSections structure. +type UpdateCourseSectionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdateCourseSectionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUpdateCourseSectionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewUpdateCourseSectionsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewUpdateCourseSectionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewUpdateCourseSectionsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewUpdateCourseSectionsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUpdateCourseSectionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewUpdateCourseSectionsOK creates a UpdateCourseSectionsOK with default headers values +func NewUpdateCourseSectionsOK() *UpdateCourseSectionsOK { + return &UpdateCourseSectionsOK{} +} + +/* +UpdateCourseSectionsOK describes a response with status code 200, with default header values. + +CourseSection Response Object +*/ +type UpdateCourseSectionsOK struct { + Payload *members_models.CourseSectionResponse +} + +// IsSuccess returns true when this update course sections o k response has a 2xx status code +func (o *UpdateCourseSectionsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update course sections o k response has a 3xx status code +func (o *UpdateCourseSectionsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course sections o k response has a 4xx status code +func (o *UpdateCourseSectionsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update course sections o k response has a 5xx status code +func (o *UpdateCourseSectionsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update course sections o k response a status code equal to that given +func (o *UpdateCourseSectionsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the update course sections o k response +func (o *UpdateCourseSectionsOK) Code() int { + return 200 +} + +func (o *UpdateCourseSectionsOK) Error() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsOK %+v", 200, o.Payload) +} + +func (o *UpdateCourseSectionsOK) String() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsOK %+v", 200, o.Payload) +} + +func (o *UpdateCourseSectionsOK) GetPayload() *members_models.CourseSectionResponse { + return o.Payload +} + +func (o *UpdateCourseSectionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.CourseSectionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseSectionsUnauthorized creates a UpdateCourseSectionsUnauthorized with default headers values +func NewUpdateCourseSectionsUnauthorized() *UpdateCourseSectionsUnauthorized { + return &UpdateCourseSectionsUnauthorized{} +} + +/* +UpdateCourseSectionsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type UpdateCourseSectionsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update course sections unauthorized response has a 2xx status code +func (o *UpdateCourseSectionsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course sections unauthorized response has a 3xx status code +func (o *UpdateCourseSectionsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course sections unauthorized response has a 4xx status code +func (o *UpdateCourseSectionsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course sections unauthorized response has a 5xx status code +func (o *UpdateCourseSectionsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this update course sections unauthorized response a status code equal to that given +func (o *UpdateCourseSectionsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the update course sections unauthorized response +func (o *UpdateCourseSectionsUnauthorized) Code() int { + return 401 +} + +func (o *UpdateCourseSectionsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateCourseSectionsUnauthorized) String() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateCourseSectionsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCourseSectionsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseSectionsForbidden creates a UpdateCourseSectionsForbidden with default headers values +func NewUpdateCourseSectionsForbidden() *UpdateCourseSectionsForbidden { + return &UpdateCourseSectionsForbidden{} +} + +/* +UpdateCourseSectionsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type UpdateCourseSectionsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this update course sections forbidden response has a 2xx status code +func (o *UpdateCourseSectionsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course sections forbidden response has a 3xx status code +func (o *UpdateCourseSectionsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course sections forbidden response has a 4xx status code +func (o *UpdateCourseSectionsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course sections forbidden response has a 5xx status code +func (o *UpdateCourseSectionsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this update course sections forbidden response a status code equal to that given +func (o *UpdateCourseSectionsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the update course sections forbidden response +func (o *UpdateCourseSectionsForbidden) Code() int { + return 403 +} + +func (o *UpdateCourseSectionsForbidden) Error() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsForbidden %+v", 403, o.Payload) +} + +func (o *UpdateCourseSectionsForbidden) String() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsForbidden %+v", 403, o.Payload) +} + +func (o *UpdateCourseSectionsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCourseSectionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseSectionsNotFound creates a UpdateCourseSectionsNotFound with default headers values +func NewUpdateCourseSectionsNotFound() *UpdateCourseSectionsNotFound { + return &UpdateCourseSectionsNotFound{} +} + +/* +UpdateCourseSectionsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type UpdateCourseSectionsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update course sections not found response has a 2xx status code +func (o *UpdateCourseSectionsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course sections not found response has a 3xx status code +func (o *UpdateCourseSectionsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course sections not found response has a 4xx status code +func (o *UpdateCourseSectionsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course sections not found response has a 5xx status code +func (o *UpdateCourseSectionsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this update course sections not found response a status code equal to that given +func (o *UpdateCourseSectionsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the update course sections not found response +func (o *UpdateCourseSectionsNotFound) Code() int { + return 404 +} + +func (o *UpdateCourseSectionsNotFound) Error() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsNotFound %+v", 404, o.Payload) +} + +func (o *UpdateCourseSectionsNotFound) String() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsNotFound %+v", 404, o.Payload) +} + +func (o *UpdateCourseSectionsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCourseSectionsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseSectionsUnprocessableEntity creates a UpdateCourseSectionsUnprocessableEntity with default headers values +func NewUpdateCourseSectionsUnprocessableEntity() *UpdateCourseSectionsUnprocessableEntity { + return &UpdateCourseSectionsUnprocessableEntity{} +} + +/* +UpdateCourseSectionsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type UpdateCourseSectionsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update course sections unprocessable entity response has a 2xx status code +func (o *UpdateCourseSectionsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course sections unprocessable entity response has a 3xx status code +func (o *UpdateCourseSectionsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course sections unprocessable entity response has a 4xx status code +func (o *UpdateCourseSectionsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course sections unprocessable entity response has a 5xx status code +func (o *UpdateCourseSectionsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this update course sections unprocessable entity response a status code equal to that given +func (o *UpdateCourseSectionsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the update course sections unprocessable entity response +func (o *UpdateCourseSectionsUnprocessableEntity) Code() int { + return 422 +} + +func (o *UpdateCourseSectionsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateCourseSectionsUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateCourseSectionsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCourseSectionsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseSectionsInternalServerError creates a UpdateCourseSectionsInternalServerError with default headers values +func NewUpdateCourseSectionsInternalServerError() *UpdateCourseSectionsInternalServerError { + return &UpdateCourseSectionsInternalServerError{} +} + +/* +UpdateCourseSectionsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type UpdateCourseSectionsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update course sections internal server error response has a 2xx status code +func (o *UpdateCourseSectionsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course sections internal server error response has a 3xx status code +func (o *UpdateCourseSectionsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course sections internal server error response has a 4xx status code +func (o *UpdateCourseSectionsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this update course sections internal server error response has a 5xx status code +func (o *UpdateCourseSectionsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this update course sections internal server error response a status code equal to that given +func (o *UpdateCourseSectionsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the update course sections internal server error response +func (o *UpdateCourseSectionsInternalServerError) Code() int { + return 500 +} + +func (o *UpdateCourseSectionsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateCourseSectionsInternalServerError) String() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateCourseSectionsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCourseSectionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/courses/update_courses_parameters.go b/api/members/members_client/courses/update_courses_parameters.go new file mode 100644 index 0000000..721f8d9 --- /dev/null +++ b/api/members/members_client/courses/update_courses_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewUpdateCoursesParams creates a new UpdateCoursesParams 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 NewUpdateCoursesParams() *UpdateCoursesParams { + return &UpdateCoursesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUpdateCoursesParamsWithTimeout creates a new UpdateCoursesParams object +// with the ability to set a timeout on a request. +func NewUpdateCoursesParamsWithTimeout(timeout time.Duration) *UpdateCoursesParams { + return &UpdateCoursesParams{ + timeout: timeout, + } +} + +// NewUpdateCoursesParamsWithContext creates a new UpdateCoursesParams object +// with the ability to set a context for a request. +func NewUpdateCoursesParamsWithContext(ctx context.Context) *UpdateCoursesParams { + return &UpdateCoursesParams{ + Context: ctx, + } +} + +// NewUpdateCoursesParamsWithHTTPClient creates a new UpdateCoursesParams object +// with the ability to set a custom HTTPClient for a request. +func NewUpdateCoursesParamsWithHTTPClient(client *http.Client) *UpdateCoursesParams { + return &UpdateCoursesParams{ + HTTPClient: client, + } +} + +/* +UpdateCoursesParams contains all the parameters to send to the API endpoint + + for the update courses operation. + + Typically these are written to a http.Request. +*/ +type UpdateCoursesParams struct { + + /* CourseRequest. + + An array of new Course records + */ + CourseRequest *members_models.CourseRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the update courses params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateCoursesParams) WithDefaults() *UpdateCoursesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the update courses params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateCoursesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the update courses params +func (o *UpdateCoursesParams) WithTimeout(timeout time.Duration) *UpdateCoursesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the update courses params +func (o *UpdateCoursesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the update courses params +func (o *UpdateCoursesParams) WithContext(ctx context.Context) *UpdateCoursesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the update courses params +func (o *UpdateCoursesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the update courses params +func (o *UpdateCoursesParams) WithHTTPClient(client *http.Client) *UpdateCoursesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the update courses params +func (o *UpdateCoursesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCourseRequest adds the courseRequest to the update courses params +func (o *UpdateCoursesParams) WithCourseRequest(courseRequest *members_models.CourseRequest) *UpdateCoursesParams { + o.SetCourseRequest(courseRequest) + return o +} + +// SetCourseRequest adds the courseRequest to the update courses params +func (o *UpdateCoursesParams) SetCourseRequest(courseRequest *members_models.CourseRequest) { + o.CourseRequest = courseRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *UpdateCoursesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.CourseRequest != nil { + if err := r.SetBodyParam(o.CourseRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/courses/update_courses_responses.go b/api/members/members_client/courses/update_courses_responses.go new file mode 100644 index 0000000..3eacf11 --- /dev/null +++ b/api/members/members_client/courses/update_courses_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// UpdateCoursesReader is a Reader for the UpdateCourses structure. +type UpdateCoursesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdateCoursesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUpdateCoursesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewUpdateCoursesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewUpdateCoursesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewUpdateCoursesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewUpdateCoursesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUpdateCoursesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewUpdateCoursesOK creates a UpdateCoursesOK with default headers values +func NewUpdateCoursesOK() *UpdateCoursesOK { + return &UpdateCoursesOK{} +} + +/* +UpdateCoursesOK describes a response with status code 200, with default header values. + +Course Response Object +*/ +type UpdateCoursesOK struct { + Payload *members_models.CourseResponse +} + +// IsSuccess returns true when this update courses o k response has a 2xx status code +func (o *UpdateCoursesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update courses o k response has a 3xx status code +func (o *UpdateCoursesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update courses o k response has a 4xx status code +func (o *UpdateCoursesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update courses o k response has a 5xx status code +func (o *UpdateCoursesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update courses o k response a status code equal to that given +func (o *UpdateCoursesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the update courses o k response +func (o *UpdateCoursesOK) Code() int { + return 200 +} + +func (o *UpdateCoursesOK) Error() string { + return fmt.Sprintf("[PUT /courses][%d] updateCoursesOK %+v", 200, o.Payload) +} + +func (o *UpdateCoursesOK) String() string { + return fmt.Sprintf("[PUT /courses][%d] updateCoursesOK %+v", 200, o.Payload) +} + +func (o *UpdateCoursesOK) GetPayload() *members_models.CourseResponse { + return o.Payload +} + +func (o *UpdateCoursesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.CourseResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCoursesUnauthorized creates a UpdateCoursesUnauthorized with default headers values +func NewUpdateCoursesUnauthorized() *UpdateCoursesUnauthorized { + return &UpdateCoursesUnauthorized{} +} + +/* +UpdateCoursesUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type UpdateCoursesUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update courses unauthorized response has a 2xx status code +func (o *UpdateCoursesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update courses unauthorized response has a 3xx status code +func (o *UpdateCoursesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update courses unauthorized response has a 4xx status code +func (o *UpdateCoursesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this update courses unauthorized response has a 5xx status code +func (o *UpdateCoursesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this update courses unauthorized response a status code equal to that given +func (o *UpdateCoursesUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the update courses unauthorized response +func (o *UpdateCoursesUnauthorized) Code() int { + return 401 +} + +func (o *UpdateCoursesUnauthorized) Error() string { + return fmt.Sprintf("[PUT /courses][%d] updateCoursesUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateCoursesUnauthorized) String() string { + return fmt.Sprintf("[PUT /courses][%d] updateCoursesUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateCoursesUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCoursesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCoursesForbidden creates a UpdateCoursesForbidden with default headers values +func NewUpdateCoursesForbidden() *UpdateCoursesForbidden { + return &UpdateCoursesForbidden{} +} + +/* +UpdateCoursesForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type UpdateCoursesForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this update courses forbidden response has a 2xx status code +func (o *UpdateCoursesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update courses forbidden response has a 3xx status code +func (o *UpdateCoursesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update courses forbidden response has a 4xx status code +func (o *UpdateCoursesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this update courses forbidden response has a 5xx status code +func (o *UpdateCoursesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this update courses forbidden response a status code equal to that given +func (o *UpdateCoursesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the update courses forbidden response +func (o *UpdateCoursesForbidden) Code() int { + return 403 +} + +func (o *UpdateCoursesForbidden) Error() string { + return fmt.Sprintf("[PUT /courses][%d] updateCoursesForbidden %+v", 403, o.Payload) +} + +func (o *UpdateCoursesForbidden) String() string { + return fmt.Sprintf("[PUT /courses][%d] updateCoursesForbidden %+v", 403, o.Payload) +} + +func (o *UpdateCoursesForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCoursesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCoursesNotFound creates a UpdateCoursesNotFound with default headers values +func NewUpdateCoursesNotFound() *UpdateCoursesNotFound { + return &UpdateCoursesNotFound{} +} + +/* +UpdateCoursesNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type UpdateCoursesNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update courses not found response has a 2xx status code +func (o *UpdateCoursesNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update courses not found response has a 3xx status code +func (o *UpdateCoursesNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update courses not found response has a 4xx status code +func (o *UpdateCoursesNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this update courses not found response has a 5xx status code +func (o *UpdateCoursesNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this update courses not found response a status code equal to that given +func (o *UpdateCoursesNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the update courses not found response +func (o *UpdateCoursesNotFound) Code() int { + return 404 +} + +func (o *UpdateCoursesNotFound) Error() string { + return fmt.Sprintf("[PUT /courses][%d] updateCoursesNotFound %+v", 404, o.Payload) +} + +func (o *UpdateCoursesNotFound) String() string { + return fmt.Sprintf("[PUT /courses][%d] updateCoursesNotFound %+v", 404, o.Payload) +} + +func (o *UpdateCoursesNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCoursesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCoursesUnprocessableEntity creates a UpdateCoursesUnprocessableEntity with default headers values +func NewUpdateCoursesUnprocessableEntity() *UpdateCoursesUnprocessableEntity { + return &UpdateCoursesUnprocessableEntity{} +} + +/* +UpdateCoursesUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type UpdateCoursesUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update courses unprocessable entity response has a 2xx status code +func (o *UpdateCoursesUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update courses unprocessable entity response has a 3xx status code +func (o *UpdateCoursesUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update courses unprocessable entity response has a 4xx status code +func (o *UpdateCoursesUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this update courses unprocessable entity response has a 5xx status code +func (o *UpdateCoursesUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this update courses unprocessable entity response a status code equal to that given +func (o *UpdateCoursesUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the update courses unprocessable entity response +func (o *UpdateCoursesUnprocessableEntity) Code() int { + return 422 +} + +func (o *UpdateCoursesUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /courses][%d] updateCoursesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateCoursesUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /courses][%d] updateCoursesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateCoursesUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCoursesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCoursesInternalServerError creates a UpdateCoursesInternalServerError with default headers values +func NewUpdateCoursesInternalServerError() *UpdateCoursesInternalServerError { + return &UpdateCoursesInternalServerError{} +} + +/* +UpdateCoursesInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type UpdateCoursesInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update courses internal server error response has a 2xx status code +func (o *UpdateCoursesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update courses internal server error response has a 3xx status code +func (o *UpdateCoursesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update courses internal server error response has a 4xx status code +func (o *UpdateCoursesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this update courses internal server error response has a 5xx status code +func (o *UpdateCoursesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this update courses internal server error response a status code equal to that given +func (o *UpdateCoursesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the update courses internal server error response +func (o *UpdateCoursesInternalServerError) Code() int { + return 500 +} + +func (o *UpdateCoursesInternalServerError) Error() string { + return fmt.Sprintf("[PUT /courses][%d] updateCoursesInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateCoursesInternalServerError) String() string { + return fmt.Sprintf("[PUT /courses][%d] updateCoursesInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateCoursesInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateCoursesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/databases/get_databases_responses.go b/api/members/members_client/databases/get_databases_responses.go index ad728e2..4dc6968 100644 --- a/api/members/members_client/databases/get_databases_responses.go +++ b/api/members/members_client/databases/get_databases_responses.go @@ -79,8 +79,6 @@ GetDatabasesOK describes a response with status code 200, with default header va Response with Database objects */ type GetDatabasesOK struct { - AccessControlAllowOrigin string - Payload *members_models.DatabaseResponse } @@ -128,13 +126,6 @@ func (o *GetDatabasesOK) GetPayload() *members_models.DatabaseResponse { func (o *GetDatabasesOK) 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.DatabaseResponse) // response payload @@ -301,8 +292,6 @@ GetDatabasesNotFound describes a response with status code 404, with default hea Resource was not found */ type GetDatabasesNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -350,13 +339,6 @@ func (o *GetDatabasesNotFound) GetPayload() *members_models.Error { func (o *GetDatabasesNotFound) 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 @@ -446,8 +428,6 @@ GetDatabasesInternalServerError describes a response with status code 500, with Server Internal Error */ type GetDatabasesInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -495,13 +475,6 @@ func (o *GetDatabasesInternalServerError) GetPayload() *members_models.Error { func (o *GetDatabasesInternalServerError) 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 diff --git a/api/members/members_client/databases/post_databases_responses.go b/api/members/members_client/databases/post_databases_responses.go index 29b784a..2f68f5c 100644 --- a/api/members/members_client/databases/post_databases_responses.go +++ b/api/members/members_client/databases/post_databases_responses.go @@ -79,8 +79,6 @@ PostDatabasesOK describes a response with status code 200, with default header v Response with Database objects */ type PostDatabasesOK struct { - AccessControlAllowOrigin string - Payload *members_models.DatabaseResponse } @@ -128,13 +126,6 @@ func (o *PostDatabasesOK) GetPayload() *members_models.DatabaseResponse { func (o *PostDatabasesOK) 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.DatabaseResponse) // response payload @@ -301,8 +292,6 @@ PostDatabasesNotFound describes a response with status code 404, with default he Resource was not found */ type PostDatabasesNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -350,13 +339,6 @@ func (o *PostDatabasesNotFound) GetPayload() *members_models.Error { func (o *PostDatabasesNotFound) 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 @@ -446,8 +428,6 @@ PostDatabasesInternalServerError describes a response with status code 500, with Server Internal Error */ type PostDatabasesInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -495,13 +475,6 @@ func (o *PostDatabasesInternalServerError) GetPayload() *members_models.Error { func (o *PostDatabasesInternalServerError) 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 diff --git a/api/members/members_client/databases/put_databases_responses.go b/api/members/members_client/databases/put_databases_responses.go index e1594e4..64f0491 100644 --- a/api/members/members_client/databases/put_databases_responses.go +++ b/api/members/members_client/databases/put_databases_responses.go @@ -79,8 +79,6 @@ PutDatabasesOK describes a response with status code 200, with default header va Response with Database objects */ type PutDatabasesOK struct { - AccessControlAllowOrigin string - Payload *members_models.DatabaseResponse } @@ -128,13 +126,6 @@ func (o *PutDatabasesOK) GetPayload() *members_models.DatabaseResponse { func (o *PutDatabasesOK) 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.DatabaseResponse) // response payload @@ -301,8 +292,6 @@ PutDatabasesNotFound describes a response with status code 404, with default hea Resource was not found */ type PutDatabasesNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -350,13 +339,6 @@ func (o *PutDatabasesNotFound) GetPayload() *members_models.Error { func (o *PutDatabasesNotFound) 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 @@ -446,8 +428,6 @@ PutDatabasesInternalServerError describes a response with status code 500, with Server Internal Error */ type PutDatabasesInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -495,13 +475,6 @@ func (o *PutDatabasesInternalServerError) GetPayload() *members_models.Error { func (o *PutDatabasesInternalServerError) 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 diff --git a/api/members/members_client/emails/emails_client.go b/api/members/members_client/emails/emails_client.go index f2b61e6..c98f01e 100644 --- a/api/members/members_client/emails/emails_client.go +++ b/api/members/members_client/emails/emails_client.go @@ -36,6 +36,10 @@ type ClientOption func(*runtime.ClientOperation) type ClientService interface { GetEmailMessages(params *GetEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEmailMessagesOK, error) + GetOutgoingEmailMessages(params *GetOutgoingEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOutgoingEmailMessagesOK, error) + + PostEmailMessages(params *PostEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEmailMessagesOK, error) + PostOutgoingEmailMessages(params *PostOutgoingEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostOutgoingEmailMessagesOK, error) SetTransport(transport runtime.ClientTransport) @@ -54,7 +58,7 @@ func (a *Client) GetEmailMessages(params *GetEmailMessagesParams, authInfo runti op := &runtime.ClientOperation{ ID: "getEmailMessages", Method: "GET", - PathPattern: "/emails", + PathPattern: "/emailmessages", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -82,6 +86,88 @@ func (a *Client) GetEmailMessages(params *GetEmailMessagesParams, authInfo runti panic(msg) } +/* +GetOutgoingEmailMessages gets email messages from data store + +Retrieves email messages from workflow storage +*/ +func (a *Client) GetOutgoingEmailMessages(params *GetOutgoingEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOutgoingEmailMessagesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetOutgoingEmailMessagesParams() + } + op := &runtime.ClientOperation{ + ID: "getOutgoingEmailMessages", + Method: "GET", + PathPattern: "/outgoingemailmessages", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetOutgoingEmailMessagesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetOutgoingEmailMessagesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getOutgoingEmailMessages: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PostEmailMessages adds new email messages to the outgoing queue + +Insert new email messages into workflow storage +*/ +func (a *Client) PostEmailMessages(params *PostEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEmailMessagesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostEmailMessagesParams() + } + op := &runtime.ClientOperation{ + ID: "postEmailMessages", + Method: "POST", + PathPattern: "/emailmessages", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostEmailMessagesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostEmailMessagesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postEmailMessages: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* PostOutgoingEmailMessages adds new email messages to the outgoing queue @@ -95,7 +181,7 @@ func (a *Client) PostOutgoingEmailMessages(params *PostOutgoingEmailMessagesPara op := &runtime.ClientOperation{ ID: "postOutgoingEmailMessages", Method: "POST", - PathPattern: "/emails", + PathPattern: "/outgoingemailmessages", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, diff --git a/api/members/members_client/emails/get_email_messages_responses.go b/api/members/members_client/emails/get_email_messages_responses.go index 8e1c200..b411feb 100644 --- a/api/members/members_client/emails/get_email_messages_responses.go +++ b/api/members/members_client/emails/get_email_messages_responses.go @@ -79,8 +79,6 @@ GetEmailMessagesOK describes a response with status code 200, with default heade Array of Email Messages */ type GetEmailMessagesOK struct { - AccessControlAllowOrigin string - Payload *members_models.EmailMessagesResponse } @@ -115,11 +113,11 @@ func (o *GetEmailMessagesOK) Code() int { } func (o *GetEmailMessagesOK) Error() string { - return fmt.Sprintf("[GET /emails][%d] getEmailMessagesOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesOK %+v", 200, o.Payload) } func (o *GetEmailMessagesOK) String() string { - return fmt.Sprintf("[GET /emails][%d] getEmailMessagesOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesOK %+v", 200, o.Payload) } func (o *GetEmailMessagesOK) GetPayload() *members_models.EmailMessagesResponse { @@ -128,13 +126,6 @@ func (o *GetEmailMessagesOK) GetPayload() *members_models.EmailMessagesResponse func (o *GetEmailMessagesOK) 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.EmailMessagesResponse) // response payload @@ -190,11 +181,11 @@ func (o *GetEmailMessagesUnauthorized) Code() int { } func (o *GetEmailMessagesUnauthorized) Error() string { - return fmt.Sprintf("[GET /emails][%d] getEmailMessagesUnauthorized %+v", 401, o.Payload) + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesUnauthorized %+v", 401, o.Payload) } func (o *GetEmailMessagesUnauthorized) String() string { - return fmt.Sprintf("[GET /emails][%d] getEmailMessagesUnauthorized %+v", 401, o.Payload) + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesUnauthorized %+v", 401, o.Payload) } func (o *GetEmailMessagesUnauthorized) GetPayload() *members_models.Error { @@ -260,11 +251,11 @@ func (o *GetEmailMessagesForbidden) Code() int { } func (o *GetEmailMessagesForbidden) Error() string { - return fmt.Sprintf("[GET /emails][%d] getEmailMessagesForbidden %+v", 403, o.Payload) + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesForbidden %+v", 403, o.Payload) } func (o *GetEmailMessagesForbidden) String() string { - return fmt.Sprintf("[GET /emails][%d] getEmailMessagesForbidden %+v", 403, o.Payload) + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesForbidden %+v", 403, o.Payload) } func (o *GetEmailMessagesForbidden) GetPayload() *members_models.Error { @@ -301,8 +292,6 @@ GetEmailMessagesNotFound describes a response with status code 404, with default Resource was not found */ type GetEmailMessagesNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -337,11 +326,11 @@ func (o *GetEmailMessagesNotFound) Code() int { } func (o *GetEmailMessagesNotFound) Error() string { - return fmt.Sprintf("[GET /emails][%d] getEmailMessagesNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesNotFound %+v", 404, o.Payload) } func (o *GetEmailMessagesNotFound) String() string { - return fmt.Sprintf("[GET /emails][%d] getEmailMessagesNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesNotFound %+v", 404, o.Payload) } func (o *GetEmailMessagesNotFound) GetPayload() *members_models.Error { @@ -350,13 +339,6 @@ func (o *GetEmailMessagesNotFound) GetPayload() *members_models.Error { func (o *GetEmailMessagesNotFound) 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 @@ -412,11 +394,11 @@ func (o *GetEmailMessagesUnprocessableEntity) Code() int { } func (o *GetEmailMessagesUnprocessableEntity) Error() string { - return fmt.Sprintf("[GET /emails][%d] getEmailMessagesUnprocessableEntity %+v", 422, o.Payload) + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesUnprocessableEntity %+v", 422, o.Payload) } func (o *GetEmailMessagesUnprocessableEntity) String() string { - return fmt.Sprintf("[GET /emails][%d] getEmailMessagesUnprocessableEntity %+v", 422, o.Payload) + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesUnprocessableEntity %+v", 422, o.Payload) } func (o *GetEmailMessagesUnprocessableEntity) GetPayload() *members_models.Error { @@ -446,8 +428,6 @@ GetEmailMessagesInternalServerError describes a response with status code 500, w Server Internal Error */ type GetEmailMessagesInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -482,11 +462,11 @@ func (o *GetEmailMessagesInternalServerError) Code() int { } func (o *GetEmailMessagesInternalServerError) Error() string { - return fmt.Sprintf("[GET /emails][%d] getEmailMessagesInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesInternalServerError %+v", 500, o.Payload) } func (o *GetEmailMessagesInternalServerError) String() string { - return fmt.Sprintf("[GET /emails][%d] getEmailMessagesInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesInternalServerError %+v", 500, o.Payload) } func (o *GetEmailMessagesInternalServerError) GetPayload() *members_models.Error { @@ -495,13 +475,6 @@ func (o *GetEmailMessagesInternalServerError) GetPayload() *members_models.Error func (o *GetEmailMessagesInternalServerError) 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 diff --git a/api/members/members_client/emails/get_outgoing_email_messages_parameters.go b/api/members/members_client/emails/get_outgoing_email_messages_parameters.go new file mode 100644 index 0000000..7228330 --- /dev/null +++ b/api/members/members_client/emails/get_outgoing_email_messages_parameters.go @@ -0,0 +1,240 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package emails + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetOutgoingEmailMessagesParams creates a new GetOutgoingEmailMessagesParams 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 NewGetOutgoingEmailMessagesParams() *GetOutgoingEmailMessagesParams { + return &GetOutgoingEmailMessagesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetOutgoingEmailMessagesParamsWithTimeout creates a new GetOutgoingEmailMessagesParams object +// with the ability to set a timeout on a request. +func NewGetOutgoingEmailMessagesParamsWithTimeout(timeout time.Duration) *GetOutgoingEmailMessagesParams { + return &GetOutgoingEmailMessagesParams{ + timeout: timeout, + } +} + +// NewGetOutgoingEmailMessagesParamsWithContext creates a new GetOutgoingEmailMessagesParams object +// with the ability to set a context for a request. +func NewGetOutgoingEmailMessagesParamsWithContext(ctx context.Context) *GetOutgoingEmailMessagesParams { + return &GetOutgoingEmailMessagesParams{ + Context: ctx, + } +} + +// NewGetOutgoingEmailMessagesParamsWithHTTPClient creates a new GetOutgoingEmailMessagesParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetOutgoingEmailMessagesParamsWithHTTPClient(client *http.Client) *GetOutgoingEmailMessagesParams { + return &GetOutgoingEmailMessagesParams{ + HTTPClient: client, + } +} + +/* +GetOutgoingEmailMessagesParams contains all the parameters to send to the API endpoint + + for the get outgoing email messages operation. + + Typically these are written to a http.Request. +*/ +type GetOutgoingEmailMessagesParams struct { + + /* EmailMessageID. + + Email Message ID + */ + EmailMessageID *string + + /* Limit. + + How many objects to return at one time + + Format: int64 + */ + Limit *int64 + + /* Offset. + + How many objects to skip? + + Format: int64 + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get outgoing email messages params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetOutgoingEmailMessagesParams) WithDefaults() *GetOutgoingEmailMessagesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get outgoing email messages params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetOutgoingEmailMessagesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get outgoing email messages params +func (o *GetOutgoingEmailMessagesParams) WithTimeout(timeout time.Duration) *GetOutgoingEmailMessagesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get outgoing email messages params +func (o *GetOutgoingEmailMessagesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get outgoing email messages params +func (o *GetOutgoingEmailMessagesParams) WithContext(ctx context.Context) *GetOutgoingEmailMessagesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get outgoing email messages params +func (o *GetOutgoingEmailMessagesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get outgoing email messages params +func (o *GetOutgoingEmailMessagesParams) WithHTTPClient(client *http.Client) *GetOutgoingEmailMessagesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get outgoing email messages params +func (o *GetOutgoingEmailMessagesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEmailMessageID adds the emailMessageID to the get outgoing email messages params +func (o *GetOutgoingEmailMessagesParams) WithEmailMessageID(emailMessageID *string) *GetOutgoingEmailMessagesParams { + o.SetEmailMessageID(emailMessageID) + return o +} + +// SetEmailMessageID adds the emailMessageId to the get outgoing email messages params +func (o *GetOutgoingEmailMessagesParams) SetEmailMessageID(emailMessageID *string) { + o.EmailMessageID = emailMessageID +} + +// WithLimit adds the limit to the get outgoing email messages params +func (o *GetOutgoingEmailMessagesParams) WithLimit(limit *int64) *GetOutgoingEmailMessagesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get outgoing email messages params +func (o *GetOutgoingEmailMessagesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get outgoing email messages params +func (o *GetOutgoingEmailMessagesParams) WithOffset(offset *int64) *GetOutgoingEmailMessagesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get outgoing email messages params +func (o *GetOutgoingEmailMessagesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetOutgoingEmailMessagesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.EmailMessageID != nil { + + // query param emailMessageId + var qrEmailMessageID string + + if o.EmailMessageID != nil { + qrEmailMessageID = *o.EmailMessageID + } + qEmailMessageID := qrEmailMessageID + if qEmailMessageID != "" { + + if err := r.SetQueryParam("emailMessageId", qEmailMessageID); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/emails/get_outgoing_email_messages_responses.go b/api/members/members_client/emails/get_outgoing_email_messages_responses.go new file mode 100644 index 0000000..e95aec2 --- /dev/null +++ b/api/members/members_client/emails/get_outgoing_email_messages_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package emails + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// GetOutgoingEmailMessagesReader is a Reader for the GetOutgoingEmailMessages structure. +type GetOutgoingEmailMessagesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetOutgoingEmailMessagesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetOutgoingEmailMessagesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetOutgoingEmailMessagesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetOutgoingEmailMessagesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetOutgoingEmailMessagesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetOutgoingEmailMessagesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetOutgoingEmailMessagesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGetOutgoingEmailMessagesOK creates a GetOutgoingEmailMessagesOK with default headers values +func NewGetOutgoingEmailMessagesOK() *GetOutgoingEmailMessagesOK { + return &GetOutgoingEmailMessagesOK{} +} + +/* +GetOutgoingEmailMessagesOK describes a response with status code 200, with default header values. + +Array of Outgoing Email Messages +*/ +type GetOutgoingEmailMessagesOK struct { + Payload *members_models.OutgoingEmailMessagesResponse +} + +// IsSuccess returns true when this get outgoing email messages o k response has a 2xx status code +func (o *GetOutgoingEmailMessagesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get outgoing email messages o k response has a 3xx status code +func (o *GetOutgoingEmailMessagesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get outgoing email messages o k response has a 4xx status code +func (o *GetOutgoingEmailMessagesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get outgoing email messages o k response has a 5xx status code +func (o *GetOutgoingEmailMessagesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get outgoing email messages o k response a status code equal to that given +func (o *GetOutgoingEmailMessagesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get outgoing email messages o k response +func (o *GetOutgoingEmailMessagesOK) Code() int { + return 200 +} + +func (o *GetOutgoingEmailMessagesOK) Error() string { + return fmt.Sprintf("[GET /outgoingemailmessages][%d] getOutgoingEmailMessagesOK %+v", 200, o.Payload) +} + +func (o *GetOutgoingEmailMessagesOK) String() string { + return fmt.Sprintf("[GET /outgoingemailmessages][%d] getOutgoingEmailMessagesOK %+v", 200, o.Payload) +} + +func (o *GetOutgoingEmailMessagesOK) GetPayload() *members_models.OutgoingEmailMessagesResponse { + return o.Payload +} + +func (o *GetOutgoingEmailMessagesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.OutgoingEmailMessagesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetOutgoingEmailMessagesUnauthorized creates a GetOutgoingEmailMessagesUnauthorized with default headers values +func NewGetOutgoingEmailMessagesUnauthorized() *GetOutgoingEmailMessagesUnauthorized { + return &GetOutgoingEmailMessagesUnauthorized{} +} + +/* +GetOutgoingEmailMessagesUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetOutgoingEmailMessagesUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get outgoing email messages unauthorized response has a 2xx status code +func (o *GetOutgoingEmailMessagesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get outgoing email messages unauthorized response has a 3xx status code +func (o *GetOutgoingEmailMessagesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get outgoing email messages unauthorized response has a 4xx status code +func (o *GetOutgoingEmailMessagesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get outgoing email messages unauthorized response has a 5xx status code +func (o *GetOutgoingEmailMessagesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get outgoing email messages unauthorized response a status code equal to that given +func (o *GetOutgoingEmailMessagesUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get outgoing email messages unauthorized response +func (o *GetOutgoingEmailMessagesUnauthorized) Code() int { + return 401 +} + +func (o *GetOutgoingEmailMessagesUnauthorized) Error() string { + return fmt.Sprintf("[GET /outgoingemailmessages][%d] getOutgoingEmailMessagesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetOutgoingEmailMessagesUnauthorized) String() string { + return fmt.Sprintf("[GET /outgoingemailmessages][%d] getOutgoingEmailMessagesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetOutgoingEmailMessagesUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetOutgoingEmailMessagesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetOutgoingEmailMessagesForbidden creates a GetOutgoingEmailMessagesForbidden with default headers values +func NewGetOutgoingEmailMessagesForbidden() *GetOutgoingEmailMessagesForbidden { + return &GetOutgoingEmailMessagesForbidden{} +} + +/* +GetOutgoingEmailMessagesForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type GetOutgoingEmailMessagesForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this get outgoing email messages forbidden response has a 2xx status code +func (o *GetOutgoingEmailMessagesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get outgoing email messages forbidden response has a 3xx status code +func (o *GetOutgoingEmailMessagesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get outgoing email messages forbidden response has a 4xx status code +func (o *GetOutgoingEmailMessagesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get outgoing email messages forbidden response has a 5xx status code +func (o *GetOutgoingEmailMessagesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get outgoing email messages forbidden response a status code equal to that given +func (o *GetOutgoingEmailMessagesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get outgoing email messages forbidden response +func (o *GetOutgoingEmailMessagesForbidden) Code() int { + return 403 +} + +func (o *GetOutgoingEmailMessagesForbidden) Error() string { + return fmt.Sprintf("[GET /outgoingemailmessages][%d] getOutgoingEmailMessagesForbidden %+v", 403, o.Payload) +} + +func (o *GetOutgoingEmailMessagesForbidden) String() string { + return fmt.Sprintf("[GET /outgoingemailmessages][%d] getOutgoingEmailMessagesForbidden %+v", 403, o.Payload) +} + +func (o *GetOutgoingEmailMessagesForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetOutgoingEmailMessagesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetOutgoingEmailMessagesNotFound creates a GetOutgoingEmailMessagesNotFound with default headers values +func NewGetOutgoingEmailMessagesNotFound() *GetOutgoingEmailMessagesNotFound { + return &GetOutgoingEmailMessagesNotFound{} +} + +/* +GetOutgoingEmailMessagesNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type GetOutgoingEmailMessagesNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get outgoing email messages not found response has a 2xx status code +func (o *GetOutgoingEmailMessagesNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get outgoing email messages not found response has a 3xx status code +func (o *GetOutgoingEmailMessagesNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get outgoing email messages not found response has a 4xx status code +func (o *GetOutgoingEmailMessagesNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get outgoing email messages not found response has a 5xx status code +func (o *GetOutgoingEmailMessagesNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get outgoing email messages not found response a status code equal to that given +func (o *GetOutgoingEmailMessagesNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get outgoing email messages not found response +func (o *GetOutgoingEmailMessagesNotFound) Code() int { + return 404 +} + +func (o *GetOutgoingEmailMessagesNotFound) Error() string { + return fmt.Sprintf("[GET /outgoingemailmessages][%d] getOutgoingEmailMessagesNotFound %+v", 404, o.Payload) +} + +func (o *GetOutgoingEmailMessagesNotFound) String() string { + return fmt.Sprintf("[GET /outgoingemailmessages][%d] getOutgoingEmailMessagesNotFound %+v", 404, o.Payload) +} + +func (o *GetOutgoingEmailMessagesNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetOutgoingEmailMessagesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetOutgoingEmailMessagesUnprocessableEntity creates a GetOutgoingEmailMessagesUnprocessableEntity with default headers values +func NewGetOutgoingEmailMessagesUnprocessableEntity() *GetOutgoingEmailMessagesUnprocessableEntity { + return &GetOutgoingEmailMessagesUnprocessableEntity{} +} + +/* +GetOutgoingEmailMessagesUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetOutgoingEmailMessagesUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get outgoing email messages unprocessable entity response has a 2xx status code +func (o *GetOutgoingEmailMessagesUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get outgoing email messages unprocessable entity response has a 3xx status code +func (o *GetOutgoingEmailMessagesUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get outgoing email messages unprocessable entity response has a 4xx status code +func (o *GetOutgoingEmailMessagesUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this get outgoing email messages unprocessable entity response has a 5xx status code +func (o *GetOutgoingEmailMessagesUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this get outgoing email messages unprocessable entity response a status code equal to that given +func (o *GetOutgoingEmailMessagesUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the get outgoing email messages unprocessable entity response +func (o *GetOutgoingEmailMessagesUnprocessableEntity) Code() int { + return 422 +} + +func (o *GetOutgoingEmailMessagesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /outgoingemailmessages][%d] getOutgoingEmailMessagesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetOutgoingEmailMessagesUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /outgoingemailmessages][%d] getOutgoingEmailMessagesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetOutgoingEmailMessagesUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetOutgoingEmailMessagesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetOutgoingEmailMessagesInternalServerError creates a GetOutgoingEmailMessagesInternalServerError with default headers values +func NewGetOutgoingEmailMessagesInternalServerError() *GetOutgoingEmailMessagesInternalServerError { + return &GetOutgoingEmailMessagesInternalServerError{} +} + +/* +GetOutgoingEmailMessagesInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type GetOutgoingEmailMessagesInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get outgoing email messages internal server error response has a 2xx status code +func (o *GetOutgoingEmailMessagesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get outgoing email messages internal server error response has a 3xx status code +func (o *GetOutgoingEmailMessagesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get outgoing email messages internal server error response has a 4xx status code +func (o *GetOutgoingEmailMessagesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get outgoing email messages internal server error response has a 5xx status code +func (o *GetOutgoingEmailMessagesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get outgoing email messages internal server error response a status code equal to that given +func (o *GetOutgoingEmailMessagesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get outgoing email messages internal server error response +func (o *GetOutgoingEmailMessagesInternalServerError) Code() int { + return 500 +} + +func (o *GetOutgoingEmailMessagesInternalServerError) Error() string { + return fmt.Sprintf("[GET /outgoingemailmessages][%d] getOutgoingEmailMessagesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetOutgoingEmailMessagesInternalServerError) String() string { + return fmt.Sprintf("[GET /outgoingemailmessages][%d] getOutgoingEmailMessagesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetOutgoingEmailMessagesInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetOutgoingEmailMessagesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/emails/post_email_messages_parameters.go b/api/members/members_client/emails/post_email_messages_parameters.go new file mode 100644 index 0000000..cb18c43 --- /dev/null +++ b/api/members/members_client/emails/post_email_messages_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package emails + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostEmailMessagesParams creates a new PostEmailMessagesParams 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 NewPostEmailMessagesParams() *PostEmailMessagesParams { + return &PostEmailMessagesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostEmailMessagesParamsWithTimeout creates a new PostEmailMessagesParams object +// with the ability to set a timeout on a request. +func NewPostEmailMessagesParamsWithTimeout(timeout time.Duration) *PostEmailMessagesParams { + return &PostEmailMessagesParams{ + timeout: timeout, + } +} + +// NewPostEmailMessagesParamsWithContext creates a new PostEmailMessagesParams object +// with the ability to set a context for a request. +func NewPostEmailMessagesParamsWithContext(ctx context.Context) *PostEmailMessagesParams { + return &PostEmailMessagesParams{ + Context: ctx, + } +} + +// NewPostEmailMessagesParamsWithHTTPClient creates a new PostEmailMessagesParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostEmailMessagesParamsWithHTTPClient(client *http.Client) *PostEmailMessagesParams { + return &PostEmailMessagesParams{ + HTTPClient: client, + } +} + +/* +PostEmailMessagesParams contains all the parameters to send to the API endpoint + + for the post email messages operation. + + Typically these are written to a http.Request. +*/ +type PostEmailMessagesParams struct { + + /* EmailMessageRequest. + + An array of Email Message records + */ + EmailMessageRequest *members_models.EmailMessageRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post email messages params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostEmailMessagesParams) WithDefaults() *PostEmailMessagesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post email messages params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostEmailMessagesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post email messages params +func (o *PostEmailMessagesParams) WithTimeout(timeout time.Duration) *PostEmailMessagesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post email messages params +func (o *PostEmailMessagesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post email messages params +func (o *PostEmailMessagesParams) WithContext(ctx context.Context) *PostEmailMessagesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post email messages params +func (o *PostEmailMessagesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post email messages params +func (o *PostEmailMessagesParams) WithHTTPClient(client *http.Client) *PostEmailMessagesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post email messages params +func (o *PostEmailMessagesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEmailMessageRequest adds the emailMessageRequest to the post email messages params +func (o *PostEmailMessagesParams) WithEmailMessageRequest(emailMessageRequest *members_models.EmailMessageRequest) *PostEmailMessagesParams { + o.SetEmailMessageRequest(emailMessageRequest) + return o +} + +// SetEmailMessageRequest adds the emailMessageRequest to the post email messages params +func (o *PostEmailMessagesParams) SetEmailMessageRequest(emailMessageRequest *members_models.EmailMessageRequest) { + o.EmailMessageRequest = emailMessageRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostEmailMessagesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.EmailMessageRequest != nil { + if err := r.SetBodyParam(o.EmailMessageRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/emails/post_email_messages_responses.go b/api/members/members_client/emails/post_email_messages_responses.go new file mode 100644 index 0000000..ba1153f --- /dev/null +++ b/api/members/members_client/emails/post_email_messages_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package emails + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// PostEmailMessagesReader is a Reader for the PostEmailMessages structure. +type PostEmailMessagesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostEmailMessagesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostEmailMessagesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostEmailMessagesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostEmailMessagesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostEmailMessagesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostEmailMessagesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostEmailMessagesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostEmailMessagesOK creates a PostEmailMessagesOK with default headers values +func NewPostEmailMessagesOK() *PostEmailMessagesOK { + return &PostEmailMessagesOK{} +} + +/* +PostEmailMessagesOK describes a response with status code 200, with default header values. + +Array of Email Messages +*/ +type PostEmailMessagesOK struct { + Payload *members_models.EmailMessagesResponse +} + +// IsSuccess returns true when this post email messages o k response has a 2xx status code +func (o *PostEmailMessagesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post email messages o k response has a 3xx status code +func (o *PostEmailMessagesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post email messages o k response has a 4xx status code +func (o *PostEmailMessagesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this post email messages o k response has a 5xx status code +func (o *PostEmailMessagesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this post email messages o k response a status code equal to that given +func (o *PostEmailMessagesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the post email messages o k response +func (o *PostEmailMessagesOK) Code() int { + return 200 +} + +func (o *PostEmailMessagesOK) Error() string { + return fmt.Sprintf("[POST /emailmessages][%d] postEmailMessagesOK %+v", 200, o.Payload) +} + +func (o *PostEmailMessagesOK) String() string { + return fmt.Sprintf("[POST /emailmessages][%d] postEmailMessagesOK %+v", 200, o.Payload) +} + +func (o *PostEmailMessagesOK) GetPayload() *members_models.EmailMessagesResponse { + return o.Payload +} + +func (o *PostEmailMessagesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.EmailMessagesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEmailMessagesUnauthorized creates a PostEmailMessagesUnauthorized with default headers values +func NewPostEmailMessagesUnauthorized() *PostEmailMessagesUnauthorized { + return &PostEmailMessagesUnauthorized{} +} + +/* +PostEmailMessagesUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostEmailMessagesUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post email messages unauthorized response has a 2xx status code +func (o *PostEmailMessagesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post email messages unauthorized response has a 3xx status code +func (o *PostEmailMessagesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post email messages unauthorized response has a 4xx status code +func (o *PostEmailMessagesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this post email messages unauthorized response has a 5xx status code +func (o *PostEmailMessagesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this post email messages unauthorized response a status code equal to that given +func (o *PostEmailMessagesUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the post email messages unauthorized response +func (o *PostEmailMessagesUnauthorized) Code() int { + return 401 +} + +func (o *PostEmailMessagesUnauthorized) Error() string { + return fmt.Sprintf("[POST /emailmessages][%d] postEmailMessagesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostEmailMessagesUnauthorized) String() string { + return fmt.Sprintf("[POST /emailmessages][%d] postEmailMessagesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostEmailMessagesUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostEmailMessagesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEmailMessagesForbidden creates a PostEmailMessagesForbidden with default headers values +func NewPostEmailMessagesForbidden() *PostEmailMessagesForbidden { + return &PostEmailMessagesForbidden{} +} + +/* +PostEmailMessagesForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PostEmailMessagesForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this post email messages forbidden response has a 2xx status code +func (o *PostEmailMessagesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post email messages forbidden response has a 3xx status code +func (o *PostEmailMessagesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post email messages forbidden response has a 4xx status code +func (o *PostEmailMessagesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this post email messages forbidden response has a 5xx status code +func (o *PostEmailMessagesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this post email messages forbidden response a status code equal to that given +func (o *PostEmailMessagesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the post email messages forbidden response +func (o *PostEmailMessagesForbidden) Code() int { + return 403 +} + +func (o *PostEmailMessagesForbidden) Error() string { + return fmt.Sprintf("[POST /emailmessages][%d] postEmailMessagesForbidden %+v", 403, o.Payload) +} + +func (o *PostEmailMessagesForbidden) String() string { + return fmt.Sprintf("[POST /emailmessages][%d] postEmailMessagesForbidden %+v", 403, o.Payload) +} + +func (o *PostEmailMessagesForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostEmailMessagesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEmailMessagesNotFound creates a PostEmailMessagesNotFound with default headers values +func NewPostEmailMessagesNotFound() *PostEmailMessagesNotFound { + return &PostEmailMessagesNotFound{} +} + +/* +PostEmailMessagesNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PostEmailMessagesNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post email messages not found response has a 2xx status code +func (o *PostEmailMessagesNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post email messages not found response has a 3xx status code +func (o *PostEmailMessagesNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post email messages not found response has a 4xx status code +func (o *PostEmailMessagesNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this post email messages not found response has a 5xx status code +func (o *PostEmailMessagesNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this post email messages not found response a status code equal to that given +func (o *PostEmailMessagesNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the post email messages not found response +func (o *PostEmailMessagesNotFound) Code() int { + return 404 +} + +func (o *PostEmailMessagesNotFound) Error() string { + return fmt.Sprintf("[POST /emailmessages][%d] postEmailMessagesNotFound %+v", 404, o.Payload) +} + +func (o *PostEmailMessagesNotFound) String() string { + return fmt.Sprintf("[POST /emailmessages][%d] postEmailMessagesNotFound %+v", 404, o.Payload) +} + +func (o *PostEmailMessagesNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostEmailMessagesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEmailMessagesUnprocessableEntity creates a PostEmailMessagesUnprocessableEntity with default headers values +func NewPostEmailMessagesUnprocessableEntity() *PostEmailMessagesUnprocessableEntity { + return &PostEmailMessagesUnprocessableEntity{} +} + +/* +PostEmailMessagesUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostEmailMessagesUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post email messages unprocessable entity response has a 2xx status code +func (o *PostEmailMessagesUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post email messages unprocessable entity response has a 3xx status code +func (o *PostEmailMessagesUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post email messages unprocessable entity response has a 4xx status code +func (o *PostEmailMessagesUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this post email messages unprocessable entity response has a 5xx status code +func (o *PostEmailMessagesUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this post email messages unprocessable entity response a status code equal to that given +func (o *PostEmailMessagesUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the post email messages unprocessable entity response +func (o *PostEmailMessagesUnprocessableEntity) Code() int { + return 422 +} + +func (o *PostEmailMessagesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /emailmessages][%d] postEmailMessagesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostEmailMessagesUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /emailmessages][%d] postEmailMessagesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostEmailMessagesUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostEmailMessagesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEmailMessagesInternalServerError creates a PostEmailMessagesInternalServerError with default headers values +func NewPostEmailMessagesInternalServerError() *PostEmailMessagesInternalServerError { + return &PostEmailMessagesInternalServerError{} +} + +/* +PostEmailMessagesInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PostEmailMessagesInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post email messages internal server error response has a 2xx status code +func (o *PostEmailMessagesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post email messages internal server error response has a 3xx status code +func (o *PostEmailMessagesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post email messages internal server error response has a 4xx status code +func (o *PostEmailMessagesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this post email messages internal server error response has a 5xx status code +func (o *PostEmailMessagesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this post email messages internal server error response a status code equal to that given +func (o *PostEmailMessagesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the post email messages internal server error response +func (o *PostEmailMessagesInternalServerError) Code() int { + return 500 +} + +func (o *PostEmailMessagesInternalServerError) Error() string { + return fmt.Sprintf("[POST /emailmessages][%d] postEmailMessagesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostEmailMessagesInternalServerError) String() string { + return fmt.Sprintf("[POST /emailmessages][%d] postEmailMessagesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostEmailMessagesInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostEmailMessagesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/emails/post_outgoing_email_messages_responses.go b/api/members/members_client/emails/post_outgoing_email_messages_responses.go index 5711d1b..73ab68f 100644 --- a/api/members/members_client/emails/post_outgoing_email_messages_responses.go +++ b/api/members/members_client/emails/post_outgoing_email_messages_responses.go @@ -76,12 +76,10 @@ func NewPostOutgoingEmailMessagesOK() *PostOutgoingEmailMessagesOK { /* PostOutgoingEmailMessagesOK describes a response with status code 200, with default header values. -Array of Email Messages +Array of Outgoing Email Messages */ type PostOutgoingEmailMessagesOK struct { - AccessControlAllowOrigin string - - Payload *members_models.EmailMessagesResponse + Payload *members_models.OutgoingEmailMessagesResponse } // IsSuccess returns true when this post outgoing email messages o k response has a 2xx status code @@ -115,27 +113,20 @@ func (o *PostOutgoingEmailMessagesOK) Code() int { } func (o *PostOutgoingEmailMessagesOK) Error() string { - return fmt.Sprintf("[POST /emails][%d] postOutgoingEmailMessagesOK %+v", 200, o.Payload) + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesOK %+v", 200, o.Payload) } func (o *PostOutgoingEmailMessagesOK) String() string { - return fmt.Sprintf("[POST /emails][%d] postOutgoingEmailMessagesOK %+v", 200, o.Payload) + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesOK %+v", 200, o.Payload) } -func (o *PostOutgoingEmailMessagesOK) GetPayload() *members_models.EmailMessagesResponse { +func (o *PostOutgoingEmailMessagesOK) GetPayload() *members_models.OutgoingEmailMessagesResponse { return o.Payload } func (o *PostOutgoingEmailMessagesOK) 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.EmailMessagesResponse) + o.Payload = new(members_models.OutgoingEmailMessagesResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -190,11 +181,11 @@ func (o *PostOutgoingEmailMessagesUnauthorized) Code() int { } func (o *PostOutgoingEmailMessagesUnauthorized) Error() string { - return fmt.Sprintf("[POST /emails][%d] postOutgoingEmailMessagesUnauthorized %+v", 401, o.Payload) + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesUnauthorized %+v", 401, o.Payload) } func (o *PostOutgoingEmailMessagesUnauthorized) String() string { - return fmt.Sprintf("[POST /emails][%d] postOutgoingEmailMessagesUnauthorized %+v", 401, o.Payload) + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesUnauthorized %+v", 401, o.Payload) } func (o *PostOutgoingEmailMessagesUnauthorized) GetPayload() *members_models.Error { @@ -260,11 +251,11 @@ func (o *PostOutgoingEmailMessagesForbidden) Code() int { } func (o *PostOutgoingEmailMessagesForbidden) Error() string { - return fmt.Sprintf("[POST /emails][%d] postOutgoingEmailMessagesForbidden %+v", 403, o.Payload) + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesForbidden %+v", 403, o.Payload) } func (o *PostOutgoingEmailMessagesForbidden) String() string { - return fmt.Sprintf("[POST /emails][%d] postOutgoingEmailMessagesForbidden %+v", 403, o.Payload) + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesForbidden %+v", 403, o.Payload) } func (o *PostOutgoingEmailMessagesForbidden) GetPayload() *members_models.Error { @@ -301,8 +292,6 @@ PostOutgoingEmailMessagesNotFound describes a response with status code 404, wit Resource was not found */ type PostOutgoingEmailMessagesNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -337,11 +326,11 @@ func (o *PostOutgoingEmailMessagesNotFound) Code() int { } func (o *PostOutgoingEmailMessagesNotFound) Error() string { - return fmt.Sprintf("[POST /emails][%d] postOutgoingEmailMessagesNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesNotFound %+v", 404, o.Payload) } func (o *PostOutgoingEmailMessagesNotFound) String() string { - return fmt.Sprintf("[POST /emails][%d] postOutgoingEmailMessagesNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesNotFound %+v", 404, o.Payload) } func (o *PostOutgoingEmailMessagesNotFound) GetPayload() *members_models.Error { @@ -350,13 +339,6 @@ func (o *PostOutgoingEmailMessagesNotFound) GetPayload() *members_models.Error { func (o *PostOutgoingEmailMessagesNotFound) 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 @@ -412,11 +394,11 @@ func (o *PostOutgoingEmailMessagesUnprocessableEntity) Code() int { } func (o *PostOutgoingEmailMessagesUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /emails][%d] postOutgoingEmailMessagesUnprocessableEntity %+v", 422, o.Payload) + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesUnprocessableEntity %+v", 422, o.Payload) } func (o *PostOutgoingEmailMessagesUnprocessableEntity) String() string { - return fmt.Sprintf("[POST /emails][%d] postOutgoingEmailMessagesUnprocessableEntity %+v", 422, o.Payload) + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesUnprocessableEntity %+v", 422, o.Payload) } func (o *PostOutgoingEmailMessagesUnprocessableEntity) GetPayload() *members_models.Error { @@ -446,8 +428,6 @@ PostOutgoingEmailMessagesInternalServerError describes a response with status co Server Internal Error */ type PostOutgoingEmailMessagesInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -482,11 +462,11 @@ func (o *PostOutgoingEmailMessagesInternalServerError) Code() int { } func (o *PostOutgoingEmailMessagesInternalServerError) Error() string { - return fmt.Sprintf("[POST /emails][%d] postOutgoingEmailMessagesInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesInternalServerError %+v", 500, o.Payload) } func (o *PostOutgoingEmailMessagesInternalServerError) String() string { - return fmt.Sprintf("[POST /emails][%d] postOutgoingEmailMessagesInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesInternalServerError %+v", 500, o.Payload) } func (o *PostOutgoingEmailMessagesInternalServerError) GetPayload() *members_models.Error { @@ -495,13 +475,6 @@ func (o *PostOutgoingEmailMessagesInternalServerError) GetPayload() *members_mod func (o *PostOutgoingEmailMessagesInternalServerError) 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 diff --git a/api/members/members_client/enrollments/create_enrollment_parameters.go b/api/members/members_client/enrollments/create_enrollment_parameters.go deleted file mode 100644 index 51a79fd..0000000 --- a/api/members/members_client/enrollments/create_enrollment_parameters.go +++ /dev/null @@ -1,157 +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 enrollments - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateEnrollmentParams creates a new CreateEnrollmentParams 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 NewCreateEnrollmentParams() *CreateEnrollmentParams { - return &CreateEnrollmentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateEnrollmentParamsWithTimeout creates a new CreateEnrollmentParams object -// with the ability to set a timeout on a request. -func NewCreateEnrollmentParamsWithTimeout(timeout time.Duration) *CreateEnrollmentParams { - return &CreateEnrollmentParams{ - timeout: timeout, - } -} - -// NewCreateEnrollmentParamsWithContext creates a new CreateEnrollmentParams object -// with the ability to set a context for a request. -func NewCreateEnrollmentParamsWithContext(ctx context.Context) *CreateEnrollmentParams { - return &CreateEnrollmentParams{ - Context: ctx, - } -} - -// NewCreateEnrollmentParamsWithHTTPClient creates a new CreateEnrollmentParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateEnrollmentParamsWithHTTPClient(client *http.Client) *CreateEnrollmentParams { - return &CreateEnrollmentParams{ - HTTPClient: client, - } -} - -/* -CreateEnrollmentParams contains all the parameters to send to the API endpoint - - for the create enrollment operation. - - Typically these are written to a http.Request. -*/ -type CreateEnrollmentParams struct { - - /* EnrollmentRequest. - - An array of new Enrollment records - */ - EnrollmentRequest *members_models.EnrollmentRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create enrollment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateEnrollmentParams) WithDefaults() *CreateEnrollmentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create enrollment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateEnrollmentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create enrollment params -func (o *CreateEnrollmentParams) WithTimeout(timeout time.Duration) *CreateEnrollmentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create enrollment params -func (o *CreateEnrollmentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create enrollment params -func (o *CreateEnrollmentParams) WithContext(ctx context.Context) *CreateEnrollmentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create enrollment params -func (o *CreateEnrollmentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create enrollment params -func (o *CreateEnrollmentParams) WithHTTPClient(client *http.Client) *CreateEnrollmentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create enrollment params -func (o *CreateEnrollmentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEnrollmentRequest adds the enrollmentRequest to the create enrollment params -func (o *CreateEnrollmentParams) WithEnrollmentRequest(enrollmentRequest *members_models.EnrollmentRequest) *CreateEnrollmentParams { - o.SetEnrollmentRequest(enrollmentRequest) - return o -} - -// SetEnrollmentRequest adds the enrollmentRequest to the create enrollment params -func (o *CreateEnrollmentParams) SetEnrollmentRequest(enrollmentRequest *members_models.EnrollmentRequest) { - o.EnrollmentRequest = enrollmentRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateEnrollmentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.EnrollmentRequest != nil { - if err := r.SetBodyParam(o.EnrollmentRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/enrollments/create_enrollment_responses.go b/api/members/members_client/enrollments/create_enrollment_responses.go deleted file mode 100644 index 25df58b..0000000 --- a/api/members/members_client/enrollments/create_enrollment_responses.go +++ /dev/null @@ -1,92 +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 enrollments - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateEnrollmentReader is a Reader for the CreateEnrollment structure. -type CreateEnrollmentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateEnrollmentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateEnrollmentCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateEnrollmentCreated creates a CreateEnrollmentCreated with default headers values -func NewCreateEnrollmentCreated() *CreateEnrollmentCreated { - return &CreateEnrollmentCreated{} -} - -/* -CreateEnrollmentCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateEnrollmentCreated struct { -} - -// IsSuccess returns true when this create enrollment created response has a 2xx status code -func (o *CreateEnrollmentCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create enrollment created response has a 3xx status code -func (o *CreateEnrollmentCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create enrollment created response has a 4xx status code -func (o *CreateEnrollmentCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create enrollment created response has a 5xx status code -func (o *CreateEnrollmentCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create enrollment created response a status code equal to that given -func (o *CreateEnrollmentCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create enrollment created response -func (o *CreateEnrollmentCreated) Code() int { - return 201 -} - -func (o *CreateEnrollmentCreated) Error() string { - return fmt.Sprintf("[POST /enrollments][%d] createEnrollmentCreated ", 201) -} - -func (o *CreateEnrollmentCreated) String() string { - return fmt.Sprintf("[POST /enrollments][%d] createEnrollmentCreated ", 201) -} - -func (o *CreateEnrollmentCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/enrollments/enrollments_client.go b/api/members/members_client/enrollments/enrollments_client.go index 224a6a6..aa10a92 100644 --- a/api/members/members_client/enrollments/enrollments_client.go +++ b/api/members/members_client/enrollments/enrollments_client.go @@ -34,59 +34,21 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateEnrollment(params *CreateEnrollmentParams, opts ...ClientOption) (*CreateEnrollmentCreated, error) + DeleteEnrollment(params *DeleteEnrollmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteEnrollmentNoContent, error) - DeleteEnrollment(params *DeleteEnrollmentParams, opts ...ClientOption) (*DeleteEnrollmentNoContent, error) + GetEnrollments(params *GetEnrollmentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEnrollmentsOK, error) - GetEnrollments(params *GetEnrollmentsParams, opts ...ClientOption) (*GetEnrollmentsOK, error) + PostEnrollment(params *PostEnrollmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEnrollmentCreated, error) - UpdateEnrollment(params *UpdateEnrollmentParams, opts ...ClientOption) (*UpdateEnrollmentOK, error) + UpdateEnrollment(params *UpdateEnrollmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateEnrollmentOK, error) SetTransport(transport runtime.ClientTransport) } -/* -CreateEnrollment creates a new enrollment -*/ -func (a *Client) CreateEnrollment(params *CreateEnrollmentParams, opts ...ClientOption) (*CreateEnrollmentCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateEnrollmentParams() - } - op := &runtime.ClientOperation{ - ID: "createEnrollment", - Method: "POST", - PathPattern: "/enrollments", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateEnrollmentReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateEnrollmentCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createEnrollment: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DeleteEnrollment deletes a enrollment */ -func (a *Client) DeleteEnrollment(params *DeleteEnrollmentParams, opts ...ClientOption) (*DeleteEnrollmentNoContent, error) { +func (a *Client) DeleteEnrollment(params *DeleteEnrollmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteEnrollmentNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeleteEnrollmentParams() @@ -100,6 +62,7 @@ func (a *Client) DeleteEnrollment(params *DeleteEnrollmentParams, opts ...Client Schemes: []string{"http"}, Params: params, Reader: &DeleteEnrollmentReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +87,7 @@ func (a *Client) DeleteEnrollment(params *DeleteEnrollmentParams, opts ...Client /* GetEnrollments gets a list of enrollments */ -func (a *Client) GetEnrollments(params *GetEnrollmentsParams, opts ...ClientOption) (*GetEnrollmentsOK, error) { +func (a *Client) GetEnrollments(params *GetEnrollmentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEnrollmentsOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetEnrollmentsParams() @@ -138,6 +101,7 @@ func (a *Client) GetEnrollments(params *GetEnrollmentsParams, opts ...ClientOpti Schemes: []string{"http"}, Params: params, Reader: &GetEnrollmentsReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -159,10 +123,49 @@ func (a *Client) GetEnrollments(params *GetEnrollmentsParams, opts ...ClientOpti panic(msg) } +/* +PostEnrollment creates a new enrollment +*/ +func (a *Client) PostEnrollment(params *PostEnrollmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEnrollmentCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostEnrollmentParams() + } + op := &runtime.ClientOperation{ + ID: "postEnrollment", + Method: "POST", + PathPattern: "/enrollments", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostEnrollmentReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostEnrollmentCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postEnrollment: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UpdateEnrollment updates an existing enrollment */ -func (a *Client) UpdateEnrollment(params *UpdateEnrollmentParams, opts ...ClientOption) (*UpdateEnrollmentOK, error) { +func (a *Client) UpdateEnrollment(params *UpdateEnrollmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateEnrollmentOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateEnrollmentParams() @@ -176,6 +179,7 @@ func (a *Client) UpdateEnrollment(params *UpdateEnrollmentParams, opts ...Client Schemes: []string{"http"}, Params: params, Reader: &UpdateEnrollmentReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/enrollments/get_enrollments_responses.go b/api/members/members_client/enrollments/get_enrollments_responses.go index 7079423..a3701a4 100644 --- a/api/members/members_client/enrollments/get_enrollments_responses.go +++ b/api/members/members_client/enrollments/get_enrollments_responses.go @@ -11,9 +11,12 @@ package enrollments import ( "fmt" + "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" ) // GetEnrollmentsReader is a Reader for the GetEnrollments structure. @@ -30,6 +33,36 @@ func (o *GetEnrollmentsReader) ReadResponse(response runtime.ClientResponse, con return nil, err } return result, nil + case 401: + result := NewGetEnrollmentsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetEnrollmentsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetEnrollmentsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetEnrollmentsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetEnrollmentsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } @@ -43,9 +76,10 @@ func NewGetEnrollmentsOK() *GetEnrollmentsOK { /* GetEnrollmentsOK describes a response with status code 200, with default header values. -OK +Enrollment Response Object */ type GetEnrollmentsOK struct { + Payload *members_models.EnrollmentResponse } // IsSuccess returns true when this get enrollments o k response has a 2xx status code @@ -79,14 +113,374 @@ func (o *GetEnrollmentsOK) Code() int { } func (o *GetEnrollmentsOK) Error() string { - return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsOK ", 200) + return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsOK %+v", 200, o.Payload) } func (o *GetEnrollmentsOK) String() string { - return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsOK ", 200) + return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsOK %+v", 200, o.Payload) +} + +func (o *GetEnrollmentsOK) GetPayload() *members_models.EnrollmentResponse { + return o.Payload } func (o *GetEnrollmentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(members_models.EnrollmentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEnrollmentsUnauthorized creates a GetEnrollmentsUnauthorized with default headers values +func NewGetEnrollmentsUnauthorized() *GetEnrollmentsUnauthorized { + return &GetEnrollmentsUnauthorized{} +} + +/* +GetEnrollmentsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetEnrollmentsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get enrollments unauthorized response has a 2xx status code +func (o *GetEnrollmentsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get enrollments unauthorized response has a 3xx status code +func (o *GetEnrollmentsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get enrollments unauthorized response has a 4xx status code +func (o *GetEnrollmentsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get enrollments unauthorized response has a 5xx status code +func (o *GetEnrollmentsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get enrollments unauthorized response a status code equal to that given +func (o *GetEnrollmentsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get enrollments unauthorized response +func (o *GetEnrollmentsUnauthorized) Code() int { + return 401 +} + +func (o *GetEnrollmentsUnauthorized) Error() string { + return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetEnrollmentsUnauthorized) String() string { + return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetEnrollmentsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetEnrollmentsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEnrollmentsForbidden creates a GetEnrollmentsForbidden with default headers values +func NewGetEnrollmentsForbidden() *GetEnrollmentsForbidden { + return &GetEnrollmentsForbidden{} +} + +/* +GetEnrollmentsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type GetEnrollmentsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this get enrollments forbidden response has a 2xx status code +func (o *GetEnrollmentsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get enrollments forbidden response has a 3xx status code +func (o *GetEnrollmentsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get enrollments forbidden response has a 4xx status code +func (o *GetEnrollmentsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get enrollments forbidden response has a 5xx status code +func (o *GetEnrollmentsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get enrollments forbidden response a status code equal to that given +func (o *GetEnrollmentsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get enrollments forbidden response +func (o *GetEnrollmentsForbidden) Code() int { + return 403 +} + +func (o *GetEnrollmentsForbidden) Error() string { + return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsForbidden %+v", 403, o.Payload) +} + +func (o *GetEnrollmentsForbidden) String() string { + return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsForbidden %+v", 403, o.Payload) +} + +func (o *GetEnrollmentsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetEnrollmentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEnrollmentsNotFound creates a GetEnrollmentsNotFound with default headers values +func NewGetEnrollmentsNotFound() *GetEnrollmentsNotFound { + return &GetEnrollmentsNotFound{} +} + +/* +GetEnrollmentsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type GetEnrollmentsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get enrollments not found response has a 2xx status code +func (o *GetEnrollmentsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get enrollments not found response has a 3xx status code +func (o *GetEnrollmentsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get enrollments not found response has a 4xx status code +func (o *GetEnrollmentsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get enrollments not found response has a 5xx status code +func (o *GetEnrollmentsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get enrollments not found response a status code equal to that given +func (o *GetEnrollmentsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get enrollments not found response +func (o *GetEnrollmentsNotFound) Code() int { + return 404 +} + +func (o *GetEnrollmentsNotFound) Error() string { + return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsNotFound %+v", 404, o.Payload) +} + +func (o *GetEnrollmentsNotFound) String() string { + return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsNotFound %+v", 404, o.Payload) +} + +func (o *GetEnrollmentsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetEnrollmentsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEnrollmentsUnprocessableEntity creates a GetEnrollmentsUnprocessableEntity with default headers values +func NewGetEnrollmentsUnprocessableEntity() *GetEnrollmentsUnprocessableEntity { + return &GetEnrollmentsUnprocessableEntity{} +} + +/* +GetEnrollmentsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetEnrollmentsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get enrollments unprocessable entity response has a 2xx status code +func (o *GetEnrollmentsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get enrollments unprocessable entity response has a 3xx status code +func (o *GetEnrollmentsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get enrollments unprocessable entity response has a 4xx status code +func (o *GetEnrollmentsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this get enrollments unprocessable entity response has a 5xx status code +func (o *GetEnrollmentsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this get enrollments unprocessable entity response a status code equal to that given +func (o *GetEnrollmentsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the get enrollments unprocessable entity response +func (o *GetEnrollmentsUnprocessableEntity) Code() int { + return 422 +} + +func (o *GetEnrollmentsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetEnrollmentsUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetEnrollmentsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetEnrollmentsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEnrollmentsInternalServerError creates a GetEnrollmentsInternalServerError with default headers values +func NewGetEnrollmentsInternalServerError() *GetEnrollmentsInternalServerError { + return &GetEnrollmentsInternalServerError{} +} + +/* +GetEnrollmentsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type GetEnrollmentsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get enrollments internal server error response has a 2xx status code +func (o *GetEnrollmentsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get enrollments internal server error response has a 3xx status code +func (o *GetEnrollmentsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get enrollments internal server error response has a 4xx status code +func (o *GetEnrollmentsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get enrollments internal server error response has a 5xx status code +func (o *GetEnrollmentsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get enrollments internal server error response a status code equal to that given +func (o *GetEnrollmentsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get enrollments internal server error response +func (o *GetEnrollmentsInternalServerError) Code() int { + return 500 +} + +func (o *GetEnrollmentsInternalServerError) Error() string { + return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetEnrollmentsInternalServerError) String() string { + return fmt.Sprintf("[GET /enrollments][%d] getEnrollmentsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetEnrollmentsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetEnrollmentsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + return nil } diff --git a/api/members/members_client/enrollments/post_enrollment_parameters.go b/api/members/members_client/enrollments/post_enrollment_parameters.go new file mode 100644 index 0000000..0cca956 --- /dev/null +++ b/api/members/members_client/enrollments/post_enrollment_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package enrollments + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostEnrollmentParams creates a new PostEnrollmentParams 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 NewPostEnrollmentParams() *PostEnrollmentParams { + return &PostEnrollmentParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostEnrollmentParamsWithTimeout creates a new PostEnrollmentParams object +// with the ability to set a timeout on a request. +func NewPostEnrollmentParamsWithTimeout(timeout time.Duration) *PostEnrollmentParams { + return &PostEnrollmentParams{ + timeout: timeout, + } +} + +// NewPostEnrollmentParamsWithContext creates a new PostEnrollmentParams object +// with the ability to set a context for a request. +func NewPostEnrollmentParamsWithContext(ctx context.Context) *PostEnrollmentParams { + return &PostEnrollmentParams{ + Context: ctx, + } +} + +// NewPostEnrollmentParamsWithHTTPClient creates a new PostEnrollmentParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostEnrollmentParamsWithHTTPClient(client *http.Client) *PostEnrollmentParams { + return &PostEnrollmentParams{ + HTTPClient: client, + } +} + +/* +PostEnrollmentParams contains all the parameters to send to the API endpoint + + for the post enrollment operation. + + Typically these are written to a http.Request. +*/ +type PostEnrollmentParams struct { + + /* EnrollmentRequest. + + An array of new Enrollment records + */ + EnrollmentRequest *members_models.EnrollmentRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post enrollment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostEnrollmentParams) WithDefaults() *PostEnrollmentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post enrollment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostEnrollmentParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post enrollment params +func (o *PostEnrollmentParams) WithTimeout(timeout time.Duration) *PostEnrollmentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post enrollment params +func (o *PostEnrollmentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post enrollment params +func (o *PostEnrollmentParams) WithContext(ctx context.Context) *PostEnrollmentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post enrollment params +func (o *PostEnrollmentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post enrollment params +func (o *PostEnrollmentParams) WithHTTPClient(client *http.Client) *PostEnrollmentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post enrollment params +func (o *PostEnrollmentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEnrollmentRequest adds the enrollmentRequest to the post enrollment params +func (o *PostEnrollmentParams) WithEnrollmentRequest(enrollmentRequest *members_models.EnrollmentRequest) *PostEnrollmentParams { + o.SetEnrollmentRequest(enrollmentRequest) + return o +} + +// SetEnrollmentRequest adds the enrollmentRequest to the post enrollment params +func (o *PostEnrollmentParams) SetEnrollmentRequest(enrollmentRequest *members_models.EnrollmentRequest) { + o.EnrollmentRequest = enrollmentRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostEnrollmentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.EnrollmentRequest != nil { + if err := r.SetBodyParam(o.EnrollmentRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/enrollments/post_enrollment_responses.go b/api/members/members_client/enrollments/post_enrollment_responses.go new file mode 100644 index 0000000..0110d7a --- /dev/null +++ b/api/members/members_client/enrollments/post_enrollment_responses.go @@ -0,0 +1,92 @@ +// 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 enrollments + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PostEnrollmentReader is a Reader for the PostEnrollment structure. +type PostEnrollmentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostEnrollmentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostEnrollmentCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostEnrollmentCreated creates a PostEnrollmentCreated with default headers values +func NewPostEnrollmentCreated() *PostEnrollmentCreated { + return &PostEnrollmentCreated{} +} + +/* +PostEnrollmentCreated describes a response with status code 201, with default header values. + +Created +*/ +type PostEnrollmentCreated struct { +} + +// IsSuccess returns true when this post enrollment created response has a 2xx status code +func (o *PostEnrollmentCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post enrollment created response has a 3xx status code +func (o *PostEnrollmentCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post enrollment created response has a 4xx status code +func (o *PostEnrollmentCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this post enrollment created response has a 5xx status code +func (o *PostEnrollmentCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this post enrollment created response a status code equal to that given +func (o *PostEnrollmentCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the post enrollment created response +func (o *PostEnrollmentCreated) Code() int { + return 201 +} + +func (o *PostEnrollmentCreated) Error() string { + return fmt.Sprintf("[POST /enrollments][%d] postEnrollmentCreated ", 201) +} + +func (o *PostEnrollmentCreated) String() string { + return fmt.Sprintf("[POST /enrollments][%d] postEnrollmentCreated ", 201) +} + +func (o *PostEnrollmentCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/members/members_client/event_categories/create_event_category_parameters.go b/api/members/members_client/event_categories/create_event_category_parameters.go deleted file mode 100644 index 7fbba18..0000000 --- a/api/members/members_client/event_categories/create_event_category_parameters.go +++ /dev/null @@ -1,157 +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 event_categories - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateEventCategoryParams creates a new CreateEventCategoryParams 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 NewCreateEventCategoryParams() *CreateEventCategoryParams { - return &CreateEventCategoryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateEventCategoryParamsWithTimeout creates a new CreateEventCategoryParams object -// with the ability to set a timeout on a request. -func NewCreateEventCategoryParamsWithTimeout(timeout time.Duration) *CreateEventCategoryParams { - return &CreateEventCategoryParams{ - timeout: timeout, - } -} - -// NewCreateEventCategoryParamsWithContext creates a new CreateEventCategoryParams object -// with the ability to set a context for a request. -func NewCreateEventCategoryParamsWithContext(ctx context.Context) *CreateEventCategoryParams { - return &CreateEventCategoryParams{ - Context: ctx, - } -} - -// NewCreateEventCategoryParamsWithHTTPClient creates a new CreateEventCategoryParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateEventCategoryParamsWithHTTPClient(client *http.Client) *CreateEventCategoryParams { - return &CreateEventCategoryParams{ - HTTPClient: client, - } -} - -/* -CreateEventCategoryParams contains all the parameters to send to the API endpoint - - for the create event category operation. - - Typically these are written to a http.Request. -*/ -type CreateEventCategoryParams struct { - - /* EventcategoryRequest. - - An array of new EventCategory records - */ - EventcategoryRequest *members_models.EventCategoryRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create event category params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateEventCategoryParams) WithDefaults() *CreateEventCategoryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create event category params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateEventCategoryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create event category params -func (o *CreateEventCategoryParams) WithTimeout(timeout time.Duration) *CreateEventCategoryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create event category params -func (o *CreateEventCategoryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create event category params -func (o *CreateEventCategoryParams) WithContext(ctx context.Context) *CreateEventCategoryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create event category params -func (o *CreateEventCategoryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create event category params -func (o *CreateEventCategoryParams) WithHTTPClient(client *http.Client) *CreateEventCategoryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create event category params -func (o *CreateEventCategoryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEventcategoryRequest adds the eventcategoryRequest to the create event category params -func (o *CreateEventCategoryParams) WithEventcategoryRequest(eventcategoryRequest *members_models.EventCategoryRequest) *CreateEventCategoryParams { - o.SetEventcategoryRequest(eventcategoryRequest) - return o -} - -// SetEventcategoryRequest adds the eventcategoryRequest to the create event category params -func (o *CreateEventCategoryParams) SetEventcategoryRequest(eventcategoryRequest *members_models.EventCategoryRequest) { - o.EventcategoryRequest = eventcategoryRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateEventCategoryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.EventcategoryRequest != nil { - if err := r.SetBodyParam(o.EventcategoryRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/event_categories/create_event_category_responses.go b/api/members/members_client/event_categories/create_event_category_responses.go deleted file mode 100644 index 18a683e..0000000 --- a/api/members/members_client/event_categories/create_event_category_responses.go +++ /dev/null @@ -1,92 +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 event_categories - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateEventCategoryReader is a Reader for the CreateEventCategory structure. -type CreateEventCategoryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateEventCategoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateEventCategoryCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateEventCategoryCreated creates a CreateEventCategoryCreated with default headers values -func NewCreateEventCategoryCreated() *CreateEventCategoryCreated { - return &CreateEventCategoryCreated{} -} - -/* -CreateEventCategoryCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateEventCategoryCreated struct { -} - -// IsSuccess returns true when this create event category created response has a 2xx status code -func (o *CreateEventCategoryCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create event category created response has a 3xx status code -func (o *CreateEventCategoryCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create event category created response has a 4xx status code -func (o *CreateEventCategoryCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create event category created response has a 5xx status code -func (o *CreateEventCategoryCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create event category created response a status code equal to that given -func (o *CreateEventCategoryCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create event category created response -func (o *CreateEventCategoryCreated) Code() int { - return 201 -} - -func (o *CreateEventCategoryCreated) Error() string { - return fmt.Sprintf("[POST /eventcategories][%d] createEventCategoryCreated ", 201) -} - -func (o *CreateEventCategoryCreated) String() string { - return fmt.Sprintf("[POST /eventcategories][%d] createEventCategoryCreated ", 201) -} - -func (o *CreateEventCategoryCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/event_categories/delete_event_category_parameters.go b/api/members/members_client/event_categories/delete_event_category_parameters.go deleted file mode 100644 index 66f713d..0000000 --- a/api/members/members_client/event_categories/delete_event_category_parameters.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// (c) 2012-2020 by Taxnexus, Inc. -// All rights reserved worldwide. -// Proprietary product; unlicensed use is not allowed - -package event_categories - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteEventCategoryParams creates a new DeleteEventCategoryParams 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 NewDeleteEventCategoryParams() *DeleteEventCategoryParams { - return &DeleteEventCategoryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteEventCategoryParamsWithTimeout creates a new DeleteEventCategoryParams object -// with the ability to set a timeout on a request. -func NewDeleteEventCategoryParamsWithTimeout(timeout time.Duration) *DeleteEventCategoryParams { - return &DeleteEventCategoryParams{ - timeout: timeout, - } -} - -// NewDeleteEventCategoryParamsWithContext creates a new DeleteEventCategoryParams object -// with the ability to set a context for a request. -func NewDeleteEventCategoryParamsWithContext(ctx context.Context) *DeleteEventCategoryParams { - return &DeleteEventCategoryParams{ - Context: ctx, - } -} - -// NewDeleteEventCategoryParamsWithHTTPClient creates a new DeleteEventCategoryParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteEventCategoryParamsWithHTTPClient(client *http.Client) *DeleteEventCategoryParams { - return &DeleteEventCategoryParams{ - HTTPClient: client, - } -} - -/* -DeleteEventCategoryParams contains all the parameters to send to the API endpoint - - for the delete event category operation. - - Typically these are written to a http.Request. -*/ -type DeleteEventCategoryParams struct { - - /* ID. - - Unique Record ID - */ - ID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete event category params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteEventCategoryParams) WithDefaults() *DeleteEventCategoryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete event category params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteEventCategoryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete event category params -func (o *DeleteEventCategoryParams) WithTimeout(timeout time.Duration) *DeleteEventCategoryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete event category params -func (o *DeleteEventCategoryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete event category params -func (o *DeleteEventCategoryParams) WithContext(ctx context.Context) *DeleteEventCategoryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete event category params -func (o *DeleteEventCategoryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete event category params -func (o *DeleteEventCategoryParams) WithHTTPClient(client *http.Client) *DeleteEventCategoryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete event category params -func (o *DeleteEventCategoryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete event category params -func (o *DeleteEventCategoryParams) WithID(id *string) *DeleteEventCategoryParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete event category params -func (o *DeleteEventCategoryParams) SetID(id *string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteEventCategoryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ID != nil { - - // query param id - var qrID string - - if o.ID != nil { - qrID = *o.ID - } - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/event_categories/delete_event_category_responses.go b/api/members/members_client/event_categories/delete_event_category_responses.go deleted file mode 100644 index 263f6f2..0000000 --- a/api/members/members_client/event_categories/delete_event_category_responses.go +++ /dev/null @@ -1,92 +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 event_categories - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// DeleteEventCategoryReader is a Reader for the DeleteEventCategory structure. -type DeleteEventCategoryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteEventCategoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteEventCategoryNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeleteEventCategoryNoContent creates a DeleteEventCategoryNoContent with default headers values -func NewDeleteEventCategoryNoContent() *DeleteEventCategoryNoContent { - return &DeleteEventCategoryNoContent{} -} - -/* -DeleteEventCategoryNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteEventCategoryNoContent struct { -} - -// IsSuccess returns true when this delete event category no content response has a 2xx status code -func (o *DeleteEventCategoryNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete event category no content response has a 3xx status code -func (o *DeleteEventCategoryNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete event category no content response has a 4xx status code -func (o *DeleteEventCategoryNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete event category no content response has a 5xx status code -func (o *DeleteEventCategoryNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete event category no content response a status code equal to that given -func (o *DeleteEventCategoryNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete event category no content response -func (o *DeleteEventCategoryNoContent) Code() int { - return 204 -} - -func (o *DeleteEventCategoryNoContent) Error() string { - return fmt.Sprintf("[DELETE /eventcategories][%d] deleteEventCategoryNoContent ", 204) -} - -func (o *DeleteEventCategoryNoContent) String() string { - return fmt.Sprintf("[DELETE /eventcategories][%d] deleteEventCategoryNoContent ", 204) -} - -func (o *DeleteEventCategoryNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/event_categories/event_categories_client.go b/api/members/members_client/event_categories/event_categories_client.go deleted file mode 100644 index f8650a0..0000000 --- a/api/members/members_client/event_categories/event_categories_client.go +++ /dev/null @@ -1,203 +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 event_categories - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new event categories API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for event categories API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateEventCategory(params *CreateEventCategoryParams, opts ...ClientOption) (*CreateEventCategoryCreated, error) - - DeleteEventCategory(params *DeleteEventCategoryParams, opts ...ClientOption) (*DeleteEventCategoryNoContent, error) - - GetEventCategorys(params *GetEventCategorysParams, opts ...ClientOption) (*GetEventCategorysOK, error) - - UpdateEventCategory(params *UpdateEventCategoryParams, opts ...ClientOption) (*UpdateEventCategoryOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateEventCategory creates a new event category -*/ -func (a *Client) CreateEventCategory(params *CreateEventCategoryParams, opts ...ClientOption) (*CreateEventCategoryCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateEventCategoryParams() - } - op := &runtime.ClientOperation{ - ID: "createEventCategory", - Method: "POST", - PathPattern: "/eventcategories", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateEventCategoryReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateEventCategoryCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createEventCategory: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -DeleteEventCategory deletes a event category -*/ -func (a *Client) DeleteEventCategory(params *DeleteEventCategoryParams, opts ...ClientOption) (*DeleteEventCategoryNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteEventCategoryParams() - } - op := &runtime.ClientOperation{ - ID: "deleteEventCategory", - Method: "DELETE", - PathPattern: "/eventcategories", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteEventCategoryReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteEventCategoryNoContent) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for deleteEventCategory: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetEventCategorys gets a list of event categories -*/ -func (a *Client) GetEventCategorys(params *GetEventCategorysParams, opts ...ClientOption) (*GetEventCategorysOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetEventCategorysParams() - } - op := &runtime.ClientOperation{ - ID: "getEventCategorys", - Method: "GET", - PathPattern: "/eventcategories", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetEventCategorysReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetEventCategorysOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for getEventCategorys: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -UpdateEventCategory updates an existing event category -*/ -func (a *Client) UpdateEventCategory(params *UpdateEventCategoryParams, opts ...ClientOption) (*UpdateEventCategoryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateEventCategoryParams() - } - op := &runtime.ClientOperation{ - ID: "updateEventCategory", - Method: "PUT", - PathPattern: "/eventcategories", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &UpdateEventCategoryReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*UpdateEventCategoryOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for updateEventCategory: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/members/members_client/event_categories/get_event_categorys_responses.go b/api/members/members_client/event_categories/get_event_categorys_responses.go deleted file mode 100644 index efedf84..0000000 --- a/api/members/members_client/event_categories/get_event_categorys_responses.go +++ /dev/null @@ -1,92 +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 event_categories - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// GetEventCategorysReader is a Reader for the GetEventCategorys structure. -type GetEventCategorysReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetEventCategorysReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetEventCategorysOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetEventCategorysOK creates a GetEventCategorysOK with default headers values -func NewGetEventCategorysOK() *GetEventCategorysOK { - return &GetEventCategorysOK{} -} - -/* -GetEventCategorysOK describes a response with status code 200, with default header values. - -OK -*/ -type GetEventCategorysOK struct { -} - -// IsSuccess returns true when this get event categorys o k response has a 2xx status code -func (o *GetEventCategorysOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get event categorys o k response has a 3xx status code -func (o *GetEventCategorysOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get event categorys o k response has a 4xx status code -func (o *GetEventCategorysOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get event categorys o k response has a 5xx status code -func (o *GetEventCategorysOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get event categorys o k response a status code equal to that given -func (o *GetEventCategorysOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get event categorys o k response -func (o *GetEventCategorysOK) Code() int { - return 200 -} - -func (o *GetEventCategorysOK) Error() string { - return fmt.Sprintf("[GET /eventcategories][%d] getEventCategorysOK ", 200) -} - -func (o *GetEventCategorysOK) String() string { - return fmt.Sprintf("[GET /eventcategories][%d] getEventCategorysOK ", 200) -} - -func (o *GetEventCategorysOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/event_categories/update_event_category_parameters.go b/api/members/members_client/event_categories/update_event_category_parameters.go deleted file mode 100644 index da1ef43..0000000 --- a/api/members/members_client/event_categories/update_event_category_parameters.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// (c) 2012-2020 by Taxnexus, Inc. -// All rights reserved worldwide. -// Proprietary product; unlicensed use is not allowed - -package event_categories - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewUpdateEventCategoryParams creates a new UpdateEventCategoryParams 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 NewUpdateEventCategoryParams() *UpdateEventCategoryParams { - return &UpdateEventCategoryParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateEventCategoryParamsWithTimeout creates a new UpdateEventCategoryParams object -// with the ability to set a timeout on a request. -func NewUpdateEventCategoryParamsWithTimeout(timeout time.Duration) *UpdateEventCategoryParams { - return &UpdateEventCategoryParams{ - timeout: timeout, - } -} - -// NewUpdateEventCategoryParamsWithContext creates a new UpdateEventCategoryParams object -// with the ability to set a context for a request. -func NewUpdateEventCategoryParamsWithContext(ctx context.Context) *UpdateEventCategoryParams { - return &UpdateEventCategoryParams{ - Context: ctx, - } -} - -// NewUpdateEventCategoryParamsWithHTTPClient creates a new UpdateEventCategoryParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateEventCategoryParamsWithHTTPClient(client *http.Client) *UpdateEventCategoryParams { - return &UpdateEventCategoryParams{ - HTTPClient: client, - } -} - -/* -UpdateEventCategoryParams contains all the parameters to send to the API endpoint - - for the update event category operation. - - Typically these are written to a http.Request. -*/ -type UpdateEventCategoryParams struct { - - /* ID. - - Unique Record ID - */ - ID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update event category params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateEventCategoryParams) WithDefaults() *UpdateEventCategoryParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update event category params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateEventCategoryParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update event category params -func (o *UpdateEventCategoryParams) WithTimeout(timeout time.Duration) *UpdateEventCategoryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update event category params -func (o *UpdateEventCategoryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update event category params -func (o *UpdateEventCategoryParams) WithContext(ctx context.Context) *UpdateEventCategoryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update event category params -func (o *UpdateEventCategoryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update event category params -func (o *UpdateEventCategoryParams) WithHTTPClient(client *http.Client) *UpdateEventCategoryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update event category params -func (o *UpdateEventCategoryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the update event category params -func (o *UpdateEventCategoryParams) WithID(id *string) *UpdateEventCategoryParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update event category params -func (o *UpdateEventCategoryParams) SetID(id *string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateEventCategoryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ID != nil { - - // query param id - var qrID string - - if o.ID != nil { - qrID = *o.ID - } - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/event_categories/update_event_category_responses.go b/api/members/members_client/event_categories/update_event_category_responses.go deleted file mode 100644 index 9a8d416..0000000 --- a/api/members/members_client/event_categories/update_event_category_responses.go +++ /dev/null @@ -1,92 +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 event_categories - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// UpdateEventCategoryReader is a Reader for the UpdateEventCategory structure. -type UpdateEventCategoryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateEventCategoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateEventCategoryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewUpdateEventCategoryOK creates a UpdateEventCategoryOK with default headers values -func NewUpdateEventCategoryOK() *UpdateEventCategoryOK { - return &UpdateEventCategoryOK{} -} - -/* -UpdateEventCategoryOK describes a response with status code 200, with default header values. - -OK -*/ -type UpdateEventCategoryOK struct { -} - -// IsSuccess returns true when this update event category o k response has a 2xx status code -func (o *UpdateEventCategoryOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update event category o k response has a 3xx status code -func (o *UpdateEventCategoryOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update event category o k response has a 4xx status code -func (o *UpdateEventCategoryOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update event category o k response has a 5xx status code -func (o *UpdateEventCategoryOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update event category o k response a status code equal to that given -func (o *UpdateEventCategoryOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update event category o k response -func (o *UpdateEventCategoryOK) Code() int { - return 200 -} - -func (o *UpdateEventCategoryOK) Error() string { - return fmt.Sprintf("[PUT /eventcategories][%d] updateEventCategoryOK ", 200) -} - -func (o *UpdateEventCategoryOK) String() string { - return fmt.Sprintf("[PUT /eventcategories][%d] updateEventCategoryOK ", 200) -} - -func (o *UpdateEventCategoryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/event_category_assignments/create_event_category_assignment_parameters.go b/api/members/members_client/event_category_assignments/create_event_category_assignment_parameters.go deleted file mode 100644 index d0e6459..0000000 --- a/api/members/members_client/event_category_assignments/create_event_category_assignment_parameters.go +++ /dev/null @@ -1,157 +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 event_category_assignments - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateEventCategoryAssignmentParams creates a new CreateEventCategoryAssignmentParams 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 NewCreateEventCategoryAssignmentParams() *CreateEventCategoryAssignmentParams { - return &CreateEventCategoryAssignmentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateEventCategoryAssignmentParamsWithTimeout creates a new CreateEventCategoryAssignmentParams object -// with the ability to set a timeout on a request. -func NewCreateEventCategoryAssignmentParamsWithTimeout(timeout time.Duration) *CreateEventCategoryAssignmentParams { - return &CreateEventCategoryAssignmentParams{ - timeout: timeout, - } -} - -// NewCreateEventCategoryAssignmentParamsWithContext creates a new CreateEventCategoryAssignmentParams object -// with the ability to set a context for a request. -func NewCreateEventCategoryAssignmentParamsWithContext(ctx context.Context) *CreateEventCategoryAssignmentParams { - return &CreateEventCategoryAssignmentParams{ - Context: ctx, - } -} - -// NewCreateEventCategoryAssignmentParamsWithHTTPClient creates a new CreateEventCategoryAssignmentParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateEventCategoryAssignmentParamsWithHTTPClient(client *http.Client) *CreateEventCategoryAssignmentParams { - return &CreateEventCategoryAssignmentParams{ - HTTPClient: client, - } -} - -/* -CreateEventCategoryAssignmentParams contains all the parameters to send to the API endpoint - - for the create event category assignment operation. - - Typically these are written to a http.Request. -*/ -type CreateEventCategoryAssignmentParams struct { - - /* EventcategoryassignmentRequest. - - An array of new EventCategoryAssignment records - */ - EventcategoryassignmentRequest *members_models.EventCategoryAssignmentRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create event category assignment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateEventCategoryAssignmentParams) WithDefaults() *CreateEventCategoryAssignmentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create event category assignment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateEventCategoryAssignmentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create event category assignment params -func (o *CreateEventCategoryAssignmentParams) WithTimeout(timeout time.Duration) *CreateEventCategoryAssignmentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create event category assignment params -func (o *CreateEventCategoryAssignmentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create event category assignment params -func (o *CreateEventCategoryAssignmentParams) WithContext(ctx context.Context) *CreateEventCategoryAssignmentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create event category assignment params -func (o *CreateEventCategoryAssignmentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create event category assignment params -func (o *CreateEventCategoryAssignmentParams) WithHTTPClient(client *http.Client) *CreateEventCategoryAssignmentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create event category assignment params -func (o *CreateEventCategoryAssignmentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEventcategoryassignmentRequest adds the eventcategoryassignmentRequest to the create event category assignment params -func (o *CreateEventCategoryAssignmentParams) WithEventcategoryassignmentRequest(eventcategoryassignmentRequest *members_models.EventCategoryAssignmentRequest) *CreateEventCategoryAssignmentParams { - o.SetEventcategoryassignmentRequest(eventcategoryassignmentRequest) - return o -} - -// SetEventcategoryassignmentRequest adds the eventcategoryassignmentRequest to the create event category assignment params -func (o *CreateEventCategoryAssignmentParams) SetEventcategoryassignmentRequest(eventcategoryassignmentRequest *members_models.EventCategoryAssignmentRequest) { - o.EventcategoryassignmentRequest = eventcategoryassignmentRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateEventCategoryAssignmentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.EventcategoryassignmentRequest != nil { - if err := r.SetBodyParam(o.EventcategoryassignmentRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/event_category_assignments/create_event_category_assignment_responses.go b/api/members/members_client/event_category_assignments/create_event_category_assignment_responses.go deleted file mode 100644 index faf15ac..0000000 --- a/api/members/members_client/event_category_assignments/create_event_category_assignment_responses.go +++ /dev/null @@ -1,92 +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 event_category_assignments - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateEventCategoryAssignmentReader is a Reader for the CreateEventCategoryAssignment structure. -type CreateEventCategoryAssignmentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateEventCategoryAssignmentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateEventCategoryAssignmentCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateEventCategoryAssignmentCreated creates a CreateEventCategoryAssignmentCreated with default headers values -func NewCreateEventCategoryAssignmentCreated() *CreateEventCategoryAssignmentCreated { - return &CreateEventCategoryAssignmentCreated{} -} - -/* -CreateEventCategoryAssignmentCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateEventCategoryAssignmentCreated struct { -} - -// IsSuccess returns true when this create event category assignment created response has a 2xx status code -func (o *CreateEventCategoryAssignmentCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create event category assignment created response has a 3xx status code -func (o *CreateEventCategoryAssignmentCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create event category assignment created response has a 4xx status code -func (o *CreateEventCategoryAssignmentCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create event category assignment created response has a 5xx status code -func (o *CreateEventCategoryAssignmentCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create event category assignment created response a status code equal to that given -func (o *CreateEventCategoryAssignmentCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create event category assignment created response -func (o *CreateEventCategoryAssignmentCreated) Code() int { - return 201 -} - -func (o *CreateEventCategoryAssignmentCreated) Error() string { - return fmt.Sprintf("[POST /eventcategoryassignments][%d] createEventCategoryAssignmentCreated ", 201) -} - -func (o *CreateEventCategoryAssignmentCreated) String() string { - return fmt.Sprintf("[POST /eventcategoryassignments][%d] createEventCategoryAssignmentCreated ", 201) -} - -func (o *CreateEventCategoryAssignmentCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/event_category_assignments/delete_event_category_assignment_parameters.go b/api/members/members_client/event_category_assignments/delete_event_category_assignment_parameters.go deleted file mode 100644 index 239e437..0000000 --- a/api/members/members_client/event_category_assignments/delete_event_category_assignment_parameters.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// (c) 2012-2020 by Taxnexus, Inc. -// All rights reserved worldwide. -// Proprietary product; unlicensed use is not allowed - -package event_category_assignments - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteEventCategoryAssignmentParams creates a new DeleteEventCategoryAssignmentParams 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 NewDeleteEventCategoryAssignmentParams() *DeleteEventCategoryAssignmentParams { - return &DeleteEventCategoryAssignmentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteEventCategoryAssignmentParamsWithTimeout creates a new DeleteEventCategoryAssignmentParams object -// with the ability to set a timeout on a request. -func NewDeleteEventCategoryAssignmentParamsWithTimeout(timeout time.Duration) *DeleteEventCategoryAssignmentParams { - return &DeleteEventCategoryAssignmentParams{ - timeout: timeout, - } -} - -// NewDeleteEventCategoryAssignmentParamsWithContext creates a new DeleteEventCategoryAssignmentParams object -// with the ability to set a context for a request. -func NewDeleteEventCategoryAssignmentParamsWithContext(ctx context.Context) *DeleteEventCategoryAssignmentParams { - return &DeleteEventCategoryAssignmentParams{ - Context: ctx, - } -} - -// NewDeleteEventCategoryAssignmentParamsWithHTTPClient creates a new DeleteEventCategoryAssignmentParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteEventCategoryAssignmentParamsWithHTTPClient(client *http.Client) *DeleteEventCategoryAssignmentParams { - return &DeleteEventCategoryAssignmentParams{ - HTTPClient: client, - } -} - -/* -DeleteEventCategoryAssignmentParams contains all the parameters to send to the API endpoint - - for the delete event category assignment operation. - - Typically these are written to a http.Request. -*/ -type DeleteEventCategoryAssignmentParams struct { - - /* ID. - - Unique Record ID - */ - ID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete event category assignment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteEventCategoryAssignmentParams) WithDefaults() *DeleteEventCategoryAssignmentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete event category assignment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteEventCategoryAssignmentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete event category assignment params -func (o *DeleteEventCategoryAssignmentParams) WithTimeout(timeout time.Duration) *DeleteEventCategoryAssignmentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete event category assignment params -func (o *DeleteEventCategoryAssignmentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete event category assignment params -func (o *DeleteEventCategoryAssignmentParams) WithContext(ctx context.Context) *DeleteEventCategoryAssignmentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete event category assignment params -func (o *DeleteEventCategoryAssignmentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete event category assignment params -func (o *DeleteEventCategoryAssignmentParams) WithHTTPClient(client *http.Client) *DeleteEventCategoryAssignmentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete event category assignment params -func (o *DeleteEventCategoryAssignmentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete event category assignment params -func (o *DeleteEventCategoryAssignmentParams) WithID(id *string) *DeleteEventCategoryAssignmentParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete event category assignment params -func (o *DeleteEventCategoryAssignmentParams) SetID(id *string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteEventCategoryAssignmentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ID != nil { - - // query param id - var qrID string - - if o.ID != nil { - qrID = *o.ID - } - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/event_category_assignments/delete_event_category_assignment_responses.go b/api/members/members_client/event_category_assignments/delete_event_category_assignment_responses.go deleted file mode 100644 index 4f123fa..0000000 --- a/api/members/members_client/event_category_assignments/delete_event_category_assignment_responses.go +++ /dev/null @@ -1,92 +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 event_category_assignments - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// DeleteEventCategoryAssignmentReader is a Reader for the DeleteEventCategoryAssignment structure. -type DeleteEventCategoryAssignmentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteEventCategoryAssignmentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteEventCategoryAssignmentNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeleteEventCategoryAssignmentNoContent creates a DeleteEventCategoryAssignmentNoContent with default headers values -func NewDeleteEventCategoryAssignmentNoContent() *DeleteEventCategoryAssignmentNoContent { - return &DeleteEventCategoryAssignmentNoContent{} -} - -/* -DeleteEventCategoryAssignmentNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteEventCategoryAssignmentNoContent struct { -} - -// IsSuccess returns true when this delete event category assignment no content response has a 2xx status code -func (o *DeleteEventCategoryAssignmentNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete event category assignment no content response has a 3xx status code -func (o *DeleteEventCategoryAssignmentNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete event category assignment no content response has a 4xx status code -func (o *DeleteEventCategoryAssignmentNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete event category assignment no content response has a 5xx status code -func (o *DeleteEventCategoryAssignmentNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete event category assignment no content response a status code equal to that given -func (o *DeleteEventCategoryAssignmentNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete event category assignment no content response -func (o *DeleteEventCategoryAssignmentNoContent) Code() int { - return 204 -} - -func (o *DeleteEventCategoryAssignmentNoContent) Error() string { - return fmt.Sprintf("[DELETE /eventcategoryassignments][%d] deleteEventCategoryAssignmentNoContent ", 204) -} - -func (o *DeleteEventCategoryAssignmentNoContent) String() string { - return fmt.Sprintf("[DELETE /eventcategoryassignments][%d] deleteEventCategoryAssignmentNoContent ", 204) -} - -func (o *DeleteEventCategoryAssignmentNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/event_category_assignments/event_category_assignments_client.go b/api/members/members_client/event_category_assignments/event_category_assignments_client.go deleted file mode 100644 index 54dacd3..0000000 --- a/api/members/members_client/event_category_assignments/event_category_assignments_client.go +++ /dev/null @@ -1,203 +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 event_category_assignments - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new event category assignments API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for event category assignments API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreateEventCategoryAssignment(params *CreateEventCategoryAssignmentParams, opts ...ClientOption) (*CreateEventCategoryAssignmentCreated, error) - - DeleteEventCategoryAssignment(params *DeleteEventCategoryAssignmentParams, opts ...ClientOption) (*DeleteEventCategoryAssignmentNoContent, error) - - GetEventCategoryAssignments(params *GetEventCategoryAssignmentsParams, opts ...ClientOption) (*GetEventCategoryAssignmentsOK, error) - - UpdateEventCategoryAssignment(params *UpdateEventCategoryAssignmentParams, opts ...ClientOption) (*UpdateEventCategoryAssignmentOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreateEventCategoryAssignment creates a new event category assignment -*/ -func (a *Client) CreateEventCategoryAssignment(params *CreateEventCategoryAssignmentParams, opts ...ClientOption) (*CreateEventCategoryAssignmentCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateEventCategoryAssignmentParams() - } - op := &runtime.ClientOperation{ - ID: "createEventCategoryAssignment", - Method: "POST", - PathPattern: "/eventcategoryassignments", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateEventCategoryAssignmentReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateEventCategoryAssignmentCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createEventCategoryAssignment: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -DeleteEventCategoryAssignment deletes a event category assignment -*/ -func (a *Client) DeleteEventCategoryAssignment(params *DeleteEventCategoryAssignmentParams, opts ...ClientOption) (*DeleteEventCategoryAssignmentNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteEventCategoryAssignmentParams() - } - op := &runtime.ClientOperation{ - ID: "deleteEventCategoryAssignment", - Method: "DELETE", - PathPattern: "/eventcategoryassignments", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteEventCategoryAssignmentReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteEventCategoryAssignmentNoContent) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for deleteEventCategoryAssignment: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetEventCategoryAssignments gets a list of event categoryassignments -*/ -func (a *Client) GetEventCategoryAssignments(params *GetEventCategoryAssignmentsParams, opts ...ClientOption) (*GetEventCategoryAssignmentsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetEventCategoryAssignmentsParams() - } - op := &runtime.ClientOperation{ - ID: "getEventCategoryAssignments", - Method: "GET", - PathPattern: "/eventcategoryassignments", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetEventCategoryAssignmentsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetEventCategoryAssignmentsOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for getEventCategoryAssignments: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -UpdateEventCategoryAssignment updates an existing event category assignment -*/ -func (a *Client) UpdateEventCategoryAssignment(params *UpdateEventCategoryAssignmentParams, opts ...ClientOption) (*UpdateEventCategoryAssignmentOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateEventCategoryAssignmentParams() - } - op := &runtime.ClientOperation{ - ID: "updateEventCategoryAssignment", - Method: "PUT", - PathPattern: "/eventcategoryassignments", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &UpdateEventCategoryAssignmentReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*UpdateEventCategoryAssignmentOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for updateEventCategoryAssignment: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/members/members_client/event_category_assignments/get_event_category_assignments_parameters.go b/api/members/members_client/event_category_assignments/get_event_category_assignments_parameters.go deleted file mode 100644 index 7d88a08..0000000 --- a/api/members/members_client/event_category_assignments/get_event_category_assignments_parameters.go +++ /dev/null @@ -1,240 +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 event_category_assignments - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetEventCategoryAssignmentsParams creates a new GetEventCategoryAssignmentsParams 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 NewGetEventCategoryAssignmentsParams() *GetEventCategoryAssignmentsParams { - return &GetEventCategoryAssignmentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetEventCategoryAssignmentsParamsWithTimeout creates a new GetEventCategoryAssignmentsParams object -// with the ability to set a timeout on a request. -func NewGetEventCategoryAssignmentsParamsWithTimeout(timeout time.Duration) *GetEventCategoryAssignmentsParams { - return &GetEventCategoryAssignmentsParams{ - timeout: timeout, - } -} - -// NewGetEventCategoryAssignmentsParamsWithContext creates a new GetEventCategoryAssignmentsParams object -// with the ability to set a context for a request. -func NewGetEventCategoryAssignmentsParamsWithContext(ctx context.Context) *GetEventCategoryAssignmentsParams { - return &GetEventCategoryAssignmentsParams{ - Context: ctx, - } -} - -// NewGetEventCategoryAssignmentsParamsWithHTTPClient creates a new GetEventCategoryAssignmentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetEventCategoryAssignmentsParamsWithHTTPClient(client *http.Client) *GetEventCategoryAssignmentsParams { - return &GetEventCategoryAssignmentsParams{ - HTTPClient: client, - } -} - -/* -GetEventCategoryAssignmentsParams contains all the parameters to send to the API endpoint - - for the get event category assignments operation. - - Typically these are written to a http.Request. -*/ -type GetEventCategoryAssignmentsParams struct { - - /* ID. - - Unique Record ID - */ - ID *string - - /* Limit. - - How many objects to return at one time - - Format: int64 - */ - Limit *int64 - - /* Offset. - - How many objects to skip? - - Format: int64 - */ - Offset *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get event category assignments params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEventCategoryAssignmentsParams) WithDefaults() *GetEventCategoryAssignmentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get event category assignments params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEventCategoryAssignmentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get event category assignments params -func (o *GetEventCategoryAssignmentsParams) WithTimeout(timeout time.Duration) *GetEventCategoryAssignmentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get event category assignments params -func (o *GetEventCategoryAssignmentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get event category assignments params -func (o *GetEventCategoryAssignmentsParams) WithContext(ctx context.Context) *GetEventCategoryAssignmentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get event category assignments params -func (o *GetEventCategoryAssignmentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get event category assignments params -func (o *GetEventCategoryAssignmentsParams) WithHTTPClient(client *http.Client) *GetEventCategoryAssignmentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get event category assignments params -func (o *GetEventCategoryAssignmentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get event category assignments params -func (o *GetEventCategoryAssignmentsParams) WithID(id *string) *GetEventCategoryAssignmentsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get event category assignments params -func (o *GetEventCategoryAssignmentsParams) SetID(id *string) { - o.ID = id -} - -// WithLimit adds the limit to the get event category assignments params -func (o *GetEventCategoryAssignmentsParams) WithLimit(limit *int64) *GetEventCategoryAssignmentsParams { - o.SetLimit(limit) - return o -} - -// SetLimit adds the limit to the get event category assignments params -func (o *GetEventCategoryAssignmentsParams) SetLimit(limit *int64) { - o.Limit = limit -} - -// WithOffset adds the offset to the get event category assignments params -func (o *GetEventCategoryAssignmentsParams) WithOffset(offset *int64) *GetEventCategoryAssignmentsParams { - o.SetOffset(offset) - return o -} - -// SetOffset adds the offset to the get event category assignments params -func (o *GetEventCategoryAssignmentsParams) SetOffset(offset *int64) { - o.Offset = offset -} - -// WriteToRequest writes these params to a swagger request -func (o *GetEventCategoryAssignmentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ID != nil { - - // query param id - var qrID string - - if o.ID != nil { - qrID = *o.ID - } - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if o.Limit != nil { - - // query param limit - var qrLimit int64 - - if o.Limit != nil { - qrLimit = *o.Limit - } - qLimit := swag.FormatInt64(qrLimit) - if qLimit != "" { - - if err := r.SetQueryParam("limit", qLimit); err != nil { - return err - } - } - } - - if o.Offset != nil { - - // query param offset - var qrOffset int64 - - if o.Offset != nil { - qrOffset = *o.Offset - } - qOffset := swag.FormatInt64(qrOffset) - if qOffset != "" { - - if err := r.SetQueryParam("offset", qOffset); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/event_category_assignments/get_event_category_assignments_responses.go b/api/members/members_client/event_category_assignments/get_event_category_assignments_responses.go deleted file mode 100644 index e609986..0000000 --- a/api/members/members_client/event_category_assignments/get_event_category_assignments_responses.go +++ /dev/null @@ -1,92 +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 event_category_assignments - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// GetEventCategoryAssignmentsReader is a Reader for the GetEventCategoryAssignments structure. -type GetEventCategoryAssignmentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetEventCategoryAssignmentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetEventCategoryAssignmentsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetEventCategoryAssignmentsOK creates a GetEventCategoryAssignmentsOK with default headers values -func NewGetEventCategoryAssignmentsOK() *GetEventCategoryAssignmentsOK { - return &GetEventCategoryAssignmentsOK{} -} - -/* -GetEventCategoryAssignmentsOK describes a response with status code 200, with default header values. - -OK -*/ -type GetEventCategoryAssignmentsOK struct { -} - -// IsSuccess returns true when this get event category assignments o k response has a 2xx status code -func (o *GetEventCategoryAssignmentsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get event category assignments o k response has a 3xx status code -func (o *GetEventCategoryAssignmentsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get event category assignments o k response has a 4xx status code -func (o *GetEventCategoryAssignmentsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get event category assignments o k response has a 5xx status code -func (o *GetEventCategoryAssignmentsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get event category assignments o k response a status code equal to that given -func (o *GetEventCategoryAssignmentsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the get event category assignments o k response -func (o *GetEventCategoryAssignmentsOK) Code() int { - return 200 -} - -func (o *GetEventCategoryAssignmentsOK) Error() string { - return fmt.Sprintf("[GET /eventcategoryassignments][%d] getEventCategoryAssignmentsOK ", 200) -} - -func (o *GetEventCategoryAssignmentsOK) String() string { - return fmt.Sprintf("[GET /eventcategoryassignments][%d] getEventCategoryAssignmentsOK ", 200) -} - -func (o *GetEventCategoryAssignmentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/event_category_assignments/update_event_category_assignment_parameters.go b/api/members/members_client/event_category_assignments/update_event_category_assignment_parameters.go deleted file mode 100644 index 7f06d60..0000000 --- a/api/members/members_client/event_category_assignments/update_event_category_assignment_parameters.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// (c) 2012-2020 by Taxnexus, Inc. -// All rights reserved worldwide. -// Proprietary product; unlicensed use is not allowed - -package event_category_assignments - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewUpdateEventCategoryAssignmentParams creates a new UpdateEventCategoryAssignmentParams 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 NewUpdateEventCategoryAssignmentParams() *UpdateEventCategoryAssignmentParams { - return &UpdateEventCategoryAssignmentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateEventCategoryAssignmentParamsWithTimeout creates a new UpdateEventCategoryAssignmentParams object -// with the ability to set a timeout on a request. -func NewUpdateEventCategoryAssignmentParamsWithTimeout(timeout time.Duration) *UpdateEventCategoryAssignmentParams { - return &UpdateEventCategoryAssignmentParams{ - timeout: timeout, - } -} - -// NewUpdateEventCategoryAssignmentParamsWithContext creates a new UpdateEventCategoryAssignmentParams object -// with the ability to set a context for a request. -func NewUpdateEventCategoryAssignmentParamsWithContext(ctx context.Context) *UpdateEventCategoryAssignmentParams { - return &UpdateEventCategoryAssignmentParams{ - Context: ctx, - } -} - -// NewUpdateEventCategoryAssignmentParamsWithHTTPClient creates a new UpdateEventCategoryAssignmentParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateEventCategoryAssignmentParamsWithHTTPClient(client *http.Client) *UpdateEventCategoryAssignmentParams { - return &UpdateEventCategoryAssignmentParams{ - HTTPClient: client, - } -} - -/* -UpdateEventCategoryAssignmentParams contains all the parameters to send to the API endpoint - - for the update event category assignment operation. - - Typically these are written to a http.Request. -*/ -type UpdateEventCategoryAssignmentParams struct { - - /* ID. - - Unique Record ID - */ - ID *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update event category assignment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateEventCategoryAssignmentParams) WithDefaults() *UpdateEventCategoryAssignmentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update event category assignment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateEventCategoryAssignmentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update event category assignment params -func (o *UpdateEventCategoryAssignmentParams) WithTimeout(timeout time.Duration) *UpdateEventCategoryAssignmentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update event category assignment params -func (o *UpdateEventCategoryAssignmentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update event category assignment params -func (o *UpdateEventCategoryAssignmentParams) WithContext(ctx context.Context) *UpdateEventCategoryAssignmentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update event category assignment params -func (o *UpdateEventCategoryAssignmentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update event category assignment params -func (o *UpdateEventCategoryAssignmentParams) WithHTTPClient(client *http.Client) *UpdateEventCategoryAssignmentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update event category assignment params -func (o *UpdateEventCategoryAssignmentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the update event category assignment params -func (o *UpdateEventCategoryAssignmentParams) WithID(id *string) *UpdateEventCategoryAssignmentParams { - o.SetID(id) - return o -} - -// SetID adds the id to the update event category assignment params -func (o *UpdateEventCategoryAssignmentParams) SetID(id *string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateEventCategoryAssignmentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ID != nil { - - // query param id - var qrID string - - if o.ID != nil { - qrID = *o.ID - } - qID := qrID - if qID != "" { - - if err := r.SetQueryParam("id", qID); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/event_category_assignments/update_event_category_assignment_responses.go b/api/members/members_client/event_category_assignments/update_event_category_assignment_responses.go deleted file mode 100644 index 9d0fcc1..0000000 --- a/api/members/members_client/event_category_assignments/update_event_category_assignment_responses.go +++ /dev/null @@ -1,92 +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 event_category_assignments - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// UpdateEventCategoryAssignmentReader is a Reader for the UpdateEventCategoryAssignment structure. -type UpdateEventCategoryAssignmentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateEventCategoryAssignmentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateEventCategoryAssignmentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewUpdateEventCategoryAssignmentOK creates a UpdateEventCategoryAssignmentOK with default headers values -func NewUpdateEventCategoryAssignmentOK() *UpdateEventCategoryAssignmentOK { - return &UpdateEventCategoryAssignmentOK{} -} - -/* -UpdateEventCategoryAssignmentOK describes a response with status code 200, with default header values. - -OK -*/ -type UpdateEventCategoryAssignmentOK struct { -} - -// IsSuccess returns true when this update event category assignment o k response has a 2xx status code -func (o *UpdateEventCategoryAssignmentOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update event category assignment o k response has a 3xx status code -func (o *UpdateEventCategoryAssignmentOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update event category assignment o k response has a 4xx status code -func (o *UpdateEventCategoryAssignmentOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update event category assignment o k response has a 5xx status code -func (o *UpdateEventCategoryAssignmentOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update event category assignment o k response a status code equal to that given -func (o *UpdateEventCategoryAssignmentOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update event category assignment o k response -func (o *UpdateEventCategoryAssignmentOK) Code() int { - return 200 -} - -func (o *UpdateEventCategoryAssignmentOK) Error() string { - return fmt.Sprintf("[PUT /eventcategoryassignments][%d] updateEventCategoryAssignmentOK ", 200) -} - -func (o *UpdateEventCategoryAssignmentOK) String() string { - return fmt.Sprintf("[PUT /eventcategoryassignments][%d] updateEventCategoryAssignmentOK ", 200) -} - -func (o *UpdateEventCategoryAssignmentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/events/create_event_parameters.go b/api/members/members_client/events/create_event_parameters.go deleted file mode 100644 index 554bd93..0000000 --- a/api/members/members_client/events/create_event_parameters.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// (c) 2012-2020 by Taxnexus, Inc. -// All rights reserved worldwide. -// Proprietary product; unlicensed use is not allowed - -package events - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateEventParams creates a new CreateEventParams 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 NewCreateEventParams() *CreateEventParams { - return &CreateEventParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateEventParamsWithTimeout creates a new CreateEventParams object -// with the ability to set a timeout on a request. -func NewCreateEventParamsWithTimeout(timeout time.Duration) *CreateEventParams { - return &CreateEventParams{ - timeout: timeout, - } -} - -// NewCreateEventParamsWithContext creates a new CreateEventParams object -// with the ability to set a context for a request. -func NewCreateEventParamsWithContext(ctx context.Context) *CreateEventParams { - return &CreateEventParams{ - Context: ctx, - } -} - -// NewCreateEventParamsWithHTTPClient creates a new CreateEventParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateEventParamsWithHTTPClient(client *http.Client) *CreateEventParams { - return &CreateEventParams{ - HTTPClient: client, - } -} - -/* -CreateEventParams contains all the parameters to send to the API endpoint - - for the create event operation. - - Typically these are written to a http.Request. -*/ -type CreateEventParams struct { - - /* EventRequest. - - An array of new Event records - */ - EventRequest *members_models.EventRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create event params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateEventParams) WithDefaults() *CreateEventParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create event params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateEventParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create event params -func (o *CreateEventParams) WithTimeout(timeout time.Duration) *CreateEventParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create event params -func (o *CreateEventParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create event params -func (o *CreateEventParams) WithContext(ctx context.Context) *CreateEventParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create event params -func (o *CreateEventParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create event params -func (o *CreateEventParams) WithHTTPClient(client *http.Client) *CreateEventParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create event params -func (o *CreateEventParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEventRequest adds the eventRequest to the create event params -func (o *CreateEventParams) WithEventRequest(eventRequest *members_models.EventRequest) *CreateEventParams { - o.SetEventRequest(eventRequest) - return o -} - -// SetEventRequest adds the eventRequest to the create event params -func (o *CreateEventParams) SetEventRequest(eventRequest *members_models.EventRequest) { - o.EventRequest = eventRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateEventParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.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 -} diff --git a/api/members/members_client/events/create_event_responses.go b/api/members/members_client/events/create_event_responses.go deleted file mode 100644 index 8e28684..0000000 --- a/api/members/members_client/events/create_event_responses.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// (c) 2012-2020 by Taxnexus, Inc. -// All rights reserved worldwide. -// Proprietary product; unlicensed use is not allowed - -package events - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateEventReader is a Reader for the CreateEvent structure. -type CreateEventReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateEventReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateEventCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateEventCreated creates a CreateEventCreated with default headers values -func NewCreateEventCreated() *CreateEventCreated { - return &CreateEventCreated{} -} - -/* -CreateEventCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateEventCreated struct { -} - -// IsSuccess returns true when this create event created response has a 2xx status code -func (o *CreateEventCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create event created response has a 3xx status code -func (o *CreateEventCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create event created response has a 4xx status code -func (o *CreateEventCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create event created response has a 5xx status code -func (o *CreateEventCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create event created response a status code equal to that given -func (o *CreateEventCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create event created response -func (o *CreateEventCreated) Code() int { - return 201 -} - -func (o *CreateEventCreated) Error() string { - return fmt.Sprintf("[POST /events][%d] createEventCreated ", 201) -} - -func (o *CreateEventCreated) String() string { - return fmt.Sprintf("[POST /events][%d] createEventCreated ", 201) -} - -func (o *CreateEventCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/events/events_client.go b/api/members/members_client/events/events_client.go index 23ba495..c7cb3b0 100644 --- a/api/members/members_client/events/events_client.go +++ b/api/members/members_client/events/events_client.go @@ -34,97 +34,19 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateEvent(params *CreateEventParams, opts ...ClientOption) (*CreateEventCreated, error) + GetEvents(params *GetEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventsOK, error) - DeleteEvent(params *DeleteEventParams, opts ...ClientOption) (*DeleteEventNoContent, error) + PostEvents(params *PostEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventsOK, error) - GetEvents(params *GetEventsParams, opts ...ClientOption) (*GetEventsOK, error) - - UpdateEvent(params *UpdateEventParams, opts ...ClientOption) (*UpdateEventOK, error) + UpdateEvent(params *UpdateEventParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateEventOK, error) SetTransport(transport runtime.ClientTransport) } -/* -CreateEvent creates a new event -*/ -func (a *Client) CreateEvent(params *CreateEventParams, opts ...ClientOption) (*CreateEventCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateEventParams() - } - op := &runtime.ClientOperation{ - ID: "createEvent", - Method: "POST", - PathPattern: "/events", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateEventReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateEventCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createEvent: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -DeleteEvent deletes a event -*/ -func (a *Client) DeleteEvent(params *DeleteEventParams, opts ...ClientOption) (*DeleteEventNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteEventParams() - } - op := &runtime.ClientOperation{ - ID: "deleteEvent", - Method: "DELETE", - PathPattern: "/events", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteEventReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteEventNoContent) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for deleteEvent: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* GetEvents gets a list of events */ -func (a *Client) GetEvents(params *GetEventsParams, opts ...ClientOption) (*GetEventsOK, error) { +func (a *Client) GetEvents(params *GetEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventsOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetEventsParams() @@ -138,6 +60,7 @@ func (a *Client) GetEvents(params *GetEventsParams, opts ...ClientOption) (*GetE Schemes: []string{"http"}, Params: params, Reader: &GetEventsReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -159,10 +82,49 @@ func (a *Client) GetEvents(params *GetEventsParams, opts ...ClientOption) (*GetE panic(msg) } +/* +PostEvents creates a new event +*/ +func (a *Client) PostEvents(params *PostEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostEventsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostEventsParams() + } + op := &runtime.ClientOperation{ + ID: "postEvents", + Method: "POST", + PathPattern: "/events", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostEventsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostEventsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postEvents: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UpdateEvent updates an existing event */ -func (a *Client) UpdateEvent(params *UpdateEventParams, opts ...ClientOption) (*UpdateEventOK, error) { +func (a *Client) UpdateEvent(params *UpdateEventParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateEventOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateEventParams() @@ -176,6 +138,7 @@ func (a *Client) UpdateEvent(params *UpdateEventParams, opts ...ClientOption) (* Schemes: []string{"http"}, Params: params, Reader: &UpdateEventReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/events/get_events_responses.go b/api/members/members_client/events/get_events_responses.go index b8181cc..c4d2f10 100644 --- a/api/members/members_client/events/get_events_responses.go +++ b/api/members/members_client/events/get_events_responses.go @@ -11,9 +11,12 @@ package events import ( "fmt" + "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" ) // GetEventsReader is a Reader for the GetEvents structure. @@ -30,6 +33,36 @@ func (o *GetEventsReader) ReadResponse(response runtime.ClientResponse, consumer return nil, err } return result, nil + case 401: + result := NewGetEventsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetEventsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetEventsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetEventsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetEventsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } @@ -43,9 +76,10 @@ func NewGetEventsOK() *GetEventsOK { /* GetEventsOK describes a response with status code 200, with default header values. -OK +Event Response Object */ type GetEventsOK struct { + Payload *members_models.EventResponse } // IsSuccess returns true when this get events o k response has a 2xx status code @@ -79,14 +113,374 @@ func (o *GetEventsOK) Code() int { } func (o *GetEventsOK) Error() string { - return fmt.Sprintf("[GET /events][%d] getEventsOK ", 200) + return fmt.Sprintf("[GET /events][%d] getEventsOK %+v", 200, o.Payload) } func (o *GetEventsOK) String() string { - return fmt.Sprintf("[GET /events][%d] getEventsOK ", 200) + return fmt.Sprintf("[GET /events][%d] getEventsOK %+v", 200, o.Payload) +} + +func (o *GetEventsOK) GetPayload() *members_models.EventResponse { + return o.Payload } func (o *GetEventsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(members_models.EventResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEventsUnauthorized creates a GetEventsUnauthorized with default headers values +func NewGetEventsUnauthorized() *GetEventsUnauthorized { + return &GetEventsUnauthorized{} +} + +/* +GetEventsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetEventsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get events unauthorized response has a 2xx status code +func (o *GetEventsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get events unauthorized response has a 3xx status code +func (o *GetEventsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get events unauthorized response has a 4xx status code +func (o *GetEventsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get events unauthorized response has a 5xx status code +func (o *GetEventsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get events unauthorized response a status code equal to that given +func (o *GetEventsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get events unauthorized response +func (o *GetEventsUnauthorized) Code() int { + return 401 +} + +func (o *GetEventsUnauthorized) Error() string { + return fmt.Sprintf("[GET /events][%d] getEventsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetEventsUnauthorized) String() string { + return fmt.Sprintf("[GET /events][%d] getEventsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetEventsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetEventsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEventsForbidden creates a GetEventsForbidden with default headers values +func NewGetEventsForbidden() *GetEventsForbidden { + return &GetEventsForbidden{} +} + +/* +GetEventsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type GetEventsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this get events forbidden response has a 2xx status code +func (o *GetEventsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get events forbidden response has a 3xx status code +func (o *GetEventsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get events forbidden response has a 4xx status code +func (o *GetEventsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get events forbidden response has a 5xx status code +func (o *GetEventsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get events forbidden response a status code equal to that given +func (o *GetEventsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get events forbidden response +func (o *GetEventsForbidden) Code() int { + return 403 +} + +func (o *GetEventsForbidden) Error() string { + return fmt.Sprintf("[GET /events][%d] getEventsForbidden %+v", 403, o.Payload) +} + +func (o *GetEventsForbidden) String() string { + return fmt.Sprintf("[GET /events][%d] getEventsForbidden %+v", 403, o.Payload) +} + +func (o *GetEventsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetEventsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEventsNotFound creates a GetEventsNotFound with default headers values +func NewGetEventsNotFound() *GetEventsNotFound { + return &GetEventsNotFound{} +} + +/* +GetEventsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type GetEventsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get events not found response has a 2xx status code +func (o *GetEventsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get events not found response has a 3xx status code +func (o *GetEventsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get events not found response has a 4xx status code +func (o *GetEventsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get events not found response has a 5xx status code +func (o *GetEventsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get events not found response a status code equal to that given +func (o *GetEventsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get events not found response +func (o *GetEventsNotFound) Code() int { + return 404 +} + +func (o *GetEventsNotFound) Error() string { + return fmt.Sprintf("[GET /events][%d] getEventsNotFound %+v", 404, o.Payload) +} + +func (o *GetEventsNotFound) String() string { + return fmt.Sprintf("[GET /events][%d] getEventsNotFound %+v", 404, o.Payload) +} + +func (o *GetEventsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetEventsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEventsUnprocessableEntity creates a GetEventsUnprocessableEntity with default headers values +func NewGetEventsUnprocessableEntity() *GetEventsUnprocessableEntity { + return &GetEventsUnprocessableEntity{} +} + +/* +GetEventsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetEventsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get events unprocessable entity response has a 2xx status code +func (o *GetEventsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get events unprocessable entity response has a 3xx status code +func (o *GetEventsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get events unprocessable entity response has a 4xx status code +func (o *GetEventsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this get events unprocessable entity response has a 5xx status code +func (o *GetEventsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this get events unprocessable entity response a status code equal to that given +func (o *GetEventsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the get events unprocessable entity response +func (o *GetEventsUnprocessableEntity) Code() int { + return 422 +} + +func (o *GetEventsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /events][%d] getEventsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetEventsUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /events][%d] getEventsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetEventsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetEventsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEventsInternalServerError creates a GetEventsInternalServerError with default headers values +func NewGetEventsInternalServerError() *GetEventsInternalServerError { + return &GetEventsInternalServerError{} +} + +/* +GetEventsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type GetEventsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get events internal server error response has a 2xx status code +func (o *GetEventsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get events internal server error response has a 3xx status code +func (o *GetEventsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get events internal server error response has a 4xx status code +func (o *GetEventsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get events internal server error response has a 5xx status code +func (o *GetEventsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get events internal server error response a status code equal to that given +func (o *GetEventsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get events internal server error response +func (o *GetEventsInternalServerError) Code() int { + return 500 +} + +func (o *GetEventsInternalServerError) Error() string { + return fmt.Sprintf("[GET /events][%d] getEventsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetEventsInternalServerError) String() string { + return fmt.Sprintf("[GET /events][%d] getEventsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetEventsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetEventsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + return nil } diff --git a/api/members/members_client/events/post_events_parameters.go b/api/members/members_client/events/post_events_parameters.go new file mode 100644 index 0000000..878ef82 --- /dev/null +++ b/api/members/members_client/events/post_events_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package events + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostEventsParams creates a new PostEventsParams 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 NewPostEventsParams() *PostEventsParams { + return &PostEventsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostEventsParamsWithTimeout creates a new PostEventsParams object +// with the ability to set a timeout on a request. +func NewPostEventsParamsWithTimeout(timeout time.Duration) *PostEventsParams { + return &PostEventsParams{ + timeout: timeout, + } +} + +// NewPostEventsParamsWithContext creates a new PostEventsParams object +// with the ability to set a context for a request. +func NewPostEventsParamsWithContext(ctx context.Context) *PostEventsParams { + return &PostEventsParams{ + Context: ctx, + } +} + +// NewPostEventsParamsWithHTTPClient creates a new PostEventsParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostEventsParamsWithHTTPClient(client *http.Client) *PostEventsParams { + return &PostEventsParams{ + HTTPClient: client, + } +} + +/* +PostEventsParams contains all the parameters to send to the API endpoint + + for the post events operation. + + Typically these are written to a http.Request. +*/ +type PostEventsParams struct { + + /* EventRequest. + + An array of new Event records + */ + EventRequest *members_models.EventRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post events params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostEventsParams) WithDefaults() *PostEventsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post events params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostEventsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post events params +func (o *PostEventsParams) WithTimeout(timeout time.Duration) *PostEventsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post events params +func (o *PostEventsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post events params +func (o *PostEventsParams) WithContext(ctx context.Context) *PostEventsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post events params +func (o *PostEventsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post events params +func (o *PostEventsParams) WithHTTPClient(client *http.Client) *PostEventsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post events params +func (o *PostEventsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEventRequest adds the eventRequest to the post events params +func (o *PostEventsParams) WithEventRequest(eventRequest *members_models.EventRequest) *PostEventsParams { + o.SetEventRequest(eventRequest) + return o +} + +// SetEventRequest adds the eventRequest to the post events params +func (o *PostEventsParams) SetEventRequest(eventRequest *members_models.EventRequest) { + o.EventRequest = eventRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostEventsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.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 +} diff --git a/api/members/members_client/events/post_events_responses.go b/api/members/members_client/events/post_events_responses.go new file mode 100644 index 0000000..357a906 --- /dev/null +++ b/api/members/members_client/events/post_events_responses.go @@ -0,0 +1,486 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package events + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// PostEventsReader is a Reader for the PostEvents structure. +type PostEventsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostEventsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostEventsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostEventsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostEventsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostEventsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostEventsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostEventsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostEventsOK creates a PostEventsOK with default headers values +func NewPostEventsOK() *PostEventsOK { + return &PostEventsOK{} +} + +/* +PostEventsOK describes a response with status code 200, with default header values. + +Event Response Object +*/ +type PostEventsOK struct { + Payload *members_models.EventResponse +} + +// IsSuccess returns true when this post events o k response has a 2xx status code +func (o *PostEventsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post events o k response has a 3xx status code +func (o *PostEventsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post events o k response has a 4xx status code +func (o *PostEventsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this post events o k response has a 5xx status code +func (o *PostEventsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this post events o k response a status code equal to that given +func (o *PostEventsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the post events o k response +func (o *PostEventsOK) Code() int { + return 200 +} + +func (o *PostEventsOK) Error() string { + return fmt.Sprintf("[POST /events][%d] postEventsOK %+v", 200, o.Payload) +} + +func (o *PostEventsOK) String() string { + return fmt.Sprintf("[POST /events][%d] postEventsOK %+v", 200, o.Payload) +} + +func (o *PostEventsOK) GetPayload() *members_models.EventResponse { + return o.Payload +} + +func (o *PostEventsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.EventResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEventsUnauthorized creates a PostEventsUnauthorized with default headers values +func NewPostEventsUnauthorized() *PostEventsUnauthorized { + return &PostEventsUnauthorized{} +} + +/* +PostEventsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostEventsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post events unauthorized response has a 2xx status code +func (o *PostEventsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post events unauthorized response has a 3xx status code +func (o *PostEventsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post events unauthorized response has a 4xx status code +func (o *PostEventsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this post events unauthorized response has a 5xx status code +func (o *PostEventsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this post events unauthorized response a status code equal to that given +func (o *PostEventsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the post events unauthorized response +func (o *PostEventsUnauthorized) Code() int { + return 401 +} + +func (o *PostEventsUnauthorized) Error() string { + return fmt.Sprintf("[POST /events][%d] postEventsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostEventsUnauthorized) String() string { + return fmt.Sprintf("[POST /events][%d] postEventsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostEventsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostEventsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEventsForbidden creates a PostEventsForbidden with default headers values +func NewPostEventsForbidden() *PostEventsForbidden { + return &PostEventsForbidden{} +} + +/* +PostEventsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PostEventsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this post events forbidden response has a 2xx status code +func (o *PostEventsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post events forbidden response has a 3xx status code +func (o *PostEventsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post events forbidden response has a 4xx status code +func (o *PostEventsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this post events forbidden response has a 5xx status code +func (o *PostEventsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this post events forbidden response a status code equal to that given +func (o *PostEventsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the post events forbidden response +func (o *PostEventsForbidden) Code() int { + return 403 +} + +func (o *PostEventsForbidden) Error() string { + return fmt.Sprintf("[POST /events][%d] postEventsForbidden %+v", 403, o.Payload) +} + +func (o *PostEventsForbidden) String() string { + return fmt.Sprintf("[POST /events][%d] postEventsForbidden %+v", 403, o.Payload) +} + +func (o *PostEventsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostEventsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEventsNotFound creates a PostEventsNotFound with default headers values +func NewPostEventsNotFound() *PostEventsNotFound { + return &PostEventsNotFound{} +} + +/* +PostEventsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PostEventsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post events not found response has a 2xx status code +func (o *PostEventsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post events not found response has a 3xx status code +func (o *PostEventsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post events not found response has a 4xx status code +func (o *PostEventsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this post events not found response has a 5xx status code +func (o *PostEventsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this post events not found response a status code equal to that given +func (o *PostEventsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the post events not found response +func (o *PostEventsNotFound) Code() int { + return 404 +} + +func (o *PostEventsNotFound) Error() string { + return fmt.Sprintf("[POST /events][%d] postEventsNotFound %+v", 404, o.Payload) +} + +func (o *PostEventsNotFound) String() string { + return fmt.Sprintf("[POST /events][%d] postEventsNotFound %+v", 404, o.Payload) +} + +func (o *PostEventsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostEventsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEventsUnprocessableEntity creates a PostEventsUnprocessableEntity with default headers values +func NewPostEventsUnprocessableEntity() *PostEventsUnprocessableEntity { + return &PostEventsUnprocessableEntity{} +} + +/* +PostEventsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostEventsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post events unprocessable entity response has a 2xx status code +func (o *PostEventsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post events unprocessable entity response has a 3xx status code +func (o *PostEventsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post events unprocessable entity response has a 4xx status code +func (o *PostEventsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this post events unprocessable entity response has a 5xx status code +func (o *PostEventsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this post events unprocessable entity response a status code equal to that given +func (o *PostEventsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the post events unprocessable entity response +func (o *PostEventsUnprocessableEntity) Code() int { + return 422 +} + +func (o *PostEventsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /events][%d] postEventsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostEventsUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /events][%d] postEventsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostEventsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostEventsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEventsInternalServerError creates a PostEventsInternalServerError with default headers values +func NewPostEventsInternalServerError() *PostEventsInternalServerError { + return &PostEventsInternalServerError{} +} + +/* +PostEventsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PostEventsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post events internal server error response has a 2xx status code +func (o *PostEventsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post events internal server error response has a 3xx status code +func (o *PostEventsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post events internal server error response has a 4xx status code +func (o *PostEventsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this post events internal server error response has a 5xx status code +func (o *PostEventsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this post events internal server error response a status code equal to that given +func (o *PostEventsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the post events internal server error response +func (o *PostEventsInternalServerError) Code() int { + return 500 +} + +func (o *PostEventsInternalServerError) Error() string { + return fmt.Sprintf("[POST /events][%d] postEventsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostEventsInternalServerError) String() string { + return fmt.Sprintf("[POST /events][%d] postEventsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostEventsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostEventsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/events/update_event_responses.go b/api/members/members_client/events/update_event_responses.go index 0d122d8..7d7a901 100644 --- a/api/members/members_client/events/update_event_responses.go +++ b/api/members/members_client/events/update_event_responses.go @@ -11,9 +11,12 @@ package events import ( "fmt" + "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" ) // UpdateEventReader is a Reader for the UpdateEvent structure. @@ -30,6 +33,36 @@ func (o *UpdateEventReader) ReadResponse(response runtime.ClientResponse, consum return nil, err } return result, nil + case 401: + result := NewUpdateEventUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewUpdateEventForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewUpdateEventNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewUpdateEventUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUpdateEventInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } @@ -43,9 +76,10 @@ func NewUpdateEventOK() *UpdateEventOK { /* UpdateEventOK describes a response with status code 200, with default header values. -OK +Event Response Object */ type UpdateEventOK struct { + Payload *members_models.EventResponse } // IsSuccess returns true when this update event o k response has a 2xx status code @@ -79,14 +113,374 @@ func (o *UpdateEventOK) Code() int { } func (o *UpdateEventOK) Error() string { - return fmt.Sprintf("[PUT /events][%d] updateEventOK ", 200) + return fmt.Sprintf("[PUT /events][%d] updateEventOK %+v", 200, o.Payload) } func (o *UpdateEventOK) String() string { - return fmt.Sprintf("[PUT /events][%d] updateEventOK ", 200) + return fmt.Sprintf("[PUT /events][%d] updateEventOK %+v", 200, o.Payload) +} + +func (o *UpdateEventOK) GetPayload() *members_models.EventResponse { + return o.Payload } func (o *UpdateEventOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(members_models.EventResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateEventUnauthorized creates a UpdateEventUnauthorized with default headers values +func NewUpdateEventUnauthorized() *UpdateEventUnauthorized { + return &UpdateEventUnauthorized{} +} + +/* +UpdateEventUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type UpdateEventUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update event unauthorized response has a 2xx status code +func (o *UpdateEventUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update event unauthorized response has a 3xx status code +func (o *UpdateEventUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update event unauthorized response has a 4xx status code +func (o *UpdateEventUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this update event unauthorized response has a 5xx status code +func (o *UpdateEventUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this update event unauthorized response a status code equal to that given +func (o *UpdateEventUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the update event unauthorized response +func (o *UpdateEventUnauthorized) Code() int { + return 401 +} + +func (o *UpdateEventUnauthorized) Error() string { + return fmt.Sprintf("[PUT /events][%d] updateEventUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateEventUnauthorized) String() string { + return fmt.Sprintf("[PUT /events][%d] updateEventUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateEventUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateEventUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateEventForbidden creates a UpdateEventForbidden with default headers values +func NewUpdateEventForbidden() *UpdateEventForbidden { + return &UpdateEventForbidden{} +} + +/* +UpdateEventForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type UpdateEventForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this update event forbidden response has a 2xx status code +func (o *UpdateEventForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update event forbidden response has a 3xx status code +func (o *UpdateEventForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update event forbidden response has a 4xx status code +func (o *UpdateEventForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this update event forbidden response has a 5xx status code +func (o *UpdateEventForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this update event forbidden response a status code equal to that given +func (o *UpdateEventForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the update event forbidden response +func (o *UpdateEventForbidden) Code() int { + return 403 +} + +func (o *UpdateEventForbidden) Error() string { + return fmt.Sprintf("[PUT /events][%d] updateEventForbidden %+v", 403, o.Payload) +} + +func (o *UpdateEventForbidden) String() string { + return fmt.Sprintf("[PUT /events][%d] updateEventForbidden %+v", 403, o.Payload) +} + +func (o *UpdateEventForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateEventForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // hydrates response header Access-Control-Allow-Origin + hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") + + if hdrAccessControlAllowOrigin != "" { + o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin + } + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateEventNotFound creates a UpdateEventNotFound with default headers values +func NewUpdateEventNotFound() *UpdateEventNotFound { + return &UpdateEventNotFound{} +} + +/* +UpdateEventNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type UpdateEventNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update event not found response has a 2xx status code +func (o *UpdateEventNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update event not found response has a 3xx status code +func (o *UpdateEventNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update event not found response has a 4xx status code +func (o *UpdateEventNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this update event not found response has a 5xx status code +func (o *UpdateEventNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this update event not found response a status code equal to that given +func (o *UpdateEventNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the update event not found response +func (o *UpdateEventNotFound) Code() int { + return 404 +} + +func (o *UpdateEventNotFound) Error() string { + return fmt.Sprintf("[PUT /events][%d] updateEventNotFound %+v", 404, o.Payload) +} + +func (o *UpdateEventNotFound) String() string { + return fmt.Sprintf("[PUT /events][%d] updateEventNotFound %+v", 404, o.Payload) +} + +func (o *UpdateEventNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateEventNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateEventUnprocessableEntity creates a UpdateEventUnprocessableEntity with default headers values +func NewUpdateEventUnprocessableEntity() *UpdateEventUnprocessableEntity { + return &UpdateEventUnprocessableEntity{} +} + +/* +UpdateEventUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type UpdateEventUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update event unprocessable entity response has a 2xx status code +func (o *UpdateEventUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update event unprocessable entity response has a 3xx status code +func (o *UpdateEventUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update event unprocessable entity response has a 4xx status code +func (o *UpdateEventUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this update event unprocessable entity response has a 5xx status code +func (o *UpdateEventUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this update event unprocessable entity response a status code equal to that given +func (o *UpdateEventUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the update event unprocessable entity response +func (o *UpdateEventUnprocessableEntity) Code() int { + return 422 +} + +func (o *UpdateEventUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /events][%d] updateEventUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateEventUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /events][%d] updateEventUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateEventUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateEventUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateEventInternalServerError creates a UpdateEventInternalServerError with default headers values +func NewUpdateEventInternalServerError() *UpdateEventInternalServerError { + return &UpdateEventInternalServerError{} +} + +/* +UpdateEventInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type UpdateEventInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this update event internal server error response has a 2xx status code +func (o *UpdateEventInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update event internal server error response has a 3xx status code +func (o *UpdateEventInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update event internal server error response has a 4xx status code +func (o *UpdateEventInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this update event internal server error response has a 5xx status code +func (o *UpdateEventInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this update event internal server error response a status code equal to that given +func (o *UpdateEventInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the update event internal server error response +func (o *UpdateEventInternalServerError) Code() int { + return 500 +} + +func (o *UpdateEventInternalServerError) Error() string { + return fmt.Sprintf("[PUT /events][%d] updateEventInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateEventInternalServerError) String() string { + return fmt.Sprintf("[PUT /events][%d] updateEventInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateEventInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *UpdateEventInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + return nil } diff --git a/api/members/members_client/favorites/create_favorite_parameters.go b/api/members/members_client/favorites/create_favorite_parameters.go deleted file mode 100644 index 875df47..0000000 --- a/api/members/members_client/favorites/create_favorite_parameters.go +++ /dev/null @@ -1,157 +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 favorites - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateFavoriteParams creates a new CreateFavoriteParams 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 NewCreateFavoriteParams() *CreateFavoriteParams { - return &CreateFavoriteParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateFavoriteParamsWithTimeout creates a new CreateFavoriteParams object -// with the ability to set a timeout on a request. -func NewCreateFavoriteParamsWithTimeout(timeout time.Duration) *CreateFavoriteParams { - return &CreateFavoriteParams{ - timeout: timeout, - } -} - -// NewCreateFavoriteParamsWithContext creates a new CreateFavoriteParams object -// with the ability to set a context for a request. -func NewCreateFavoriteParamsWithContext(ctx context.Context) *CreateFavoriteParams { - return &CreateFavoriteParams{ - Context: ctx, - } -} - -// NewCreateFavoriteParamsWithHTTPClient creates a new CreateFavoriteParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateFavoriteParamsWithHTTPClient(client *http.Client) *CreateFavoriteParams { - return &CreateFavoriteParams{ - HTTPClient: client, - } -} - -/* -CreateFavoriteParams contains all the parameters to send to the API endpoint - - for the create favorite operation. - - Typically these are written to a http.Request. -*/ -type CreateFavoriteParams struct { - - /* FavoriteRequest. - - An array of new Favorite records - */ - FavoriteRequest *members_models.FavoriteRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create favorite params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateFavoriteParams) WithDefaults() *CreateFavoriteParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create favorite params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateFavoriteParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create favorite params -func (o *CreateFavoriteParams) WithTimeout(timeout time.Duration) *CreateFavoriteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create favorite params -func (o *CreateFavoriteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create favorite params -func (o *CreateFavoriteParams) WithContext(ctx context.Context) *CreateFavoriteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create favorite params -func (o *CreateFavoriteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create favorite params -func (o *CreateFavoriteParams) WithHTTPClient(client *http.Client) *CreateFavoriteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create favorite params -func (o *CreateFavoriteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFavoriteRequest adds the favoriteRequest to the create favorite params -func (o *CreateFavoriteParams) WithFavoriteRequest(favoriteRequest *members_models.FavoriteRequest) *CreateFavoriteParams { - o.SetFavoriteRequest(favoriteRequest) - return o -} - -// SetFavoriteRequest adds the favoriteRequest to the create favorite params -func (o *CreateFavoriteParams) SetFavoriteRequest(favoriteRequest *members_models.FavoriteRequest) { - o.FavoriteRequest = favoriteRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateFavoriteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.FavoriteRequest != nil { - if err := r.SetBodyParam(o.FavoriteRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/favorites/create_favorite_responses.go b/api/members/members_client/favorites/create_favorite_responses.go deleted file mode 100644 index 2e780ac..0000000 --- a/api/members/members_client/favorites/create_favorite_responses.go +++ /dev/null @@ -1,92 +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 favorites - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateFavoriteReader is a Reader for the CreateFavorite structure. -type CreateFavoriteReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateFavoriteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateFavoriteCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateFavoriteCreated creates a CreateFavoriteCreated with default headers values -func NewCreateFavoriteCreated() *CreateFavoriteCreated { - return &CreateFavoriteCreated{} -} - -/* -CreateFavoriteCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateFavoriteCreated struct { -} - -// IsSuccess returns true when this create favorite created response has a 2xx status code -func (o *CreateFavoriteCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create favorite created response has a 3xx status code -func (o *CreateFavoriteCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create favorite created response has a 4xx status code -func (o *CreateFavoriteCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create favorite created response has a 5xx status code -func (o *CreateFavoriteCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create favorite created response a status code equal to that given -func (o *CreateFavoriteCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create favorite created response -func (o *CreateFavoriteCreated) Code() int { - return 201 -} - -func (o *CreateFavoriteCreated) Error() string { - return fmt.Sprintf("[POST /favorites][%d] createFavoriteCreated ", 201) -} - -func (o *CreateFavoriteCreated) String() string { - return fmt.Sprintf("[POST /favorites][%d] createFavoriteCreated ", 201) -} - -func (o *CreateFavoriteCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/favorites/favorites_client.go b/api/members/members_client/favorites/favorites_client.go index 6518510..7ceaf3a 100644 --- a/api/members/members_client/favorites/favorites_client.go +++ b/api/members/members_client/favorites/favorites_client.go @@ -34,59 +34,21 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateFavorite(params *CreateFavoriteParams, opts ...ClientOption) (*CreateFavoriteCreated, error) + DeleteFavorite(params *DeleteFavoriteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteFavoriteNoContent, error) - DeleteFavorite(params *DeleteFavoriteParams, opts ...ClientOption) (*DeleteFavoriteNoContent, error) + GetFavorites(params *GetFavoritesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFavoritesOK, error) - GetFavorites(params *GetFavoritesParams, opts ...ClientOption) (*GetFavoritesOK, error) + PostFavorite(params *PostFavoriteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostFavoriteCreated, error) - UpdateFavorite(params *UpdateFavoriteParams, opts ...ClientOption) (*UpdateFavoriteOK, error) + UpdateFavorite(params *UpdateFavoriteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateFavoriteOK, error) SetTransport(transport runtime.ClientTransport) } -/* -CreateFavorite creates a new favorite -*/ -func (a *Client) CreateFavorite(params *CreateFavoriteParams, opts ...ClientOption) (*CreateFavoriteCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateFavoriteParams() - } - op := &runtime.ClientOperation{ - ID: "createFavorite", - Method: "POST", - PathPattern: "/favorites", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateFavoriteReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateFavoriteCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createFavorite: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DeleteFavorite deletes a favorite */ -func (a *Client) DeleteFavorite(params *DeleteFavoriteParams, opts ...ClientOption) (*DeleteFavoriteNoContent, error) { +func (a *Client) DeleteFavorite(params *DeleteFavoriteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteFavoriteNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeleteFavoriteParams() @@ -100,6 +62,7 @@ func (a *Client) DeleteFavorite(params *DeleteFavoriteParams, opts ...ClientOpti Schemes: []string{"http"}, Params: params, Reader: &DeleteFavoriteReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +87,7 @@ func (a *Client) DeleteFavorite(params *DeleteFavoriteParams, opts ...ClientOpti /* GetFavorites gets a list of favorites */ -func (a *Client) GetFavorites(params *GetFavoritesParams, opts ...ClientOption) (*GetFavoritesOK, error) { +func (a *Client) GetFavorites(params *GetFavoritesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetFavoritesOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetFavoritesParams() @@ -138,6 +101,7 @@ func (a *Client) GetFavorites(params *GetFavoritesParams, opts ...ClientOption) Schemes: []string{"http"}, Params: params, Reader: &GetFavoritesReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -159,10 +123,49 @@ func (a *Client) GetFavorites(params *GetFavoritesParams, opts ...ClientOption) panic(msg) } +/* +PostFavorite creates a new favorite +*/ +func (a *Client) PostFavorite(params *PostFavoriteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostFavoriteCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostFavoriteParams() + } + op := &runtime.ClientOperation{ + ID: "postFavorite", + Method: "POST", + PathPattern: "/favorites", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostFavoriteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostFavoriteCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postFavorite: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UpdateFavorite updates an existing favorite */ -func (a *Client) UpdateFavorite(params *UpdateFavoriteParams, opts ...ClientOption) (*UpdateFavoriteOK, error) { +func (a *Client) UpdateFavorite(params *UpdateFavoriteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateFavoriteOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateFavoriteParams() @@ -176,6 +179,7 @@ func (a *Client) UpdateFavorite(params *UpdateFavoriteParams, opts ...ClientOpti Schemes: []string{"http"}, Params: params, Reader: &UpdateFavoriteReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/favorites/post_favorite_parameters.go b/api/members/members_client/favorites/post_favorite_parameters.go new file mode 100644 index 0000000..bcd4c84 --- /dev/null +++ b/api/members/members_client/favorites/post_favorite_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package favorites + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostFavoriteParams creates a new PostFavoriteParams 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 NewPostFavoriteParams() *PostFavoriteParams { + return &PostFavoriteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostFavoriteParamsWithTimeout creates a new PostFavoriteParams object +// with the ability to set a timeout on a request. +func NewPostFavoriteParamsWithTimeout(timeout time.Duration) *PostFavoriteParams { + return &PostFavoriteParams{ + timeout: timeout, + } +} + +// NewPostFavoriteParamsWithContext creates a new PostFavoriteParams object +// with the ability to set a context for a request. +func NewPostFavoriteParamsWithContext(ctx context.Context) *PostFavoriteParams { + return &PostFavoriteParams{ + Context: ctx, + } +} + +// NewPostFavoriteParamsWithHTTPClient creates a new PostFavoriteParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostFavoriteParamsWithHTTPClient(client *http.Client) *PostFavoriteParams { + return &PostFavoriteParams{ + HTTPClient: client, + } +} + +/* +PostFavoriteParams contains all the parameters to send to the API endpoint + + for the post favorite operation. + + Typically these are written to a http.Request. +*/ +type PostFavoriteParams struct { + + /* FavoriteRequest. + + An array of new Favorite records + */ + FavoriteRequest *members_models.FavoriteRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post favorite params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostFavoriteParams) WithDefaults() *PostFavoriteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post favorite params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostFavoriteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post favorite params +func (o *PostFavoriteParams) WithTimeout(timeout time.Duration) *PostFavoriteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post favorite params +func (o *PostFavoriteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post favorite params +func (o *PostFavoriteParams) WithContext(ctx context.Context) *PostFavoriteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post favorite params +func (o *PostFavoriteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post favorite params +func (o *PostFavoriteParams) WithHTTPClient(client *http.Client) *PostFavoriteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post favorite params +func (o *PostFavoriteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFavoriteRequest adds the favoriteRequest to the post favorite params +func (o *PostFavoriteParams) WithFavoriteRequest(favoriteRequest *members_models.FavoriteRequest) *PostFavoriteParams { + o.SetFavoriteRequest(favoriteRequest) + return o +} + +// SetFavoriteRequest adds the favoriteRequest to the post favorite params +func (o *PostFavoriteParams) SetFavoriteRequest(favoriteRequest *members_models.FavoriteRequest) { + o.FavoriteRequest = favoriteRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostFavoriteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.FavoriteRequest != nil { + if err := r.SetBodyParam(o.FavoriteRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/favorites/post_favorite_responses.go b/api/members/members_client/favorites/post_favorite_responses.go new file mode 100644 index 0000000..3d7e624 --- /dev/null +++ b/api/members/members_client/favorites/post_favorite_responses.go @@ -0,0 +1,92 @@ +// 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 favorites + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PostFavoriteReader is a Reader for the PostFavorite structure. +type PostFavoriteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostFavoriteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostFavoriteCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostFavoriteCreated creates a PostFavoriteCreated with default headers values +func NewPostFavoriteCreated() *PostFavoriteCreated { + return &PostFavoriteCreated{} +} + +/* +PostFavoriteCreated describes a response with status code 201, with default header values. + +Created +*/ +type PostFavoriteCreated struct { +} + +// IsSuccess returns true when this post favorite created response has a 2xx status code +func (o *PostFavoriteCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post favorite created response has a 3xx status code +func (o *PostFavoriteCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post favorite created response has a 4xx status code +func (o *PostFavoriteCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this post favorite created response has a 5xx status code +func (o *PostFavoriteCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this post favorite created response a status code equal to that given +func (o *PostFavoriteCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the post favorite created response +func (o *PostFavoriteCreated) Code() int { + return 201 +} + +func (o *PostFavoriteCreated) Error() string { + return fmt.Sprintf("[POST /favorites][%d] postFavoriteCreated ", 201) +} + +func (o *PostFavoriteCreated) String() string { + return fmt.Sprintf("[POST /favorites][%d] postFavoriteCreated ", 201) +} + +func (o *PostFavoriteCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/members/members_client/invoices/create_invoice_parameters.go b/api/members/members_client/invoices/create_invoice_parameters.go deleted file mode 100644 index 14bde8c..0000000 --- a/api/members/members_client/invoices/create_invoice_parameters.go +++ /dev/null @@ -1,157 +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 invoices - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateInvoiceParams creates a new CreateInvoiceParams 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 NewCreateInvoiceParams() *CreateInvoiceParams { - return &CreateInvoiceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateInvoiceParamsWithTimeout creates a new CreateInvoiceParams object -// with the ability to set a timeout on a request. -func NewCreateInvoiceParamsWithTimeout(timeout time.Duration) *CreateInvoiceParams { - return &CreateInvoiceParams{ - timeout: timeout, - } -} - -// NewCreateInvoiceParamsWithContext creates a new CreateInvoiceParams object -// with the ability to set a context for a request. -func NewCreateInvoiceParamsWithContext(ctx context.Context) *CreateInvoiceParams { - return &CreateInvoiceParams{ - Context: ctx, - } -} - -// NewCreateInvoiceParamsWithHTTPClient creates a new CreateInvoiceParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateInvoiceParamsWithHTTPClient(client *http.Client) *CreateInvoiceParams { - return &CreateInvoiceParams{ - HTTPClient: client, - } -} - -/* -CreateInvoiceParams contains all the parameters to send to the API endpoint - - for the create invoice operation. - - Typically these are written to a http.Request. -*/ -type CreateInvoiceParams struct { - - /* InvoiceRequest. - - An array of new Invoice records - */ - InvoiceRequest *members_models.InvoiceRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create invoice params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInvoiceParams) WithDefaults() *CreateInvoiceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create invoice params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateInvoiceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create invoice params -func (o *CreateInvoiceParams) WithTimeout(timeout time.Duration) *CreateInvoiceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create invoice params -func (o *CreateInvoiceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create invoice params -func (o *CreateInvoiceParams) WithContext(ctx context.Context) *CreateInvoiceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create invoice params -func (o *CreateInvoiceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create invoice params -func (o *CreateInvoiceParams) WithHTTPClient(client *http.Client) *CreateInvoiceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create invoice params -func (o *CreateInvoiceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithInvoiceRequest adds the invoiceRequest to the create invoice params -func (o *CreateInvoiceParams) WithInvoiceRequest(invoiceRequest *members_models.InvoiceRequest) *CreateInvoiceParams { - o.SetInvoiceRequest(invoiceRequest) - return o -} - -// SetInvoiceRequest adds the invoiceRequest to the create invoice params -func (o *CreateInvoiceParams) SetInvoiceRequest(invoiceRequest *members_models.InvoiceRequest) { - o.InvoiceRequest = invoiceRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateInvoiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.InvoiceRequest != nil { - if err := r.SetBodyParam(o.InvoiceRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/invoices/create_invoice_responses.go b/api/members/members_client/invoices/create_invoice_responses.go deleted file mode 100644 index b7de261..0000000 --- a/api/members/members_client/invoices/create_invoice_responses.go +++ /dev/null @@ -1,92 +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 invoices - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateInvoiceReader is a Reader for the CreateInvoice structure. -type CreateInvoiceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateInvoiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateInvoiceCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateInvoiceCreated creates a CreateInvoiceCreated with default headers values -func NewCreateInvoiceCreated() *CreateInvoiceCreated { - return &CreateInvoiceCreated{} -} - -/* -CreateInvoiceCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateInvoiceCreated struct { -} - -// IsSuccess returns true when this create invoice created response has a 2xx status code -func (o *CreateInvoiceCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create invoice created response has a 3xx status code -func (o *CreateInvoiceCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create invoice created response has a 4xx status code -func (o *CreateInvoiceCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create invoice created response has a 5xx status code -func (o *CreateInvoiceCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create invoice created response a status code equal to that given -func (o *CreateInvoiceCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create invoice created response -func (o *CreateInvoiceCreated) Code() int { - return 201 -} - -func (o *CreateInvoiceCreated) Error() string { - return fmt.Sprintf("[POST /invoices][%d] createInvoiceCreated ", 201) -} - -func (o *CreateInvoiceCreated) String() string { - return fmt.Sprintf("[POST /invoices][%d] createInvoiceCreated ", 201) -} - -func (o *CreateInvoiceCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/invoices/invoices_client.go b/api/members/members_client/invoices/invoices_client.go index c299f26..6b946bd 100644 --- a/api/members/members_client/invoices/invoices_client.go +++ b/api/members/members_client/invoices/invoices_client.go @@ -34,59 +34,21 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateInvoice(params *CreateInvoiceParams, opts ...ClientOption) (*CreateInvoiceCreated, error) + DeleteInvoice(params *DeleteInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteInvoiceNoContent, error) - DeleteInvoice(params *DeleteInvoiceParams, opts ...ClientOption) (*DeleteInvoiceNoContent, error) + GetInvoices(params *GetInvoicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInvoicesOK, error) - GetInvoices(params *GetInvoicesParams, opts ...ClientOption) (*GetInvoicesOK, error) + PostInvoice(params *PostInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostInvoiceCreated, error) - UpdateInvoice(params *UpdateInvoiceParams, opts ...ClientOption) (*UpdateInvoiceOK, error) + UpdateInvoice(params *UpdateInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInvoiceOK, error) SetTransport(transport runtime.ClientTransport) } -/* -CreateInvoice creates a new invoice -*/ -func (a *Client) CreateInvoice(params *CreateInvoiceParams, opts ...ClientOption) (*CreateInvoiceCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateInvoiceParams() - } - op := &runtime.ClientOperation{ - ID: "createInvoice", - Method: "POST", - PathPattern: "/invoices", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateInvoiceReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateInvoiceCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createInvoice: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DeleteInvoice deletes a invoice */ -func (a *Client) DeleteInvoice(params *DeleteInvoiceParams, opts ...ClientOption) (*DeleteInvoiceNoContent, error) { +func (a *Client) DeleteInvoice(params *DeleteInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteInvoiceNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeleteInvoiceParams() @@ -100,6 +62,7 @@ func (a *Client) DeleteInvoice(params *DeleteInvoiceParams, opts ...ClientOption Schemes: []string{"http"}, Params: params, Reader: &DeleteInvoiceReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +87,7 @@ func (a *Client) DeleteInvoice(params *DeleteInvoiceParams, opts ...ClientOption /* GetInvoices gets a list of invoices */ -func (a *Client) GetInvoices(params *GetInvoicesParams, opts ...ClientOption) (*GetInvoicesOK, error) { +func (a *Client) GetInvoices(params *GetInvoicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInvoicesOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetInvoicesParams() @@ -138,6 +101,7 @@ func (a *Client) GetInvoices(params *GetInvoicesParams, opts ...ClientOption) (* Schemes: []string{"http"}, Params: params, Reader: &GetInvoicesReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -159,10 +123,49 @@ func (a *Client) GetInvoices(params *GetInvoicesParams, opts ...ClientOption) (* panic(msg) } +/* +PostInvoice creates a new invoice +*/ +func (a *Client) PostInvoice(params *PostInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostInvoiceCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostInvoiceParams() + } + op := &runtime.ClientOperation{ + ID: "postInvoice", + Method: "POST", + PathPattern: "/invoices", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostInvoiceReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostInvoiceCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postInvoice: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UpdateInvoice updates an existing invoice */ -func (a *Client) UpdateInvoice(params *UpdateInvoiceParams, opts ...ClientOption) (*UpdateInvoiceOK, error) { +func (a *Client) UpdateInvoice(params *UpdateInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInvoiceOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateInvoiceParams() @@ -176,6 +179,7 @@ func (a *Client) UpdateInvoice(params *UpdateInvoiceParams, opts ...ClientOption Schemes: []string{"http"}, Params: params, Reader: &UpdateInvoiceReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/invoices/post_invoice_parameters.go b/api/members/members_client/invoices/post_invoice_parameters.go new file mode 100644 index 0000000..5fae2dc --- /dev/null +++ b/api/members/members_client/invoices/post_invoice_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package invoices + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostInvoiceParams creates a new PostInvoiceParams 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 NewPostInvoiceParams() *PostInvoiceParams { + return &PostInvoiceParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostInvoiceParamsWithTimeout creates a new PostInvoiceParams object +// with the ability to set a timeout on a request. +func NewPostInvoiceParamsWithTimeout(timeout time.Duration) *PostInvoiceParams { + return &PostInvoiceParams{ + timeout: timeout, + } +} + +// NewPostInvoiceParamsWithContext creates a new PostInvoiceParams object +// with the ability to set a context for a request. +func NewPostInvoiceParamsWithContext(ctx context.Context) *PostInvoiceParams { + return &PostInvoiceParams{ + Context: ctx, + } +} + +// NewPostInvoiceParamsWithHTTPClient creates a new PostInvoiceParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostInvoiceParamsWithHTTPClient(client *http.Client) *PostInvoiceParams { + return &PostInvoiceParams{ + HTTPClient: client, + } +} + +/* +PostInvoiceParams contains all the parameters to send to the API endpoint + + for the post invoice operation. + + Typically these are written to a http.Request. +*/ +type PostInvoiceParams struct { + + /* InvoiceRequest. + + An array of new Invoice records + */ + InvoiceRequest *members_models.InvoiceRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post invoice params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostInvoiceParams) WithDefaults() *PostInvoiceParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post invoice params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostInvoiceParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post invoice params +func (o *PostInvoiceParams) WithTimeout(timeout time.Duration) *PostInvoiceParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post invoice params +func (o *PostInvoiceParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post invoice params +func (o *PostInvoiceParams) WithContext(ctx context.Context) *PostInvoiceParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post invoice params +func (o *PostInvoiceParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post invoice params +func (o *PostInvoiceParams) WithHTTPClient(client *http.Client) *PostInvoiceParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post invoice params +func (o *PostInvoiceParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInvoiceRequest adds the invoiceRequest to the post invoice params +func (o *PostInvoiceParams) WithInvoiceRequest(invoiceRequest *members_models.InvoiceRequest) *PostInvoiceParams { + o.SetInvoiceRequest(invoiceRequest) + return o +} + +// SetInvoiceRequest adds the invoiceRequest to the post invoice params +func (o *PostInvoiceParams) SetInvoiceRequest(invoiceRequest *members_models.InvoiceRequest) { + o.InvoiceRequest = invoiceRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostInvoiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.InvoiceRequest != nil { + if err := r.SetBodyParam(o.InvoiceRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/invoices/post_invoice_responses.go b/api/members/members_client/invoices/post_invoice_responses.go new file mode 100644 index 0000000..f5f67b7 --- /dev/null +++ b/api/members/members_client/invoices/post_invoice_responses.go @@ -0,0 +1,92 @@ +// 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 invoices + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PostInvoiceReader is a Reader for the PostInvoice structure. +type PostInvoiceReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostInvoiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostInvoiceCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostInvoiceCreated creates a PostInvoiceCreated with default headers values +func NewPostInvoiceCreated() *PostInvoiceCreated { + return &PostInvoiceCreated{} +} + +/* +PostInvoiceCreated describes a response with status code 201, with default header values. + +Created +*/ +type PostInvoiceCreated struct { +} + +// IsSuccess returns true when this post invoice created response has a 2xx status code +func (o *PostInvoiceCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post invoice created response has a 3xx status code +func (o *PostInvoiceCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post invoice created response has a 4xx status code +func (o *PostInvoiceCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this post invoice created response has a 5xx status code +func (o *PostInvoiceCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this post invoice created response a status code equal to that given +func (o *PostInvoiceCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the post invoice created response +func (o *PostInvoiceCreated) Code() int { + return 201 +} + +func (o *PostInvoiceCreated) Error() string { + return fmt.Sprintf("[POST /invoices][%d] postInvoiceCreated ", 201) +} + +func (o *PostInvoiceCreated) String() string { + return fmt.Sprintf("[POST /invoices][%d] postInvoiceCreated ", 201) +} + +func (o *PostInvoiceCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/members/members_client/issued_certificates/create_issued_certificate_parameters.go b/api/members/members_client/issued_certificates/create_issued_certificate_parameters.go deleted file mode 100644 index d242114..0000000 --- a/api/members/members_client/issued_certificates/create_issued_certificate_parameters.go +++ /dev/null @@ -1,157 +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 issued_certificates - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateIssuedCertificateParams creates a new CreateIssuedCertificateParams 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 NewCreateIssuedCertificateParams() *CreateIssuedCertificateParams { - return &CreateIssuedCertificateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateIssuedCertificateParamsWithTimeout creates a new CreateIssuedCertificateParams object -// with the ability to set a timeout on a request. -func NewCreateIssuedCertificateParamsWithTimeout(timeout time.Duration) *CreateIssuedCertificateParams { - return &CreateIssuedCertificateParams{ - timeout: timeout, - } -} - -// NewCreateIssuedCertificateParamsWithContext creates a new CreateIssuedCertificateParams object -// with the ability to set a context for a request. -func NewCreateIssuedCertificateParamsWithContext(ctx context.Context) *CreateIssuedCertificateParams { - return &CreateIssuedCertificateParams{ - Context: ctx, - } -} - -// NewCreateIssuedCertificateParamsWithHTTPClient creates a new CreateIssuedCertificateParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateIssuedCertificateParamsWithHTTPClient(client *http.Client) *CreateIssuedCertificateParams { - return &CreateIssuedCertificateParams{ - HTTPClient: client, - } -} - -/* -CreateIssuedCertificateParams contains all the parameters to send to the API endpoint - - for the create issued certificate operation. - - Typically these are written to a http.Request. -*/ -type CreateIssuedCertificateParams struct { - - /* IssuedcertificateRequest. - - An array of new IssuedCertificate records - */ - IssuedcertificateRequest *members_models.IssuedCertificateRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create issued certificate params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateIssuedCertificateParams) WithDefaults() *CreateIssuedCertificateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create issued certificate params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateIssuedCertificateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create issued certificate params -func (o *CreateIssuedCertificateParams) WithTimeout(timeout time.Duration) *CreateIssuedCertificateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create issued certificate params -func (o *CreateIssuedCertificateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create issued certificate params -func (o *CreateIssuedCertificateParams) WithContext(ctx context.Context) *CreateIssuedCertificateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create issued certificate params -func (o *CreateIssuedCertificateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create issued certificate params -func (o *CreateIssuedCertificateParams) WithHTTPClient(client *http.Client) *CreateIssuedCertificateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create issued certificate params -func (o *CreateIssuedCertificateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIssuedcertificateRequest adds the issuedcertificateRequest to the create issued certificate params -func (o *CreateIssuedCertificateParams) WithIssuedcertificateRequest(issuedcertificateRequest *members_models.IssuedCertificateRequest) *CreateIssuedCertificateParams { - o.SetIssuedcertificateRequest(issuedcertificateRequest) - return o -} - -// SetIssuedcertificateRequest adds the issuedcertificateRequest to the create issued certificate params -func (o *CreateIssuedCertificateParams) SetIssuedcertificateRequest(issuedcertificateRequest *members_models.IssuedCertificateRequest) { - o.IssuedcertificateRequest = issuedcertificateRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateIssuedCertificateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.IssuedcertificateRequest != nil { - if err := r.SetBodyParam(o.IssuedcertificateRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/issued_certificates/create_issued_certificate_responses.go b/api/members/members_client/issued_certificates/create_issued_certificate_responses.go deleted file mode 100644 index 71747c8..0000000 --- a/api/members/members_client/issued_certificates/create_issued_certificate_responses.go +++ /dev/null @@ -1,92 +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 issued_certificates - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateIssuedCertificateReader is a Reader for the CreateIssuedCertificate structure. -type CreateIssuedCertificateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateIssuedCertificateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateIssuedCertificateCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateIssuedCertificateCreated creates a CreateIssuedCertificateCreated with default headers values -func NewCreateIssuedCertificateCreated() *CreateIssuedCertificateCreated { - return &CreateIssuedCertificateCreated{} -} - -/* -CreateIssuedCertificateCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateIssuedCertificateCreated struct { -} - -// IsSuccess returns true when this create issued certificate created response has a 2xx status code -func (o *CreateIssuedCertificateCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create issued certificate created response has a 3xx status code -func (o *CreateIssuedCertificateCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create issued certificate created response has a 4xx status code -func (o *CreateIssuedCertificateCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create issued certificate created response has a 5xx status code -func (o *CreateIssuedCertificateCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create issued certificate created response a status code equal to that given -func (o *CreateIssuedCertificateCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create issued certificate created response -func (o *CreateIssuedCertificateCreated) Code() int { - return 201 -} - -func (o *CreateIssuedCertificateCreated) Error() string { - return fmt.Sprintf("[POST /issuedcertificates][%d] createIssuedCertificateCreated ", 201) -} - -func (o *CreateIssuedCertificateCreated) String() string { - return fmt.Sprintf("[POST /issuedcertificates][%d] createIssuedCertificateCreated ", 201) -} - -func (o *CreateIssuedCertificateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/issued_certificates/issued_certificates_client.go b/api/members/members_client/issued_certificates/issued_certificates_client.go index edfa11b..d6c059c 100644 --- a/api/members/members_client/issued_certificates/issued_certificates_client.go +++ b/api/members/members_client/issued_certificates/issued_certificates_client.go @@ -34,59 +34,21 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateIssuedCertificate(params *CreateIssuedCertificateParams, opts ...ClientOption) (*CreateIssuedCertificateCreated, error) + DeleteIssuedCertificate(params *DeleteIssuedCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteIssuedCertificateNoContent, error) - DeleteIssuedCertificate(params *DeleteIssuedCertificateParams, opts ...ClientOption) (*DeleteIssuedCertificateNoContent, error) + GetIssuedCertificates(params *GetIssuedCertificatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIssuedCertificatesOK, error) - GetIssuedCertificates(params *GetIssuedCertificatesParams, opts ...ClientOption) (*GetIssuedCertificatesOK, error) + PostIssuedCertificate(params *PostIssuedCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIssuedCertificateCreated, error) - UpdateIssuedCertificate(params *UpdateIssuedCertificateParams, opts ...ClientOption) (*UpdateIssuedCertificateOK, error) + UpdateIssuedCertificate(params *UpdateIssuedCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIssuedCertificateOK, error) SetTransport(transport runtime.ClientTransport) } -/* -CreateIssuedCertificate creates a new issued certificate -*/ -func (a *Client) CreateIssuedCertificate(params *CreateIssuedCertificateParams, opts ...ClientOption) (*CreateIssuedCertificateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateIssuedCertificateParams() - } - op := &runtime.ClientOperation{ - ID: "createIssuedCertificate", - Method: "POST", - PathPattern: "/issuedcertificates", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateIssuedCertificateReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateIssuedCertificateCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createIssuedCertificate: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DeleteIssuedCertificate deletes a issued certificate */ -func (a *Client) DeleteIssuedCertificate(params *DeleteIssuedCertificateParams, opts ...ClientOption) (*DeleteIssuedCertificateNoContent, error) { +func (a *Client) DeleteIssuedCertificate(params *DeleteIssuedCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteIssuedCertificateNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeleteIssuedCertificateParams() @@ -100,6 +62,7 @@ func (a *Client) DeleteIssuedCertificate(params *DeleteIssuedCertificateParams, Schemes: []string{"http"}, Params: params, Reader: &DeleteIssuedCertificateReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +87,7 @@ func (a *Client) DeleteIssuedCertificate(params *DeleteIssuedCertificateParams, /* GetIssuedCertificates gets a list of issued certificates */ -func (a *Client) GetIssuedCertificates(params *GetIssuedCertificatesParams, opts ...ClientOption) (*GetIssuedCertificatesOK, error) { +func (a *Client) GetIssuedCertificates(params *GetIssuedCertificatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIssuedCertificatesOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetIssuedCertificatesParams() @@ -138,6 +101,7 @@ func (a *Client) GetIssuedCertificates(params *GetIssuedCertificatesParams, opts Schemes: []string{"http"}, Params: params, Reader: &GetIssuedCertificatesReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -159,10 +123,49 @@ func (a *Client) GetIssuedCertificates(params *GetIssuedCertificatesParams, opts panic(msg) } +/* +PostIssuedCertificate creates a new issued certificate +*/ +func (a *Client) PostIssuedCertificate(params *PostIssuedCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIssuedCertificateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostIssuedCertificateParams() + } + op := &runtime.ClientOperation{ + ID: "postIssuedCertificate", + Method: "POST", + PathPattern: "/issuedcertificates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostIssuedCertificateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostIssuedCertificateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postIssuedCertificate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UpdateIssuedCertificate updates an existing issued certificate */ -func (a *Client) UpdateIssuedCertificate(params *UpdateIssuedCertificateParams, opts ...ClientOption) (*UpdateIssuedCertificateOK, error) { +func (a *Client) UpdateIssuedCertificate(params *UpdateIssuedCertificateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateIssuedCertificateOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateIssuedCertificateParams() @@ -176,6 +179,7 @@ func (a *Client) UpdateIssuedCertificate(params *UpdateIssuedCertificateParams, Schemes: []string{"http"}, Params: params, Reader: &UpdateIssuedCertificateReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/issued_certificates/post_issued_certificate_parameters.go b/api/members/members_client/issued_certificates/post_issued_certificate_parameters.go new file mode 100644 index 0000000..657d041 --- /dev/null +++ b/api/members/members_client/issued_certificates/post_issued_certificate_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package issued_certificates + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostIssuedCertificateParams creates a new PostIssuedCertificateParams 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 NewPostIssuedCertificateParams() *PostIssuedCertificateParams { + return &PostIssuedCertificateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostIssuedCertificateParamsWithTimeout creates a new PostIssuedCertificateParams object +// with the ability to set a timeout on a request. +func NewPostIssuedCertificateParamsWithTimeout(timeout time.Duration) *PostIssuedCertificateParams { + return &PostIssuedCertificateParams{ + timeout: timeout, + } +} + +// NewPostIssuedCertificateParamsWithContext creates a new PostIssuedCertificateParams object +// with the ability to set a context for a request. +func NewPostIssuedCertificateParamsWithContext(ctx context.Context) *PostIssuedCertificateParams { + return &PostIssuedCertificateParams{ + Context: ctx, + } +} + +// NewPostIssuedCertificateParamsWithHTTPClient creates a new PostIssuedCertificateParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostIssuedCertificateParamsWithHTTPClient(client *http.Client) *PostIssuedCertificateParams { + return &PostIssuedCertificateParams{ + HTTPClient: client, + } +} + +/* +PostIssuedCertificateParams contains all the parameters to send to the API endpoint + + for the post issued certificate operation. + + Typically these are written to a http.Request. +*/ +type PostIssuedCertificateParams struct { + + /* IssuedcertificateRequest. + + An array of new IssuedCertificate records + */ + IssuedcertificateRequest *members_models.IssuedCertificateRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post issued certificate params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostIssuedCertificateParams) WithDefaults() *PostIssuedCertificateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post issued certificate params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostIssuedCertificateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post issued certificate params +func (o *PostIssuedCertificateParams) WithTimeout(timeout time.Duration) *PostIssuedCertificateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post issued certificate params +func (o *PostIssuedCertificateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post issued certificate params +func (o *PostIssuedCertificateParams) WithContext(ctx context.Context) *PostIssuedCertificateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post issued certificate params +func (o *PostIssuedCertificateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post issued certificate params +func (o *PostIssuedCertificateParams) WithHTTPClient(client *http.Client) *PostIssuedCertificateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post issued certificate params +func (o *PostIssuedCertificateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIssuedcertificateRequest adds the issuedcertificateRequest to the post issued certificate params +func (o *PostIssuedCertificateParams) WithIssuedcertificateRequest(issuedcertificateRequest *members_models.IssuedCertificateRequest) *PostIssuedCertificateParams { + o.SetIssuedcertificateRequest(issuedcertificateRequest) + return o +} + +// SetIssuedcertificateRequest adds the issuedcertificateRequest to the post issued certificate params +func (o *PostIssuedCertificateParams) SetIssuedcertificateRequest(issuedcertificateRequest *members_models.IssuedCertificateRequest) { + o.IssuedcertificateRequest = issuedcertificateRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostIssuedCertificateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.IssuedcertificateRequest != nil { + if err := r.SetBodyParam(o.IssuedcertificateRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/issued_certificates/post_issued_certificate_responses.go b/api/members/members_client/issued_certificates/post_issued_certificate_responses.go new file mode 100644 index 0000000..b66aca6 --- /dev/null +++ b/api/members/members_client/issued_certificates/post_issued_certificate_responses.go @@ -0,0 +1,92 @@ +// 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 issued_certificates + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PostIssuedCertificateReader is a Reader for the PostIssuedCertificate structure. +type PostIssuedCertificateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostIssuedCertificateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostIssuedCertificateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostIssuedCertificateCreated creates a PostIssuedCertificateCreated with default headers values +func NewPostIssuedCertificateCreated() *PostIssuedCertificateCreated { + return &PostIssuedCertificateCreated{} +} + +/* +PostIssuedCertificateCreated describes a response with status code 201, with default header values. + +Created +*/ +type PostIssuedCertificateCreated struct { +} + +// IsSuccess returns true when this post issued certificate created response has a 2xx status code +func (o *PostIssuedCertificateCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post issued certificate created response has a 3xx status code +func (o *PostIssuedCertificateCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post issued certificate created response has a 4xx status code +func (o *PostIssuedCertificateCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this post issued certificate created response has a 5xx status code +func (o *PostIssuedCertificateCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this post issued certificate created response a status code equal to that given +func (o *PostIssuedCertificateCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the post issued certificate created response +func (o *PostIssuedCertificateCreated) Code() int { + return 201 +} + +func (o *PostIssuedCertificateCreated) Error() string { + return fmt.Sprintf("[POST /issuedcertificates][%d] postIssuedCertificateCreated ", 201) +} + +func (o *PostIssuedCertificateCreated) String() string { + return fmt.Sprintf("[POST /issuedcertificates][%d] postIssuedCertificateCreated ", 201) +} + +func (o *PostIssuedCertificateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/members/members_client/lesson_progress/create_lesson_progress_parameters.go b/api/members/members_client/lesson_progress/create_lesson_progress_parameters.go deleted file mode 100644 index 2d1a55d..0000000 --- a/api/members/members_client/lesson_progress/create_lesson_progress_parameters.go +++ /dev/null @@ -1,157 +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 lesson_progress - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateLessonProgressParams creates a new CreateLessonProgressParams 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 NewCreateLessonProgressParams() *CreateLessonProgressParams { - return &CreateLessonProgressParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateLessonProgressParamsWithTimeout creates a new CreateLessonProgressParams object -// with the ability to set a timeout on a request. -func NewCreateLessonProgressParamsWithTimeout(timeout time.Duration) *CreateLessonProgressParams { - return &CreateLessonProgressParams{ - timeout: timeout, - } -} - -// NewCreateLessonProgressParamsWithContext creates a new CreateLessonProgressParams object -// with the ability to set a context for a request. -func NewCreateLessonProgressParamsWithContext(ctx context.Context) *CreateLessonProgressParams { - return &CreateLessonProgressParams{ - Context: ctx, - } -} - -// NewCreateLessonProgressParamsWithHTTPClient creates a new CreateLessonProgressParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateLessonProgressParamsWithHTTPClient(client *http.Client) *CreateLessonProgressParams { - return &CreateLessonProgressParams{ - HTTPClient: client, - } -} - -/* -CreateLessonProgressParams contains all the parameters to send to the API endpoint - - for the create lesson progress operation. - - Typically these are written to a http.Request. -*/ -type CreateLessonProgressParams struct { - - /* LessonprogressRequest. - - An array of new LessonProgress records - */ - LessonprogressRequest *members_models.LessonProgressRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create lesson progress params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateLessonProgressParams) WithDefaults() *CreateLessonProgressParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create lesson progress params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateLessonProgressParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create lesson progress params -func (o *CreateLessonProgressParams) WithTimeout(timeout time.Duration) *CreateLessonProgressParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create lesson progress params -func (o *CreateLessonProgressParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create lesson progress params -func (o *CreateLessonProgressParams) WithContext(ctx context.Context) *CreateLessonProgressParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create lesson progress params -func (o *CreateLessonProgressParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create lesson progress params -func (o *CreateLessonProgressParams) WithHTTPClient(client *http.Client) *CreateLessonProgressParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create lesson progress params -func (o *CreateLessonProgressParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithLessonprogressRequest adds the lessonprogressRequest to the create lesson progress params -func (o *CreateLessonProgressParams) WithLessonprogressRequest(lessonprogressRequest *members_models.LessonProgressRequest) *CreateLessonProgressParams { - o.SetLessonprogressRequest(lessonprogressRequest) - return o -} - -// SetLessonprogressRequest adds the lessonprogressRequest to the create lesson progress params -func (o *CreateLessonProgressParams) SetLessonprogressRequest(lessonprogressRequest *members_models.LessonProgressRequest) { - o.LessonprogressRequest = lessonprogressRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateLessonProgressParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.LessonprogressRequest != nil { - if err := r.SetBodyParam(o.LessonprogressRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/lesson_progress/create_lesson_progress_responses.go b/api/members/members_client/lesson_progress/create_lesson_progress_responses.go deleted file mode 100644 index 170d29d..0000000 --- a/api/members/members_client/lesson_progress/create_lesson_progress_responses.go +++ /dev/null @@ -1,92 +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 lesson_progress - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateLessonProgressReader is a Reader for the CreateLessonProgress structure. -type CreateLessonProgressReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateLessonProgressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateLessonProgressCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateLessonProgressCreated creates a CreateLessonProgressCreated with default headers values -func NewCreateLessonProgressCreated() *CreateLessonProgressCreated { - return &CreateLessonProgressCreated{} -} - -/* -CreateLessonProgressCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateLessonProgressCreated struct { -} - -// IsSuccess returns true when this create lesson progress created response has a 2xx status code -func (o *CreateLessonProgressCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create lesson progress created response has a 3xx status code -func (o *CreateLessonProgressCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create lesson progress created response has a 4xx status code -func (o *CreateLessonProgressCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create lesson progress created response has a 5xx status code -func (o *CreateLessonProgressCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create lesson progress created response a status code equal to that given -func (o *CreateLessonProgressCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create lesson progress created response -func (o *CreateLessonProgressCreated) Code() int { - return 201 -} - -func (o *CreateLessonProgressCreated) Error() string { - return fmt.Sprintf("[POST /lessonprogress][%d] createLessonProgressCreated ", 201) -} - -func (o *CreateLessonProgressCreated) String() string { - return fmt.Sprintf("[POST /lessonprogress][%d] createLessonProgressCreated ", 201) -} - -func (o *CreateLessonProgressCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/lesson_progress/lesson_progress_client.go b/api/members/members_client/lesson_progress/lesson_progress_client.go index 1774e2c..a6cd7db 100644 --- a/api/members/members_client/lesson_progress/lesson_progress_client.go +++ b/api/members/members_client/lesson_progress/lesson_progress_client.go @@ -34,59 +34,21 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateLessonProgress(params *CreateLessonProgressParams, opts ...ClientOption) (*CreateLessonProgressCreated, error) + DeleteLessonProgress(params *DeleteLessonProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteLessonProgressNoContent, error) - DeleteLessonProgress(params *DeleteLessonProgressParams, opts ...ClientOption) (*DeleteLessonProgressNoContent, error) + GetLessonProgress(params *GetLessonProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLessonProgressOK, error) - GetLessonProgress(params *GetLessonProgressParams, opts ...ClientOption) (*GetLessonProgressOK, error) + PostLessonProgress(params *PostLessonProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostLessonProgressCreated, error) - UpdateLessonProgress(params *UpdateLessonProgressParams, opts ...ClientOption) (*UpdateLessonProgressOK, error) + UpdateLessonProgress(params *UpdateLessonProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateLessonProgressOK, error) SetTransport(transport runtime.ClientTransport) } -/* -CreateLessonProgress creates a new lesson progress -*/ -func (a *Client) CreateLessonProgress(params *CreateLessonProgressParams, opts ...ClientOption) (*CreateLessonProgressCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateLessonProgressParams() - } - op := &runtime.ClientOperation{ - ID: "createLessonProgress", - Method: "POST", - PathPattern: "/lessonprogress", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateLessonProgressReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateLessonProgressCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createLessonProgress: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DeleteLessonProgress deletes a lesson progress */ -func (a *Client) DeleteLessonProgress(params *DeleteLessonProgressParams, opts ...ClientOption) (*DeleteLessonProgressNoContent, error) { +func (a *Client) DeleteLessonProgress(params *DeleteLessonProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteLessonProgressNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeleteLessonProgressParams() @@ -100,6 +62,7 @@ func (a *Client) DeleteLessonProgress(params *DeleteLessonProgressParams, opts . Schemes: []string{"http"}, Params: params, Reader: &DeleteLessonProgressReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +87,7 @@ func (a *Client) DeleteLessonProgress(params *DeleteLessonProgressParams, opts . /* GetLessonProgress gets a list of lesson progress */ -func (a *Client) GetLessonProgress(params *GetLessonProgressParams, opts ...ClientOption) (*GetLessonProgressOK, error) { +func (a *Client) GetLessonProgress(params *GetLessonProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLessonProgressOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetLessonProgressParams() @@ -138,6 +101,7 @@ func (a *Client) GetLessonProgress(params *GetLessonProgressParams, opts ...Clie Schemes: []string{"http"}, Params: params, Reader: &GetLessonProgressReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -159,10 +123,49 @@ func (a *Client) GetLessonProgress(params *GetLessonProgressParams, opts ...Clie panic(msg) } +/* +PostLessonProgress creates a new lesson progress +*/ +func (a *Client) PostLessonProgress(params *PostLessonProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostLessonProgressCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostLessonProgressParams() + } + op := &runtime.ClientOperation{ + ID: "postLessonProgress", + Method: "POST", + PathPattern: "/lessonprogress", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostLessonProgressReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostLessonProgressCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postLessonProgress: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UpdateLessonProgress updates an existing lesson progress */ -func (a *Client) UpdateLessonProgress(params *UpdateLessonProgressParams, opts ...ClientOption) (*UpdateLessonProgressOK, error) { +func (a *Client) UpdateLessonProgress(params *UpdateLessonProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateLessonProgressOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateLessonProgressParams() @@ -176,6 +179,7 @@ func (a *Client) UpdateLessonProgress(params *UpdateLessonProgressParams, opts . Schemes: []string{"http"}, Params: params, Reader: &UpdateLessonProgressReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/lesson_progress/post_lesson_progress_parameters.go b/api/members/members_client/lesson_progress/post_lesson_progress_parameters.go new file mode 100644 index 0000000..f76af0d --- /dev/null +++ b/api/members/members_client/lesson_progress/post_lesson_progress_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package lesson_progress + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostLessonProgressParams creates a new PostLessonProgressParams 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 NewPostLessonProgressParams() *PostLessonProgressParams { + return &PostLessonProgressParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostLessonProgressParamsWithTimeout creates a new PostLessonProgressParams object +// with the ability to set a timeout on a request. +func NewPostLessonProgressParamsWithTimeout(timeout time.Duration) *PostLessonProgressParams { + return &PostLessonProgressParams{ + timeout: timeout, + } +} + +// NewPostLessonProgressParamsWithContext creates a new PostLessonProgressParams object +// with the ability to set a context for a request. +func NewPostLessonProgressParamsWithContext(ctx context.Context) *PostLessonProgressParams { + return &PostLessonProgressParams{ + Context: ctx, + } +} + +// NewPostLessonProgressParamsWithHTTPClient creates a new PostLessonProgressParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostLessonProgressParamsWithHTTPClient(client *http.Client) *PostLessonProgressParams { + return &PostLessonProgressParams{ + HTTPClient: client, + } +} + +/* +PostLessonProgressParams contains all the parameters to send to the API endpoint + + for the post lesson progress operation. + + Typically these are written to a http.Request. +*/ +type PostLessonProgressParams struct { + + /* LessonprogressRequest. + + An array of new LessonProgress records + */ + LessonprogressRequest *members_models.LessonProgressRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post lesson progress params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostLessonProgressParams) WithDefaults() *PostLessonProgressParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post lesson progress params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostLessonProgressParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post lesson progress params +func (o *PostLessonProgressParams) WithTimeout(timeout time.Duration) *PostLessonProgressParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post lesson progress params +func (o *PostLessonProgressParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post lesson progress params +func (o *PostLessonProgressParams) WithContext(ctx context.Context) *PostLessonProgressParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post lesson progress params +func (o *PostLessonProgressParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post lesson progress params +func (o *PostLessonProgressParams) WithHTTPClient(client *http.Client) *PostLessonProgressParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post lesson progress params +func (o *PostLessonProgressParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLessonprogressRequest adds the lessonprogressRequest to the post lesson progress params +func (o *PostLessonProgressParams) WithLessonprogressRequest(lessonprogressRequest *members_models.LessonProgressRequest) *PostLessonProgressParams { + o.SetLessonprogressRequest(lessonprogressRequest) + return o +} + +// SetLessonprogressRequest adds the lessonprogressRequest to the post lesson progress params +func (o *PostLessonProgressParams) SetLessonprogressRequest(lessonprogressRequest *members_models.LessonProgressRequest) { + o.LessonprogressRequest = lessonprogressRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostLessonProgressParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.LessonprogressRequest != nil { + if err := r.SetBodyParam(o.LessonprogressRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/lesson_progress/post_lesson_progress_responses.go b/api/members/members_client/lesson_progress/post_lesson_progress_responses.go new file mode 100644 index 0000000..7a6c71e --- /dev/null +++ b/api/members/members_client/lesson_progress/post_lesson_progress_responses.go @@ -0,0 +1,92 @@ +// 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 lesson_progress + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PostLessonProgressReader is a Reader for the PostLessonProgress structure. +type PostLessonProgressReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostLessonProgressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostLessonProgressCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostLessonProgressCreated creates a PostLessonProgressCreated with default headers values +func NewPostLessonProgressCreated() *PostLessonProgressCreated { + return &PostLessonProgressCreated{} +} + +/* +PostLessonProgressCreated describes a response with status code 201, with default header values. + +Created +*/ +type PostLessonProgressCreated struct { +} + +// IsSuccess returns true when this post lesson progress created response has a 2xx status code +func (o *PostLessonProgressCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post lesson progress created response has a 3xx status code +func (o *PostLessonProgressCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post lesson progress created response has a 4xx status code +func (o *PostLessonProgressCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this post lesson progress created response has a 5xx status code +func (o *PostLessonProgressCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this post lesson progress created response a status code equal to that given +func (o *PostLessonProgressCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the post lesson progress created response +func (o *PostLessonProgressCreated) Code() int { + return 201 +} + +func (o *PostLessonProgressCreated) Error() string { + return fmt.Sprintf("[POST /lessonprogress][%d] postLessonProgressCreated ", 201) +} + +func (o *PostLessonProgressCreated) String() string { + return fmt.Sprintf("[POST /lessonprogress][%d] postLessonProgressCreated ", 201) +} + +func (o *PostLessonProgressCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/members/members_client/members_client.go b/api/members/members_client/members_client.go index c1a5cdf..4436603 100644 --- a/api/members/members_client/members_client.go +++ b/api/members/members_client/members_client.go @@ -17,14 +17,10 @@ import ( "code.tnxs.net/vernonkeenan/lib/api/members/members_client/attendees" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/certificates" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/clusters" - "code.tnxs.net/vernonkeenan/lib/api/members/members_client/course_lessons" - "code.tnxs.net/vernonkeenan/lib/api/members/members_client/course_sections" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/courses" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/databases" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/emails" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/enrollments" - "code.tnxs.net/vernonkeenan/lib/api/members/members_client/event_categories" - "code.tnxs.net/vernonkeenan/lib/api/members/members_client/event_category_assignments" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/events" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/favorites" "code.tnxs.net/vernonkeenan/lib/api/members/members_client/invoices" @@ -88,14 +84,10 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Members { cli.Attendees = attendees.New(transport, formats) cli.Certificates = certificates.New(transport, formats) cli.Clusters = clusters.New(transport, formats) - cli.CourseLessons = course_lessons.New(transport, formats) - cli.CourseSections = course_sections.New(transport, formats) cli.Courses = courses.New(transport, formats) cli.Databases = databases.New(transport, formats) cli.Emails = emails.New(transport, formats) cli.Enrollments = enrollments.New(transport, formats) - cli.EventCategories = event_categories.New(transport, formats) - cli.EventCategoryAssignments = event_category_assignments.New(transport, formats) cli.Events = events.New(transport, formats) cli.Favorites = favorites.New(transport, formats) cli.Invoices = invoices.New(transport, formats) @@ -162,10 +154,6 @@ type Members struct { Clusters clusters.ClientService - CourseLessons course_lessons.ClientService - - CourseSections course_sections.ClientService - Courses courses.ClientService Databases databases.ClientService @@ -174,10 +162,6 @@ type Members struct { Enrollments enrollments.ClientService - EventCategories event_categories.ClientService - - EventCategoryAssignments event_category_assignments.ClientService - Events events.ClientService Favorites favorites.ClientService @@ -219,14 +203,10 @@ func (c *Members) SetTransport(transport runtime.ClientTransport) { c.Attendees.SetTransport(transport) c.Certificates.SetTransport(transport) c.Clusters.SetTransport(transport) - c.CourseLessons.SetTransport(transport) - c.CourseSections.SetTransport(transport) c.Courses.SetTransport(transport) c.Databases.SetTransport(transport) c.Emails.SetTransport(transport) c.Enrollments.SetTransport(transport) - c.EventCategories.SetTransport(transport) - c.EventCategoryAssignments.SetTransport(transport) c.Events.SetTransport(transport) c.Favorites.SetTransport(transport) c.Invoices.SetTransport(transport) diff --git a/api/members/members_client/orders/create_order_parameters.go b/api/members/members_client/orders/create_order_parameters.go deleted file mode 100644 index a244092..0000000 --- a/api/members/members_client/orders/create_order_parameters.go +++ /dev/null @@ -1,157 +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 orders - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateOrderParams creates a new CreateOrderParams 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 NewCreateOrderParams() *CreateOrderParams { - return &CreateOrderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateOrderParamsWithTimeout creates a new CreateOrderParams object -// with the ability to set a timeout on a request. -func NewCreateOrderParamsWithTimeout(timeout time.Duration) *CreateOrderParams { - return &CreateOrderParams{ - timeout: timeout, - } -} - -// NewCreateOrderParamsWithContext creates a new CreateOrderParams object -// with the ability to set a context for a request. -func NewCreateOrderParamsWithContext(ctx context.Context) *CreateOrderParams { - return &CreateOrderParams{ - Context: ctx, - } -} - -// NewCreateOrderParamsWithHTTPClient creates a new CreateOrderParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateOrderParamsWithHTTPClient(client *http.Client) *CreateOrderParams { - return &CreateOrderParams{ - HTTPClient: client, - } -} - -/* -CreateOrderParams contains all the parameters to send to the API endpoint - - for the create order operation. - - Typically these are written to a http.Request. -*/ -type CreateOrderParams struct { - - /* OrderRequest. - - An array of new Order records - */ - OrderRequest *members_models.OrderRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create order params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateOrderParams) WithDefaults() *CreateOrderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create order params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateOrderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create order params -func (o *CreateOrderParams) WithTimeout(timeout time.Duration) *CreateOrderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create order params -func (o *CreateOrderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create order params -func (o *CreateOrderParams) WithContext(ctx context.Context) *CreateOrderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create order params -func (o *CreateOrderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create order params -func (o *CreateOrderParams) WithHTTPClient(client *http.Client) *CreateOrderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create order params -func (o *CreateOrderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithOrderRequest adds the orderRequest to the create order params -func (o *CreateOrderParams) WithOrderRequest(orderRequest *members_models.OrderRequest) *CreateOrderParams { - o.SetOrderRequest(orderRequest) - return o -} - -// SetOrderRequest adds the orderRequest to the create order params -func (o *CreateOrderParams) SetOrderRequest(orderRequest *members_models.OrderRequest) { - o.OrderRequest = orderRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateOrderParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.OrderRequest != nil { - if err := r.SetBodyParam(o.OrderRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/orders/create_order_responses.go b/api/members/members_client/orders/create_order_responses.go deleted file mode 100644 index b4a4615..0000000 --- a/api/members/members_client/orders/create_order_responses.go +++ /dev/null @@ -1,92 +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 orders - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateOrderReader is a Reader for the CreateOrder structure. -type CreateOrderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateOrderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateOrderCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateOrderCreated creates a CreateOrderCreated with default headers values -func NewCreateOrderCreated() *CreateOrderCreated { - return &CreateOrderCreated{} -} - -/* -CreateOrderCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateOrderCreated struct { -} - -// IsSuccess returns true when this create order created response has a 2xx status code -func (o *CreateOrderCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create order created response has a 3xx status code -func (o *CreateOrderCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create order created response has a 4xx status code -func (o *CreateOrderCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create order created response has a 5xx status code -func (o *CreateOrderCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create order created response a status code equal to that given -func (o *CreateOrderCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create order created response -func (o *CreateOrderCreated) Code() int { - return 201 -} - -func (o *CreateOrderCreated) Error() string { - return fmt.Sprintf("[POST /orders][%d] createOrderCreated ", 201) -} - -func (o *CreateOrderCreated) String() string { - return fmt.Sprintf("[POST /orders][%d] createOrderCreated ", 201) -} - -func (o *CreateOrderCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/orders/orders_client.go b/api/members/members_client/orders/orders_client.go index 1ba3730..96cab67 100644 --- a/api/members/members_client/orders/orders_client.go +++ b/api/members/members_client/orders/orders_client.go @@ -34,59 +34,21 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateOrder(params *CreateOrderParams, opts ...ClientOption) (*CreateOrderCreated, error) + DeleteOrder(params *DeleteOrderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteOrderNoContent, error) - DeleteOrder(params *DeleteOrderParams, opts ...ClientOption) (*DeleteOrderNoContent, error) + GetOrders(params *GetOrdersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOrdersOK, error) - GetOrders(params *GetOrdersParams, opts ...ClientOption) (*GetOrdersOK, error) + PostOrder(params *PostOrderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostOrderCreated, error) - UpdateOrder(params *UpdateOrderParams, opts ...ClientOption) (*UpdateOrderOK, error) + UpdateOrder(params *UpdateOrderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateOrderOK, error) SetTransport(transport runtime.ClientTransport) } -/* -CreateOrder creates a new order -*/ -func (a *Client) CreateOrder(params *CreateOrderParams, opts ...ClientOption) (*CreateOrderCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateOrderParams() - } - op := &runtime.ClientOperation{ - ID: "createOrder", - Method: "POST", - PathPattern: "/orders", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateOrderReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateOrderCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createOrder: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DeleteOrder deletes a order */ -func (a *Client) DeleteOrder(params *DeleteOrderParams, opts ...ClientOption) (*DeleteOrderNoContent, error) { +func (a *Client) DeleteOrder(params *DeleteOrderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteOrderNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeleteOrderParams() @@ -100,6 +62,7 @@ func (a *Client) DeleteOrder(params *DeleteOrderParams, opts ...ClientOption) (* Schemes: []string{"http"}, Params: params, Reader: &DeleteOrderReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +87,7 @@ func (a *Client) DeleteOrder(params *DeleteOrderParams, opts ...ClientOption) (* /* GetOrders gets a list of orders */ -func (a *Client) GetOrders(params *GetOrdersParams, opts ...ClientOption) (*GetOrdersOK, error) { +func (a *Client) GetOrders(params *GetOrdersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOrdersOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetOrdersParams() @@ -138,6 +101,7 @@ func (a *Client) GetOrders(params *GetOrdersParams, opts ...ClientOption) (*GetO Schemes: []string{"http"}, Params: params, Reader: &GetOrdersReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -159,10 +123,49 @@ func (a *Client) GetOrders(params *GetOrdersParams, opts ...ClientOption) (*GetO panic(msg) } +/* +PostOrder creates a new order +*/ +func (a *Client) PostOrder(params *PostOrderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostOrderCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostOrderParams() + } + op := &runtime.ClientOperation{ + ID: "postOrder", + Method: "POST", + PathPattern: "/orders", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostOrderReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostOrderCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postOrder: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UpdateOrder updates an existing order */ -func (a *Client) UpdateOrder(params *UpdateOrderParams, opts ...ClientOption) (*UpdateOrderOK, error) { +func (a *Client) UpdateOrder(params *UpdateOrderParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateOrderOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateOrderParams() @@ -176,6 +179,7 @@ func (a *Client) UpdateOrder(params *UpdateOrderParams, opts ...ClientOption) (* Schemes: []string{"http"}, Params: params, Reader: &UpdateOrderReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/orders/post_order_parameters.go b/api/members/members_client/orders/post_order_parameters.go new file mode 100644 index 0000000..d4542bf --- /dev/null +++ b/api/members/members_client/orders/post_order_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package orders + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostOrderParams creates a new PostOrderParams 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 NewPostOrderParams() *PostOrderParams { + return &PostOrderParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostOrderParamsWithTimeout creates a new PostOrderParams object +// with the ability to set a timeout on a request. +func NewPostOrderParamsWithTimeout(timeout time.Duration) *PostOrderParams { + return &PostOrderParams{ + timeout: timeout, + } +} + +// NewPostOrderParamsWithContext creates a new PostOrderParams object +// with the ability to set a context for a request. +func NewPostOrderParamsWithContext(ctx context.Context) *PostOrderParams { + return &PostOrderParams{ + Context: ctx, + } +} + +// NewPostOrderParamsWithHTTPClient creates a new PostOrderParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostOrderParamsWithHTTPClient(client *http.Client) *PostOrderParams { + return &PostOrderParams{ + HTTPClient: client, + } +} + +/* +PostOrderParams contains all the parameters to send to the API endpoint + + for the post order operation. + + Typically these are written to a http.Request. +*/ +type PostOrderParams struct { + + /* OrderRequest. + + An array of new Order records + */ + OrderRequest *members_models.OrderRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post order params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostOrderParams) WithDefaults() *PostOrderParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post order params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostOrderParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post order params +func (o *PostOrderParams) WithTimeout(timeout time.Duration) *PostOrderParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post order params +func (o *PostOrderParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post order params +func (o *PostOrderParams) WithContext(ctx context.Context) *PostOrderParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post order params +func (o *PostOrderParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post order params +func (o *PostOrderParams) WithHTTPClient(client *http.Client) *PostOrderParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post order params +func (o *PostOrderParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOrderRequest adds the orderRequest to the post order params +func (o *PostOrderParams) WithOrderRequest(orderRequest *members_models.OrderRequest) *PostOrderParams { + o.SetOrderRequest(orderRequest) + return o +} + +// SetOrderRequest adds the orderRequest to the post order params +func (o *PostOrderParams) SetOrderRequest(orderRequest *members_models.OrderRequest) { + o.OrderRequest = orderRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostOrderParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.OrderRequest != nil { + if err := r.SetBodyParam(o.OrderRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/orders/post_order_responses.go b/api/members/members_client/orders/post_order_responses.go new file mode 100644 index 0000000..0d78589 --- /dev/null +++ b/api/members/members_client/orders/post_order_responses.go @@ -0,0 +1,92 @@ +// 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 orders + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PostOrderReader is a Reader for the PostOrder structure. +type PostOrderReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostOrderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostOrderCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostOrderCreated creates a PostOrderCreated with default headers values +func NewPostOrderCreated() *PostOrderCreated { + return &PostOrderCreated{} +} + +/* +PostOrderCreated describes a response with status code 201, with default header values. + +Created +*/ +type PostOrderCreated struct { +} + +// IsSuccess returns true when this post order created response has a 2xx status code +func (o *PostOrderCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post order created response has a 3xx status code +func (o *PostOrderCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post order created response has a 4xx status code +func (o *PostOrderCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this post order created response has a 5xx status code +func (o *PostOrderCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this post order created response a status code equal to that given +func (o *PostOrderCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the post order created response +func (o *PostOrderCreated) Code() int { + return 201 +} + +func (o *PostOrderCreated) Error() string { + return fmt.Sprintf("[POST /orders][%d] postOrderCreated ", 201) +} + +func (o *PostOrderCreated) String() string { + return fmt.Sprintf("[POST /orders][%d] postOrderCreated ", 201) +} + +func (o *PostOrderCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/members/members_client/payment_methods/create_payment_method_parameters.go b/api/members/members_client/payment_methods/create_payment_method_parameters.go deleted file mode 100644 index 1c6ac0b..0000000 --- a/api/members/members_client/payment_methods/create_payment_method_parameters.go +++ /dev/null @@ -1,157 +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 payment_methods - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreatePaymentMethodParams creates a new CreatePaymentMethodParams 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 NewCreatePaymentMethodParams() *CreatePaymentMethodParams { - return &CreatePaymentMethodParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreatePaymentMethodParamsWithTimeout creates a new CreatePaymentMethodParams object -// with the ability to set a timeout on a request. -func NewCreatePaymentMethodParamsWithTimeout(timeout time.Duration) *CreatePaymentMethodParams { - return &CreatePaymentMethodParams{ - timeout: timeout, - } -} - -// NewCreatePaymentMethodParamsWithContext creates a new CreatePaymentMethodParams object -// with the ability to set a context for a request. -func NewCreatePaymentMethodParamsWithContext(ctx context.Context) *CreatePaymentMethodParams { - return &CreatePaymentMethodParams{ - Context: ctx, - } -} - -// NewCreatePaymentMethodParamsWithHTTPClient creates a new CreatePaymentMethodParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreatePaymentMethodParamsWithHTTPClient(client *http.Client) *CreatePaymentMethodParams { - return &CreatePaymentMethodParams{ - HTTPClient: client, - } -} - -/* -CreatePaymentMethodParams contains all the parameters to send to the API endpoint - - for the create payment method operation. - - Typically these are written to a http.Request. -*/ -type CreatePaymentMethodParams struct { - - /* PaymentmethodRequest. - - An array of new PaymentMethod records - */ - PaymentmethodRequest *members_models.PaymentMethodRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create payment method params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreatePaymentMethodParams) WithDefaults() *CreatePaymentMethodParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create payment method params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreatePaymentMethodParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create payment method params -func (o *CreatePaymentMethodParams) WithTimeout(timeout time.Duration) *CreatePaymentMethodParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create payment method params -func (o *CreatePaymentMethodParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create payment method params -func (o *CreatePaymentMethodParams) WithContext(ctx context.Context) *CreatePaymentMethodParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create payment method params -func (o *CreatePaymentMethodParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create payment method params -func (o *CreatePaymentMethodParams) WithHTTPClient(client *http.Client) *CreatePaymentMethodParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create payment method params -func (o *CreatePaymentMethodParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithPaymentmethodRequest adds the paymentmethodRequest to the create payment method params -func (o *CreatePaymentMethodParams) WithPaymentmethodRequest(paymentmethodRequest *members_models.PaymentMethodRequest) *CreatePaymentMethodParams { - o.SetPaymentmethodRequest(paymentmethodRequest) - return o -} - -// SetPaymentmethodRequest adds the paymentmethodRequest to the create payment method params -func (o *CreatePaymentMethodParams) SetPaymentmethodRequest(paymentmethodRequest *members_models.PaymentMethodRequest) { - o.PaymentmethodRequest = paymentmethodRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreatePaymentMethodParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.PaymentmethodRequest != nil { - if err := r.SetBodyParam(o.PaymentmethodRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/payment_methods/create_payment_method_responses.go b/api/members/members_client/payment_methods/create_payment_method_responses.go deleted file mode 100644 index 71b036d..0000000 --- a/api/members/members_client/payment_methods/create_payment_method_responses.go +++ /dev/null @@ -1,92 +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 payment_methods - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreatePaymentMethodReader is a Reader for the CreatePaymentMethod structure. -type CreatePaymentMethodReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreatePaymentMethodReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreatePaymentMethodCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreatePaymentMethodCreated creates a CreatePaymentMethodCreated with default headers values -func NewCreatePaymentMethodCreated() *CreatePaymentMethodCreated { - return &CreatePaymentMethodCreated{} -} - -/* -CreatePaymentMethodCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreatePaymentMethodCreated struct { -} - -// IsSuccess returns true when this create payment method created response has a 2xx status code -func (o *CreatePaymentMethodCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create payment method created response has a 3xx status code -func (o *CreatePaymentMethodCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create payment method created response has a 4xx status code -func (o *CreatePaymentMethodCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create payment method created response has a 5xx status code -func (o *CreatePaymentMethodCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create payment method created response a status code equal to that given -func (o *CreatePaymentMethodCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create payment method created response -func (o *CreatePaymentMethodCreated) Code() int { - return 201 -} - -func (o *CreatePaymentMethodCreated) Error() string { - return fmt.Sprintf("[POST /paymentmethods][%d] createPaymentMethodCreated ", 201) -} - -func (o *CreatePaymentMethodCreated) String() string { - return fmt.Sprintf("[POST /paymentmethods][%d] createPaymentMethodCreated ", 201) -} - -func (o *CreatePaymentMethodCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/payment_methods/payment_methods_client.go b/api/members/members_client/payment_methods/payment_methods_client.go index ab6c74e..cd4438a 100644 --- a/api/members/members_client/payment_methods/payment_methods_client.go +++ b/api/members/members_client/payment_methods/payment_methods_client.go @@ -34,59 +34,21 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreatePaymentMethod(params *CreatePaymentMethodParams, opts ...ClientOption) (*CreatePaymentMethodCreated, error) + DeletePaymentMethod(params *DeletePaymentMethodParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeletePaymentMethodNoContent, error) - DeletePaymentMethod(params *DeletePaymentMethodParams, opts ...ClientOption) (*DeletePaymentMethodNoContent, error) + GetPaymentMethods(params *GetPaymentMethodsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPaymentMethodsOK, error) - GetPaymentMethods(params *GetPaymentMethodsParams, opts ...ClientOption) (*GetPaymentMethodsOK, error) + PostPaymentMethod(params *PostPaymentMethodParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPaymentMethodCreated, error) - UpdatePaymentMethod(params *UpdatePaymentMethodParams, opts ...ClientOption) (*UpdatePaymentMethodOK, error) + UpdatePaymentMethod(params *UpdatePaymentMethodParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdatePaymentMethodOK, error) SetTransport(transport runtime.ClientTransport) } -/* -CreatePaymentMethod creates a new payment method -*/ -func (a *Client) CreatePaymentMethod(params *CreatePaymentMethodParams, opts ...ClientOption) (*CreatePaymentMethodCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreatePaymentMethodParams() - } - op := &runtime.ClientOperation{ - ID: "createPaymentMethod", - Method: "POST", - PathPattern: "/paymentmethods", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreatePaymentMethodReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreatePaymentMethodCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createPaymentMethod: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DeletePaymentMethod deletes a payment method */ -func (a *Client) DeletePaymentMethod(params *DeletePaymentMethodParams, opts ...ClientOption) (*DeletePaymentMethodNoContent, error) { +func (a *Client) DeletePaymentMethod(params *DeletePaymentMethodParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeletePaymentMethodNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeletePaymentMethodParams() @@ -100,6 +62,7 @@ func (a *Client) DeletePaymentMethod(params *DeletePaymentMethodParams, opts ... Schemes: []string{"http"}, Params: params, Reader: &DeletePaymentMethodReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +87,7 @@ func (a *Client) DeletePaymentMethod(params *DeletePaymentMethodParams, opts ... /* GetPaymentMethods gets a list of payment methods */ -func (a *Client) GetPaymentMethods(params *GetPaymentMethodsParams, opts ...ClientOption) (*GetPaymentMethodsOK, error) { +func (a *Client) GetPaymentMethods(params *GetPaymentMethodsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPaymentMethodsOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetPaymentMethodsParams() @@ -138,6 +101,7 @@ func (a *Client) GetPaymentMethods(params *GetPaymentMethodsParams, opts ...Clie Schemes: []string{"http"}, Params: params, Reader: &GetPaymentMethodsReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -159,10 +123,49 @@ func (a *Client) GetPaymentMethods(params *GetPaymentMethodsParams, opts ...Clie panic(msg) } +/* +PostPaymentMethod creates a new payment method +*/ +func (a *Client) PostPaymentMethod(params *PostPaymentMethodParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostPaymentMethodCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostPaymentMethodParams() + } + op := &runtime.ClientOperation{ + ID: "postPaymentMethod", + Method: "POST", + PathPattern: "/paymentmethods", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostPaymentMethodReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostPaymentMethodCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postPaymentMethod: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UpdatePaymentMethod updates an existing payment method */ -func (a *Client) UpdatePaymentMethod(params *UpdatePaymentMethodParams, opts ...ClientOption) (*UpdatePaymentMethodOK, error) { +func (a *Client) UpdatePaymentMethod(params *UpdatePaymentMethodParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdatePaymentMethodOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdatePaymentMethodParams() @@ -176,6 +179,7 @@ func (a *Client) UpdatePaymentMethod(params *UpdatePaymentMethodParams, opts ... Schemes: []string{"http"}, Params: params, Reader: &UpdatePaymentMethodReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/payment_methods/post_payment_method_parameters.go b/api/members/members_client/payment_methods/post_payment_method_parameters.go new file mode 100644 index 0000000..81111db --- /dev/null +++ b/api/members/members_client/payment_methods/post_payment_method_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package payment_methods + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostPaymentMethodParams creates a new PostPaymentMethodParams 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 NewPostPaymentMethodParams() *PostPaymentMethodParams { + return &PostPaymentMethodParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostPaymentMethodParamsWithTimeout creates a new PostPaymentMethodParams object +// with the ability to set a timeout on a request. +func NewPostPaymentMethodParamsWithTimeout(timeout time.Duration) *PostPaymentMethodParams { + return &PostPaymentMethodParams{ + timeout: timeout, + } +} + +// NewPostPaymentMethodParamsWithContext creates a new PostPaymentMethodParams object +// with the ability to set a context for a request. +func NewPostPaymentMethodParamsWithContext(ctx context.Context) *PostPaymentMethodParams { + return &PostPaymentMethodParams{ + Context: ctx, + } +} + +// NewPostPaymentMethodParamsWithHTTPClient creates a new PostPaymentMethodParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostPaymentMethodParamsWithHTTPClient(client *http.Client) *PostPaymentMethodParams { + return &PostPaymentMethodParams{ + HTTPClient: client, + } +} + +/* +PostPaymentMethodParams contains all the parameters to send to the API endpoint + + for the post payment method operation. + + Typically these are written to a http.Request. +*/ +type PostPaymentMethodParams struct { + + /* PaymentmethodRequest. + + An array of new PaymentMethod records + */ + PaymentmethodRequest *members_models.PaymentMethodRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post payment method params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostPaymentMethodParams) WithDefaults() *PostPaymentMethodParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post payment method params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostPaymentMethodParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post payment method params +func (o *PostPaymentMethodParams) WithTimeout(timeout time.Duration) *PostPaymentMethodParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post payment method params +func (o *PostPaymentMethodParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post payment method params +func (o *PostPaymentMethodParams) WithContext(ctx context.Context) *PostPaymentMethodParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post payment method params +func (o *PostPaymentMethodParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post payment method params +func (o *PostPaymentMethodParams) WithHTTPClient(client *http.Client) *PostPaymentMethodParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post payment method params +func (o *PostPaymentMethodParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPaymentmethodRequest adds the paymentmethodRequest to the post payment method params +func (o *PostPaymentMethodParams) WithPaymentmethodRequest(paymentmethodRequest *members_models.PaymentMethodRequest) *PostPaymentMethodParams { + o.SetPaymentmethodRequest(paymentmethodRequest) + return o +} + +// SetPaymentmethodRequest adds the paymentmethodRequest to the post payment method params +func (o *PostPaymentMethodParams) SetPaymentmethodRequest(paymentmethodRequest *members_models.PaymentMethodRequest) { + o.PaymentmethodRequest = paymentmethodRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostPaymentMethodParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.PaymentmethodRequest != nil { + if err := r.SetBodyParam(o.PaymentmethodRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/payment_methods/post_payment_method_responses.go b/api/members/members_client/payment_methods/post_payment_method_responses.go new file mode 100644 index 0000000..dc1f0c4 --- /dev/null +++ b/api/members/members_client/payment_methods/post_payment_method_responses.go @@ -0,0 +1,92 @@ +// 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 payment_methods + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PostPaymentMethodReader is a Reader for the PostPaymentMethod structure. +type PostPaymentMethodReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostPaymentMethodReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostPaymentMethodCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostPaymentMethodCreated creates a PostPaymentMethodCreated with default headers values +func NewPostPaymentMethodCreated() *PostPaymentMethodCreated { + return &PostPaymentMethodCreated{} +} + +/* +PostPaymentMethodCreated describes a response with status code 201, with default header values. + +Created +*/ +type PostPaymentMethodCreated struct { +} + +// IsSuccess returns true when this post payment method created response has a 2xx status code +func (o *PostPaymentMethodCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post payment method created response has a 3xx status code +func (o *PostPaymentMethodCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post payment method created response has a 4xx status code +func (o *PostPaymentMethodCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this post payment method created response has a 5xx status code +func (o *PostPaymentMethodCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this post payment method created response a status code equal to that given +func (o *PostPaymentMethodCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the post payment method created response +func (o *PostPaymentMethodCreated) Code() int { + return 201 +} + +func (o *PostPaymentMethodCreated) Error() string { + return fmt.Sprintf("[POST /paymentmethods][%d] postPaymentMethodCreated ", 201) +} + +func (o *PostPaymentMethodCreated) String() string { + return fmt.Sprintf("[POST /paymentmethods][%d] postPaymentMethodCreated ", 201) +} + +func (o *PostPaymentMethodCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/members/members_client/research_project_companies/create_research_project_company_parameters.go b/api/members/members_client/research_project_companies/create_research_project_company_parameters.go deleted file mode 100644 index 2cd9ed7..0000000 --- a/api/members/members_client/research_project_companies/create_research_project_company_parameters.go +++ /dev/null @@ -1,157 +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 research_project_companies - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateResearchProjectCompanyParams creates a new CreateResearchProjectCompanyParams 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 NewCreateResearchProjectCompanyParams() *CreateResearchProjectCompanyParams { - return &CreateResearchProjectCompanyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateResearchProjectCompanyParamsWithTimeout creates a new CreateResearchProjectCompanyParams object -// with the ability to set a timeout on a request. -func NewCreateResearchProjectCompanyParamsWithTimeout(timeout time.Duration) *CreateResearchProjectCompanyParams { - return &CreateResearchProjectCompanyParams{ - timeout: timeout, - } -} - -// NewCreateResearchProjectCompanyParamsWithContext creates a new CreateResearchProjectCompanyParams object -// with the ability to set a context for a request. -func NewCreateResearchProjectCompanyParamsWithContext(ctx context.Context) *CreateResearchProjectCompanyParams { - return &CreateResearchProjectCompanyParams{ - Context: ctx, - } -} - -// NewCreateResearchProjectCompanyParamsWithHTTPClient creates a new CreateResearchProjectCompanyParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateResearchProjectCompanyParamsWithHTTPClient(client *http.Client) *CreateResearchProjectCompanyParams { - return &CreateResearchProjectCompanyParams{ - HTTPClient: client, - } -} - -/* -CreateResearchProjectCompanyParams contains all the parameters to send to the API endpoint - - for the create research project company operation. - - Typically these are written to a http.Request. -*/ -type CreateResearchProjectCompanyParams struct { - - /* ResearchprojectcompanyRequest. - - An array of new ResearchProjectCompany records - */ - ResearchprojectcompanyRequest *members_models.ResearchProjectCompanyRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create research project company params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateResearchProjectCompanyParams) WithDefaults() *CreateResearchProjectCompanyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create research project company params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateResearchProjectCompanyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create research project company params -func (o *CreateResearchProjectCompanyParams) WithTimeout(timeout time.Duration) *CreateResearchProjectCompanyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create research project company params -func (o *CreateResearchProjectCompanyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create research project company params -func (o *CreateResearchProjectCompanyParams) WithContext(ctx context.Context) *CreateResearchProjectCompanyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create research project company params -func (o *CreateResearchProjectCompanyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create research project company params -func (o *CreateResearchProjectCompanyParams) WithHTTPClient(client *http.Client) *CreateResearchProjectCompanyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create research project company params -func (o *CreateResearchProjectCompanyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithResearchprojectcompanyRequest adds the researchprojectcompanyRequest to the create research project company params -func (o *CreateResearchProjectCompanyParams) WithResearchprojectcompanyRequest(researchprojectcompanyRequest *members_models.ResearchProjectCompanyRequest) *CreateResearchProjectCompanyParams { - o.SetResearchprojectcompanyRequest(researchprojectcompanyRequest) - return o -} - -// SetResearchprojectcompanyRequest adds the researchprojectcompanyRequest to the create research project company params -func (o *CreateResearchProjectCompanyParams) SetResearchprojectcompanyRequest(researchprojectcompanyRequest *members_models.ResearchProjectCompanyRequest) { - o.ResearchprojectcompanyRequest = researchprojectcompanyRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateResearchProjectCompanyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.ResearchprojectcompanyRequest != nil { - if err := r.SetBodyParam(o.ResearchprojectcompanyRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/research_project_companies/create_research_project_company_responses.go b/api/members/members_client/research_project_companies/create_research_project_company_responses.go deleted file mode 100644 index 2935690..0000000 --- a/api/members/members_client/research_project_companies/create_research_project_company_responses.go +++ /dev/null @@ -1,92 +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 research_project_companies - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateResearchProjectCompanyReader is a Reader for the CreateResearchProjectCompany structure. -type CreateResearchProjectCompanyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateResearchProjectCompanyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateResearchProjectCompanyCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateResearchProjectCompanyCreated creates a CreateResearchProjectCompanyCreated with default headers values -func NewCreateResearchProjectCompanyCreated() *CreateResearchProjectCompanyCreated { - return &CreateResearchProjectCompanyCreated{} -} - -/* -CreateResearchProjectCompanyCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateResearchProjectCompanyCreated struct { -} - -// IsSuccess returns true when this create research project company created response has a 2xx status code -func (o *CreateResearchProjectCompanyCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create research project company created response has a 3xx status code -func (o *CreateResearchProjectCompanyCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create research project company created response has a 4xx status code -func (o *CreateResearchProjectCompanyCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create research project company created response has a 5xx status code -func (o *CreateResearchProjectCompanyCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create research project company created response a status code equal to that given -func (o *CreateResearchProjectCompanyCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create research project company created response -func (o *CreateResearchProjectCompanyCreated) Code() int { - return 201 -} - -func (o *CreateResearchProjectCompanyCreated) Error() string { - return fmt.Sprintf("[POST /researchprojectcompanys][%d] createResearchProjectCompanyCreated ", 201) -} - -func (o *CreateResearchProjectCompanyCreated) String() string { - return fmt.Sprintf("[POST /researchprojectcompanys][%d] createResearchProjectCompanyCreated ", 201) -} - -func (o *CreateResearchProjectCompanyCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/research_project_companies/post_research_project_company_parameters.go b/api/members/members_client/research_project_companies/post_research_project_company_parameters.go new file mode 100644 index 0000000..3af9cd1 --- /dev/null +++ b/api/members/members_client/research_project_companies/post_research_project_company_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package research_project_companies + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostResearchProjectCompanyParams creates a new PostResearchProjectCompanyParams 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 NewPostResearchProjectCompanyParams() *PostResearchProjectCompanyParams { + return &PostResearchProjectCompanyParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostResearchProjectCompanyParamsWithTimeout creates a new PostResearchProjectCompanyParams object +// with the ability to set a timeout on a request. +func NewPostResearchProjectCompanyParamsWithTimeout(timeout time.Duration) *PostResearchProjectCompanyParams { + return &PostResearchProjectCompanyParams{ + timeout: timeout, + } +} + +// NewPostResearchProjectCompanyParamsWithContext creates a new PostResearchProjectCompanyParams object +// with the ability to set a context for a request. +func NewPostResearchProjectCompanyParamsWithContext(ctx context.Context) *PostResearchProjectCompanyParams { + return &PostResearchProjectCompanyParams{ + Context: ctx, + } +} + +// NewPostResearchProjectCompanyParamsWithHTTPClient creates a new PostResearchProjectCompanyParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostResearchProjectCompanyParamsWithHTTPClient(client *http.Client) *PostResearchProjectCompanyParams { + return &PostResearchProjectCompanyParams{ + HTTPClient: client, + } +} + +/* +PostResearchProjectCompanyParams contains all the parameters to send to the API endpoint + + for the post research project company operation. + + Typically these are written to a http.Request. +*/ +type PostResearchProjectCompanyParams struct { + + /* ResearchprojectcompanyRequest. + + An array of new ResearchProjectCompany records + */ + ResearchprojectcompanyRequest *members_models.ResearchProjectCompanyRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post research project company params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostResearchProjectCompanyParams) WithDefaults() *PostResearchProjectCompanyParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post research project company params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostResearchProjectCompanyParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post research project company params +func (o *PostResearchProjectCompanyParams) WithTimeout(timeout time.Duration) *PostResearchProjectCompanyParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post research project company params +func (o *PostResearchProjectCompanyParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post research project company params +func (o *PostResearchProjectCompanyParams) WithContext(ctx context.Context) *PostResearchProjectCompanyParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post research project company params +func (o *PostResearchProjectCompanyParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post research project company params +func (o *PostResearchProjectCompanyParams) WithHTTPClient(client *http.Client) *PostResearchProjectCompanyParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post research project company params +func (o *PostResearchProjectCompanyParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithResearchprojectcompanyRequest adds the researchprojectcompanyRequest to the post research project company params +func (o *PostResearchProjectCompanyParams) WithResearchprojectcompanyRequest(researchprojectcompanyRequest *members_models.ResearchProjectCompanyRequest) *PostResearchProjectCompanyParams { + o.SetResearchprojectcompanyRequest(researchprojectcompanyRequest) + return o +} + +// SetResearchprojectcompanyRequest adds the researchprojectcompanyRequest to the post research project company params +func (o *PostResearchProjectCompanyParams) SetResearchprojectcompanyRequest(researchprojectcompanyRequest *members_models.ResearchProjectCompanyRequest) { + o.ResearchprojectcompanyRequest = researchprojectcompanyRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostResearchProjectCompanyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.ResearchprojectcompanyRequest != nil { + if err := r.SetBodyParam(o.ResearchprojectcompanyRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/research_project_companies/post_research_project_company_responses.go b/api/members/members_client/research_project_companies/post_research_project_company_responses.go new file mode 100644 index 0000000..6420453 --- /dev/null +++ b/api/members/members_client/research_project_companies/post_research_project_company_responses.go @@ -0,0 +1,92 @@ +// 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 research_project_companies + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PostResearchProjectCompanyReader is a Reader for the PostResearchProjectCompany structure. +type PostResearchProjectCompanyReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostResearchProjectCompanyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostResearchProjectCompanyCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostResearchProjectCompanyCreated creates a PostResearchProjectCompanyCreated with default headers values +func NewPostResearchProjectCompanyCreated() *PostResearchProjectCompanyCreated { + return &PostResearchProjectCompanyCreated{} +} + +/* +PostResearchProjectCompanyCreated describes a response with status code 201, with default header values. + +Created +*/ +type PostResearchProjectCompanyCreated struct { +} + +// IsSuccess returns true when this post research project company created response has a 2xx status code +func (o *PostResearchProjectCompanyCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post research project company created response has a 3xx status code +func (o *PostResearchProjectCompanyCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post research project company created response has a 4xx status code +func (o *PostResearchProjectCompanyCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this post research project company created response has a 5xx status code +func (o *PostResearchProjectCompanyCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this post research project company created response a status code equal to that given +func (o *PostResearchProjectCompanyCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the post research project company created response +func (o *PostResearchProjectCompanyCreated) Code() int { + return 201 +} + +func (o *PostResearchProjectCompanyCreated) Error() string { + return fmt.Sprintf("[POST /researchprojectcompanys][%d] postResearchProjectCompanyCreated ", 201) +} + +func (o *PostResearchProjectCompanyCreated) String() string { + return fmt.Sprintf("[POST /researchprojectcompanys][%d] postResearchProjectCompanyCreated ", 201) +} + +func (o *PostResearchProjectCompanyCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/members/members_client/research_project_companies/research_project_companies_client.go b/api/members/members_client/research_project_companies/research_project_companies_client.go index f392fbe..4c953d0 100644 --- a/api/members/members_client/research_project_companies/research_project_companies_client.go +++ b/api/members/members_client/research_project_companies/research_project_companies_client.go @@ -34,59 +34,21 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateResearchProjectCompany(params *CreateResearchProjectCompanyParams, opts ...ClientOption) (*CreateResearchProjectCompanyCreated, error) + DeleteResearchProjectCompany(params *DeleteResearchProjectCompanyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteResearchProjectCompanyNoContent, error) - DeleteResearchProjectCompany(params *DeleteResearchProjectCompanyParams, opts ...ClientOption) (*DeleteResearchProjectCompanyNoContent, error) + GetResearchProjectCompanies(params *GetResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectCompaniesOK, error) - GetResearchProjectCompanies(params *GetResearchProjectCompaniesParams, opts ...ClientOption) (*GetResearchProjectCompaniesOK, error) + PostResearchProjectCompany(params *PostResearchProjectCompanyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectCompanyCreated, error) - UpdateResearchProjectCompany(params *UpdateResearchProjectCompanyParams, opts ...ClientOption) (*UpdateResearchProjectCompanyOK, error) + UpdateResearchProjectCompany(params *UpdateResearchProjectCompanyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateResearchProjectCompanyOK, error) SetTransport(transport runtime.ClientTransport) } -/* -CreateResearchProjectCompany creates a new research project company -*/ -func (a *Client) CreateResearchProjectCompany(params *CreateResearchProjectCompanyParams, opts ...ClientOption) (*CreateResearchProjectCompanyCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateResearchProjectCompanyParams() - } - op := &runtime.ClientOperation{ - ID: "createResearchProjectCompany", - Method: "POST", - PathPattern: "/researchprojectcompanys", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateResearchProjectCompanyReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateResearchProjectCompanyCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createResearchProjectCompany: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DeleteResearchProjectCompany deletes a research project company */ -func (a *Client) DeleteResearchProjectCompany(params *DeleteResearchProjectCompanyParams, opts ...ClientOption) (*DeleteResearchProjectCompanyNoContent, error) { +func (a *Client) DeleteResearchProjectCompany(params *DeleteResearchProjectCompanyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteResearchProjectCompanyNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeleteResearchProjectCompanyParams() @@ -100,6 +62,7 @@ func (a *Client) DeleteResearchProjectCompany(params *DeleteResearchProjectCompa Schemes: []string{"http"}, Params: params, Reader: &DeleteResearchProjectCompanyReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +87,7 @@ func (a *Client) DeleteResearchProjectCompany(params *DeleteResearchProjectCompa /* GetResearchProjectCompanies gets a list of research project companies */ -func (a *Client) GetResearchProjectCompanies(params *GetResearchProjectCompaniesParams, opts ...ClientOption) (*GetResearchProjectCompaniesOK, error) { +func (a *Client) GetResearchProjectCompanies(params *GetResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectCompaniesOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetResearchProjectCompaniesParams() @@ -138,6 +101,7 @@ func (a *Client) GetResearchProjectCompanies(params *GetResearchProjectCompanies Schemes: []string{"http"}, Params: params, Reader: &GetResearchProjectCompaniesReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -159,10 +123,49 @@ func (a *Client) GetResearchProjectCompanies(params *GetResearchProjectCompanies panic(msg) } +/* +PostResearchProjectCompany creates a new research project company +*/ +func (a *Client) PostResearchProjectCompany(params *PostResearchProjectCompanyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectCompanyCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostResearchProjectCompanyParams() + } + op := &runtime.ClientOperation{ + ID: "postResearchProjectCompany", + Method: "POST", + PathPattern: "/researchprojectcompanys", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostResearchProjectCompanyReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostResearchProjectCompanyCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postResearchProjectCompany: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UpdateResearchProjectCompany updates an existing research project company */ -func (a *Client) UpdateResearchProjectCompany(params *UpdateResearchProjectCompanyParams, opts ...ClientOption) (*UpdateResearchProjectCompanyOK, error) { +func (a *Client) UpdateResearchProjectCompany(params *UpdateResearchProjectCompanyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateResearchProjectCompanyOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateResearchProjectCompanyParams() @@ -176,6 +179,7 @@ func (a *Client) UpdateResearchProjectCompany(params *UpdateResearchProjectCompa Schemes: []string{"http"}, Params: params, Reader: &UpdateResearchProjectCompanyReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/research_project_topics/create_research_project_topic_parameters.go b/api/members/members_client/research_project_topics/create_research_project_topic_parameters.go deleted file mode 100644 index 526e623..0000000 --- a/api/members/members_client/research_project_topics/create_research_project_topic_parameters.go +++ /dev/null @@ -1,157 +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 research_project_topics - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateResearchProjectTopicParams creates a new CreateResearchProjectTopicParams 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 NewCreateResearchProjectTopicParams() *CreateResearchProjectTopicParams { - return &CreateResearchProjectTopicParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateResearchProjectTopicParamsWithTimeout creates a new CreateResearchProjectTopicParams object -// with the ability to set a timeout on a request. -func NewCreateResearchProjectTopicParamsWithTimeout(timeout time.Duration) *CreateResearchProjectTopicParams { - return &CreateResearchProjectTopicParams{ - timeout: timeout, - } -} - -// NewCreateResearchProjectTopicParamsWithContext creates a new CreateResearchProjectTopicParams object -// with the ability to set a context for a request. -func NewCreateResearchProjectTopicParamsWithContext(ctx context.Context) *CreateResearchProjectTopicParams { - return &CreateResearchProjectTopicParams{ - Context: ctx, - } -} - -// NewCreateResearchProjectTopicParamsWithHTTPClient creates a new CreateResearchProjectTopicParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateResearchProjectTopicParamsWithHTTPClient(client *http.Client) *CreateResearchProjectTopicParams { - return &CreateResearchProjectTopicParams{ - HTTPClient: client, - } -} - -/* -CreateResearchProjectTopicParams contains all the parameters to send to the API endpoint - - for the create research project topic operation. - - Typically these are written to a http.Request. -*/ -type CreateResearchProjectTopicParams struct { - - /* ResearchprojecttopicRequest. - - An array of new ResearchProjectTopic records - */ - ResearchprojecttopicRequest *members_models.ResearchProjectTopicRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create research project topic params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateResearchProjectTopicParams) WithDefaults() *CreateResearchProjectTopicParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create research project topic params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateResearchProjectTopicParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create research project topic params -func (o *CreateResearchProjectTopicParams) WithTimeout(timeout time.Duration) *CreateResearchProjectTopicParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create research project topic params -func (o *CreateResearchProjectTopicParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create research project topic params -func (o *CreateResearchProjectTopicParams) WithContext(ctx context.Context) *CreateResearchProjectTopicParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create research project topic params -func (o *CreateResearchProjectTopicParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create research project topic params -func (o *CreateResearchProjectTopicParams) WithHTTPClient(client *http.Client) *CreateResearchProjectTopicParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create research project topic params -func (o *CreateResearchProjectTopicParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithResearchprojecttopicRequest adds the researchprojecttopicRequest to the create research project topic params -func (o *CreateResearchProjectTopicParams) WithResearchprojecttopicRequest(researchprojecttopicRequest *members_models.ResearchProjectTopicRequest) *CreateResearchProjectTopicParams { - o.SetResearchprojecttopicRequest(researchprojecttopicRequest) - return o -} - -// SetResearchprojecttopicRequest adds the researchprojecttopicRequest to the create research project topic params -func (o *CreateResearchProjectTopicParams) SetResearchprojecttopicRequest(researchprojecttopicRequest *members_models.ResearchProjectTopicRequest) { - o.ResearchprojecttopicRequest = researchprojecttopicRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateResearchProjectTopicParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.ResearchprojecttopicRequest != nil { - if err := r.SetBodyParam(o.ResearchprojecttopicRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/research_project_topics/create_research_project_topic_responses.go b/api/members/members_client/research_project_topics/create_research_project_topic_responses.go deleted file mode 100644 index c9ac693..0000000 --- a/api/members/members_client/research_project_topics/create_research_project_topic_responses.go +++ /dev/null @@ -1,92 +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 research_project_topics - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateResearchProjectTopicReader is a Reader for the CreateResearchProjectTopic structure. -type CreateResearchProjectTopicReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateResearchProjectTopicReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateResearchProjectTopicCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateResearchProjectTopicCreated creates a CreateResearchProjectTopicCreated with default headers values -func NewCreateResearchProjectTopicCreated() *CreateResearchProjectTopicCreated { - return &CreateResearchProjectTopicCreated{} -} - -/* -CreateResearchProjectTopicCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateResearchProjectTopicCreated struct { -} - -// IsSuccess returns true when this create research project topic created response has a 2xx status code -func (o *CreateResearchProjectTopicCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create research project topic created response has a 3xx status code -func (o *CreateResearchProjectTopicCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create research project topic created response has a 4xx status code -func (o *CreateResearchProjectTopicCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create research project topic created response has a 5xx status code -func (o *CreateResearchProjectTopicCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create research project topic created response a status code equal to that given -func (o *CreateResearchProjectTopicCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create research project topic created response -func (o *CreateResearchProjectTopicCreated) Code() int { - return 201 -} - -func (o *CreateResearchProjectTopicCreated) Error() string { - return fmt.Sprintf("[POST /researchprojecttopics][%d] createResearchProjectTopicCreated ", 201) -} - -func (o *CreateResearchProjectTopicCreated) String() string { - return fmt.Sprintf("[POST /researchprojecttopics][%d] createResearchProjectTopicCreated ", 201) -} - -func (o *CreateResearchProjectTopicCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/research_project_topics/post_research_project_topic_parameters.go b/api/members/members_client/research_project_topics/post_research_project_topic_parameters.go new file mode 100644 index 0000000..6ed07a4 --- /dev/null +++ b/api/members/members_client/research_project_topics/post_research_project_topic_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package research_project_topics + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostResearchProjectTopicParams creates a new PostResearchProjectTopicParams 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 NewPostResearchProjectTopicParams() *PostResearchProjectTopicParams { + return &PostResearchProjectTopicParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostResearchProjectTopicParamsWithTimeout creates a new PostResearchProjectTopicParams object +// with the ability to set a timeout on a request. +func NewPostResearchProjectTopicParamsWithTimeout(timeout time.Duration) *PostResearchProjectTopicParams { + return &PostResearchProjectTopicParams{ + timeout: timeout, + } +} + +// NewPostResearchProjectTopicParamsWithContext creates a new PostResearchProjectTopicParams object +// with the ability to set a context for a request. +func NewPostResearchProjectTopicParamsWithContext(ctx context.Context) *PostResearchProjectTopicParams { + return &PostResearchProjectTopicParams{ + Context: ctx, + } +} + +// NewPostResearchProjectTopicParamsWithHTTPClient creates a new PostResearchProjectTopicParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostResearchProjectTopicParamsWithHTTPClient(client *http.Client) *PostResearchProjectTopicParams { + return &PostResearchProjectTopicParams{ + HTTPClient: client, + } +} + +/* +PostResearchProjectTopicParams contains all the parameters to send to the API endpoint + + for the post research project topic operation. + + Typically these are written to a http.Request. +*/ +type PostResearchProjectTopicParams struct { + + /* ResearchprojecttopicRequest. + + An array of new ResearchProjectTopic records + */ + ResearchprojecttopicRequest *members_models.ResearchProjectTopicRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post research project topic params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostResearchProjectTopicParams) WithDefaults() *PostResearchProjectTopicParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post research project topic params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostResearchProjectTopicParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post research project topic params +func (o *PostResearchProjectTopicParams) WithTimeout(timeout time.Duration) *PostResearchProjectTopicParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post research project topic params +func (o *PostResearchProjectTopicParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post research project topic params +func (o *PostResearchProjectTopicParams) WithContext(ctx context.Context) *PostResearchProjectTopicParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post research project topic params +func (o *PostResearchProjectTopicParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post research project topic params +func (o *PostResearchProjectTopicParams) WithHTTPClient(client *http.Client) *PostResearchProjectTopicParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post research project topic params +func (o *PostResearchProjectTopicParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithResearchprojecttopicRequest adds the researchprojecttopicRequest to the post research project topic params +func (o *PostResearchProjectTopicParams) WithResearchprojecttopicRequest(researchprojecttopicRequest *members_models.ResearchProjectTopicRequest) *PostResearchProjectTopicParams { + o.SetResearchprojecttopicRequest(researchprojecttopicRequest) + return o +} + +// SetResearchprojecttopicRequest adds the researchprojecttopicRequest to the post research project topic params +func (o *PostResearchProjectTopicParams) SetResearchprojecttopicRequest(researchprojecttopicRequest *members_models.ResearchProjectTopicRequest) { + o.ResearchprojecttopicRequest = researchprojecttopicRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostResearchProjectTopicParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.ResearchprojecttopicRequest != nil { + if err := r.SetBodyParam(o.ResearchprojecttopicRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/research_project_topics/post_research_project_topic_responses.go b/api/members/members_client/research_project_topics/post_research_project_topic_responses.go new file mode 100644 index 0000000..a94238a --- /dev/null +++ b/api/members/members_client/research_project_topics/post_research_project_topic_responses.go @@ -0,0 +1,92 @@ +// 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 research_project_topics + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PostResearchProjectTopicReader is a Reader for the PostResearchProjectTopic structure. +type PostResearchProjectTopicReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostResearchProjectTopicReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostResearchProjectTopicCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostResearchProjectTopicCreated creates a PostResearchProjectTopicCreated with default headers values +func NewPostResearchProjectTopicCreated() *PostResearchProjectTopicCreated { + return &PostResearchProjectTopicCreated{} +} + +/* +PostResearchProjectTopicCreated describes a response with status code 201, with default header values. + +Created +*/ +type PostResearchProjectTopicCreated struct { +} + +// IsSuccess returns true when this post research project topic created response has a 2xx status code +func (o *PostResearchProjectTopicCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post research project topic created response has a 3xx status code +func (o *PostResearchProjectTopicCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post research project topic created response has a 4xx status code +func (o *PostResearchProjectTopicCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this post research project topic created response has a 5xx status code +func (o *PostResearchProjectTopicCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this post research project topic created response a status code equal to that given +func (o *PostResearchProjectTopicCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the post research project topic created response +func (o *PostResearchProjectTopicCreated) Code() int { + return 201 +} + +func (o *PostResearchProjectTopicCreated) Error() string { + return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicCreated ", 201) +} + +func (o *PostResearchProjectTopicCreated) String() string { + return fmt.Sprintf("[POST /researchprojecttopics][%d] postResearchProjectTopicCreated ", 201) +} + +func (o *PostResearchProjectTopicCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/members/members_client/research_project_topics/research_project_topics_client.go b/api/members/members_client/research_project_topics/research_project_topics_client.go index 36fd7a8..407fc84 100644 --- a/api/members/members_client/research_project_topics/research_project_topics_client.go +++ b/api/members/members_client/research_project_topics/research_project_topics_client.go @@ -34,59 +34,21 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateResearchProjectTopic(params *CreateResearchProjectTopicParams, opts ...ClientOption) (*CreateResearchProjectTopicCreated, error) + DeleteResearchProjectTopic(params *DeleteResearchProjectTopicParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteResearchProjectTopicNoContent, error) - DeleteResearchProjectTopic(params *DeleteResearchProjectTopicParams, opts ...ClientOption) (*DeleteResearchProjectTopicNoContent, error) + GetResearchProjectTopics(params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error) - GetResearchProjectTopics(params *GetResearchProjectTopicsParams, opts ...ClientOption) (*GetResearchProjectTopicsOK, error) + PostResearchProjectTopic(params *PostResearchProjectTopicParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectTopicCreated, error) - UpdateResearchProjectTopic(params *UpdateResearchProjectTopicParams, opts ...ClientOption) (*UpdateResearchProjectTopicOK, error) + UpdateResearchProjectTopic(params *UpdateResearchProjectTopicParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateResearchProjectTopicOK, error) SetTransport(transport runtime.ClientTransport) } -/* -CreateResearchProjectTopic creates a new research project topic -*/ -func (a *Client) CreateResearchProjectTopic(params *CreateResearchProjectTopicParams, opts ...ClientOption) (*CreateResearchProjectTopicCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateResearchProjectTopicParams() - } - op := &runtime.ClientOperation{ - ID: "createResearchProjectTopic", - Method: "POST", - PathPattern: "/researchprojecttopics", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateResearchProjectTopicReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateResearchProjectTopicCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createResearchProjectTopic: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DeleteResearchProjectTopic deletes a research project topic */ -func (a *Client) DeleteResearchProjectTopic(params *DeleteResearchProjectTopicParams, opts ...ClientOption) (*DeleteResearchProjectTopicNoContent, error) { +func (a *Client) DeleteResearchProjectTopic(params *DeleteResearchProjectTopicParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteResearchProjectTopicNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeleteResearchProjectTopicParams() @@ -100,6 +62,7 @@ func (a *Client) DeleteResearchProjectTopic(params *DeleteResearchProjectTopicPa Schemes: []string{"http"}, Params: params, Reader: &DeleteResearchProjectTopicReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +87,7 @@ func (a *Client) DeleteResearchProjectTopic(params *DeleteResearchProjectTopicPa /* GetResearchProjectTopics gets a list of research project topics */ -func (a *Client) GetResearchProjectTopics(params *GetResearchProjectTopicsParams, opts ...ClientOption) (*GetResearchProjectTopicsOK, error) { +func (a *Client) GetResearchProjectTopics(params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetResearchProjectTopicsParams() @@ -138,6 +101,7 @@ func (a *Client) GetResearchProjectTopics(params *GetResearchProjectTopicsParams Schemes: []string{"http"}, Params: params, Reader: &GetResearchProjectTopicsReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -159,10 +123,49 @@ func (a *Client) GetResearchProjectTopics(params *GetResearchProjectTopicsParams panic(msg) } +/* +PostResearchProjectTopic creates a new research project topic +*/ +func (a *Client) PostResearchProjectTopic(params *PostResearchProjectTopicParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectTopicCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostResearchProjectTopicParams() + } + op := &runtime.ClientOperation{ + ID: "postResearchProjectTopic", + Method: "POST", + PathPattern: "/researchprojecttopics", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostResearchProjectTopicReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostResearchProjectTopicCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postResearchProjectTopic: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UpdateResearchProjectTopic updates an existing research project topic */ -func (a *Client) UpdateResearchProjectTopic(params *UpdateResearchProjectTopicParams, opts ...ClientOption) (*UpdateResearchProjectTopicOK, error) { +func (a *Client) UpdateResearchProjectTopic(params *UpdateResearchProjectTopicParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateResearchProjectTopicOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateResearchProjectTopicParams() @@ -176,6 +179,7 @@ func (a *Client) UpdateResearchProjectTopic(params *UpdateResearchProjectTopicPa Schemes: []string{"http"}, Params: params, Reader: &UpdateResearchProjectTopicReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/research_projects/create_research_project_parameters.go b/api/members/members_client/research_projects/create_research_project_parameters.go deleted file mode 100644 index 3c43c50..0000000 --- a/api/members/members_client/research_projects/create_research_project_parameters.go +++ /dev/null @@ -1,157 +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 research_projects - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateResearchProjectParams creates a new CreateResearchProjectParams 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 NewCreateResearchProjectParams() *CreateResearchProjectParams { - return &CreateResearchProjectParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateResearchProjectParamsWithTimeout creates a new CreateResearchProjectParams object -// with the ability to set a timeout on a request. -func NewCreateResearchProjectParamsWithTimeout(timeout time.Duration) *CreateResearchProjectParams { - return &CreateResearchProjectParams{ - timeout: timeout, - } -} - -// NewCreateResearchProjectParamsWithContext creates a new CreateResearchProjectParams object -// with the ability to set a context for a request. -func NewCreateResearchProjectParamsWithContext(ctx context.Context) *CreateResearchProjectParams { - return &CreateResearchProjectParams{ - Context: ctx, - } -} - -// NewCreateResearchProjectParamsWithHTTPClient creates a new CreateResearchProjectParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateResearchProjectParamsWithHTTPClient(client *http.Client) *CreateResearchProjectParams { - return &CreateResearchProjectParams{ - HTTPClient: client, - } -} - -/* -CreateResearchProjectParams contains all the parameters to send to the API endpoint - - for the create research project operation. - - Typically these are written to a http.Request. -*/ -type CreateResearchProjectParams struct { - - /* ResearchprojectRequest. - - An array of new ResearchProject records - */ - ResearchprojectRequest *members_models.ResearchProjectRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create research project params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateResearchProjectParams) WithDefaults() *CreateResearchProjectParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create research project params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateResearchProjectParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create research project params -func (o *CreateResearchProjectParams) WithTimeout(timeout time.Duration) *CreateResearchProjectParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create research project params -func (o *CreateResearchProjectParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create research project params -func (o *CreateResearchProjectParams) WithContext(ctx context.Context) *CreateResearchProjectParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create research project params -func (o *CreateResearchProjectParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create research project params -func (o *CreateResearchProjectParams) WithHTTPClient(client *http.Client) *CreateResearchProjectParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create research project params -func (o *CreateResearchProjectParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithResearchprojectRequest adds the researchprojectRequest to the create research project params -func (o *CreateResearchProjectParams) WithResearchprojectRequest(researchprojectRequest *members_models.ResearchProjectRequest) *CreateResearchProjectParams { - o.SetResearchprojectRequest(researchprojectRequest) - return o -} - -// SetResearchprojectRequest adds the researchprojectRequest to the create research project params -func (o *CreateResearchProjectParams) SetResearchprojectRequest(researchprojectRequest *members_models.ResearchProjectRequest) { - o.ResearchprojectRequest = researchprojectRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateResearchProjectParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.ResearchprojectRequest != nil { - if err := r.SetBodyParam(o.ResearchprojectRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/research_projects/create_research_project_responses.go b/api/members/members_client/research_projects/create_research_project_responses.go deleted file mode 100644 index f0f8220..0000000 --- a/api/members/members_client/research_projects/create_research_project_responses.go +++ /dev/null @@ -1,92 +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 research_projects - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateResearchProjectReader is a Reader for the CreateResearchProject structure. -type CreateResearchProjectReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateResearchProjectReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateResearchProjectCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateResearchProjectCreated creates a CreateResearchProjectCreated with default headers values -func NewCreateResearchProjectCreated() *CreateResearchProjectCreated { - return &CreateResearchProjectCreated{} -} - -/* -CreateResearchProjectCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateResearchProjectCreated struct { -} - -// IsSuccess returns true when this create research project created response has a 2xx status code -func (o *CreateResearchProjectCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create research project created response has a 3xx status code -func (o *CreateResearchProjectCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create research project created response has a 4xx status code -func (o *CreateResearchProjectCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create research project created response has a 5xx status code -func (o *CreateResearchProjectCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create research project created response a status code equal to that given -func (o *CreateResearchProjectCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create research project created response -func (o *CreateResearchProjectCreated) Code() int { - return 201 -} - -func (o *CreateResearchProjectCreated) Error() string { - return fmt.Sprintf("[POST /researchprojects][%d] createResearchProjectCreated ", 201) -} - -func (o *CreateResearchProjectCreated) String() string { - return fmt.Sprintf("[POST /researchprojects][%d] createResearchProjectCreated ", 201) -} - -func (o *CreateResearchProjectCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/research_projects/post_research_project_parameters.go b/api/members/members_client/research_projects/post_research_project_parameters.go new file mode 100644 index 0000000..128f641 --- /dev/null +++ b/api/members/members_client/research_projects/post_research_project_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package research_projects + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostResearchProjectParams creates a new PostResearchProjectParams 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 NewPostResearchProjectParams() *PostResearchProjectParams { + return &PostResearchProjectParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostResearchProjectParamsWithTimeout creates a new PostResearchProjectParams object +// with the ability to set a timeout on a request. +func NewPostResearchProjectParamsWithTimeout(timeout time.Duration) *PostResearchProjectParams { + return &PostResearchProjectParams{ + timeout: timeout, + } +} + +// NewPostResearchProjectParamsWithContext creates a new PostResearchProjectParams object +// with the ability to set a context for a request. +func NewPostResearchProjectParamsWithContext(ctx context.Context) *PostResearchProjectParams { + return &PostResearchProjectParams{ + Context: ctx, + } +} + +// NewPostResearchProjectParamsWithHTTPClient creates a new PostResearchProjectParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostResearchProjectParamsWithHTTPClient(client *http.Client) *PostResearchProjectParams { + return &PostResearchProjectParams{ + HTTPClient: client, + } +} + +/* +PostResearchProjectParams contains all the parameters to send to the API endpoint + + for the post research project operation. + + Typically these are written to a http.Request. +*/ +type PostResearchProjectParams struct { + + /* ResearchprojectRequest. + + An array of new ResearchProject records + */ + ResearchprojectRequest *members_models.ResearchProjectRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post research project params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostResearchProjectParams) WithDefaults() *PostResearchProjectParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post research project params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostResearchProjectParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post research project params +func (o *PostResearchProjectParams) WithTimeout(timeout time.Duration) *PostResearchProjectParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post research project params +func (o *PostResearchProjectParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post research project params +func (o *PostResearchProjectParams) WithContext(ctx context.Context) *PostResearchProjectParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post research project params +func (o *PostResearchProjectParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post research project params +func (o *PostResearchProjectParams) WithHTTPClient(client *http.Client) *PostResearchProjectParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post research project params +func (o *PostResearchProjectParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithResearchprojectRequest adds the researchprojectRequest to the post research project params +func (o *PostResearchProjectParams) WithResearchprojectRequest(researchprojectRequest *members_models.ResearchProjectRequest) *PostResearchProjectParams { + o.SetResearchprojectRequest(researchprojectRequest) + return o +} + +// SetResearchprojectRequest adds the researchprojectRequest to the post research project params +func (o *PostResearchProjectParams) SetResearchprojectRequest(researchprojectRequest *members_models.ResearchProjectRequest) { + o.ResearchprojectRequest = researchprojectRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostResearchProjectParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.ResearchprojectRequest != nil { + if err := r.SetBodyParam(o.ResearchprojectRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/research_projects/post_research_project_responses.go b/api/members/members_client/research_projects/post_research_project_responses.go new file mode 100644 index 0000000..3f35f5a --- /dev/null +++ b/api/members/members_client/research_projects/post_research_project_responses.go @@ -0,0 +1,92 @@ +// 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 research_projects + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PostResearchProjectReader is a Reader for the PostResearchProject structure. +type PostResearchProjectReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostResearchProjectReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostResearchProjectCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostResearchProjectCreated creates a PostResearchProjectCreated with default headers values +func NewPostResearchProjectCreated() *PostResearchProjectCreated { + return &PostResearchProjectCreated{} +} + +/* +PostResearchProjectCreated describes a response with status code 201, with default header values. + +Created +*/ +type PostResearchProjectCreated struct { +} + +// IsSuccess returns true when this post research project created response has a 2xx status code +func (o *PostResearchProjectCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post research project created response has a 3xx status code +func (o *PostResearchProjectCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post research project created response has a 4xx status code +func (o *PostResearchProjectCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this post research project created response has a 5xx status code +func (o *PostResearchProjectCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this post research project created response a status code equal to that given +func (o *PostResearchProjectCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the post research project created response +func (o *PostResearchProjectCreated) Code() int { + return 201 +} + +func (o *PostResearchProjectCreated) Error() string { + return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectCreated ", 201) +} + +func (o *PostResearchProjectCreated) String() string { + return fmt.Sprintf("[POST /researchprojects][%d] postResearchProjectCreated ", 201) +} + +func (o *PostResearchProjectCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/members/members_client/research_projects/research_projects_client.go b/api/members/members_client/research_projects/research_projects_client.go index bdaf93c..8c9c3e4 100644 --- a/api/members/members_client/research_projects/research_projects_client.go +++ b/api/members/members_client/research_projects/research_projects_client.go @@ -34,59 +34,21 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateResearchProject(params *CreateResearchProjectParams, opts ...ClientOption) (*CreateResearchProjectCreated, error) + DeleteResearchProject(params *DeleteResearchProjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteResearchProjectNoContent, error) - DeleteResearchProject(params *DeleteResearchProjectParams, opts ...ClientOption) (*DeleteResearchProjectNoContent, error) + GetResearchProjects(params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error) - GetResearchProjects(params *GetResearchProjectsParams, opts ...ClientOption) (*GetResearchProjectsOK, error) + PostResearchProject(params *PostResearchProjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectCreated, error) - UpdateResearchProject(params *UpdateResearchProjectParams, opts ...ClientOption) (*UpdateResearchProjectOK, error) + UpdateResearchProject(params *UpdateResearchProjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateResearchProjectOK, error) SetTransport(transport runtime.ClientTransport) } -/* -CreateResearchProject creates a new research project -*/ -func (a *Client) CreateResearchProject(params *CreateResearchProjectParams, opts ...ClientOption) (*CreateResearchProjectCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateResearchProjectParams() - } - op := &runtime.ClientOperation{ - ID: "createResearchProject", - Method: "POST", - PathPattern: "/researchprojects", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateResearchProjectReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateResearchProjectCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createResearchProject: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DeleteResearchProject deletes a research project */ -func (a *Client) DeleteResearchProject(params *DeleteResearchProjectParams, opts ...ClientOption) (*DeleteResearchProjectNoContent, error) { +func (a *Client) DeleteResearchProject(params *DeleteResearchProjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteResearchProjectNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeleteResearchProjectParams() @@ -100,6 +62,7 @@ func (a *Client) DeleteResearchProject(params *DeleteResearchProjectParams, opts Schemes: []string{"http"}, Params: params, Reader: &DeleteResearchProjectReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +87,7 @@ func (a *Client) DeleteResearchProject(params *DeleteResearchProjectParams, opts /* GetResearchProjects gets a list of research projects */ -func (a *Client) GetResearchProjects(params *GetResearchProjectsParams, opts ...ClientOption) (*GetResearchProjectsOK, error) { +func (a *Client) GetResearchProjects(params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetResearchProjectsParams() @@ -138,6 +101,7 @@ func (a *Client) GetResearchProjects(params *GetResearchProjectsParams, opts ... Schemes: []string{"http"}, Params: params, Reader: &GetResearchProjectsReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -159,10 +123,49 @@ func (a *Client) GetResearchProjects(params *GetResearchProjectsParams, opts ... panic(msg) } +/* +PostResearchProject creates a new research project +*/ +func (a *Client) PostResearchProject(params *PostResearchProjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostResearchProjectParams() + } + op := &runtime.ClientOperation{ + ID: "postResearchProject", + Method: "POST", + PathPattern: "/researchprojects", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostResearchProjectReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostResearchProjectCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postResearchProject: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UpdateResearchProject updates an existing research project */ -func (a *Client) UpdateResearchProject(params *UpdateResearchProjectParams, opts ...ClientOption) (*UpdateResearchProjectOK, error) { +func (a *Client) UpdateResearchProject(params *UpdateResearchProjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateResearchProjectOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateResearchProjectParams() @@ -176,6 +179,7 @@ func (a *Client) UpdateResearchProject(params *UpdateResearchProjectParams, opts Schemes: []string{"http"}, Params: params, Reader: &UpdateResearchProjectReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/templates/get_templates_responses.go b/api/members/members_client/templates/get_templates_responses.go index 19ab2e9..3339985 100644 --- a/api/members/members_client/templates/get_templates_responses.go +++ b/api/members/members_client/templates/get_templates_responses.go @@ -292,8 +292,6 @@ GetTemplatesNotFound describes a response with status code 404, with default hea Resource was not found */ type GetTemplatesNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -341,13 +339,6 @@ func (o *GetTemplatesNotFound) GetPayload() *members_models.Error { func (o *GetTemplatesNotFound) 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 @@ -437,8 +428,6 @@ GetTemplatesInternalServerError describes a response with status code 500, with Server Internal Error */ type GetTemplatesInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -486,13 +475,6 @@ func (o *GetTemplatesInternalServerError) GetPayload() *members_models.Error { func (o *GetTemplatesInternalServerError) 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 diff --git a/api/members/members_client/templates/post_templates_responses.go b/api/members/members_client/templates/post_templates_responses.go index 48428da..e15d233 100644 --- a/api/members/members_client/templates/post_templates_responses.go +++ b/api/members/members_client/templates/post_templates_responses.go @@ -292,8 +292,6 @@ PostTemplatesNotFound describes a response with status code 404, with default he Resource was not found */ type PostTemplatesNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -341,13 +339,6 @@ func (o *PostTemplatesNotFound) GetPayload() *members_models.Error { func (o *PostTemplatesNotFound) 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 @@ -437,8 +428,6 @@ PostTemplatesInternalServerError describes a response with status code 500, with Server Internal Error */ type PostTemplatesInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -486,13 +475,6 @@ func (o *PostTemplatesInternalServerError) GetPayload() *members_models.Error { func (o *PostTemplatesInternalServerError) 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 diff --git a/api/members/members_client/tenants/get_tenants_responses.go b/api/members/members_client/tenants/get_tenants_responses.go index a31e23d..cd926c3 100644 --- a/api/members/members_client/tenants/get_tenants_responses.go +++ b/api/members/members_client/tenants/get_tenants_responses.go @@ -79,8 +79,6 @@ GetTenantsOK describes a response with status code 200, with default header valu Response with Tenant objects */ type GetTenantsOK struct { - AccessControlAllowOrigin string - Payload *members_models.TenantResponse } @@ -128,13 +126,6 @@ func (o *GetTenantsOK) GetPayload() *members_models.TenantResponse { func (o *GetTenantsOK) 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.TenantResponse) // response payload @@ -301,8 +292,6 @@ GetTenantsNotFound describes a response with status code 404, with default heade Resource was not found */ type GetTenantsNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -350,13 +339,6 @@ func (o *GetTenantsNotFound) GetPayload() *members_models.Error { func (o *GetTenantsNotFound) 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 @@ -446,8 +428,6 @@ GetTenantsInternalServerError describes a response with status code 500, with de Server Internal Error */ type GetTenantsInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -495,13 +475,6 @@ func (o *GetTenantsInternalServerError) GetPayload() *members_models.Error { func (o *GetTenantsInternalServerError) 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 diff --git a/api/members/members_client/tenants/post_tenants_responses.go b/api/members/members_client/tenants/post_tenants_responses.go index 27f6c21..53a9307 100644 --- a/api/members/members_client/tenants/post_tenants_responses.go +++ b/api/members/members_client/tenants/post_tenants_responses.go @@ -79,8 +79,6 @@ PostTenantsOK describes a response with status code 200, with default header val Response with Tenant objects */ type PostTenantsOK struct { - AccessControlAllowOrigin string - Payload *members_models.TenantResponse } @@ -128,13 +126,6 @@ func (o *PostTenantsOK) GetPayload() *members_models.TenantResponse { func (o *PostTenantsOK) 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.TenantResponse) // response payload @@ -301,8 +292,6 @@ PostTenantsNotFound describes a response with status code 404, with default head Resource was not found */ type PostTenantsNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -350,13 +339,6 @@ func (o *PostTenantsNotFound) GetPayload() *members_models.Error { func (o *PostTenantsNotFound) 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 @@ -446,8 +428,6 @@ PostTenantsInternalServerError describes a response with status code 500, with d Server Internal Error */ type PostTenantsInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -495,13 +475,6 @@ func (o *PostTenantsInternalServerError) GetPayload() *members_models.Error { func (o *PostTenantsInternalServerError) 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 diff --git a/api/members/members_client/tenants/put_tenants_responses.go b/api/members/members_client/tenants/put_tenants_responses.go index 454dd25..e18d4aa 100644 --- a/api/members/members_client/tenants/put_tenants_responses.go +++ b/api/members/members_client/tenants/put_tenants_responses.go @@ -79,8 +79,6 @@ PutTenantsOK describes a response with status code 200, with default header valu Response with Tenant objects */ type PutTenantsOK struct { - AccessControlAllowOrigin string - Payload *members_models.TenantResponse } @@ -128,13 +126,6 @@ func (o *PutTenantsOK) GetPayload() *members_models.TenantResponse { func (o *PutTenantsOK) 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.TenantResponse) // response payload @@ -301,8 +292,6 @@ PutTenantsNotFound describes a response with status code 404, with default heade Resource was not found */ type PutTenantsNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -350,13 +339,6 @@ func (o *PutTenantsNotFound) GetPayload() *members_models.Error { func (o *PutTenantsNotFound) 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 @@ -446,8 +428,6 @@ PutTenantsInternalServerError describes a response with status code 500, with de Server Internal Error */ type PutTenantsInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -495,13 +475,6 @@ func (o *PutTenantsInternalServerError) GetPayload() *members_models.Error { func (o *PutTenantsInternalServerError) 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 diff --git a/api/members/members_client/tickets/create_ticket_parameters.go b/api/members/members_client/tickets/create_ticket_parameters.go deleted file mode 100644 index 8a1e1e1..0000000 --- a/api/members/members_client/tickets/create_ticket_parameters.go +++ /dev/null @@ -1,157 +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 - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateTicketParams creates a new CreateTicketParams 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 NewCreateTicketParams() *CreateTicketParams { - return &CreateTicketParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateTicketParamsWithTimeout creates a new CreateTicketParams object -// with the ability to set a timeout on a request. -func NewCreateTicketParamsWithTimeout(timeout time.Duration) *CreateTicketParams { - return &CreateTicketParams{ - timeout: timeout, - } -} - -// NewCreateTicketParamsWithContext creates a new CreateTicketParams object -// with the ability to set a context for a request. -func NewCreateTicketParamsWithContext(ctx context.Context) *CreateTicketParams { - return &CreateTicketParams{ - Context: ctx, - } -} - -// NewCreateTicketParamsWithHTTPClient creates a new CreateTicketParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateTicketParamsWithHTTPClient(client *http.Client) *CreateTicketParams { - return &CreateTicketParams{ - HTTPClient: client, - } -} - -/* -CreateTicketParams contains all the parameters to send to the API endpoint - - for the create ticket operation. - - Typically these are written to a http.Request. -*/ -type CreateTicketParams struct { - - /* TicketRequest. - - An array of new Ticket records - */ - TicketRequest *members_models.TicketRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create ticket params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTicketParams) WithDefaults() *CreateTicketParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create ticket params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTicketParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create ticket params -func (o *CreateTicketParams) WithTimeout(timeout time.Duration) *CreateTicketParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create ticket params -func (o *CreateTicketParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create ticket params -func (o *CreateTicketParams) WithContext(ctx context.Context) *CreateTicketParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create ticket params -func (o *CreateTicketParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create ticket params -func (o *CreateTicketParams) WithHTTPClient(client *http.Client) *CreateTicketParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create ticket params -func (o *CreateTicketParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithTicketRequest adds the ticketRequest to the create ticket params -func (o *CreateTicketParams) WithTicketRequest(ticketRequest *members_models.TicketRequest) *CreateTicketParams { - o.SetTicketRequest(ticketRequest) - return o -} - -// SetTicketRequest adds the ticketRequest to the create ticket params -func (o *CreateTicketParams) SetTicketRequest(ticketRequest *members_models.TicketRequest) { - o.TicketRequest = ticketRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateTicketParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.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 -} diff --git a/api/members/members_client/tickets/create_ticket_responses.go b/api/members/members_client/tickets/create_ticket_responses.go deleted file mode 100644 index b0b7a6f..0000000 --- a/api/members/members_client/tickets/create_ticket_responses.go +++ /dev/null @@ -1,92 +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 - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateTicketReader is a Reader for the CreateTicket structure. -type CreateTicketReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateTicketReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateTicketCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateTicketCreated creates a CreateTicketCreated with default headers values -func NewCreateTicketCreated() *CreateTicketCreated { - return &CreateTicketCreated{} -} - -/* -CreateTicketCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateTicketCreated struct { -} - -// IsSuccess returns true when this create ticket created response has a 2xx status code -func (o *CreateTicketCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create ticket created response has a 3xx status code -func (o *CreateTicketCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create ticket created response has a 4xx status code -func (o *CreateTicketCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create ticket created response has a 5xx status code -func (o *CreateTicketCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create ticket created response a status code equal to that given -func (o *CreateTicketCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create ticket created response -func (o *CreateTicketCreated) Code() int { - return 201 -} - -func (o *CreateTicketCreated) Error() string { - return fmt.Sprintf("[POST /tickets][%d] createTicketCreated ", 201) -} - -func (o *CreateTicketCreated) String() string { - return fmt.Sprintf("[POST /tickets][%d] createTicketCreated ", 201) -} - -func (o *CreateTicketCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/tickets/post_ticket_parameters.go b/api/members/members_client/tickets/post_ticket_parameters.go new file mode 100644 index 0000000..3979f81 --- /dev/null +++ b/api/members/members_client/tickets/post_ticket_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tickets + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostTicketParams creates a new PostTicketParams 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 NewPostTicketParams() *PostTicketParams { + return &PostTicketParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostTicketParamsWithTimeout creates a new PostTicketParams object +// with the ability to set a timeout on a request. +func NewPostTicketParamsWithTimeout(timeout time.Duration) *PostTicketParams { + return &PostTicketParams{ + timeout: timeout, + } +} + +// NewPostTicketParamsWithContext creates a new PostTicketParams object +// with the ability to set a context for a request. +func NewPostTicketParamsWithContext(ctx context.Context) *PostTicketParams { + return &PostTicketParams{ + Context: ctx, + } +} + +// NewPostTicketParamsWithHTTPClient creates a new PostTicketParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostTicketParamsWithHTTPClient(client *http.Client) *PostTicketParams { + return &PostTicketParams{ + HTTPClient: client, + } +} + +/* +PostTicketParams contains all the parameters to send to the API endpoint + + for the post ticket operation. + + Typically these are written to a http.Request. +*/ +type PostTicketParams struct { + + /* TicketRequest. + + An array of new Ticket records + */ + TicketRequest *members_models.TicketRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post ticket params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostTicketParams) WithDefaults() *PostTicketParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post ticket params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostTicketParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post ticket params +func (o *PostTicketParams) WithTimeout(timeout time.Duration) *PostTicketParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post ticket params +func (o *PostTicketParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post ticket params +func (o *PostTicketParams) WithContext(ctx context.Context) *PostTicketParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post ticket params +func (o *PostTicketParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post ticket params +func (o *PostTicketParams) WithHTTPClient(client *http.Client) *PostTicketParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post ticket params +func (o *PostTicketParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTicketRequest adds the ticketRequest to the post ticket params +func (o *PostTicketParams) WithTicketRequest(ticketRequest *members_models.TicketRequest) *PostTicketParams { + o.SetTicketRequest(ticketRequest) + return o +} + +// SetTicketRequest adds the ticketRequest to the post ticket params +func (o *PostTicketParams) SetTicketRequest(ticketRequest *members_models.TicketRequest) { + o.TicketRequest = ticketRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostTicketParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.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 +} diff --git a/api/members/members_client/tickets/post_ticket_responses.go b/api/members/members_client/tickets/post_ticket_responses.go new file mode 100644 index 0000000..df334d2 --- /dev/null +++ b/api/members/members_client/tickets/post_ticket_responses.go @@ -0,0 +1,92 @@ +// 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 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PostTicketReader is a Reader for the PostTicket structure. +type PostTicketReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostTicketReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostTicketCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostTicketCreated creates a PostTicketCreated with default headers values +func NewPostTicketCreated() *PostTicketCreated { + return &PostTicketCreated{} +} + +/* +PostTicketCreated describes a response with status code 201, with default header values. + +Created +*/ +type PostTicketCreated struct { +} + +// IsSuccess returns true when this post ticket created response has a 2xx status code +func (o *PostTicketCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post ticket created response has a 3xx status code +func (o *PostTicketCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post ticket created response has a 4xx status code +func (o *PostTicketCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this post ticket created response has a 5xx status code +func (o *PostTicketCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this post ticket created response a status code equal to that given +func (o *PostTicketCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the post ticket created response +func (o *PostTicketCreated) Code() int { + return 201 +} + +func (o *PostTicketCreated) Error() string { + return fmt.Sprintf("[POST /tickets][%d] postTicketCreated ", 201) +} + +func (o *PostTicketCreated) String() string { + return fmt.Sprintf("[POST /tickets][%d] postTicketCreated ", 201) +} + +func (o *PostTicketCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/members/members_client/tickets/tickets_client.go b/api/members/members_client/tickets/tickets_client.go index 3792d6e..6f44171 100644 --- a/api/members/members_client/tickets/tickets_client.go +++ b/api/members/members_client/tickets/tickets_client.go @@ -34,59 +34,21 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateTicket(params *CreateTicketParams, opts ...ClientOption) (*CreateTicketCreated, error) + DeleteTicket(params *DeleteTicketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteTicketNoContent, error) - DeleteTicket(params *DeleteTicketParams, opts ...ClientOption) (*DeleteTicketNoContent, error) + GetTickets(params *GetTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTicketsOK, error) - GetTickets(params *GetTicketsParams, opts ...ClientOption) (*GetTicketsOK, error) + PostTicket(params *PostTicketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostTicketCreated, error) - UpdateTicket(params *UpdateTicketParams, opts ...ClientOption) (*UpdateTicketOK, error) + UpdateTicket(params *UpdateTicketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTicketOK, error) SetTransport(transport runtime.ClientTransport) } -/* -CreateTicket creates a new ticket -*/ -func (a *Client) CreateTicket(params *CreateTicketParams, opts ...ClientOption) (*CreateTicketCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateTicketParams() - } - op := &runtime.ClientOperation{ - ID: "createTicket", - Method: "POST", - PathPattern: "/tickets", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateTicketReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateTicketCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createTicket: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DeleteTicket deletes a ticket */ -func (a *Client) DeleteTicket(params *DeleteTicketParams, opts ...ClientOption) (*DeleteTicketNoContent, error) { +func (a *Client) DeleteTicket(params *DeleteTicketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteTicketNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeleteTicketParams() @@ -100,6 +62,7 @@ func (a *Client) DeleteTicket(params *DeleteTicketParams, opts ...ClientOption) Schemes: []string{"http"}, Params: params, Reader: &DeleteTicketReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +87,7 @@ func (a *Client) DeleteTicket(params *DeleteTicketParams, opts ...ClientOption) /* GetTickets gets a list of tickets */ -func (a *Client) GetTickets(params *GetTicketsParams, opts ...ClientOption) (*GetTicketsOK, error) { +func (a *Client) GetTickets(params *GetTicketsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTicketsOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetTicketsParams() @@ -138,6 +101,7 @@ func (a *Client) GetTickets(params *GetTicketsParams, opts ...ClientOption) (*Ge Schemes: []string{"http"}, Params: params, Reader: &GetTicketsReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -159,10 +123,49 @@ func (a *Client) GetTickets(params *GetTicketsParams, opts ...ClientOption) (*Ge panic(msg) } +/* +PostTicket creates a new ticket +*/ +func (a *Client) PostTicket(params *PostTicketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostTicketCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostTicketParams() + } + op := &runtime.ClientOperation{ + ID: "postTicket", + Method: "POST", + PathPattern: "/tickets", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostTicketReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostTicketCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postTicket: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UpdateTicket updates an existing ticket */ -func (a *Client) UpdateTicket(params *UpdateTicketParams, opts ...ClientOption) (*UpdateTicketOK, error) { +func (a *Client) UpdateTicket(params *UpdateTicketParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTicketOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateTicketParams() @@ -176,6 +179,7 @@ func (a *Client) UpdateTicket(params *UpdateTicketParams, opts ...ClientOption) Schemes: []string{"http"}, Params: params, Reader: &UpdateTicketReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/transactions/create_transaction_parameters.go b/api/members/members_client/transactions/create_transaction_parameters.go deleted file mode 100644 index c1a3c7e..0000000 --- a/api/members/members_client/transactions/create_transaction_parameters.go +++ /dev/null @@ -1,157 +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 transactions - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "code.tnxs.net/vernonkeenan/lib/api/members/members_models" -) - -// NewCreateTransactionParams creates a new CreateTransactionParams 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 NewCreateTransactionParams() *CreateTransactionParams { - return &CreateTransactionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateTransactionParamsWithTimeout creates a new CreateTransactionParams object -// with the ability to set a timeout on a request. -func NewCreateTransactionParamsWithTimeout(timeout time.Duration) *CreateTransactionParams { - return &CreateTransactionParams{ - timeout: timeout, - } -} - -// NewCreateTransactionParamsWithContext creates a new CreateTransactionParams object -// with the ability to set a context for a request. -func NewCreateTransactionParamsWithContext(ctx context.Context) *CreateTransactionParams { - return &CreateTransactionParams{ - Context: ctx, - } -} - -// NewCreateTransactionParamsWithHTTPClient creates a new CreateTransactionParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateTransactionParamsWithHTTPClient(client *http.Client) *CreateTransactionParams { - return &CreateTransactionParams{ - HTTPClient: client, - } -} - -/* -CreateTransactionParams contains all the parameters to send to the API endpoint - - for the create transaction operation. - - Typically these are written to a http.Request. -*/ -type CreateTransactionParams struct { - - /* TransactionRequest. - - An array of new Transaction records - */ - TransactionRequest *members_models.TransactionRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create transaction params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTransactionParams) WithDefaults() *CreateTransactionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create transaction params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateTransactionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create transaction params -func (o *CreateTransactionParams) WithTimeout(timeout time.Duration) *CreateTransactionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create transaction params -func (o *CreateTransactionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create transaction params -func (o *CreateTransactionParams) WithContext(ctx context.Context) *CreateTransactionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create transaction params -func (o *CreateTransactionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create transaction params -func (o *CreateTransactionParams) WithHTTPClient(client *http.Client) *CreateTransactionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create transaction params -func (o *CreateTransactionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithTransactionRequest adds the transactionRequest to the create transaction params -func (o *CreateTransactionParams) WithTransactionRequest(transactionRequest *members_models.TransactionRequest) *CreateTransactionParams { - o.SetTransactionRequest(transactionRequest) - return o -} - -// SetTransactionRequest adds the transactionRequest to the create transaction params -func (o *CreateTransactionParams) SetTransactionRequest(transactionRequest *members_models.TransactionRequest) { - o.TransactionRequest = transactionRequest -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateTransactionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.TransactionRequest != nil { - if err := r.SetBodyParam(o.TransactionRequest); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/members/members_client/transactions/create_transaction_responses.go b/api/members/members_client/transactions/create_transaction_responses.go deleted file mode 100644 index 3f01416..0000000 --- a/api/members/members_client/transactions/create_transaction_responses.go +++ /dev/null @@ -1,92 +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 transactions - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// CreateTransactionReader is a Reader for the CreateTransaction structure. -type CreateTransactionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateTransactionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewCreateTransactionCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewCreateTransactionCreated creates a CreateTransactionCreated with default headers values -func NewCreateTransactionCreated() *CreateTransactionCreated { - return &CreateTransactionCreated{} -} - -/* -CreateTransactionCreated describes a response with status code 201, with default header values. - -Created -*/ -type CreateTransactionCreated struct { -} - -// IsSuccess returns true when this create transaction created response has a 2xx status code -func (o *CreateTransactionCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create transaction created response has a 3xx status code -func (o *CreateTransactionCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create transaction created response has a 4xx status code -func (o *CreateTransactionCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this create transaction created response has a 5xx status code -func (o *CreateTransactionCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this create transaction created response a status code equal to that given -func (o *CreateTransactionCreated) IsCode(code int) bool { - return code == 201 -} - -// Code gets the status code for the create transaction created response -func (o *CreateTransactionCreated) Code() int { - return 201 -} - -func (o *CreateTransactionCreated) Error() string { - return fmt.Sprintf("[POST /transactions][%d] createTransactionCreated ", 201) -} - -func (o *CreateTransactionCreated) String() string { - return fmt.Sprintf("[POST /transactions][%d] createTransactionCreated ", 201) -} - -func (o *CreateTransactionCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/api/members/members_client/transactions/post_transaction_parameters.go b/api/members/members_client/transactions/post_transaction_parameters.go new file mode 100644 index 0000000..72bcbd7 --- /dev/null +++ b/api/members/members_client/transactions/post_transaction_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package transactions + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// NewPostTransactionParams creates a new PostTransactionParams 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 NewPostTransactionParams() *PostTransactionParams { + return &PostTransactionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostTransactionParamsWithTimeout creates a new PostTransactionParams object +// with the ability to set a timeout on a request. +func NewPostTransactionParamsWithTimeout(timeout time.Duration) *PostTransactionParams { + return &PostTransactionParams{ + timeout: timeout, + } +} + +// NewPostTransactionParamsWithContext creates a new PostTransactionParams object +// with the ability to set a context for a request. +func NewPostTransactionParamsWithContext(ctx context.Context) *PostTransactionParams { + return &PostTransactionParams{ + Context: ctx, + } +} + +// NewPostTransactionParamsWithHTTPClient creates a new PostTransactionParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostTransactionParamsWithHTTPClient(client *http.Client) *PostTransactionParams { + return &PostTransactionParams{ + HTTPClient: client, + } +} + +/* +PostTransactionParams contains all the parameters to send to the API endpoint + + for the post transaction operation. + + Typically these are written to a http.Request. +*/ +type PostTransactionParams struct { + + /* TransactionRequest. + + An array of new Transaction records + */ + TransactionRequest *members_models.TransactionRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post transaction params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostTransactionParams) WithDefaults() *PostTransactionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post transaction params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostTransactionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post transaction params +func (o *PostTransactionParams) WithTimeout(timeout time.Duration) *PostTransactionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post transaction params +func (o *PostTransactionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post transaction params +func (o *PostTransactionParams) WithContext(ctx context.Context) *PostTransactionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post transaction params +func (o *PostTransactionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post transaction params +func (o *PostTransactionParams) WithHTTPClient(client *http.Client) *PostTransactionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post transaction params +func (o *PostTransactionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTransactionRequest adds the transactionRequest to the post transaction params +func (o *PostTransactionParams) WithTransactionRequest(transactionRequest *members_models.TransactionRequest) *PostTransactionParams { + o.SetTransactionRequest(transactionRequest) + return o +} + +// SetTransactionRequest adds the transactionRequest to the post transaction params +func (o *PostTransactionParams) SetTransactionRequest(transactionRequest *members_models.TransactionRequest) { + o.TransactionRequest = transactionRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostTransactionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.TransactionRequest != nil { + if err := r.SetBodyParam(o.TransactionRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/transactions/post_transaction_responses.go b/api/members/members_client/transactions/post_transaction_responses.go new file mode 100644 index 0000000..bf191b8 --- /dev/null +++ b/api/members/members_client/transactions/post_transaction_responses.go @@ -0,0 +1,92 @@ +// 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 transactions + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PostTransactionReader is a Reader for the PostTransaction structure. +type PostTransactionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostTransactionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostTransactionCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostTransactionCreated creates a PostTransactionCreated with default headers values +func NewPostTransactionCreated() *PostTransactionCreated { + return &PostTransactionCreated{} +} + +/* +PostTransactionCreated describes a response with status code 201, with default header values. + +Created +*/ +type PostTransactionCreated struct { +} + +// IsSuccess returns true when this post transaction created response has a 2xx status code +func (o *PostTransactionCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post transaction created response has a 3xx status code +func (o *PostTransactionCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post transaction created response has a 4xx status code +func (o *PostTransactionCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this post transaction created response has a 5xx status code +func (o *PostTransactionCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this post transaction created response a status code equal to that given +func (o *PostTransactionCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the post transaction created response +func (o *PostTransactionCreated) Code() int { + return 201 +} + +func (o *PostTransactionCreated) Error() string { + return fmt.Sprintf("[POST /transactions][%d] postTransactionCreated ", 201) +} + +func (o *PostTransactionCreated) String() string { + return fmt.Sprintf("[POST /transactions][%d] postTransactionCreated ", 201) +} + +func (o *PostTransactionCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/members/members_client/transactions/transactions_client.go b/api/members/members_client/transactions/transactions_client.go index a85489f..11e41c1 100644 --- a/api/members/members_client/transactions/transactions_client.go +++ b/api/members/members_client/transactions/transactions_client.go @@ -34,59 +34,21 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - CreateTransaction(params *CreateTransactionParams, opts ...ClientOption) (*CreateTransactionCreated, error) + DeleteTransaction(params *DeleteTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteTransactionNoContent, error) - DeleteTransaction(params *DeleteTransactionParams, opts ...ClientOption) (*DeleteTransactionNoContent, error) + GetTransactions(params *GetTransactionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTransactionsOK, error) - GetTransactions(params *GetTransactionsParams, opts ...ClientOption) (*GetTransactionsOK, error) + PostTransaction(params *PostTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostTransactionCreated, error) - UpdateTransaction(params *UpdateTransactionParams, opts ...ClientOption) (*UpdateTransactionOK, error) + UpdateTransaction(params *UpdateTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTransactionOK, error) SetTransport(transport runtime.ClientTransport) } -/* -CreateTransaction creates a new transaction -*/ -func (a *Client) CreateTransaction(params *CreateTransactionParams, opts ...ClientOption) (*CreateTransactionCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateTransactionParams() - } - op := &runtime.ClientOperation{ - ID: "createTransaction", - Method: "POST", - PathPattern: "/transactions", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateTransactionReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateTransactionCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for createTransaction: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - /* DeleteTransaction deletes a transaction */ -func (a *Client) DeleteTransaction(params *DeleteTransactionParams, opts ...ClientOption) (*DeleteTransactionNoContent, error) { +func (a *Client) DeleteTransaction(params *DeleteTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteTransactionNoContent, error) { // TODO: Validate the params before sending if params == nil { params = NewDeleteTransactionParams() @@ -100,6 +62,7 @@ func (a *Client) DeleteTransaction(params *DeleteTransactionParams, opts ...Clie Schemes: []string{"http"}, Params: params, Reader: &DeleteTransactionReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -124,7 +87,7 @@ func (a *Client) DeleteTransaction(params *DeleteTransactionParams, opts ...Clie /* GetTransactions gets a list of transactions */ -func (a *Client) GetTransactions(params *GetTransactionsParams, opts ...ClientOption) (*GetTransactionsOK, error) { +func (a *Client) GetTransactions(params *GetTransactionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTransactionsOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetTransactionsParams() @@ -138,6 +101,7 @@ func (a *Client) GetTransactions(params *GetTransactionsParams, opts ...ClientOp Schemes: []string{"http"}, Params: params, Reader: &GetTransactionsReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } @@ -159,10 +123,49 @@ func (a *Client) GetTransactions(params *GetTransactionsParams, opts ...ClientOp panic(msg) } +/* +PostTransaction creates a new transaction +*/ +func (a *Client) PostTransaction(params *PostTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostTransactionCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostTransactionParams() + } + op := &runtime.ClientOperation{ + ID: "postTransaction", + Method: "POST", + PathPattern: "/transactions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostTransactionReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostTransactionCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postTransaction: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UpdateTransaction updates an existing transaction */ -func (a *Client) UpdateTransaction(params *UpdateTransactionParams, opts ...ClientOption) (*UpdateTransactionOK, error) { +func (a *Client) UpdateTransaction(params *UpdateTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateTransactionOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUpdateTransactionParams() @@ -176,6 +179,7 @@ func (a *Client) UpdateTransaction(params *UpdateTransactionParams, opts ...Clie Schemes: []string{"http"}, Params: params, Reader: &UpdateTransactionReader{formats: a.formats}, + AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } diff --git a/api/members/members_client/users/get_users_responses.go b/api/members/members_client/users/get_users_responses.go index 7da6613..65ff233 100644 --- a/api/members/members_client/users/get_users_responses.go +++ b/api/members/members_client/users/get_users_responses.go @@ -292,8 +292,6 @@ GetUsersNotFound describes a response with status code 404, with default header Resource was not found */ type GetUsersNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -341,13 +339,6 @@ func (o *GetUsersNotFound) GetPayload() *members_models.Error { func (o *GetUsersNotFound) 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 @@ -437,8 +428,6 @@ GetUsersInternalServerError describes a response with status code 500, with defa Server Internal Error */ type GetUsersInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -486,13 +475,6 @@ func (o *GetUsersInternalServerError) GetPayload() *members_models.Error { func (o *GetUsersInternalServerError) 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 diff --git a/api/members/members_client/users/post_users_onboard_responses.go b/api/members/members_client/users/post_users_onboard_responses.go index 3535d87..4f705c0 100644 --- a/api/members/members_client/users/post_users_onboard_responses.go +++ b/api/members/members_client/users/post_users_onboard_responses.go @@ -292,8 +292,6 @@ PostUsersOnboardNotFound describes a response with status code 404, with default Resource was not found */ type PostUsersOnboardNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -341,13 +339,6 @@ func (o *PostUsersOnboardNotFound) GetPayload() *members_models.Error { func (o *PostUsersOnboardNotFound) 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 @@ -437,8 +428,6 @@ PostUsersOnboardInternalServerError describes a response with status code 500, w Server Internal Error */ type PostUsersOnboardInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -486,13 +475,6 @@ func (o *PostUsersOnboardInternalServerError) GetPayload() *members_models.Error func (o *PostUsersOnboardInternalServerError) 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 diff --git a/api/members/members_client/users/post_users_responses.go b/api/members/members_client/users/post_users_responses.go index 211331c..9409384 100644 --- a/api/members/members_client/users/post_users_responses.go +++ b/api/members/members_client/users/post_users_responses.go @@ -292,8 +292,6 @@ PostUsersNotFound describes a response with status code 404, with default header Resource was not found */ type PostUsersNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -341,13 +339,6 @@ func (o *PostUsersNotFound) GetPayload() *members_models.Error { func (o *PostUsersNotFound) 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 @@ -437,8 +428,6 @@ PostUsersInternalServerError describes a response with status code 500, with def Server Internal Error */ type PostUsersInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -486,13 +475,6 @@ func (o *PostUsersInternalServerError) GetPayload() *members_models.Error { func (o *PostUsersInternalServerError) 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 diff --git a/api/members/members_client/users/put_users_responses.go b/api/members/members_client/users/put_users_responses.go index 09f66b2..cd72e00 100644 --- a/api/members/members_client/users/put_users_responses.go +++ b/api/members/members_client/users/put_users_responses.go @@ -292,8 +292,6 @@ PutUsersNotFound describes a response with status code 404, with default header Resource was not found */ type PutUsersNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -341,13 +339,6 @@ func (o *PutUsersNotFound) GetPayload() *members_models.Error { func (o *PutUsersNotFound) 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 @@ -437,8 +428,6 @@ PutUsersInternalServerError describes a response with status code 500, with defa Server Internal Error */ type PutUsersInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -486,13 +475,6 @@ func (o *PutUsersInternalServerError) GetPayload() *members_models.Error { func (o *PutUsersInternalServerError) 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 diff --git a/api/members/members_client/webhooks/post_webhooks_clerk_responses.go b/api/members/members_client/webhooks/post_webhooks_clerk_responses.go index d0ab356..e967ba2 100644 --- a/api/members/members_client/webhooks/post_webhooks_clerk_responses.go +++ b/api/members/members_client/webhooks/post_webhooks_clerk_responses.go @@ -292,8 +292,6 @@ PostWebhooksClerkNotFound describes a response with status code 404, with defaul Resource was not found */ type PostWebhooksClerkNotFound struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -341,13 +339,6 @@ func (o *PostWebhooksClerkNotFound) GetPayload() *members_models.Error { func (o *PostWebhooksClerkNotFound) 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 @@ -437,8 +428,6 @@ PostWebhooksClerkInternalServerError describes a response with status code 500, Server Internal Error */ type PostWebhooksClerkInternalServerError struct { - AccessControlAllowOrigin string - Payload *members_models.Error } @@ -486,13 +475,6 @@ func (o *PostWebhooksClerkInternalServerError) GetPayload() *members_models.Erro func (o *PostWebhooksClerkInternalServerError) 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 diff --git a/api/members/members_models/course.go b/api/members/members_models/course.go index 7cb23a2..bfb4a6b 100644 --- a/api/members/members_models/course.go +++ b/api/members/members_models/course.go @@ -11,14 +11,16 @@ package members_models import ( "context" + "strconv" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // Course course // -// swagger:model Course +// swagger:model course type Course struct { // created by ID @@ -36,6 +38,12 @@ type Course struct { // ID ID string `json:"ID,omitempty"` + // image alt text + ImageAltText *string `json:"ImageAltText,omitempty"` + + // image URL + ImageURL *string `json:"ImageURL,omitempty"` + // instructor ID InstructorID *string `json:"InstructorID,omitempty"` @@ -45,8 +53,20 @@ type Course struct { // last modified date LastModifiedDate *string `json:"LastModifiedDate,omitempty"` + // logo + Logo *string `json:"Logo,omitempty"` + // price - Price float64 `json:"Price,omitempty"` + Price *float64 `json:"Price,omitempty"` + + // sections + Sections []*CourseSection `json:"Sections"` + + // slug + Slug *string `json:"Slug,omitempty"` + + // template ID + TemplateID *string `json:"TemplateID,omitempty"` // title Title *string `json:"Title,omitempty"` @@ -54,11 +74,75 @@ type Course struct { // Validate validates this course func (m *Course) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSections(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } return nil } -// ContextValidate validates this course based on context it is used +func (m *Course) validateSections(formats strfmt.Registry) error { + if swag.IsZero(m.Sections) { // not required + return nil + } + + for i := 0; i < len(m.Sections); i++ { + if swag.IsZero(m.Sections[i]) { // not required + continue + } + + if m.Sections[i] != nil { + if err := m.Sections[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Sections" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Sections" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this course based on the context it is used func (m *Course) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSections(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Course) contextValidateSections(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Sections); i++ { + + if m.Sections[i] != nil { + if err := m.Sections[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Sections" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Sections" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } diff --git a/api/members/members_models/course_lesson.go b/api/members/members_models/course_lesson.go index 2563f86..bfc24fa 100644 --- a/api/members/members_models/course_lesson.go +++ b/api/members/members_models/course_lesson.go @@ -18,9 +18,12 @@ import ( // CourseLesson course lesson // -// swagger:model CourseLesson +// swagger:model courseLesson type CourseLesson struct { + // asset ID + AssetID *string `json:"AssetID,omitempty"` + // content Content *string `json:"Content,omitempty"` @@ -33,18 +36,30 @@ type CourseLesson struct { // ID ID string `json:"ID,omitempty"` + // image alt text + ImageAltText *string `json:"ImageAltText,omitempty"` + + // image URL + ImageURL *string `json:"ImageURL,omitempty"` + // last modified by ID LastModifiedByID *string `json:"LastModifiedByID,omitempty"` // last modified date LastModifiedDate *string `json:"LastModifiedDate,omitempty"` + // logo + Logo *string `json:"Logo,omitempty"` + // order - Order int64 `json:"Order,omitempty"` + Order *int64 `json:"Order,omitempty"` // section ID SectionID *string `json:"SectionID,omitempty"` + // slug + Slug *string `json:"Slug,omitempty"` + // title Title *string `json:"Title,omitempty"` diff --git a/api/members/members_models/course_lesson_response.go b/api/members/members_models/course_lesson_response.go index ea113b0..58ee93a 100644 --- a/api/members/members_models/course_lesson_response.go +++ b/api/members/members_models/course_lesson_response.go @@ -25,6 +25,9 @@ type CourseLessonResponse struct { // data Data []*CourseLesson `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this course lesson response @@ -35,6 +38,10 @@ func (m *CourseLessonResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *CourseLessonResponse) validateData(formats strfmt.Registry) error { return nil } +func (m *CourseLessonResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this course lesson response based on the context it is used func (m *CourseLessonResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *CourseLessonResponse) ContextValidate(ctx context.Context, formats strf res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *CourseLessonResponse) contextValidateData(ctx context.Context, formats return nil } +func (m *CourseLessonResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *CourseLessonResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/course_response.go b/api/members/members_models/course_response.go index c6f5a0d..8cc39a2 100644 --- a/api/members/members_models/course_response.go +++ b/api/members/members_models/course_response.go @@ -25,6 +25,9 @@ type CourseResponse struct { // data Data []*Course `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this course response @@ -35,6 +38,10 @@ func (m *CourseResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *CourseResponse) validateData(formats strfmt.Registry) error { return nil } +func (m *CourseResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this course response based on the context it is used func (m *CourseResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *CourseResponse) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *CourseResponse) contextValidateData(ctx context.Context, formats strfmt return nil } +func (m *CourseResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *CourseResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/course_section.go b/api/members/members_models/course_section.go index 7d30559..27d4fd8 100644 --- a/api/members/members_models/course_section.go +++ b/api/members/members_models/course_section.go @@ -11,16 +11,21 @@ package members_models import ( "context" + "strconv" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // CourseSection course section // -// swagger:model CourseSection +// swagger:model courseSection type CourseSection struct { + // content + Content *string `json:"Content,omitempty"` + // course ID CourseID *string `json:"CourseID,omitempty"` @@ -30,20 +35,32 @@ type CourseSection struct { // created date CreatedDate *string `json:"CreatedDate,omitempty"` - // description - Description *string `json:"Description,omitempty"` - // ID ID string `json:"ID,omitempty"` + // image alt text + ImageAltText *string `json:"ImageAltText,omitempty"` + + // image URL + ImageURL *string `json:"ImageURL,omitempty"` + // last modified by ID LastModifiedByID *string `json:"LastModifiedByID,omitempty"` // last modified date LastModifiedDate *string `json:"LastModifiedDate,omitempty"` + // lessons + Lessons []*CourseLesson `json:"Lessons"` + + // logo + Logo *string `json:"Logo,omitempty"` + // order - Order int64 `json:"Order,omitempty"` + Order *int64 `json:"Order,omitempty"` + + // slug + Slug *string `json:"Slug,omitempty"` // title Title *string `json:"Title,omitempty"` @@ -51,11 +68,75 @@ type CourseSection struct { // Validate validates this course section func (m *CourseSection) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLessons(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } return nil } -// ContextValidate validates this course section based on context it is used +func (m *CourseSection) validateLessons(formats strfmt.Registry) error { + if swag.IsZero(m.Lessons) { // not required + return nil + } + + for i := 0; i < len(m.Lessons); i++ { + if swag.IsZero(m.Lessons[i]) { // not required + continue + } + + if m.Lessons[i] != nil { + if err := m.Lessons[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Lessons" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Lessons" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this course section based on the context it is used func (m *CourseSection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLessons(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CourseSection) contextValidateLessons(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Lessons); i++ { + + if m.Lessons[i] != nil { + if err := m.Lessons[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Lessons" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Lessons" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } diff --git a/api/members/members_models/course_section_response.go b/api/members/members_models/course_section_response.go index d3be635..8fb173b 100644 --- a/api/members/members_models/course_section_response.go +++ b/api/members/members_models/course_section_response.go @@ -25,6 +25,9 @@ type CourseSectionResponse struct { // data Data []*CourseSection `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this course section response @@ -35,6 +38,10 @@ func (m *CourseSectionResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *CourseSectionResponse) validateData(formats strfmt.Registry) error { return nil } +func (m *CourseSectionResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this course section response based on the context it is used func (m *CourseSectionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *CourseSectionResponse) ContextValidate(ctx context.Context, formats str res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *CourseSectionResponse) contextValidateData(ctx context.Context, formats return nil } +func (m *CourseSectionResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *CourseSectionResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/email_message.go b/api/members/members_models/email_message.go index 5cc2d43..e9cb05d 100644 --- a/api/members/members_models/email_message.go +++ b/api/members/members_models/email_message.go @@ -22,9 +22,6 @@ import ( // swagger:model EmailMessage type EmailMessage struct { - // activity ID - ActivityID *string `json:"ActivityID,omitempty"` - // b c c address BCCAddress *string `json:"BCCAddress,omitempty"` @@ -37,9 +34,6 @@ type EmailMessage struct { // created date CreatedDate *string `json:"CreatedDate,omitempty"` - // email message ID - EmailMessageID *string `json:"EmailMessageID,omitempty"` - // from address FromAddress *string `json:"FromAddress,omitempty"` @@ -47,8 +41,7 @@ type EmailMessage struct { FromName *string `json:"FromName,omitempty"` // HTML - // Format: byte - HTML *strfmt.Base64 `json:"HTML,omitempty"` + HTML *string `json:"HTML,omitempty"` // has attachment HasAttachment *bool `json:"HasAttachment,omitempty"` @@ -62,12 +55,6 @@ type EmailMessage struct { // incoming Incoming *bool `json:"Incoming,omitempty"` - // is client managed - IsClientManaged *bool `json:"IsClientManaged,omitempty"` - - // is externally managed - IsExternallyManaged *bool `json:"IsExternallyManaged,omitempty"` - // last modified by ID LastModifiedByID *string `json:"LastModifiedByID,omitempty"` @@ -80,23 +67,8 @@ type EmailMessage struct { // message identifier MessageIdentifier *string `json:"MessageIdentifier,omitempty"` - // parent ID - ParentID *string `json:"ParentID,omitempty"` - - // related to ID - RelatedToID *string `json:"RelatedToID,omitempty"` - - // relation address - RelationAddress *string `json:"RelationAddress,omitempty"` - - // relation ID - RelationID *string `json:"RelationID,omitempty"` - - // relation object type - RelationObjectType *string `json:"RelationObjectType,omitempty"` - - // relation type - RelationType *string `json:"RelationType,omitempty"` + // outgoing email ID + OutgoingEmailID *string `json:"OutgoingEmailID,omitempty"` // reply to email message ID ReplyToEmailMessageID *string `json:"ReplyToEmailMessageID,omitempty"` @@ -107,9 +79,8 @@ type EmailMessage struct { // subject Subject *string `json:"Subject,omitempty"` - // text - // Format: byte - Text *strfmt.Base64 `json:"Text,omitempty"` + // text body + TextBody *string `json:"TextBody,omitempty"` // thread identifier ThreadIdentifier *string `json:"ThreadIdentifier,omitempty"` @@ -117,8 +88,8 @@ type EmailMessage struct { // to address ToAddress *string `json:"ToAddress,omitempty"` - // validated from address - ValidatedFromAddress *string `json:"ValidatedFromAddress,omitempty"` + // to name + ToName *string `json:"ToName,omitempty"` } // Validate validates this email message diff --git a/api/members/members_models/event.go b/api/members/members_models/event.go index 59ed504..2c49c3b 100644 --- a/api/members/members_models/event.go +++ b/api/members/members_models/event.go @@ -18,14 +18,20 @@ import ( // Event event // -// swagger:model Event +// swagger:model event type Event struct { + // account ID + AccountID *string `json:"AccountID,omitempty"` + // capacity Capacity *int64 `json:"Capacity,omitempty"` - // createdat - Createdat *string `json:"Createdat,omitempty"` + // created by ID + CreatedByID *string `json:"CreatedByID,omitempty"` + + // created date + CreatedDate *string `json:"CreatedDate,omitempty"` // description Description *string `json:"Description,omitempty"` @@ -36,20 +42,41 @@ type Event struct { // ID ID string `json:"ID,omitempty"` + // image alt text + ImageAltText *string `json:"ImageAltText,omitempty"` + + // image URL + ImageURL *string `json:"ImageURL,omitempty"` + + // last modified by ID + LastModifiedByID *string `json:"LastModifiedByID,omitempty"` + + // last modified date + LastModifiedDate *string `json:"LastModifiedDate,omitempty"` + // location Location *string `json:"Location,omitempty"` - // organizeruser ID - OrganizeruserID *string `json:"OrganizeruserID,omitempty"` + // logo + Logo *string `json:"Logo,omitempty"` + + // online + Online *bool `json:"Online,omitempty"` + + // organizer user ID + OrganizerUserID *string `json:"OrganizerUserID,omitempty"` + + // reg URL + RegURL *string `json:"RegURL,omitempty"` + + // slug + Slug *string `json:"Slug,omitempty"` // start date StartDate *string `json:"StartDate,omitempty"` // title Title *string `json:"Title,omitempty"` - - // up datedat - UpDatedat *string `json:"UpDatedat,omitempty"` } // Validate validates this event diff --git a/api/members/members_models/event_category.go b/api/members/members_models/event_category.go deleted file mode 100644 index c261701..0000000 --- a/api/members/members_models/event_category.go +++ /dev/null @@ -1,63 +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 - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EventCategory event category -// -// swagger:model EventCategory -type EventCategory struct { - - // created date - CreatedDate *string `json:"CreatedDate,omitempty"` - - // ID - ID string `json:"ID,omitempty"` - - // last modified date - LastModifiedDate *string `json:"LastModifiedDate,omitempty"` - - // name - Name *string `json:"Name,omitempty"` -} - -// Validate validates this event category -func (m *EventCategory) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this event category based on context it is used -func (m *EventCategory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EventCategory) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EventCategory) UnmarshalBinary(b []byte) error { - var res EventCategory - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/members/members_models/event_category_assignment.go b/api/members/members_models/event_category_assignment.go deleted file mode 100644 index 334483a..0000000 --- a/api/members/members_models/event_category_assignment.go +++ /dev/null @@ -1,66 +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 - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EventCategoryAssignment event category assignment -// -// swagger:model EventCategoryAssignment -type EventCategoryAssignment struct { - - // createdat - Createdat *string `json:"Createdat,omitempty"` - - // event category ID - EventCategoryID *string `json:"EventCategoryID,omitempty"` - - // event ID - EventID *string `json:"EventID,omitempty"` - - // ID - ID string `json:"ID,omitempty"` - - // up datedat - UpDatedat *string `json:"UpDatedat,omitempty"` -} - -// Validate validates this event category assignment -func (m *EventCategoryAssignment) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this event category assignment based on context it is used -func (m *EventCategoryAssignment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *EventCategoryAssignment) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EventCategoryAssignment) UnmarshalBinary(b []byte) error { - var res EventCategoryAssignment - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/members/members_models/event_response.go b/api/members/members_models/event_response.go index 7d21a22..4a60ae1 100644 --- a/api/members/members_models/event_response.go +++ b/api/members/members_models/event_response.go @@ -25,6 +25,9 @@ type EventResponse struct { // data Data []*Event `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this event response @@ -35,6 +38,10 @@ func (m *EventResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *EventResponse) validateData(formats strfmt.Registry) error { return nil } +func (m *EventResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this event response based on the context it is used func (m *EventResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *EventResponse) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *EventResponse) contextValidateData(ctx context.Context, formats strfmt. return nil } +func (m *EventResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *EventResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/favorite.go b/api/members/members_models/favorite.go index ff33e35..8a2c327 100644 --- a/api/members/members_models/favorite.go +++ b/api/members/members_models/favorite.go @@ -33,8 +33,8 @@ type Favorite struct { // favorite ID FavoriteID *string `json:"FavoriteID,omitempty"` - // favoritetype - Favoritetype *string `json:"Favoritetype,omitempty"` + // favorite type + FavoriteType *string `json:"FavoriteType,omitempty"` // ID ID string `json:"ID,omitempty"` diff --git a/api/members/members_models/favorite_response.go b/api/members/members_models/favorite_response.go index bc173d7..272dec3 100644 --- a/api/members/members_models/favorite_response.go +++ b/api/members/members_models/favorite_response.go @@ -25,6 +25,9 @@ type FavoriteResponse struct { // data Data []*Favorite `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this favorite response @@ -35,6 +38,10 @@ func (m *FavoriteResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *FavoriteResponse) validateData(formats strfmt.Registry) error { return nil } +func (m *FavoriteResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this favorite response based on the context it is used func (m *FavoriteResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *FavoriteResponse) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *FavoriteResponse) contextValidateData(ctx context.Context, formats strf return nil } +func (m *FavoriteResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *FavoriteResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/invoice_response.go b/api/members/members_models/invoice_response.go index aaf7768..54342a3 100644 --- a/api/members/members_models/invoice_response.go +++ b/api/members/members_models/invoice_response.go @@ -25,6 +25,9 @@ type InvoiceResponse struct { // data Data []*Invoice `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this invoice response @@ -35,6 +38,10 @@ func (m *InvoiceResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *InvoiceResponse) validateData(formats strfmt.Registry) error { return nil } +func (m *InvoiceResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this invoice response based on the context it is used func (m *InvoiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *InvoiceResponse) ContextValidate(ctx context.Context, formats strfmt.Re res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *InvoiceResponse) contextValidateData(ctx context.Context, formats strfm return nil } +func (m *InvoiceResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *InvoiceResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/issued_certificate_response.go b/api/members/members_models/issued_certificate_response.go index 1281b06..4bd8987 100644 --- a/api/members/members_models/issued_certificate_response.go +++ b/api/members/members_models/issued_certificate_response.go @@ -25,6 +25,9 @@ type IssuedCertificateResponse struct { // data Data []*IssuedCertificate `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this issued certificate response @@ -35,6 +38,10 @@ func (m *IssuedCertificateResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *IssuedCertificateResponse) validateData(formats strfmt.Registry) error return nil } +func (m *IssuedCertificateResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this issued certificate response based on the context it is used func (m *IssuedCertificateResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *IssuedCertificateResponse) ContextValidate(ctx context.Context, formats res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *IssuedCertificateResponse) contextValidateData(ctx context.Context, for return nil } +func (m *IssuedCertificateResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *IssuedCertificateResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/lesson_progress_response.go b/api/members/members_models/lesson_progress_response.go index d8f7881..b226b32 100644 --- a/api/members/members_models/lesson_progress_response.go +++ b/api/members/members_models/lesson_progress_response.go @@ -25,6 +25,9 @@ type LessonProgressResponse struct { // data Data []*LessonProgress `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this lesson progress response @@ -35,6 +38,10 @@ func (m *LessonProgressResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *LessonProgressResponse) validateData(formats strfmt.Registry) error { return nil } +func (m *LessonProgressResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this lesson progress response based on the context it is used func (m *LessonProgressResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *LessonProgressResponse) ContextValidate(ctx context.Context, formats st res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *LessonProgressResponse) contextValidateData(ctx context.Context, format return nil } +func (m *LessonProgressResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *LessonProgressResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/outgoing_email_message.go b/api/members/members_models/outgoing_email_message.go index ef4e9a2..6246562 100644 --- a/api/members/members_models/outgoing_email_message.go +++ b/api/members/members_models/outgoing_email_message.go @@ -25,18 +25,27 @@ type OutgoingEmailMessage struct { // b c c address BCCAddress *string `json:"BCCAddress,omitempty"` + // bounced + Bounced *bool `json:"Bounced,omitempty"` + // c c address CCAddress *string `json:"CCAddress,omitempty"` + // created by ID + CreatedByID *string `json:"CreatedByID,omitempty"` + + // created date + CreatedDate *string `json:"CreatedDate,omitempty"` + // email message ID EmailMessageID *string `json:"EmailMessageID,omitempty"` - // email template ID - EmailTemplateID *string `json:"EmailTemplateID,omitempty"` - // external ID ExternalID *string `json:"ExternalID,omitempty"` + // from address + FromAddress *string `json:"FromAddress,omitempty"` + // from contact ID FromContactID *string `json:"FromContactID,omitempty"` @@ -52,23 +61,44 @@ type OutgoingEmailMessage struct { // ID ID string `json:"ID,omitempty"` + // last modified by ID + LastModifiedByID *string `json:"LastModifiedByID,omitempty"` + + // last modified date + LastModifiedDate *string `json:"LastModifiedDate,omitempty"` + + // object ID + ObjectID *string `json:"ObjectID,omitempty"` + + // object type + ObjectType *string `json:"ObjectType,omitempty"` + + // queued + Queued *bool `json:"Queued,omitempty"` + + // queued date + QueuedDate *string `json:"QueuedDate,omitempty"` + + // sent + Sent *bool `json:"Sent,omitempty"` + + // sent date + SentDate *string `json:"SentDate,omitempty"` + // subject Subject *string `json:"Subject,omitempty"` - // text - Text *string `json:"Text,omitempty"` + // template ID + TemplateID *string `json:"TemplateID,omitempty"` + + // text body + TextBody *string `json:"TextBody,omitempty"` // to address ToAddress *string `json:"ToAddress,omitempty"` // to name ToName *string `json:"ToName,omitempty"` - - // validated from address - ValidatedFromAddress *string `json:"ValidatedFromAddress,omitempty"` - - // who ID - WhoID *string `json:"WhoID,omitempty"` } // Validate validates this outgoing email message diff --git a/api/members/members_models/outgoing_email_message_request.go b/api/members/members_models/outgoing_email_message_request.go index aeebac0..0cbad2a 100644 --- a/api/members/members_models/outgoing_email_message_request.go +++ b/api/members/members_models/outgoing_email_message_request.go @@ -25,9 +25,6 @@ type OutgoingEmailMessageRequest struct { // data Data []*OutgoingEmailMessage `json:"data"` - - // meta - Meta *RequestMeta `json:"meta,omitempty"` } // Validate validates this outgoing email message request @@ -38,10 +35,6 @@ func (m *OutgoingEmailMessageRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateMeta(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -74,25 +67,6 @@ func (m *OutgoingEmailMessageRequest) validateData(formats strfmt.Registry) erro return nil } -func (m *OutgoingEmailMessageRequest) validateMeta(formats strfmt.Registry) error { - if swag.IsZero(m.Meta) { // not required - return nil - } - - if m.Meta != nil { - if err := m.Meta.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("meta") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("meta") - } - return err - } - } - - return nil -} - // ContextValidate validate this outgoing email message request based on the context it is used func (m *OutgoingEmailMessageRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -101,10 +75,6 @@ func (m *OutgoingEmailMessageRequest) ContextValidate(ctx context.Context, forma res = append(res, err) } - if err := m.contextValidateMeta(ctx, formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -131,22 +101,6 @@ func (m *OutgoingEmailMessageRequest) contextValidateData(ctx context.Context, f return nil } -func (m *OutgoingEmailMessageRequest) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { - - if m.Meta != nil { - if err := m.Meta.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("meta") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("meta") - } - return err - } - } - - return nil -} - // MarshalBinary interface implementation func (m *OutgoingEmailMessageRequest) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/outgoing_email_messages_response.go b/api/members/members_models/outgoing_email_messages_response.go new file mode 100644 index 0000000..0ba63d3 --- /dev/null +++ b/api/members/members_models/outgoing_email_messages_response.go @@ -0,0 +1,166 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package members_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// OutgoingEmailMessagesResponse An array Taxnexus New Email Message objects +// +// swagger:model OutgoingEmailMessagesResponse +type OutgoingEmailMessagesResponse struct { + + // data + Data []*OutgoingEmailMessage `json:"data"` + + // meta + Meta *ResponseMeta `json:"meta,omitempty"` +} + +// Validate validates this outgoing email messages response +func (m *OutgoingEmailMessagesResponse) 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 *OutgoingEmailMessagesResponse) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *OutgoingEmailMessagesResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +// ContextValidate validate this outgoing email messages response based on the context it is used +func (m *OutgoingEmailMessagesResponse) 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 *OutgoingEmailMessagesResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *OutgoingEmailMessagesResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *OutgoingEmailMessagesResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *OutgoingEmailMessagesResponse) UnmarshalBinary(b []byte) error { + var res OutgoingEmailMessagesResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/members/members_models/payment_method_response.go b/api/members/members_models/payment_method_response.go index 9e53bd9..015fddc 100644 --- a/api/members/members_models/payment_method_response.go +++ b/api/members/members_models/payment_method_response.go @@ -25,6 +25,9 @@ type PaymentMethodResponse struct { // data Data []*PaymentMethod `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this payment method response @@ -35,6 +38,10 @@ func (m *PaymentMethodResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *PaymentMethodResponse) validateData(formats strfmt.Registry) error { return nil } +func (m *PaymentMethodResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this payment method response based on the context it is used func (m *PaymentMethodResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *PaymentMethodResponse) ContextValidate(ctx context.Context, formats str res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *PaymentMethodResponse) contextValidateData(ctx context.Context, formats return nil } +func (m *PaymentMethodResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *PaymentMethodResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/research_project_company_response.go b/api/members/members_models/research_project_company_response.go index 025d1d1..ee6f547 100644 --- a/api/members/members_models/research_project_company_response.go +++ b/api/members/members_models/research_project_company_response.go @@ -25,6 +25,9 @@ type ResearchProjectCompanyResponse struct { // data Data []*ResearchProjectCompany `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this research project company response @@ -35,6 +38,10 @@ func (m *ResearchProjectCompanyResponse) Validate(formats strfmt.Registry) error res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *ResearchProjectCompanyResponse) validateData(formats strfmt.Registry) e return nil } +func (m *ResearchProjectCompanyResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this research project company response based on the context it is used func (m *ResearchProjectCompanyResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *ResearchProjectCompanyResponse) ContextValidate(ctx context.Context, fo res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *ResearchProjectCompanyResponse) contextValidateData(ctx context.Context return nil } +func (m *ResearchProjectCompanyResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *ResearchProjectCompanyResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/research_project_response.go b/api/members/members_models/research_project_response.go index 0c09944..4b78151 100644 --- a/api/members/members_models/research_project_response.go +++ b/api/members/members_models/research_project_response.go @@ -25,6 +25,9 @@ type ResearchProjectResponse struct { // data Data []*ResearchProject `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this research project response @@ -35,6 +38,10 @@ func (m *ResearchProjectResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *ResearchProjectResponse) validateData(formats strfmt.Registry) error { return nil } +func (m *ResearchProjectResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this research project response based on the context it is used func (m *ResearchProjectResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *ResearchProjectResponse) ContextValidate(ctx context.Context, formats s res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *ResearchProjectResponse) contextValidateData(ctx context.Context, forma return nil } +func (m *ResearchProjectResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *ResearchProjectResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/research_project_topic_response.go b/api/members/members_models/research_project_topic_response.go index d5266e2..72c402c 100644 --- a/api/members/members_models/research_project_topic_response.go +++ b/api/members/members_models/research_project_topic_response.go @@ -25,6 +25,9 @@ type ResearchProjectTopicResponse struct { // data Data []*ResearchProjectTopic `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this research project topic response @@ -35,6 +38,10 @@ func (m *ResearchProjectTopicResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *ResearchProjectTopicResponse) validateData(formats strfmt.Registry) err return nil } +func (m *ResearchProjectTopicResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this research project topic response based on the context it is used func (m *ResearchProjectTopicResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *ResearchProjectTopicResponse) ContextValidate(ctx context.Context, form res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *ResearchProjectTopicResponse) contextValidateData(ctx context.Context, return nil } +func (m *ResearchProjectTopicResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *ResearchProjectTopicResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/template.go b/api/members/members_models/template.go index dcd2854..46db9d9 100644 --- a/api/members/members_models/template.go +++ b/api/members/members_models/template.go @@ -34,8 +34,7 @@ type Template struct { Description *string `json:"Description,omitempty"` // HTML Body - // Format: byte - HTML strfmt.Base64 `json:"HTML,omitempty"` + HTML *string `json:"HTML,omitempty"` // Record Id ID string `json:"ID,omitempty"` diff --git a/api/members/members_models/ticket_response.go b/api/members/members_models/ticket_response.go index 1819aca..e8015ba 100644 --- a/api/members/members_models/ticket_response.go +++ b/api/members/members_models/ticket_response.go @@ -25,6 +25,9 @@ type TicketResponse struct { // data Data []*Ticket `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this ticket response @@ -35,6 +38,10 @@ func (m *TicketResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *TicketResponse) validateData(formats strfmt.Registry) error { return nil } +func (m *TicketResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this ticket response based on the context it is used func (m *TicketResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *TicketResponse) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *TicketResponse) contextValidateData(ctx context.Context, formats strfmt return nil } +func (m *TicketResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *TicketResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/members/members_models/transaction_response.go b/api/members/members_models/transaction_response.go index 7bcbf5c..a723cae 100644 --- a/api/members/members_models/transaction_response.go +++ b/api/members/members_models/transaction_response.go @@ -25,6 +25,9 @@ type TransactionResponse struct { // data Data []*Transaction `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` } // Validate validates this transaction response @@ -35,6 +38,10 @@ func (m *TransactionResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +74,25 @@ func (m *TransactionResponse) validateData(formats strfmt.Registry) error { return nil } +func (m *TransactionResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // ContextValidate validate this transaction response based on the context it is used func (m *TransactionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -75,6 +101,10 @@ func (m *TransactionResponse) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateMeta(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,6 +131,22 @@ func (m *TransactionResponse) contextValidateData(ctx context.Context, formats s return nil } +func (m *TransactionResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *TransactionResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/api/sfgate/sfgate_client/accounts/delete_account_responses.go b/api/sfgate/sfgate_client/accounts/delete_account_responses.go index 630552c..478442c 100644 --- a/api/sfgate/sfgate_client/accounts/delete_account_responses.go +++ b/api/sfgate/sfgate_client/accounts/delete_account_responses.go @@ -79,8 +79,6 @@ DeleteAccountOK describes a response with status code 200, with default header v Response with Message Objects with Delete Status */ type DeleteAccountOK struct { - AccessControlAllowOrigin string - Payload *sfgate_models.DeleteResponse } @@ -128,13 +126,6 @@ func (o *DeleteAccountOK) GetPayload() *sfgate_models.DeleteResponse { func (o *DeleteAccountOK) 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(sfgate_models.DeleteResponse) // response payload @@ -156,8 +147,6 @@ DeleteAccountUnauthorized describes a response with status code 401, with defaul Access unauthorized, invalid API-KEY was used */ type DeleteAccountUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -205,13 +194,6 @@ func (o *DeleteAccountUnauthorized) GetPayload() *sfgate_models.Error { func (o *DeleteAccountUnauthorized) 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(sfgate_models.Error) // response payload @@ -233,8 +215,6 @@ DeleteAccountForbidden describes a response with status code 403, with default h Access forbidden, account lacks access */ type DeleteAccountForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -282,13 +262,6 @@ func (o *DeleteAccountForbidden) GetPayload() *sfgate_models.Error { func (o *DeleteAccountForbidden) 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(sfgate_models.Error) // response payload @@ -310,8 +283,6 @@ DeleteAccountNotFound describes a response with status code 404, with default he Resource was not found */ type DeleteAccountNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -359,13 +330,6 @@ func (o *DeleteAccountNotFound) GetPayload() *sfgate_models.Error { func (o *DeleteAccountNotFound) 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(sfgate_models.Error) // response payload @@ -387,8 +351,6 @@ DeleteAccountUnprocessableEntity describes a response with status code 422, with Unprocessable Entity, likely a bad parameter */ type DeleteAccountUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -436,13 +398,6 @@ func (o *DeleteAccountUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *DeleteAccountUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -464,8 +419,6 @@ DeleteAccountInternalServerError describes a response with status code 500, with Server Internal Error */ type DeleteAccountInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -513,13 +466,6 @@ func (o *DeleteAccountInternalServerError) GetPayload() *sfgate_models.Error { func (o *DeleteAccountInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/accounts/get_accounts_responses.go b/api/sfgate/sfgate_client/accounts/get_accounts_responses.go index 7940e98..582bc84 100644 --- a/api/sfgate/sfgate_client/accounts/get_accounts_responses.go +++ b/api/sfgate/sfgate_client/accounts/get_accounts_responses.go @@ -147,8 +147,6 @@ GetAccountsUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type GetAccountsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetAccountsUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetAccountsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetAccountsForbidden describes a response with status code 403, with default hea Access forbidden, account lacks access */ type GetAccountsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetAccountsForbidden) GetPayload() *sfgate_models.Error { func (o *GetAccountsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetAccountsNotFound describes a response with status code 404, with default head Resource was not found */ type GetAccountsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetAccountsNotFound) GetPayload() *sfgate_models.Error { func (o *GetAccountsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetAccountsUnprocessableEntity describes a response with status code 422, with d Unprocessable Entity, likely a bad parameter */ type GetAccountsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetAccountsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetAccountsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetAccountsInternalServerError describes a response with status code 500, with d Server Internal Error */ type GetAccountsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetAccountsInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetAccountsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/accounts/post_accounts_responses.go b/api/sfgate/sfgate_client/accounts/post_accounts_responses.go index dce438e..bf195ca 100644 --- a/api/sfgate/sfgate_client/accounts/post_accounts_responses.go +++ b/api/sfgate/sfgate_client/accounts/post_accounts_responses.go @@ -147,8 +147,6 @@ PostAccountsUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type PostAccountsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PostAccountsUnauthorized) GetPayload() *sfgate_models.Error { func (o *PostAccountsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PostAccountsForbidden describes a response with status code 403, with default he Access forbidden, account lacks access */ type PostAccountsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PostAccountsForbidden) GetPayload() *sfgate_models.Error { func (o *PostAccountsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PostAccountsNotFound describes a response with status code 404, with default hea Resource was not found */ type PostAccountsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PostAccountsNotFound) GetPayload() *sfgate_models.Error { func (o *PostAccountsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PostAccountsUnprocessableEntity describes a response with status code 422, with Unprocessable Entity, likely a bad parameter */ type PostAccountsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PostAccountsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PostAccountsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PostAccountsInternalServerError describes a response with status code 500, with Server Internal Error */ type PostAccountsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PostAccountsInternalServerError) GetPayload() *sfgate_models.Error { func (o *PostAccountsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/accounts/put_accounts_responses.go b/api/sfgate/sfgate_client/accounts/put_accounts_responses.go index 3c913e6..82aaa51 100644 --- a/api/sfgate/sfgate_client/accounts/put_accounts_responses.go +++ b/api/sfgate/sfgate_client/accounts/put_accounts_responses.go @@ -147,8 +147,6 @@ PutAccountsUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type PutAccountsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PutAccountsUnauthorized) GetPayload() *sfgate_models.Error { func (o *PutAccountsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PutAccountsForbidden describes a response with status code 403, with default hea Access forbidden, account lacks access */ type PutAccountsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PutAccountsForbidden) GetPayload() *sfgate_models.Error { func (o *PutAccountsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PutAccountsNotFound describes a response with status code 404, with default head Resource was not found */ type PutAccountsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PutAccountsNotFound) GetPayload() *sfgate_models.Error { func (o *PutAccountsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PutAccountsUnprocessableEntity describes a response with status code 422, with d Unprocessable Entity, likely a bad parameter */ type PutAccountsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PutAccountsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PutAccountsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PutAccountsInternalServerError describes a response with status code 500, with d Server Internal Error */ type PutAccountsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PutAccountsInternalServerError) GetPayload() *sfgate_models.Error { func (o *PutAccountsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/assets/get_assets_responses.go b/api/sfgate/sfgate_client/assets/get_assets_responses.go index 70b6039..ef28711 100644 --- a/api/sfgate/sfgate_client/assets/get_assets_responses.go +++ b/api/sfgate/sfgate_client/assets/get_assets_responses.go @@ -147,8 +147,6 @@ GetAssetsUnauthorized describes a response with status code 401, with default he Access unauthorized, invalid API-KEY was used */ type GetAssetsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetAssetsUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetAssetsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetAssetsForbidden describes a response with status code 403, with default heade Access forbidden, account lacks access */ type GetAssetsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetAssetsForbidden) GetPayload() *sfgate_models.Error { func (o *GetAssetsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetAssetsNotFound describes a response with status code 404, with default header Resource was not found */ type GetAssetsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetAssetsNotFound) GetPayload() *sfgate_models.Error { func (o *GetAssetsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetAssetsUnprocessableEntity describes a response with status code 422, with def Unprocessable Entity, likely a bad parameter */ type GetAssetsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetAssetsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetAssetsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetAssetsInternalServerError describes a response with status code 500, with def Server Internal Error */ type GetAssetsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetAssetsInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetAssetsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/assets/post_assets_responses.go b/api/sfgate/sfgate_client/assets/post_assets_responses.go index c81f391..6089459 100644 --- a/api/sfgate/sfgate_client/assets/post_assets_responses.go +++ b/api/sfgate/sfgate_client/assets/post_assets_responses.go @@ -147,8 +147,6 @@ PostAssetsUnauthorized describes a response with status code 401, with default h Access unauthorized, invalid API-KEY was used */ type PostAssetsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PostAssetsUnauthorized) GetPayload() *sfgate_models.Error { func (o *PostAssetsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PostAssetsForbidden describes a response with status code 403, with default head Access forbidden, account lacks access */ type PostAssetsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PostAssetsForbidden) GetPayload() *sfgate_models.Error { func (o *PostAssetsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PostAssetsNotFound describes a response with status code 404, with default heade Resource was not found */ type PostAssetsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PostAssetsNotFound) GetPayload() *sfgate_models.Error { func (o *PostAssetsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PostAssetsUnprocessableEntity describes a response with status code 422, with de Unprocessable Entity, likely a bad parameter */ type PostAssetsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PostAssetsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PostAssetsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PostAssetsInternalServerError describes a response with status code 500, with de Server Internal Error */ type PostAssetsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PostAssetsInternalServerError) GetPayload() *sfgate_models.Error { func (o *PostAssetsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/clusters/get_clusters_responses.go b/api/sfgate/sfgate_client/clusters/get_clusters_responses.go index 0f1568c..e995f5b 100644 --- a/api/sfgate/sfgate_client/clusters/get_clusters_responses.go +++ b/api/sfgate/sfgate_client/clusters/get_clusters_responses.go @@ -147,8 +147,6 @@ GetClustersUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type GetClustersUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetClustersUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetClustersUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetClustersForbidden describes a response with status code 403, with default hea Access forbidden, account lacks access */ type GetClustersForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetClustersForbidden) GetPayload() *sfgate_models.Error { func (o *GetClustersForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetClustersNotFound describes a response with status code 404, with default head Resource was not found */ type GetClustersNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetClustersNotFound) GetPayload() *sfgate_models.Error { func (o *GetClustersNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetClustersUnprocessableEntity describes a response with status code 422, with d Unprocessable Entity, likely a bad parameter */ type GetClustersUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetClustersUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetClustersUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetClustersInternalServerError describes a response with status code 500, with d Server Internal Error */ type GetClustersInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetClustersInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetClustersInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/clusters/post_clusters_responses.go b/api/sfgate/sfgate_client/clusters/post_clusters_responses.go index 6958201..c23591d 100644 --- a/api/sfgate/sfgate_client/clusters/post_clusters_responses.go +++ b/api/sfgate/sfgate_client/clusters/post_clusters_responses.go @@ -147,8 +147,6 @@ PostClustersUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type PostClustersUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PostClustersUnauthorized) GetPayload() *sfgate_models.Error { func (o *PostClustersUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PostClustersForbidden describes a response with status code 403, with default he Access forbidden, account lacks access */ type PostClustersForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PostClustersForbidden) GetPayload() *sfgate_models.Error { func (o *PostClustersForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PostClustersNotFound describes a response with status code 404, with default hea Resource was not found */ type PostClustersNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PostClustersNotFound) GetPayload() *sfgate_models.Error { func (o *PostClustersNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PostClustersUnprocessableEntity describes a response with status code 422, with Unprocessable Entity, likely a bad parameter */ type PostClustersUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PostClustersUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PostClustersUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PostClustersInternalServerError describes a response with status code 500, with Server Internal Error */ type PostClustersInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PostClustersInternalServerError) GetPayload() *sfgate_models.Error { func (o *PostClustersInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/clusters/put_clusters_responses.go b/api/sfgate/sfgate_client/clusters/put_clusters_responses.go index 666b1bb..9e6bfa3 100644 --- a/api/sfgate/sfgate_client/clusters/put_clusters_responses.go +++ b/api/sfgate/sfgate_client/clusters/put_clusters_responses.go @@ -147,8 +147,6 @@ PutClustersUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type PutClustersUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PutClustersUnauthorized) GetPayload() *sfgate_models.Error { func (o *PutClustersUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PutClustersForbidden describes a response with status code 403, with default hea Access forbidden, account lacks access */ type PutClustersForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PutClustersForbidden) GetPayload() *sfgate_models.Error { func (o *PutClustersForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PutClustersNotFound describes a response with status code 404, with default head Resource was not found */ type PutClustersNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PutClustersNotFound) GetPayload() *sfgate_models.Error { func (o *PutClustersNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PutClustersUnprocessableEntity describes a response with status code 422, with d Unprocessable Entity, likely a bad parameter */ type PutClustersUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PutClustersUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PutClustersUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PutClustersInternalServerError describes a response with status code 500, with d Server Internal Error */ type PutClustersInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PutClustersInternalServerError) GetPayload() *sfgate_models.Error { func (o *PutClustersInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/company_products/get_company_products_responses.go b/api/sfgate/sfgate_client/company_products/get_company_products_responses.go index fcae450..e2251e9 100644 --- a/api/sfgate/sfgate_client/company_products/get_company_products_responses.go +++ b/api/sfgate/sfgate_client/company_products/get_company_products_responses.go @@ -147,8 +147,6 @@ GetCompanyProductsUnauthorized describes a response with status code 401, with d Access unauthorized, invalid API-KEY was used */ type GetCompanyProductsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetCompanyProductsUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetCompanyProductsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetCompanyProductsForbidden describes a response with status code 403, with defa Access forbidden, account lacks access */ type GetCompanyProductsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetCompanyProductsForbidden) GetPayload() *sfgate_models.Error { func (o *GetCompanyProductsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetCompanyProductsNotFound describes a response with status code 404, with defau Resource was not found */ type GetCompanyProductsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetCompanyProductsNotFound) GetPayload() *sfgate_models.Error { func (o *GetCompanyProductsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetCompanyProductsUnprocessableEntity describes a response with status code 422, Unprocessable Entity, likely a bad parameter */ type GetCompanyProductsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetCompanyProductsUnprocessableEntity) GetPayload() *sfgate_models.Erro func (o *GetCompanyProductsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetCompanyProductsInternalServerError describes a response with status code 500, Server Internal Error */ type GetCompanyProductsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetCompanyProductsInternalServerError) GetPayload() *sfgate_models.Erro func (o *GetCompanyProductsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/company_products/post_company_products_responses.go b/api/sfgate/sfgate_client/company_products/post_company_products_responses.go index cf6b710..b12fa94 100644 --- a/api/sfgate/sfgate_client/company_products/post_company_products_responses.go +++ b/api/sfgate/sfgate_client/company_products/post_company_products_responses.go @@ -147,8 +147,6 @@ PostCompanyProductsUnauthorized describes a response with status code 401, with Access unauthorized, invalid API-KEY was used */ type PostCompanyProductsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PostCompanyProductsUnauthorized) GetPayload() *sfgate_models.Error { func (o *PostCompanyProductsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PostCompanyProductsForbidden describes a response with status code 403, with def Access forbidden, account lacks access */ type PostCompanyProductsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PostCompanyProductsForbidden) GetPayload() *sfgate_models.Error { func (o *PostCompanyProductsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PostCompanyProductsNotFound describes a response with status code 404, with defa Resource was not found */ type PostCompanyProductsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PostCompanyProductsNotFound) GetPayload() *sfgate_models.Error { func (o *PostCompanyProductsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PostCompanyProductsUnprocessableEntity describes a response with status code 422 Unprocessable Entity, likely a bad parameter */ type PostCompanyProductsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PostCompanyProductsUnprocessableEntity) GetPayload() *sfgate_models.Err func (o *PostCompanyProductsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PostCompanyProductsInternalServerError describes a response with status code 500 Server Internal Error */ type PostCompanyProductsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PostCompanyProductsInternalServerError) GetPayload() *sfgate_models.Err func (o *PostCompanyProductsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/contacts/delete_contacts_responses.go b/api/sfgate/sfgate_client/contacts/delete_contacts_responses.go index 52fa1da..4ce9279 100644 --- a/api/sfgate/sfgate_client/contacts/delete_contacts_responses.go +++ b/api/sfgate/sfgate_client/contacts/delete_contacts_responses.go @@ -147,8 +147,6 @@ DeleteContactsUnauthorized describes a response with status code 401, with defau Access unauthorized, invalid API-KEY was used */ type DeleteContactsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *DeleteContactsUnauthorized) GetPayload() *sfgate_models.Error { func (o *DeleteContactsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ DeleteContactsForbidden describes a response with status code 403, with default Access forbidden, account lacks access */ type DeleteContactsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *DeleteContactsForbidden) GetPayload() *sfgate_models.Error { func (o *DeleteContactsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ DeleteContactsNotFound describes a response with status code 404, with default h Resource was not found */ type DeleteContactsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *DeleteContactsNotFound) GetPayload() *sfgate_models.Error { func (o *DeleteContactsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ DeleteContactsUnprocessableEntity describes a response with status code 422, wit Unprocessable Entity, likely a bad parameter */ type DeleteContactsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *DeleteContactsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *DeleteContactsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ DeleteContactsInternalServerError describes a response with status code 500, wit Server Internal Error */ type DeleteContactsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *DeleteContactsInternalServerError) GetPayload() *sfgate_models.Error { func (o *DeleteContactsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/contacts/get_contacts_responses.go b/api/sfgate/sfgate_client/contacts/get_contacts_responses.go index f096000..4a91963 100644 --- a/api/sfgate/sfgate_client/contacts/get_contacts_responses.go +++ b/api/sfgate/sfgate_client/contacts/get_contacts_responses.go @@ -147,8 +147,6 @@ GetContactsUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type GetContactsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetContactsUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetContactsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetContactsForbidden describes a response with status code 403, with default hea Access forbidden, account lacks access */ type GetContactsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetContactsForbidden) GetPayload() *sfgate_models.Error { func (o *GetContactsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetContactsNotFound describes a response with status code 404, with default head Resource was not found */ type GetContactsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetContactsNotFound) GetPayload() *sfgate_models.Error { func (o *GetContactsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetContactsUnprocessableEntity describes a response with status code 422, with d Unprocessable Entity, likely a bad parameter */ type GetContactsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetContactsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetContactsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetContactsInternalServerError describes a response with status code 500, with d Server Internal Error */ type GetContactsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetContactsInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetContactsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/contacts/post_contacts_responses.go b/api/sfgate/sfgate_client/contacts/post_contacts_responses.go index 8d45b4b..ed59fa4 100644 --- a/api/sfgate/sfgate_client/contacts/post_contacts_responses.go +++ b/api/sfgate/sfgate_client/contacts/post_contacts_responses.go @@ -141,8 +141,6 @@ PostContactsUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type PostContactsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -190,13 +188,6 @@ func (o *PostContactsUnauthorized) GetPayload() *sfgate_models.Error { func (o *PostContactsUnauthorized) 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(sfgate_models.Error) // response payload @@ -218,8 +209,6 @@ PostContactsForbidden describes a response with status code 403, with default he Access forbidden, account lacks access */ type PostContactsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -267,13 +256,6 @@ func (o *PostContactsForbidden) GetPayload() *sfgate_models.Error { func (o *PostContactsForbidden) 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(sfgate_models.Error) // response payload @@ -295,8 +277,6 @@ PostContactsNotFound describes a response with status code 404, with default hea Resource was not found */ type PostContactsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -344,13 +324,6 @@ func (o *PostContactsNotFound) GetPayload() *sfgate_models.Error { func (o *PostContactsNotFound) 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(sfgate_models.Error) // response payload @@ -372,8 +345,6 @@ PostContactsInternalServerError describes a response with status code 500, with Server Internal Error */ type PostContactsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -421,13 +392,6 @@ func (o *PostContactsInternalServerError) GetPayload() *sfgate_models.Error { func (o *PostContactsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/contacts/put_contacts_responses.go b/api/sfgate/sfgate_client/contacts/put_contacts_responses.go index 9aa97f4..3c89d34 100644 --- a/api/sfgate/sfgate_client/contacts/put_contacts_responses.go +++ b/api/sfgate/sfgate_client/contacts/put_contacts_responses.go @@ -147,8 +147,6 @@ PutContactsUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type PutContactsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PutContactsUnauthorized) GetPayload() *sfgate_models.Error { func (o *PutContactsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PutContactsForbidden describes a response with status code 403, with default hea Access forbidden, account lacks access */ type PutContactsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PutContactsForbidden) GetPayload() *sfgate_models.Error { func (o *PutContactsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PutContactsNotFound describes a response with status code 404, with default head Resource was not found */ type PutContactsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PutContactsNotFound) GetPayload() *sfgate_models.Error { func (o *PutContactsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PutContactsUnprocessableEntity describes a response with status code 422, with d Unprocessable Entity, likely a bad parameter */ type PutContactsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PutContactsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PutContactsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PutContactsInternalServerError describes a response with status code 500, with d Server Internal Error */ type PutContactsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PutContactsInternalServerError) GetPayload() *sfgate_models.Error { func (o *PutContactsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/contracts/get_contracts_responses.go b/api/sfgate/sfgate_client/contracts/get_contracts_responses.go index 985efbe..fbea10e 100644 --- a/api/sfgate/sfgate_client/contracts/get_contracts_responses.go +++ b/api/sfgate/sfgate_client/contracts/get_contracts_responses.go @@ -147,8 +147,6 @@ GetContractsUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type GetContractsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetContractsUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetContractsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetContractsForbidden describes a response with status code 403, with default he Access forbidden, account lacks access */ type GetContractsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetContractsForbidden) GetPayload() *sfgate_models.Error { func (o *GetContractsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetContractsNotFound describes a response with status code 404, with default hea Resource was not found */ type GetContractsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetContractsNotFound) GetPayload() *sfgate_models.Error { func (o *GetContractsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetContractsUnprocessableEntity describes a response with status code 422, with Unprocessable Entity, likely a bad parameter */ type GetContractsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetContractsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetContractsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetContractsInternalServerError describes a response with status code 500, with Server Internal Error */ type GetContractsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetContractsInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetContractsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/courses/courses_client.go b/api/sfgate/sfgate_client/courses/courses_client.go new file mode 100644 index 0000000..5a4d49a --- /dev/null +++ b/api/sfgate/sfgate_client/courses/courses_client.go @@ -0,0 +1,418 @@ +// 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 courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new courses API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for courses API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + GetCourseLessons(params *GetCourseLessonsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCourseLessonsOK, error) + + GetCourseSections(params *GetCourseSectionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCourseSectionsOK, error) + + GetCourses(params *GetCoursesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCoursesOK, error) + + PostCourseLesson(params *PostCourseLessonParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCourseLessonOK, error) + + PostCourseSection(params *PostCourseSectionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCourseSectionOK, error) + + PostCourses(params *PostCoursesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCoursesCreated, error) + + PutCourses(params *PutCoursesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutCoursesOK, error) + + UpdateCourseLesson(params *UpdateCourseLessonParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCourseLessonOK, error) + + UpdateCourseSection(params *UpdateCourseSectionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCourseSectionOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +GetCourseLessons gets a list of course lessons +*/ +func (a *Client) GetCourseLessons(params *GetCourseLessonsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCourseLessonsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCourseLessonsParams() + } + op := &runtime.ClientOperation{ + ID: "getCourseLessons", + Method: "GET", + PathPattern: "/courselessons", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCourseLessonsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetCourseLessonsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCourseLessons: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +GetCourseSections gets a list of course sections +*/ +func (a *Client) GetCourseSections(params *GetCourseSectionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCourseSectionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCourseSectionsParams() + } + op := &runtime.ClientOperation{ + ID: "getCourseSections", + Method: "GET", + PathPattern: "/coursesections", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCourseSectionsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetCourseSectionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCourseSections: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +GetCourses gets a list courses + +Return a list of Course records from the datastore +*/ +func (a *Client) GetCourses(params *GetCoursesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCoursesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCoursesParams() + } + op := &runtime.ClientOperation{ + ID: "getCourses", + Method: "GET", + PathPattern: "/courses", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCoursesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetCoursesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCourses: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PostCourseLesson creates a new course lesson +*/ +func (a *Client) PostCourseLesson(params *PostCourseLessonParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCourseLessonOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostCourseLessonParams() + } + op := &runtime.ClientOperation{ + ID: "postCourseLesson", + Method: "POST", + PathPattern: "/courselessons", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostCourseLessonReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostCourseLessonOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postCourseLesson: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PostCourseSection creates a new course section +*/ +func (a *Client) PostCourseSection(params *PostCourseSectionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCourseSectionOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostCourseSectionParams() + } + op := &runtime.ClientOperation{ + ID: "postCourseSection", + Method: "POST", + PathPattern: "/coursesections", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostCourseSectionReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostCourseSectionOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postCourseSection: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PostCourses creates new courses + +Create Courses in Salesforce +*/ +func (a *Client) PostCourses(params *PostCoursesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCoursesCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostCoursesParams() + } + op := &runtime.ClientOperation{ + ID: "postCourses", + Method: "POST", + PathPattern: "/courses", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostCoursesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PostCoursesCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postCourses: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PutCourses updates courses + +Update Course in Salesforce +*/ +func (a *Client) PutCourses(params *PutCoursesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutCoursesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutCoursesParams() + } + op := &runtime.ClientOperation{ + ID: "putCourses", + Method: "PUT", + PathPattern: "/courses", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutCoursesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*PutCoursesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putCourses: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +UpdateCourseLesson updates an existing course lesson +*/ +func (a *Client) UpdateCourseLesson(params *UpdateCourseLessonParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCourseLessonOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUpdateCourseLessonParams() + } + op := &runtime.ClientOperation{ + ID: "updateCourseLesson", + Method: "PUT", + PathPattern: "/courselessons", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UpdateCourseLessonReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UpdateCourseLessonOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for updateCourseLesson: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +UpdateCourseSection updates an existing course section +*/ +func (a *Client) UpdateCourseSection(params *UpdateCourseSectionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateCourseSectionOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUpdateCourseSectionParams() + } + op := &runtime.ClientOperation{ + ID: "updateCourseSection", + Method: "PUT", + PathPattern: "/coursesections", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UpdateCourseSectionReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UpdateCourseSectionOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for updateCourseSection: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/sfgate/sfgate_client/courses/get_course_lessons_parameters.go b/api/sfgate/sfgate_client/courses/get_course_lessons_parameters.go new file mode 100644 index 0000000..ac5cde0 --- /dev/null +++ b/api/sfgate/sfgate_client/courses/get_course_lessons_parameters.go @@ -0,0 +1,240 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetCourseLessonsParams creates a new GetCourseLessonsParams 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 NewGetCourseLessonsParams() *GetCourseLessonsParams { + return &GetCourseLessonsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetCourseLessonsParamsWithTimeout creates a new GetCourseLessonsParams object +// with the ability to set a timeout on a request. +func NewGetCourseLessonsParamsWithTimeout(timeout time.Duration) *GetCourseLessonsParams { + return &GetCourseLessonsParams{ + timeout: timeout, + } +} + +// NewGetCourseLessonsParamsWithContext creates a new GetCourseLessonsParams object +// with the ability to set a context for a request. +func NewGetCourseLessonsParamsWithContext(ctx context.Context) *GetCourseLessonsParams { + return &GetCourseLessonsParams{ + Context: ctx, + } +} + +// NewGetCourseLessonsParamsWithHTTPClient creates a new GetCourseLessonsParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetCourseLessonsParamsWithHTTPClient(client *http.Client) *GetCourseLessonsParams { + return &GetCourseLessonsParams{ + HTTPClient: client, + } +} + +/* +GetCourseLessonsParams contains all the parameters to send to the API endpoint + + for the get course lessons operation. + + Typically these are written to a http.Request. +*/ +type GetCourseLessonsParams struct { + + /* ID. + + Unique Record ID + */ + ID *string + + /* Limit. + + How many objects to return at one time + + Format: int64 + */ + Limit *int64 + + /* Offset. + + How many objects to skip? + + Format: int64 + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get course lessons params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetCourseLessonsParams) WithDefaults() *GetCourseLessonsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get course lessons params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetCourseLessonsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get course lessons params +func (o *GetCourseLessonsParams) WithTimeout(timeout time.Duration) *GetCourseLessonsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get course lessons params +func (o *GetCourseLessonsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get course lessons params +func (o *GetCourseLessonsParams) WithContext(ctx context.Context) *GetCourseLessonsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get course lessons params +func (o *GetCourseLessonsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get course lessons params +func (o *GetCourseLessonsParams) WithHTTPClient(client *http.Client) *GetCourseLessonsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get course lessons params +func (o *GetCourseLessonsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the get course lessons params +func (o *GetCourseLessonsParams) WithID(id *string) *GetCourseLessonsParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get course lessons params +func (o *GetCourseLessonsParams) SetID(id *string) { + o.ID = id +} + +// WithLimit adds the limit to the get course lessons params +func (o *GetCourseLessonsParams) WithLimit(limit *int64) *GetCourseLessonsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get course lessons params +func (o *GetCourseLessonsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get course lessons params +func (o *GetCourseLessonsParams) WithOffset(offset *int64) *GetCourseLessonsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get course lessons params +func (o *GetCourseLessonsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCourseLessonsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/sfgate/sfgate_client/courses/get_course_lessons_responses.go b/api/sfgate/sfgate_client/courses/get_course_lessons_responses.go new file mode 100644 index 0000000..d60cae3 --- /dev/null +++ b/api/sfgate/sfgate_client/courses/get_course_lessons_responses.go @@ -0,0 +1,477 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// GetCourseLessonsReader is a Reader for the GetCourseLessons structure. +type GetCourseLessonsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCourseLessonsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCourseLessonsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCourseLessonsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCourseLessonsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCourseLessonsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCourseLessonsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCourseLessonsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGetCourseLessonsOK creates a GetCourseLessonsOK with default headers values +func NewGetCourseLessonsOK() *GetCourseLessonsOK { + return &GetCourseLessonsOK{} +} + +/* +GetCourseLessonsOK describes a response with status code 200, with default header values. + +CourseLesson Response Object +*/ +type GetCourseLessonsOK struct { + Payload *sfgate_models.CourseLessonResponse +} + +// IsSuccess returns true when this get course lessons o k response has a 2xx status code +func (o *GetCourseLessonsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get course lessons o k response has a 3xx status code +func (o *GetCourseLessonsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course lessons o k response has a 4xx status code +func (o *GetCourseLessonsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get course lessons o k response has a 5xx status code +func (o *GetCourseLessonsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get course lessons o k response a status code equal to that given +func (o *GetCourseLessonsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get course lessons o k response +func (o *GetCourseLessonsOK) Code() int { + return 200 +} + +func (o *GetCourseLessonsOK) Error() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsOK %+v", 200, o.Payload) +} + +func (o *GetCourseLessonsOK) String() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsOK %+v", 200, o.Payload) +} + +func (o *GetCourseLessonsOK) GetPayload() *sfgate_models.CourseLessonResponse { + return o.Payload +} + +func (o *GetCourseLessonsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.CourseLessonResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseLessonsUnauthorized creates a GetCourseLessonsUnauthorized with default headers values +func NewGetCourseLessonsUnauthorized() *GetCourseLessonsUnauthorized { + return &GetCourseLessonsUnauthorized{} +} + +/* +GetCourseLessonsUnauthorized describes a response with status code 401, with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetCourseLessonsUnauthorized struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get course lessons unauthorized response has a 2xx status code +func (o *GetCourseLessonsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course lessons unauthorized response has a 3xx status code +func (o *GetCourseLessonsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course lessons unauthorized response has a 4xx status code +func (o *GetCourseLessonsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course lessons unauthorized response has a 5xx status code +func (o *GetCourseLessonsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get course lessons unauthorized response a status code equal to that given +func (o *GetCourseLessonsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get course lessons unauthorized response +func (o *GetCourseLessonsUnauthorized) Code() int { + return 401 +} + +func (o *GetCourseLessonsUnauthorized) Error() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCourseLessonsUnauthorized) String() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCourseLessonsUnauthorized) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCourseLessonsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseLessonsForbidden creates a GetCourseLessonsForbidden with default headers values +func NewGetCourseLessonsForbidden() *GetCourseLessonsForbidden { + return &GetCourseLessonsForbidden{} +} + +/* +GetCourseLessonsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type GetCourseLessonsForbidden struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get course lessons forbidden response has a 2xx status code +func (o *GetCourseLessonsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course lessons forbidden response has a 3xx status code +func (o *GetCourseLessonsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course lessons forbidden response has a 4xx status code +func (o *GetCourseLessonsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course lessons forbidden response has a 5xx status code +func (o *GetCourseLessonsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get course lessons forbidden response a status code equal to that given +func (o *GetCourseLessonsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get course lessons forbidden response +func (o *GetCourseLessonsForbidden) Code() int { + return 403 +} + +func (o *GetCourseLessonsForbidden) Error() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsForbidden %+v", 403, o.Payload) +} + +func (o *GetCourseLessonsForbidden) String() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsForbidden %+v", 403, o.Payload) +} + +func (o *GetCourseLessonsForbidden) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCourseLessonsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseLessonsNotFound creates a GetCourseLessonsNotFound with default headers values +func NewGetCourseLessonsNotFound() *GetCourseLessonsNotFound { + return &GetCourseLessonsNotFound{} +} + +/* +GetCourseLessonsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type GetCourseLessonsNotFound struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get course lessons not found response has a 2xx status code +func (o *GetCourseLessonsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course lessons not found response has a 3xx status code +func (o *GetCourseLessonsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course lessons not found response has a 4xx status code +func (o *GetCourseLessonsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course lessons not found response has a 5xx status code +func (o *GetCourseLessonsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get course lessons not found response a status code equal to that given +func (o *GetCourseLessonsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get course lessons not found response +func (o *GetCourseLessonsNotFound) Code() int { + return 404 +} + +func (o *GetCourseLessonsNotFound) Error() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsNotFound %+v", 404, o.Payload) +} + +func (o *GetCourseLessonsNotFound) String() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsNotFound %+v", 404, o.Payload) +} + +func (o *GetCourseLessonsNotFound) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCourseLessonsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseLessonsUnprocessableEntity creates a GetCourseLessonsUnprocessableEntity with default headers values +func NewGetCourseLessonsUnprocessableEntity() *GetCourseLessonsUnprocessableEntity { + return &GetCourseLessonsUnprocessableEntity{} +} + +/* +GetCourseLessonsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCourseLessonsUnprocessableEntity struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get course lessons unprocessable entity response has a 2xx status code +func (o *GetCourseLessonsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course lessons unprocessable entity response has a 3xx status code +func (o *GetCourseLessonsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course lessons unprocessable entity response has a 4xx status code +func (o *GetCourseLessonsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course lessons unprocessable entity response has a 5xx status code +func (o *GetCourseLessonsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this get course lessons unprocessable entity response a status code equal to that given +func (o *GetCourseLessonsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the get course lessons unprocessable entity response +func (o *GetCourseLessonsUnprocessableEntity) Code() int { + return 422 +} + +func (o *GetCourseLessonsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCourseLessonsUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCourseLessonsUnprocessableEntity) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCourseLessonsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseLessonsInternalServerError creates a GetCourseLessonsInternalServerError with default headers values +func NewGetCourseLessonsInternalServerError() *GetCourseLessonsInternalServerError { + return &GetCourseLessonsInternalServerError{} +} + +/* +GetCourseLessonsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type GetCourseLessonsInternalServerError struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get course lessons internal server error response has a 2xx status code +func (o *GetCourseLessonsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course lessons internal server error response has a 3xx status code +func (o *GetCourseLessonsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course lessons internal server error response has a 4xx status code +func (o *GetCourseLessonsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get course lessons internal server error response has a 5xx status code +func (o *GetCourseLessonsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get course lessons internal server error response a status code equal to that given +func (o *GetCourseLessonsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get course lessons internal server error response +func (o *GetCourseLessonsInternalServerError) Code() int { + return 500 +} + +func (o *GetCourseLessonsInternalServerError) Error() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCourseLessonsInternalServerError) String() string { + return fmt.Sprintf("[GET /courselessons][%d] getCourseLessonsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCourseLessonsInternalServerError) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCourseLessonsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/event_categories/get_event_categorys_parameters.go b/api/sfgate/sfgate_client/courses/get_course_sections_parameters.go similarity index 50% rename from api/members/members_client/event_categories/get_event_categorys_parameters.go rename to api/sfgate/sfgate_client/courses/get_course_sections_parameters.go index 7cc2abe..8f944fb 100644 --- a/api/members/members_client/event_categories/get_event_categorys_parameters.go +++ b/api/sfgate/sfgate_client/courses/get_course_sections_parameters.go @@ -4,7 +4,7 @@ // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed -package event_categories +package courses // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -21,50 +21,50 @@ import ( "github.com/go-openapi/swag" ) -// NewGetEventCategorysParams creates a new GetEventCategorysParams object, +// NewGetCourseSectionsParams creates a new GetCourseSectionsParams 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 NewGetEventCategorysParams() *GetEventCategorysParams { - return &GetEventCategorysParams{ +func NewGetCourseSectionsParams() *GetCourseSectionsParams { + return &GetCourseSectionsParams{ timeout: cr.DefaultTimeout, } } -// NewGetEventCategorysParamsWithTimeout creates a new GetEventCategorysParams object +// NewGetCourseSectionsParamsWithTimeout creates a new GetCourseSectionsParams object // with the ability to set a timeout on a request. -func NewGetEventCategorysParamsWithTimeout(timeout time.Duration) *GetEventCategorysParams { - return &GetEventCategorysParams{ +func NewGetCourseSectionsParamsWithTimeout(timeout time.Duration) *GetCourseSectionsParams { + return &GetCourseSectionsParams{ timeout: timeout, } } -// NewGetEventCategorysParamsWithContext creates a new GetEventCategorysParams object +// NewGetCourseSectionsParamsWithContext creates a new GetCourseSectionsParams object // with the ability to set a context for a request. -func NewGetEventCategorysParamsWithContext(ctx context.Context) *GetEventCategorysParams { - return &GetEventCategorysParams{ +func NewGetCourseSectionsParamsWithContext(ctx context.Context) *GetCourseSectionsParams { + return &GetCourseSectionsParams{ Context: ctx, } } -// NewGetEventCategorysParamsWithHTTPClient creates a new GetEventCategorysParams object +// NewGetCourseSectionsParamsWithHTTPClient creates a new GetCourseSectionsParams object // with the ability to set a custom HTTPClient for a request. -func NewGetEventCategorysParamsWithHTTPClient(client *http.Client) *GetEventCategorysParams { - return &GetEventCategorysParams{ +func NewGetCourseSectionsParamsWithHTTPClient(client *http.Client) *GetCourseSectionsParams { + return &GetCourseSectionsParams{ HTTPClient: client, } } /* -GetEventCategorysParams contains all the parameters to send to the API endpoint +GetCourseSectionsParams contains all the parameters to send to the API endpoint - for the get event categorys operation. + for the get course sections operation. Typically these are written to a http.Request. */ -type GetEventCategorysParams struct { +type GetCourseSectionsParams struct { /* ID. @@ -93,89 +93,89 @@ type GetEventCategorysParams struct { HTTPClient *http.Client } -// WithDefaults hydrates default values in the get event categorys params (not the query body). +// WithDefaults hydrates default values in the get course sections params (not the query body). // // All values with no default are reset to their zero value. -func (o *GetEventCategorysParams) WithDefaults() *GetEventCategorysParams { +func (o *GetCourseSectionsParams) WithDefaults() *GetCourseSectionsParams { o.SetDefaults() return o } -// SetDefaults hydrates default values in the get event categorys params (not the query body). +// SetDefaults hydrates default values in the get course sections params (not the query body). // // All values with no default are reset to their zero value. -func (o *GetEventCategorysParams) SetDefaults() { +func (o *GetCourseSectionsParams) SetDefaults() { // no default values defined for this parameter } -// WithTimeout adds the timeout to the get event categorys params -func (o *GetEventCategorysParams) WithTimeout(timeout time.Duration) *GetEventCategorysParams { +// WithTimeout adds the timeout to the get course sections params +func (o *GetCourseSectionsParams) WithTimeout(timeout time.Duration) *GetCourseSectionsParams { o.SetTimeout(timeout) return o } -// SetTimeout adds the timeout to the get event categorys params -func (o *GetEventCategorysParams) SetTimeout(timeout time.Duration) { +// SetTimeout adds the timeout to the get course sections params +func (o *GetCourseSectionsParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } -// WithContext adds the context to the get event categorys params -func (o *GetEventCategorysParams) WithContext(ctx context.Context) *GetEventCategorysParams { +// WithContext adds the context to the get course sections params +func (o *GetCourseSectionsParams) WithContext(ctx context.Context) *GetCourseSectionsParams { o.SetContext(ctx) return o } -// SetContext adds the context to the get event categorys params -func (o *GetEventCategorysParams) SetContext(ctx context.Context) { +// SetContext adds the context to the get course sections params +func (o *GetCourseSectionsParams) SetContext(ctx context.Context) { o.Context = ctx } -// WithHTTPClient adds the HTTPClient to the get event categorys params -func (o *GetEventCategorysParams) WithHTTPClient(client *http.Client) *GetEventCategorysParams { +// WithHTTPClient adds the HTTPClient to the get course sections params +func (o *GetCourseSectionsParams) WithHTTPClient(client *http.Client) *GetCourseSectionsParams { o.SetHTTPClient(client) return o } -// SetHTTPClient adds the HTTPClient to the get event categorys params -func (o *GetEventCategorysParams) SetHTTPClient(client *http.Client) { +// SetHTTPClient adds the HTTPClient to the get course sections params +func (o *GetCourseSectionsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithID adds the id to the get event categorys params -func (o *GetEventCategorysParams) WithID(id *string) *GetEventCategorysParams { +// WithID adds the id to the get course sections params +func (o *GetCourseSectionsParams) WithID(id *string) *GetCourseSectionsParams { o.SetID(id) return o } -// SetID adds the id to the get event categorys params -func (o *GetEventCategorysParams) SetID(id *string) { +// SetID adds the id to the get course sections params +func (o *GetCourseSectionsParams) SetID(id *string) { o.ID = id } -// WithLimit adds the limit to the get event categorys params -func (o *GetEventCategorysParams) WithLimit(limit *int64) *GetEventCategorysParams { +// WithLimit adds the limit to the get course sections params +func (o *GetCourseSectionsParams) WithLimit(limit *int64) *GetCourseSectionsParams { o.SetLimit(limit) return o } -// SetLimit adds the limit to the get event categorys params -func (o *GetEventCategorysParams) SetLimit(limit *int64) { +// SetLimit adds the limit to the get course sections params +func (o *GetCourseSectionsParams) SetLimit(limit *int64) { o.Limit = limit } -// WithOffset adds the offset to the get event categorys params -func (o *GetEventCategorysParams) WithOffset(offset *int64) *GetEventCategorysParams { +// WithOffset adds the offset to the get course sections params +func (o *GetCourseSectionsParams) WithOffset(offset *int64) *GetCourseSectionsParams { o.SetOffset(offset) return o } -// SetOffset adds the offset to the get event categorys params -func (o *GetEventCategorysParams) SetOffset(offset *int64) { +// SetOffset adds the offset to the get course sections params +func (o *GetCourseSectionsParams) SetOffset(offset *int64) { o.Offset = offset } // WriteToRequest writes these params to a swagger request -func (o *GetEventCategorysParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *GetCourseSectionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/api/sfgate/sfgate_client/courses/get_course_sections_responses.go b/api/sfgate/sfgate_client/courses/get_course_sections_responses.go new file mode 100644 index 0000000..900d05c --- /dev/null +++ b/api/sfgate/sfgate_client/courses/get_course_sections_responses.go @@ -0,0 +1,477 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// GetCourseSectionsReader is a Reader for the GetCourseSections structure. +type GetCourseSectionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCourseSectionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCourseSectionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCourseSectionsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCourseSectionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCourseSectionsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCourseSectionsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCourseSectionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGetCourseSectionsOK creates a GetCourseSectionsOK with default headers values +func NewGetCourseSectionsOK() *GetCourseSectionsOK { + return &GetCourseSectionsOK{} +} + +/* +GetCourseSectionsOK describes a response with status code 200, with default header values. + +CourseSection Response Object +*/ +type GetCourseSectionsOK struct { + Payload *sfgate_models.CourseSectionResponse +} + +// IsSuccess returns true when this get course sections o k response has a 2xx status code +func (o *GetCourseSectionsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get course sections o k response has a 3xx status code +func (o *GetCourseSectionsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course sections o k response has a 4xx status code +func (o *GetCourseSectionsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get course sections o k response has a 5xx status code +func (o *GetCourseSectionsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get course sections o k response a status code equal to that given +func (o *GetCourseSectionsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get course sections o k response +func (o *GetCourseSectionsOK) Code() int { + return 200 +} + +func (o *GetCourseSectionsOK) Error() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsOK %+v", 200, o.Payload) +} + +func (o *GetCourseSectionsOK) String() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsOK %+v", 200, o.Payload) +} + +func (o *GetCourseSectionsOK) GetPayload() *sfgate_models.CourseSectionResponse { + return o.Payload +} + +func (o *GetCourseSectionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.CourseSectionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseSectionsUnauthorized creates a GetCourseSectionsUnauthorized with default headers values +func NewGetCourseSectionsUnauthorized() *GetCourseSectionsUnauthorized { + return &GetCourseSectionsUnauthorized{} +} + +/* +GetCourseSectionsUnauthorized describes a response with status code 401, with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetCourseSectionsUnauthorized struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get course sections unauthorized response has a 2xx status code +func (o *GetCourseSectionsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course sections unauthorized response has a 3xx status code +func (o *GetCourseSectionsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course sections unauthorized response has a 4xx status code +func (o *GetCourseSectionsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course sections unauthorized response has a 5xx status code +func (o *GetCourseSectionsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get course sections unauthorized response a status code equal to that given +func (o *GetCourseSectionsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get course sections unauthorized response +func (o *GetCourseSectionsUnauthorized) Code() int { + return 401 +} + +func (o *GetCourseSectionsUnauthorized) Error() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCourseSectionsUnauthorized) String() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCourseSectionsUnauthorized) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCourseSectionsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseSectionsForbidden creates a GetCourseSectionsForbidden with default headers values +func NewGetCourseSectionsForbidden() *GetCourseSectionsForbidden { + return &GetCourseSectionsForbidden{} +} + +/* +GetCourseSectionsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type GetCourseSectionsForbidden struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get course sections forbidden response has a 2xx status code +func (o *GetCourseSectionsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course sections forbidden response has a 3xx status code +func (o *GetCourseSectionsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course sections forbidden response has a 4xx status code +func (o *GetCourseSectionsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course sections forbidden response has a 5xx status code +func (o *GetCourseSectionsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get course sections forbidden response a status code equal to that given +func (o *GetCourseSectionsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get course sections forbidden response +func (o *GetCourseSectionsForbidden) Code() int { + return 403 +} + +func (o *GetCourseSectionsForbidden) Error() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsForbidden %+v", 403, o.Payload) +} + +func (o *GetCourseSectionsForbidden) String() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsForbidden %+v", 403, o.Payload) +} + +func (o *GetCourseSectionsForbidden) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCourseSectionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseSectionsNotFound creates a GetCourseSectionsNotFound with default headers values +func NewGetCourseSectionsNotFound() *GetCourseSectionsNotFound { + return &GetCourseSectionsNotFound{} +} + +/* +GetCourseSectionsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type GetCourseSectionsNotFound struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get course sections not found response has a 2xx status code +func (o *GetCourseSectionsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course sections not found response has a 3xx status code +func (o *GetCourseSectionsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course sections not found response has a 4xx status code +func (o *GetCourseSectionsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course sections not found response has a 5xx status code +func (o *GetCourseSectionsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get course sections not found response a status code equal to that given +func (o *GetCourseSectionsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get course sections not found response +func (o *GetCourseSectionsNotFound) Code() int { + return 404 +} + +func (o *GetCourseSectionsNotFound) Error() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsNotFound %+v", 404, o.Payload) +} + +func (o *GetCourseSectionsNotFound) String() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsNotFound %+v", 404, o.Payload) +} + +func (o *GetCourseSectionsNotFound) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCourseSectionsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseSectionsUnprocessableEntity creates a GetCourseSectionsUnprocessableEntity with default headers values +func NewGetCourseSectionsUnprocessableEntity() *GetCourseSectionsUnprocessableEntity { + return &GetCourseSectionsUnprocessableEntity{} +} + +/* +GetCourseSectionsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCourseSectionsUnprocessableEntity struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get course sections unprocessable entity response has a 2xx status code +func (o *GetCourseSectionsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course sections unprocessable entity response has a 3xx status code +func (o *GetCourseSectionsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course sections unprocessable entity response has a 4xx status code +func (o *GetCourseSectionsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this get course sections unprocessable entity response has a 5xx status code +func (o *GetCourseSectionsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this get course sections unprocessable entity response a status code equal to that given +func (o *GetCourseSectionsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the get course sections unprocessable entity response +func (o *GetCourseSectionsUnprocessableEntity) Code() int { + return 422 +} + +func (o *GetCourseSectionsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCourseSectionsUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCourseSectionsUnprocessableEntity) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCourseSectionsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCourseSectionsInternalServerError creates a GetCourseSectionsInternalServerError with default headers values +func NewGetCourseSectionsInternalServerError() *GetCourseSectionsInternalServerError { + return &GetCourseSectionsInternalServerError{} +} + +/* +GetCourseSectionsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type GetCourseSectionsInternalServerError struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get course sections internal server error response has a 2xx status code +func (o *GetCourseSectionsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get course sections internal server error response has a 3xx status code +func (o *GetCourseSectionsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get course sections internal server error response has a 4xx status code +func (o *GetCourseSectionsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get course sections internal server error response has a 5xx status code +func (o *GetCourseSectionsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get course sections internal server error response a status code equal to that given +func (o *GetCourseSectionsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get course sections internal server error response +func (o *GetCourseSectionsInternalServerError) Code() int { + return 500 +} + +func (o *GetCourseSectionsInternalServerError) Error() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCourseSectionsInternalServerError) String() string { + return fmt.Sprintf("[GET /coursesections][%d] getCourseSectionsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCourseSectionsInternalServerError) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCourseSectionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/sfgate/sfgate_client/courses/get_courses_parameters.go b/api/sfgate/sfgate_client/courses/get_courses_parameters.go new file mode 100644 index 0000000..dbbe3b1 --- /dev/null +++ b/api/sfgate/sfgate_client/courses/get_courses_parameters.go @@ -0,0 +1,240 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetCoursesParams creates a new GetCoursesParams 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 NewGetCoursesParams() *GetCoursesParams { + return &GetCoursesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetCoursesParamsWithTimeout creates a new GetCoursesParams object +// with the ability to set a timeout on a request. +func NewGetCoursesParamsWithTimeout(timeout time.Duration) *GetCoursesParams { + return &GetCoursesParams{ + timeout: timeout, + } +} + +// NewGetCoursesParamsWithContext creates a new GetCoursesParams object +// with the ability to set a context for a request. +func NewGetCoursesParamsWithContext(ctx context.Context) *GetCoursesParams { + return &GetCoursesParams{ + Context: ctx, + } +} + +// NewGetCoursesParamsWithHTTPClient creates a new GetCoursesParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetCoursesParamsWithHTTPClient(client *http.Client) *GetCoursesParams { + return &GetCoursesParams{ + HTTPClient: client, + } +} + +/* +GetCoursesParams contains all the parameters to send to the API endpoint + + for the get courses operation. + + Typically these are written to a http.Request. +*/ +type GetCoursesParams struct { + + /* ID. + + Unique Record ID + */ + ID *string + + /* Limit. + + How many objects to return at one time + + Format: int64 + */ + Limit *int64 + + /* Offset. + + How many objects to skip? + + Format: int64 + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get courses params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetCoursesParams) WithDefaults() *GetCoursesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get courses params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetCoursesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get courses params +func (o *GetCoursesParams) WithTimeout(timeout time.Duration) *GetCoursesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get courses params +func (o *GetCoursesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get courses params +func (o *GetCoursesParams) WithContext(ctx context.Context) *GetCoursesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get courses params +func (o *GetCoursesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get courses params +func (o *GetCoursesParams) WithHTTPClient(client *http.Client) *GetCoursesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get courses params +func (o *GetCoursesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the get courses params +func (o *GetCoursesParams) WithID(id *string) *GetCoursesParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get courses params +func (o *GetCoursesParams) SetID(id *string) { + o.ID = id +} + +// WithLimit adds the limit to the get courses params +func (o *GetCoursesParams) WithLimit(limit *int64) *GetCoursesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get courses params +func (o *GetCoursesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get courses params +func (o *GetCoursesParams) WithOffset(offset *int64) *GetCoursesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get courses params +func (o *GetCoursesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCoursesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/sfgate/sfgate_client/courses/get_courses_responses.go b/api/sfgate/sfgate_client/courses/get_courses_responses.go new file mode 100644 index 0000000..db8bb0a --- /dev/null +++ b/api/sfgate/sfgate_client/courses/get_courses_responses.go @@ -0,0 +1,477 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// GetCoursesReader is a Reader for the GetCourses structure. +type GetCoursesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCoursesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCoursesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCoursesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCoursesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCoursesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCoursesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCoursesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGetCoursesOK creates a GetCoursesOK with default headers values +func NewGetCoursesOK() *GetCoursesOK { + return &GetCoursesOK{} +} + +/* +GetCoursesOK describes a response with status code 200, with default header values. + +Course Response Object +*/ +type GetCoursesOK struct { + Payload *sfgate_models.CourseResponse +} + +// IsSuccess returns true when this get courses o k response has a 2xx status code +func (o *GetCoursesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get courses o k response has a 3xx status code +func (o *GetCoursesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get courses o k response has a 4xx status code +func (o *GetCoursesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get courses o k response has a 5xx status code +func (o *GetCoursesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get courses o k response a status code equal to that given +func (o *GetCoursesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get courses o k response +func (o *GetCoursesOK) Code() int { + return 200 +} + +func (o *GetCoursesOK) Error() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesOK %+v", 200, o.Payload) +} + +func (o *GetCoursesOK) String() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesOK %+v", 200, o.Payload) +} + +func (o *GetCoursesOK) GetPayload() *sfgate_models.CourseResponse { + return o.Payload +} + +func (o *GetCoursesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.CourseResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoursesUnauthorized creates a GetCoursesUnauthorized with default headers values +func NewGetCoursesUnauthorized() *GetCoursesUnauthorized { + return &GetCoursesUnauthorized{} +} + +/* +GetCoursesUnauthorized describes a response with status code 401, with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetCoursesUnauthorized struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get courses unauthorized response has a 2xx status code +func (o *GetCoursesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get courses unauthorized response has a 3xx status code +func (o *GetCoursesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get courses unauthorized response has a 4xx status code +func (o *GetCoursesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get courses unauthorized response has a 5xx status code +func (o *GetCoursesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get courses unauthorized response a status code equal to that given +func (o *GetCoursesUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get courses unauthorized response +func (o *GetCoursesUnauthorized) Code() int { + return 401 +} + +func (o *GetCoursesUnauthorized) Error() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCoursesUnauthorized) String() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCoursesUnauthorized) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCoursesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoursesForbidden creates a GetCoursesForbidden with default headers values +func NewGetCoursesForbidden() *GetCoursesForbidden { + return &GetCoursesForbidden{} +} + +/* +GetCoursesForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type GetCoursesForbidden struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get courses forbidden response has a 2xx status code +func (o *GetCoursesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get courses forbidden response has a 3xx status code +func (o *GetCoursesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get courses forbidden response has a 4xx status code +func (o *GetCoursesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get courses forbidden response has a 5xx status code +func (o *GetCoursesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get courses forbidden response a status code equal to that given +func (o *GetCoursesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get courses forbidden response +func (o *GetCoursesForbidden) Code() int { + return 403 +} + +func (o *GetCoursesForbidden) Error() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesForbidden %+v", 403, o.Payload) +} + +func (o *GetCoursesForbidden) String() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesForbidden %+v", 403, o.Payload) +} + +func (o *GetCoursesForbidden) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCoursesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoursesNotFound creates a GetCoursesNotFound with default headers values +func NewGetCoursesNotFound() *GetCoursesNotFound { + return &GetCoursesNotFound{} +} + +/* +GetCoursesNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type GetCoursesNotFound struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get courses not found response has a 2xx status code +func (o *GetCoursesNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get courses not found response has a 3xx status code +func (o *GetCoursesNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get courses not found response has a 4xx status code +func (o *GetCoursesNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get courses not found response has a 5xx status code +func (o *GetCoursesNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get courses not found response a status code equal to that given +func (o *GetCoursesNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get courses not found response +func (o *GetCoursesNotFound) Code() int { + return 404 +} + +func (o *GetCoursesNotFound) Error() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesNotFound %+v", 404, o.Payload) +} + +func (o *GetCoursesNotFound) String() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesNotFound %+v", 404, o.Payload) +} + +func (o *GetCoursesNotFound) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCoursesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoursesUnprocessableEntity creates a GetCoursesUnprocessableEntity with default headers values +func NewGetCoursesUnprocessableEntity() *GetCoursesUnprocessableEntity { + return &GetCoursesUnprocessableEntity{} +} + +/* +GetCoursesUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCoursesUnprocessableEntity struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get courses unprocessable entity response has a 2xx status code +func (o *GetCoursesUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get courses unprocessable entity response has a 3xx status code +func (o *GetCoursesUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get courses unprocessable entity response has a 4xx status code +func (o *GetCoursesUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this get courses unprocessable entity response has a 5xx status code +func (o *GetCoursesUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this get courses unprocessable entity response a status code equal to that given +func (o *GetCoursesUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the get courses unprocessable entity response +func (o *GetCoursesUnprocessableEntity) Code() int { + return 422 +} + +func (o *GetCoursesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCoursesUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCoursesUnprocessableEntity) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCoursesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoursesInternalServerError creates a GetCoursesInternalServerError with default headers values +func NewGetCoursesInternalServerError() *GetCoursesInternalServerError { + return &GetCoursesInternalServerError{} +} + +/* +GetCoursesInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type GetCoursesInternalServerError struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get courses internal server error response has a 2xx status code +func (o *GetCoursesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get courses internal server error response has a 3xx status code +func (o *GetCoursesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get courses internal server error response has a 4xx status code +func (o *GetCoursesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get courses internal server error response has a 5xx status code +func (o *GetCoursesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get courses internal server error response a status code equal to that given +func (o *GetCoursesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get courses internal server error response +func (o *GetCoursesInternalServerError) Code() int { + return 500 +} + +func (o *GetCoursesInternalServerError) Error() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCoursesInternalServerError) String() string { + return fmt.Sprintf("[GET /courses][%d] getCoursesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCoursesInternalServerError) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetCoursesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/sfgate/sfgate_client/courses/post_course_lesson_parameters.go b/api/sfgate/sfgate_client/courses/post_course_lesson_parameters.go new file mode 100644 index 0000000..09206a6 --- /dev/null +++ b/api/sfgate/sfgate_client/courses/post_course_lesson_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// NewPostCourseLessonParams creates a new PostCourseLessonParams 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 NewPostCourseLessonParams() *PostCourseLessonParams { + return &PostCourseLessonParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostCourseLessonParamsWithTimeout creates a new PostCourseLessonParams object +// with the ability to set a timeout on a request. +func NewPostCourseLessonParamsWithTimeout(timeout time.Duration) *PostCourseLessonParams { + return &PostCourseLessonParams{ + timeout: timeout, + } +} + +// NewPostCourseLessonParamsWithContext creates a new PostCourseLessonParams object +// with the ability to set a context for a request. +func NewPostCourseLessonParamsWithContext(ctx context.Context) *PostCourseLessonParams { + return &PostCourseLessonParams{ + Context: ctx, + } +} + +// NewPostCourseLessonParamsWithHTTPClient creates a new PostCourseLessonParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostCourseLessonParamsWithHTTPClient(client *http.Client) *PostCourseLessonParams { + return &PostCourseLessonParams{ + HTTPClient: client, + } +} + +/* +PostCourseLessonParams contains all the parameters to send to the API endpoint + + for the post course lesson operation. + + Typically these are written to a http.Request. +*/ +type PostCourseLessonParams struct { + + /* CourselessonRequest. + + An array of new CourseLesson records + */ + CourselessonRequest *sfgate_models.CourseLessonRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post course lesson params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostCourseLessonParams) WithDefaults() *PostCourseLessonParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post course lesson params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostCourseLessonParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post course lesson params +func (o *PostCourseLessonParams) WithTimeout(timeout time.Duration) *PostCourseLessonParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post course lesson params +func (o *PostCourseLessonParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post course lesson params +func (o *PostCourseLessonParams) WithContext(ctx context.Context) *PostCourseLessonParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post course lesson params +func (o *PostCourseLessonParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post course lesson params +func (o *PostCourseLessonParams) WithHTTPClient(client *http.Client) *PostCourseLessonParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post course lesson params +func (o *PostCourseLessonParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCourselessonRequest adds the courselessonRequest to the post course lesson params +func (o *PostCourseLessonParams) WithCourselessonRequest(courselessonRequest *sfgate_models.CourseLessonRequest) *PostCourseLessonParams { + o.SetCourselessonRequest(courselessonRequest) + return o +} + +// SetCourselessonRequest adds the courselessonRequest to the post course lesson params +func (o *PostCourseLessonParams) SetCourselessonRequest(courselessonRequest *sfgate_models.CourseLessonRequest) { + o.CourselessonRequest = courselessonRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostCourseLessonParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.CourselessonRequest != nil { + if err := r.SetBodyParam(o.CourselessonRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/sfgate/sfgate_client/courses/post_course_lesson_responses.go b/api/sfgate/sfgate_client/courses/post_course_lesson_responses.go new file mode 100644 index 0000000..de6c17a --- /dev/null +++ b/api/sfgate/sfgate_client/courses/post_course_lesson_responses.go @@ -0,0 +1,477 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// PostCourseLessonReader is a Reader for the PostCourseLesson structure. +type PostCourseLessonReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostCourseLessonReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostCourseLessonOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostCourseLessonUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostCourseLessonForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostCourseLessonNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostCourseLessonUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostCourseLessonInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostCourseLessonOK creates a PostCourseLessonOK with default headers values +func NewPostCourseLessonOK() *PostCourseLessonOK { + return &PostCourseLessonOK{} +} + +/* +PostCourseLessonOK describes a response with status code 200, with default header values. + +CourseLesson Response Object +*/ +type PostCourseLessonOK struct { + Payload *sfgate_models.CourseLessonResponse +} + +// IsSuccess returns true when this post course lesson o k response has a 2xx status code +func (o *PostCourseLessonOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post course lesson o k response has a 3xx status code +func (o *PostCourseLessonOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course lesson o k response has a 4xx status code +func (o *PostCourseLessonOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this post course lesson o k response has a 5xx status code +func (o *PostCourseLessonOK) IsServerError() bool { + return false +} + +// IsCode returns true when this post course lesson o k response a status code equal to that given +func (o *PostCourseLessonOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the post course lesson o k response +func (o *PostCourseLessonOK) Code() int { + return 200 +} + +func (o *PostCourseLessonOK) Error() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonOK %+v", 200, o.Payload) +} + +func (o *PostCourseLessonOK) String() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonOK %+v", 200, o.Payload) +} + +func (o *PostCourseLessonOK) GetPayload() *sfgate_models.CourseLessonResponse { + return o.Payload +} + +func (o *PostCourseLessonOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.CourseLessonResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseLessonUnauthorized creates a PostCourseLessonUnauthorized with default headers values +func NewPostCourseLessonUnauthorized() *PostCourseLessonUnauthorized { + return &PostCourseLessonUnauthorized{} +} + +/* +PostCourseLessonUnauthorized describes a response with status code 401, with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostCourseLessonUnauthorized struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post course lesson unauthorized response has a 2xx status code +func (o *PostCourseLessonUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course lesson unauthorized response has a 3xx status code +func (o *PostCourseLessonUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course lesson unauthorized response has a 4xx status code +func (o *PostCourseLessonUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course lesson unauthorized response has a 5xx status code +func (o *PostCourseLessonUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this post course lesson unauthorized response a status code equal to that given +func (o *PostCourseLessonUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the post course lesson unauthorized response +func (o *PostCourseLessonUnauthorized) Code() int { + return 401 +} + +func (o *PostCourseLessonUnauthorized) Error() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCourseLessonUnauthorized) String() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCourseLessonUnauthorized) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCourseLessonUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseLessonForbidden creates a PostCourseLessonForbidden with default headers values +func NewPostCourseLessonForbidden() *PostCourseLessonForbidden { + return &PostCourseLessonForbidden{} +} + +/* +PostCourseLessonForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PostCourseLessonForbidden struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post course lesson forbidden response has a 2xx status code +func (o *PostCourseLessonForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course lesson forbidden response has a 3xx status code +func (o *PostCourseLessonForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course lesson forbidden response has a 4xx status code +func (o *PostCourseLessonForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course lesson forbidden response has a 5xx status code +func (o *PostCourseLessonForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this post course lesson forbidden response a status code equal to that given +func (o *PostCourseLessonForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the post course lesson forbidden response +func (o *PostCourseLessonForbidden) Code() int { + return 403 +} + +func (o *PostCourseLessonForbidden) Error() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonForbidden %+v", 403, o.Payload) +} + +func (o *PostCourseLessonForbidden) String() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonForbidden %+v", 403, o.Payload) +} + +func (o *PostCourseLessonForbidden) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCourseLessonForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseLessonNotFound creates a PostCourseLessonNotFound with default headers values +func NewPostCourseLessonNotFound() *PostCourseLessonNotFound { + return &PostCourseLessonNotFound{} +} + +/* +PostCourseLessonNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PostCourseLessonNotFound struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post course lesson not found response has a 2xx status code +func (o *PostCourseLessonNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course lesson not found response has a 3xx status code +func (o *PostCourseLessonNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course lesson not found response has a 4xx status code +func (o *PostCourseLessonNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course lesson not found response has a 5xx status code +func (o *PostCourseLessonNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this post course lesson not found response a status code equal to that given +func (o *PostCourseLessonNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the post course lesson not found response +func (o *PostCourseLessonNotFound) Code() int { + return 404 +} + +func (o *PostCourseLessonNotFound) Error() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonNotFound %+v", 404, o.Payload) +} + +func (o *PostCourseLessonNotFound) String() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonNotFound %+v", 404, o.Payload) +} + +func (o *PostCourseLessonNotFound) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCourseLessonNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseLessonUnprocessableEntity creates a PostCourseLessonUnprocessableEntity with default headers values +func NewPostCourseLessonUnprocessableEntity() *PostCourseLessonUnprocessableEntity { + return &PostCourseLessonUnprocessableEntity{} +} + +/* +PostCourseLessonUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostCourseLessonUnprocessableEntity struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post course lesson unprocessable entity response has a 2xx status code +func (o *PostCourseLessonUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course lesson unprocessable entity response has a 3xx status code +func (o *PostCourseLessonUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course lesson unprocessable entity response has a 4xx status code +func (o *PostCourseLessonUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course lesson unprocessable entity response has a 5xx status code +func (o *PostCourseLessonUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this post course lesson unprocessable entity response a status code equal to that given +func (o *PostCourseLessonUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the post course lesson unprocessable entity response +func (o *PostCourseLessonUnprocessableEntity) Code() int { + return 422 +} + +func (o *PostCourseLessonUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCourseLessonUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCourseLessonUnprocessableEntity) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCourseLessonUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseLessonInternalServerError creates a PostCourseLessonInternalServerError with default headers values +func NewPostCourseLessonInternalServerError() *PostCourseLessonInternalServerError { + return &PostCourseLessonInternalServerError{} +} + +/* +PostCourseLessonInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PostCourseLessonInternalServerError struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post course lesson internal server error response has a 2xx status code +func (o *PostCourseLessonInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course lesson internal server error response has a 3xx status code +func (o *PostCourseLessonInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course lesson internal server error response has a 4xx status code +func (o *PostCourseLessonInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this post course lesson internal server error response has a 5xx status code +func (o *PostCourseLessonInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this post course lesson internal server error response a status code equal to that given +func (o *PostCourseLessonInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the post course lesson internal server error response +func (o *PostCourseLessonInternalServerError) Code() int { + return 500 +} + +func (o *PostCourseLessonInternalServerError) Error() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCourseLessonInternalServerError) String() string { + return fmt.Sprintf("[POST /courselessons][%d] postCourseLessonInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCourseLessonInternalServerError) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCourseLessonInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/sfgate/sfgate_client/courses/post_course_section_parameters.go b/api/sfgate/sfgate_client/courses/post_course_section_parameters.go new file mode 100644 index 0000000..e464c40 --- /dev/null +++ b/api/sfgate/sfgate_client/courses/post_course_section_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// NewPostCourseSectionParams creates a new PostCourseSectionParams 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 NewPostCourseSectionParams() *PostCourseSectionParams { + return &PostCourseSectionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostCourseSectionParamsWithTimeout creates a new PostCourseSectionParams object +// with the ability to set a timeout on a request. +func NewPostCourseSectionParamsWithTimeout(timeout time.Duration) *PostCourseSectionParams { + return &PostCourseSectionParams{ + timeout: timeout, + } +} + +// NewPostCourseSectionParamsWithContext creates a new PostCourseSectionParams object +// with the ability to set a context for a request. +func NewPostCourseSectionParamsWithContext(ctx context.Context) *PostCourseSectionParams { + return &PostCourseSectionParams{ + Context: ctx, + } +} + +// NewPostCourseSectionParamsWithHTTPClient creates a new PostCourseSectionParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostCourseSectionParamsWithHTTPClient(client *http.Client) *PostCourseSectionParams { + return &PostCourseSectionParams{ + HTTPClient: client, + } +} + +/* +PostCourseSectionParams contains all the parameters to send to the API endpoint + + for the post course section operation. + + Typically these are written to a http.Request. +*/ +type PostCourseSectionParams struct { + + /* CoursesectionRequest. + + An array of new CourseSection records + */ + CoursesectionRequest *sfgate_models.CourseSectionRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post course section params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostCourseSectionParams) WithDefaults() *PostCourseSectionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post course section params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostCourseSectionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post course section params +func (o *PostCourseSectionParams) WithTimeout(timeout time.Duration) *PostCourseSectionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post course section params +func (o *PostCourseSectionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post course section params +func (o *PostCourseSectionParams) WithContext(ctx context.Context) *PostCourseSectionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post course section params +func (o *PostCourseSectionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post course section params +func (o *PostCourseSectionParams) WithHTTPClient(client *http.Client) *PostCourseSectionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post course section params +func (o *PostCourseSectionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCoursesectionRequest adds the coursesectionRequest to the post course section params +func (o *PostCourseSectionParams) WithCoursesectionRequest(coursesectionRequest *sfgate_models.CourseSectionRequest) *PostCourseSectionParams { + o.SetCoursesectionRequest(coursesectionRequest) + return o +} + +// SetCoursesectionRequest adds the coursesectionRequest to the post course section params +func (o *PostCourseSectionParams) SetCoursesectionRequest(coursesectionRequest *sfgate_models.CourseSectionRequest) { + o.CoursesectionRequest = coursesectionRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostCourseSectionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.CoursesectionRequest != nil { + if err := r.SetBodyParam(o.CoursesectionRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/sfgate/sfgate_client/courses/post_course_section_responses.go b/api/sfgate/sfgate_client/courses/post_course_section_responses.go new file mode 100644 index 0000000..c3f9e22 --- /dev/null +++ b/api/sfgate/sfgate_client/courses/post_course_section_responses.go @@ -0,0 +1,477 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// PostCourseSectionReader is a Reader for the PostCourseSection structure. +type PostCourseSectionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostCourseSectionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostCourseSectionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostCourseSectionUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostCourseSectionForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostCourseSectionNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostCourseSectionUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostCourseSectionInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostCourseSectionOK creates a PostCourseSectionOK with default headers values +func NewPostCourseSectionOK() *PostCourseSectionOK { + return &PostCourseSectionOK{} +} + +/* +PostCourseSectionOK describes a response with status code 200, with default header values. + +CourseSection Response Object +*/ +type PostCourseSectionOK struct { + Payload *sfgate_models.CourseSectionResponse +} + +// IsSuccess returns true when this post course section o k response has a 2xx status code +func (o *PostCourseSectionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post course section o k response has a 3xx status code +func (o *PostCourseSectionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course section o k response has a 4xx status code +func (o *PostCourseSectionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this post course section o k response has a 5xx status code +func (o *PostCourseSectionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this post course section o k response a status code equal to that given +func (o *PostCourseSectionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the post course section o k response +func (o *PostCourseSectionOK) Code() int { + return 200 +} + +func (o *PostCourseSectionOK) Error() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionOK %+v", 200, o.Payload) +} + +func (o *PostCourseSectionOK) String() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionOK %+v", 200, o.Payload) +} + +func (o *PostCourseSectionOK) GetPayload() *sfgate_models.CourseSectionResponse { + return o.Payload +} + +func (o *PostCourseSectionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.CourseSectionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseSectionUnauthorized creates a PostCourseSectionUnauthorized with default headers values +func NewPostCourseSectionUnauthorized() *PostCourseSectionUnauthorized { + return &PostCourseSectionUnauthorized{} +} + +/* +PostCourseSectionUnauthorized describes a response with status code 401, with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostCourseSectionUnauthorized struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post course section unauthorized response has a 2xx status code +func (o *PostCourseSectionUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course section unauthorized response has a 3xx status code +func (o *PostCourseSectionUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course section unauthorized response has a 4xx status code +func (o *PostCourseSectionUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course section unauthorized response has a 5xx status code +func (o *PostCourseSectionUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this post course section unauthorized response a status code equal to that given +func (o *PostCourseSectionUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the post course section unauthorized response +func (o *PostCourseSectionUnauthorized) Code() int { + return 401 +} + +func (o *PostCourseSectionUnauthorized) Error() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCourseSectionUnauthorized) String() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCourseSectionUnauthorized) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCourseSectionUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseSectionForbidden creates a PostCourseSectionForbidden with default headers values +func NewPostCourseSectionForbidden() *PostCourseSectionForbidden { + return &PostCourseSectionForbidden{} +} + +/* +PostCourseSectionForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PostCourseSectionForbidden struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post course section forbidden response has a 2xx status code +func (o *PostCourseSectionForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course section forbidden response has a 3xx status code +func (o *PostCourseSectionForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course section forbidden response has a 4xx status code +func (o *PostCourseSectionForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course section forbidden response has a 5xx status code +func (o *PostCourseSectionForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this post course section forbidden response a status code equal to that given +func (o *PostCourseSectionForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the post course section forbidden response +func (o *PostCourseSectionForbidden) Code() int { + return 403 +} + +func (o *PostCourseSectionForbidden) Error() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionForbidden %+v", 403, o.Payload) +} + +func (o *PostCourseSectionForbidden) String() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionForbidden %+v", 403, o.Payload) +} + +func (o *PostCourseSectionForbidden) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCourseSectionForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseSectionNotFound creates a PostCourseSectionNotFound with default headers values +func NewPostCourseSectionNotFound() *PostCourseSectionNotFound { + return &PostCourseSectionNotFound{} +} + +/* +PostCourseSectionNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PostCourseSectionNotFound struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post course section not found response has a 2xx status code +func (o *PostCourseSectionNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course section not found response has a 3xx status code +func (o *PostCourseSectionNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course section not found response has a 4xx status code +func (o *PostCourseSectionNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course section not found response has a 5xx status code +func (o *PostCourseSectionNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this post course section not found response a status code equal to that given +func (o *PostCourseSectionNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the post course section not found response +func (o *PostCourseSectionNotFound) Code() int { + return 404 +} + +func (o *PostCourseSectionNotFound) Error() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionNotFound %+v", 404, o.Payload) +} + +func (o *PostCourseSectionNotFound) String() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionNotFound %+v", 404, o.Payload) +} + +func (o *PostCourseSectionNotFound) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCourseSectionNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseSectionUnprocessableEntity creates a PostCourseSectionUnprocessableEntity with default headers values +func NewPostCourseSectionUnprocessableEntity() *PostCourseSectionUnprocessableEntity { + return &PostCourseSectionUnprocessableEntity{} +} + +/* +PostCourseSectionUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostCourseSectionUnprocessableEntity struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post course section unprocessable entity response has a 2xx status code +func (o *PostCourseSectionUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course section unprocessable entity response has a 3xx status code +func (o *PostCourseSectionUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course section unprocessable entity response has a 4xx status code +func (o *PostCourseSectionUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this post course section unprocessable entity response has a 5xx status code +func (o *PostCourseSectionUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this post course section unprocessable entity response a status code equal to that given +func (o *PostCourseSectionUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the post course section unprocessable entity response +func (o *PostCourseSectionUnprocessableEntity) Code() int { + return 422 +} + +func (o *PostCourseSectionUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCourseSectionUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCourseSectionUnprocessableEntity) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCourseSectionUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCourseSectionInternalServerError creates a PostCourseSectionInternalServerError with default headers values +func NewPostCourseSectionInternalServerError() *PostCourseSectionInternalServerError { + return &PostCourseSectionInternalServerError{} +} + +/* +PostCourseSectionInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PostCourseSectionInternalServerError struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post course section internal server error response has a 2xx status code +func (o *PostCourseSectionInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post course section internal server error response has a 3xx status code +func (o *PostCourseSectionInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post course section internal server error response has a 4xx status code +func (o *PostCourseSectionInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this post course section internal server error response has a 5xx status code +func (o *PostCourseSectionInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this post course section internal server error response a status code equal to that given +func (o *PostCourseSectionInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the post course section internal server error response +func (o *PostCourseSectionInternalServerError) Code() int { + return 500 +} + +func (o *PostCourseSectionInternalServerError) Error() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCourseSectionInternalServerError) String() string { + return fmt.Sprintf("[POST /coursesections][%d] postCourseSectionInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCourseSectionInternalServerError) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCourseSectionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/sfgate/sfgate_client/courses/post_courses_parameters.go b/api/sfgate/sfgate_client/courses/post_courses_parameters.go new file mode 100644 index 0000000..737947b --- /dev/null +++ b/api/sfgate/sfgate_client/courses/post_courses_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// NewPostCoursesParams creates a new PostCoursesParams 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 NewPostCoursesParams() *PostCoursesParams { + return &PostCoursesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostCoursesParamsWithTimeout creates a new PostCoursesParams object +// with the ability to set a timeout on a request. +func NewPostCoursesParamsWithTimeout(timeout time.Duration) *PostCoursesParams { + return &PostCoursesParams{ + timeout: timeout, + } +} + +// NewPostCoursesParamsWithContext creates a new PostCoursesParams object +// with the ability to set a context for a request. +func NewPostCoursesParamsWithContext(ctx context.Context) *PostCoursesParams { + return &PostCoursesParams{ + Context: ctx, + } +} + +// NewPostCoursesParamsWithHTTPClient creates a new PostCoursesParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostCoursesParamsWithHTTPClient(client *http.Client) *PostCoursesParams { + return &PostCoursesParams{ + HTTPClient: client, + } +} + +/* +PostCoursesParams contains all the parameters to send to the API endpoint + + for the post courses operation. + + Typically these are written to a http.Request. +*/ +type PostCoursesParams struct { + + /* CourseRequest. + + An array of new Course records + */ + CourseRequest *sfgate_models.CourseRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post courses params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostCoursesParams) WithDefaults() *PostCoursesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post courses params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostCoursesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post courses params +func (o *PostCoursesParams) WithTimeout(timeout time.Duration) *PostCoursesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post courses params +func (o *PostCoursesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post courses params +func (o *PostCoursesParams) WithContext(ctx context.Context) *PostCoursesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post courses params +func (o *PostCoursesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post courses params +func (o *PostCoursesParams) WithHTTPClient(client *http.Client) *PostCoursesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post courses params +func (o *PostCoursesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCourseRequest adds the courseRequest to the post courses params +func (o *PostCoursesParams) WithCourseRequest(courseRequest *sfgate_models.CourseRequest) *PostCoursesParams { + o.SetCourseRequest(courseRequest) + return o +} + +// SetCourseRequest adds the courseRequest to the post courses params +func (o *PostCoursesParams) SetCourseRequest(courseRequest *sfgate_models.CourseRequest) { + o.CourseRequest = courseRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostCoursesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.CourseRequest != nil { + if err := r.SetBodyParam(o.CourseRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/sfgate/sfgate_client/courses/post_courses_responses.go b/api/sfgate/sfgate_client/courses/post_courses_responses.go new file mode 100644 index 0000000..6d9bdba --- /dev/null +++ b/api/sfgate/sfgate_client/courses/post_courses_responses.go @@ -0,0 +1,477 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// PostCoursesReader is a Reader for the PostCourses structure. +type PostCoursesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostCoursesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewPostCoursesCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostCoursesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostCoursesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostCoursesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostCoursesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostCoursesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPostCoursesCreated creates a PostCoursesCreated with default headers values +func NewPostCoursesCreated() *PostCoursesCreated { + return &PostCoursesCreated{} +} + +/* +PostCoursesCreated describes a response with status code 201, with default header values. + +Response from Salesforce +*/ +type PostCoursesCreated struct { + Payload *sfgate_models.SalesforcePostResponse +} + +// IsSuccess returns true when this post courses created response has a 2xx status code +func (o *PostCoursesCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post courses created response has a 3xx status code +func (o *PostCoursesCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post courses created response has a 4xx status code +func (o *PostCoursesCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this post courses created response has a 5xx status code +func (o *PostCoursesCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this post courses created response a status code equal to that given +func (o *PostCoursesCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the post courses created response +func (o *PostCoursesCreated) Code() int { + return 201 +} + +func (o *PostCoursesCreated) Error() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesCreated %+v", 201, o.Payload) +} + +func (o *PostCoursesCreated) String() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesCreated %+v", 201, o.Payload) +} + +func (o *PostCoursesCreated) GetPayload() *sfgate_models.SalesforcePostResponse { + return o.Payload +} + +func (o *PostCoursesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.SalesforcePostResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoursesUnauthorized creates a PostCoursesUnauthorized with default headers values +func NewPostCoursesUnauthorized() *PostCoursesUnauthorized { + return &PostCoursesUnauthorized{} +} + +/* +PostCoursesUnauthorized describes a response with status code 401, with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostCoursesUnauthorized struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post courses unauthorized response has a 2xx status code +func (o *PostCoursesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post courses unauthorized response has a 3xx status code +func (o *PostCoursesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post courses unauthorized response has a 4xx status code +func (o *PostCoursesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this post courses unauthorized response has a 5xx status code +func (o *PostCoursesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this post courses unauthorized response a status code equal to that given +func (o *PostCoursesUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the post courses unauthorized response +func (o *PostCoursesUnauthorized) Code() int { + return 401 +} + +func (o *PostCoursesUnauthorized) Error() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCoursesUnauthorized) String() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCoursesUnauthorized) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCoursesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoursesForbidden creates a PostCoursesForbidden with default headers values +func NewPostCoursesForbidden() *PostCoursesForbidden { + return &PostCoursesForbidden{} +} + +/* +PostCoursesForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PostCoursesForbidden struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post courses forbidden response has a 2xx status code +func (o *PostCoursesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post courses forbidden response has a 3xx status code +func (o *PostCoursesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post courses forbidden response has a 4xx status code +func (o *PostCoursesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this post courses forbidden response has a 5xx status code +func (o *PostCoursesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this post courses forbidden response a status code equal to that given +func (o *PostCoursesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the post courses forbidden response +func (o *PostCoursesForbidden) Code() int { + return 403 +} + +func (o *PostCoursesForbidden) Error() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesForbidden %+v", 403, o.Payload) +} + +func (o *PostCoursesForbidden) String() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesForbidden %+v", 403, o.Payload) +} + +func (o *PostCoursesForbidden) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCoursesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoursesNotFound creates a PostCoursesNotFound with default headers values +func NewPostCoursesNotFound() *PostCoursesNotFound { + return &PostCoursesNotFound{} +} + +/* +PostCoursesNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PostCoursesNotFound struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post courses not found response has a 2xx status code +func (o *PostCoursesNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post courses not found response has a 3xx status code +func (o *PostCoursesNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post courses not found response has a 4xx status code +func (o *PostCoursesNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this post courses not found response has a 5xx status code +func (o *PostCoursesNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this post courses not found response a status code equal to that given +func (o *PostCoursesNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the post courses not found response +func (o *PostCoursesNotFound) Code() int { + return 404 +} + +func (o *PostCoursesNotFound) Error() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesNotFound %+v", 404, o.Payload) +} + +func (o *PostCoursesNotFound) String() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesNotFound %+v", 404, o.Payload) +} + +func (o *PostCoursesNotFound) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCoursesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoursesUnprocessableEntity creates a PostCoursesUnprocessableEntity with default headers values +func NewPostCoursesUnprocessableEntity() *PostCoursesUnprocessableEntity { + return &PostCoursesUnprocessableEntity{} +} + +/* +PostCoursesUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostCoursesUnprocessableEntity struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post courses unprocessable entity response has a 2xx status code +func (o *PostCoursesUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post courses unprocessable entity response has a 3xx status code +func (o *PostCoursesUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post courses unprocessable entity response has a 4xx status code +func (o *PostCoursesUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this post courses unprocessable entity response has a 5xx status code +func (o *PostCoursesUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this post courses unprocessable entity response a status code equal to that given +func (o *PostCoursesUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the post courses unprocessable entity response +func (o *PostCoursesUnprocessableEntity) Code() int { + return 422 +} + +func (o *PostCoursesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCoursesUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCoursesUnprocessableEntity) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCoursesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoursesInternalServerError creates a PostCoursesInternalServerError with default headers values +func NewPostCoursesInternalServerError() *PostCoursesInternalServerError { + return &PostCoursesInternalServerError{} +} + +/* +PostCoursesInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PostCoursesInternalServerError struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this post courses internal server error response has a 2xx status code +func (o *PostCoursesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post courses internal server error response has a 3xx status code +func (o *PostCoursesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post courses internal server error response has a 4xx status code +func (o *PostCoursesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this post courses internal server error response has a 5xx status code +func (o *PostCoursesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this post courses internal server error response a status code equal to that given +func (o *PostCoursesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the post courses internal server error response +func (o *PostCoursesInternalServerError) Code() int { + return 500 +} + +func (o *PostCoursesInternalServerError) Error() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCoursesInternalServerError) String() string { + return fmt.Sprintf("[POST /courses][%d] postCoursesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCoursesInternalServerError) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PostCoursesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/sfgate/sfgate_client/courses/put_courses_parameters.go b/api/sfgate/sfgate_client/courses/put_courses_parameters.go new file mode 100644 index 0000000..bd8be2e --- /dev/null +++ b/api/sfgate/sfgate_client/courses/put_courses_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// NewPutCoursesParams creates a new PutCoursesParams 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 NewPutCoursesParams() *PutCoursesParams { + return &PutCoursesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPutCoursesParamsWithTimeout creates a new PutCoursesParams object +// with the ability to set a timeout on a request. +func NewPutCoursesParamsWithTimeout(timeout time.Duration) *PutCoursesParams { + return &PutCoursesParams{ + timeout: timeout, + } +} + +// NewPutCoursesParamsWithContext creates a new PutCoursesParams object +// with the ability to set a context for a request. +func NewPutCoursesParamsWithContext(ctx context.Context) *PutCoursesParams { + return &PutCoursesParams{ + Context: ctx, + } +} + +// NewPutCoursesParamsWithHTTPClient creates a new PutCoursesParams object +// with the ability to set a custom HTTPClient for a request. +func NewPutCoursesParamsWithHTTPClient(client *http.Client) *PutCoursesParams { + return &PutCoursesParams{ + HTTPClient: client, + } +} + +/* +PutCoursesParams contains all the parameters to send to the API endpoint + + for the put courses operation. + + Typically these are written to a http.Request. +*/ +type PutCoursesParams struct { + + /* CourseRequest. + + An array of new Course records + */ + CourseRequest *sfgate_models.CourseRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the put courses params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PutCoursesParams) WithDefaults() *PutCoursesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the put courses params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PutCoursesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the put courses params +func (o *PutCoursesParams) WithTimeout(timeout time.Duration) *PutCoursesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put courses params +func (o *PutCoursesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put courses params +func (o *PutCoursesParams) WithContext(ctx context.Context) *PutCoursesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put courses params +func (o *PutCoursesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put courses params +func (o *PutCoursesParams) WithHTTPClient(client *http.Client) *PutCoursesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put courses params +func (o *PutCoursesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCourseRequest adds the courseRequest to the put courses params +func (o *PutCoursesParams) WithCourseRequest(courseRequest *sfgate_models.CourseRequest) *PutCoursesParams { + o.SetCourseRequest(courseRequest) + return o +} + +// SetCourseRequest adds the courseRequest to the put courses params +func (o *PutCoursesParams) SetCourseRequest(courseRequest *sfgate_models.CourseRequest) { + o.CourseRequest = courseRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutCoursesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.CourseRequest != nil { + if err := r.SetBodyParam(o.CourseRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/sfgate/sfgate_client/courses/put_courses_responses.go b/api/sfgate/sfgate_client/courses/put_courses_responses.go new file mode 100644 index 0000000..488b2bc --- /dev/null +++ b/api/sfgate/sfgate_client/courses/put_courses_responses.go @@ -0,0 +1,477 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// PutCoursesReader is a Reader for the PutCourses structure. +type PutCoursesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutCoursesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutCoursesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutCoursesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutCoursesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutCoursesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutCoursesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutCoursesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewPutCoursesOK creates a PutCoursesOK with default headers values +func NewPutCoursesOK() *PutCoursesOK { + return &PutCoursesOK{} +} + +/* +PutCoursesOK describes a response with status code 200, with default header values. + +Course Response Object +*/ +type PutCoursesOK struct { + Payload *sfgate_models.CourseResponse +} + +// IsSuccess returns true when this put courses o k response has a 2xx status code +func (o *PutCoursesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this put courses o k response has a 3xx status code +func (o *PutCoursesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put courses o k response has a 4xx status code +func (o *PutCoursesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this put courses o k response has a 5xx status code +func (o *PutCoursesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this put courses o k response a status code equal to that given +func (o *PutCoursesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the put courses o k response +func (o *PutCoursesOK) Code() int { + return 200 +} + +func (o *PutCoursesOK) Error() string { + return fmt.Sprintf("[PUT /courses][%d] putCoursesOK %+v", 200, o.Payload) +} + +func (o *PutCoursesOK) String() string { + return fmt.Sprintf("[PUT /courses][%d] putCoursesOK %+v", 200, o.Payload) +} + +func (o *PutCoursesOK) GetPayload() *sfgate_models.CourseResponse { + return o.Payload +} + +func (o *PutCoursesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.CourseResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutCoursesUnauthorized creates a PutCoursesUnauthorized with default headers values +func NewPutCoursesUnauthorized() *PutCoursesUnauthorized { + return &PutCoursesUnauthorized{} +} + +/* +PutCoursesUnauthorized describes a response with status code 401, with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PutCoursesUnauthorized struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this put courses unauthorized response has a 2xx status code +func (o *PutCoursesUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put courses unauthorized response has a 3xx status code +func (o *PutCoursesUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put courses unauthorized response has a 4xx status code +func (o *PutCoursesUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this put courses unauthorized response has a 5xx status code +func (o *PutCoursesUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this put courses unauthorized response a status code equal to that given +func (o *PutCoursesUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the put courses unauthorized response +func (o *PutCoursesUnauthorized) Code() int { + return 401 +} + +func (o *PutCoursesUnauthorized) Error() string { + return fmt.Sprintf("[PUT /courses][%d] putCoursesUnauthorized %+v", 401, o.Payload) +} + +func (o *PutCoursesUnauthorized) String() string { + return fmt.Sprintf("[PUT /courses][%d] putCoursesUnauthorized %+v", 401, o.Payload) +} + +func (o *PutCoursesUnauthorized) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PutCoursesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutCoursesForbidden creates a PutCoursesForbidden with default headers values +func NewPutCoursesForbidden() *PutCoursesForbidden { + return &PutCoursesForbidden{} +} + +/* +PutCoursesForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PutCoursesForbidden struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this put courses forbidden response has a 2xx status code +func (o *PutCoursesForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put courses forbidden response has a 3xx status code +func (o *PutCoursesForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put courses forbidden response has a 4xx status code +func (o *PutCoursesForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this put courses forbidden response has a 5xx status code +func (o *PutCoursesForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this put courses forbidden response a status code equal to that given +func (o *PutCoursesForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the put courses forbidden response +func (o *PutCoursesForbidden) Code() int { + return 403 +} + +func (o *PutCoursesForbidden) Error() string { + return fmt.Sprintf("[PUT /courses][%d] putCoursesForbidden %+v", 403, o.Payload) +} + +func (o *PutCoursesForbidden) String() string { + return fmt.Sprintf("[PUT /courses][%d] putCoursesForbidden %+v", 403, o.Payload) +} + +func (o *PutCoursesForbidden) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PutCoursesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutCoursesNotFound creates a PutCoursesNotFound with default headers values +func NewPutCoursesNotFound() *PutCoursesNotFound { + return &PutCoursesNotFound{} +} + +/* +PutCoursesNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PutCoursesNotFound struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this put courses not found response has a 2xx status code +func (o *PutCoursesNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put courses not found response has a 3xx status code +func (o *PutCoursesNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put courses not found response has a 4xx status code +func (o *PutCoursesNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this put courses not found response has a 5xx status code +func (o *PutCoursesNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this put courses not found response a status code equal to that given +func (o *PutCoursesNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the put courses not found response +func (o *PutCoursesNotFound) Code() int { + return 404 +} + +func (o *PutCoursesNotFound) Error() string { + return fmt.Sprintf("[PUT /courses][%d] putCoursesNotFound %+v", 404, o.Payload) +} + +func (o *PutCoursesNotFound) String() string { + return fmt.Sprintf("[PUT /courses][%d] putCoursesNotFound %+v", 404, o.Payload) +} + +func (o *PutCoursesNotFound) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PutCoursesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutCoursesUnprocessableEntity creates a PutCoursesUnprocessableEntity with default headers values +func NewPutCoursesUnprocessableEntity() *PutCoursesUnprocessableEntity { + return &PutCoursesUnprocessableEntity{} +} + +/* +PutCoursesUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutCoursesUnprocessableEntity struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this put courses unprocessable entity response has a 2xx status code +func (o *PutCoursesUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put courses unprocessable entity response has a 3xx status code +func (o *PutCoursesUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put courses unprocessable entity response has a 4xx status code +func (o *PutCoursesUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this put courses unprocessable entity response has a 5xx status code +func (o *PutCoursesUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this put courses unprocessable entity response a status code equal to that given +func (o *PutCoursesUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the put courses unprocessable entity response +func (o *PutCoursesUnprocessableEntity) Code() int { + return 422 +} + +func (o *PutCoursesUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /courses][%d] putCoursesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutCoursesUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /courses][%d] putCoursesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutCoursesUnprocessableEntity) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PutCoursesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutCoursesInternalServerError creates a PutCoursesInternalServerError with default headers values +func NewPutCoursesInternalServerError() *PutCoursesInternalServerError { + return &PutCoursesInternalServerError{} +} + +/* +PutCoursesInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PutCoursesInternalServerError struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this put courses internal server error response has a 2xx status code +func (o *PutCoursesInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put courses internal server error response has a 3xx status code +func (o *PutCoursesInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put courses internal server error response has a 4xx status code +func (o *PutCoursesInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this put courses internal server error response has a 5xx status code +func (o *PutCoursesInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this put courses internal server error response a status code equal to that given +func (o *PutCoursesInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the put courses internal server error response +func (o *PutCoursesInternalServerError) Code() int { + return 500 +} + +func (o *PutCoursesInternalServerError) Error() string { + return fmt.Sprintf("[PUT /courses][%d] putCoursesInternalServerError %+v", 500, o.Payload) +} + +func (o *PutCoursesInternalServerError) String() string { + return fmt.Sprintf("[PUT /courses][%d] putCoursesInternalServerError %+v", 500, o.Payload) +} + +func (o *PutCoursesInternalServerError) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *PutCoursesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/course_lessons/update_course_lesson_parameters.go b/api/sfgate/sfgate_client/courses/update_course_lesson_parameters.go similarity index 82% rename from api/members/members_client/course_lessons/update_course_lesson_parameters.go rename to api/sfgate/sfgate_client/courses/update_course_lesson_parameters.go index 21d4219..0b8b5f8 100644 --- a/api/members/members_client/course_lessons/update_course_lesson_parameters.go +++ b/api/sfgate/sfgate_client/courses/update_course_lesson_parameters.go @@ -4,7 +4,7 @@ // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed -package course_lessons +package courses // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -18,6 +18,8 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" ) // NewUpdateCourseLessonParams creates a new UpdateCourseLessonParams object, @@ -65,11 +67,11 @@ UpdateCourseLessonParams contains all the parameters to send to the API endpoint */ type UpdateCourseLessonParams struct { - /* ID. + /* CourselessonRequest. - Unique Record ID + An array of new CourseLesson records */ - ID *string + CourselessonRequest *sfgate_models.CourseLessonRequest timeout time.Duration Context context.Context @@ -124,15 +126,15 @@ func (o *UpdateCourseLessonParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithID adds the id to the update course lesson params -func (o *UpdateCourseLessonParams) WithID(id *string) *UpdateCourseLessonParams { - o.SetID(id) +// WithCourselessonRequest adds the courselessonRequest to the update course lesson params +func (o *UpdateCourseLessonParams) WithCourselessonRequest(courselessonRequest *sfgate_models.CourseLessonRequest) *UpdateCourseLessonParams { + o.SetCourselessonRequest(courselessonRequest) return o } -// SetID adds the id to the update course lesson params -func (o *UpdateCourseLessonParams) SetID(id *string) { - o.ID = id +// SetCourselessonRequest adds the courselessonRequest to the update course lesson params +func (o *UpdateCourseLessonParams) SetCourselessonRequest(courselessonRequest *sfgate_models.CourseLessonRequest) { + o.CourselessonRequest = courselessonRequest } // WriteToRequest writes these params to a swagger request @@ -142,21 +144,9 @@ func (o *UpdateCourseLessonParams) WriteToRequest(r runtime.ClientRequest, reg s 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.CourselessonRequest != nil { + if err := r.SetBodyParam(o.CourselessonRequest); err != nil { + return err } } diff --git a/api/sfgate/sfgate_client/courses/update_course_lesson_responses.go b/api/sfgate/sfgate_client/courses/update_course_lesson_responses.go new file mode 100644 index 0000000..48f52a1 --- /dev/null +++ b/api/sfgate/sfgate_client/courses/update_course_lesson_responses.go @@ -0,0 +1,477 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// UpdateCourseLessonReader is a Reader for the UpdateCourseLesson structure. +type UpdateCourseLessonReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdateCourseLessonReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUpdateCourseLessonOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewUpdateCourseLessonUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewUpdateCourseLessonForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewUpdateCourseLessonNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewUpdateCourseLessonUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUpdateCourseLessonInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewUpdateCourseLessonOK creates a UpdateCourseLessonOK with default headers values +func NewUpdateCourseLessonOK() *UpdateCourseLessonOK { + return &UpdateCourseLessonOK{} +} + +/* +UpdateCourseLessonOK describes a response with status code 200, with default header values. + +CourseLesson Response Object +*/ +type UpdateCourseLessonOK struct { + Payload *sfgate_models.CourseLessonResponse +} + +// IsSuccess returns true when this update course lesson o k response has a 2xx status code +func (o *UpdateCourseLessonOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update course lesson o k response has a 3xx status code +func (o *UpdateCourseLessonOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course lesson o k response has a 4xx status code +func (o *UpdateCourseLessonOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update course lesson o k response has a 5xx status code +func (o *UpdateCourseLessonOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update course lesson o k response a status code equal to that given +func (o *UpdateCourseLessonOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the update course lesson o k response +func (o *UpdateCourseLessonOK) Code() int { + return 200 +} + +func (o *UpdateCourseLessonOK) Error() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonOK %+v", 200, o.Payload) +} + +func (o *UpdateCourseLessonOK) String() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonOK %+v", 200, o.Payload) +} + +func (o *UpdateCourseLessonOK) GetPayload() *sfgate_models.CourseLessonResponse { + return o.Payload +} + +func (o *UpdateCourseLessonOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.CourseLessonResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseLessonUnauthorized creates a UpdateCourseLessonUnauthorized with default headers values +func NewUpdateCourseLessonUnauthorized() *UpdateCourseLessonUnauthorized { + return &UpdateCourseLessonUnauthorized{} +} + +/* +UpdateCourseLessonUnauthorized describes a response with status code 401, with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type UpdateCourseLessonUnauthorized struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update course lesson unauthorized response has a 2xx status code +func (o *UpdateCourseLessonUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course lesson unauthorized response has a 3xx status code +func (o *UpdateCourseLessonUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course lesson unauthorized response has a 4xx status code +func (o *UpdateCourseLessonUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course lesson unauthorized response has a 5xx status code +func (o *UpdateCourseLessonUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this update course lesson unauthorized response a status code equal to that given +func (o *UpdateCourseLessonUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the update course lesson unauthorized response +func (o *UpdateCourseLessonUnauthorized) Code() int { + return 401 +} + +func (o *UpdateCourseLessonUnauthorized) Error() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateCourseLessonUnauthorized) String() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateCourseLessonUnauthorized) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateCourseLessonUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseLessonForbidden creates a UpdateCourseLessonForbidden with default headers values +func NewUpdateCourseLessonForbidden() *UpdateCourseLessonForbidden { + return &UpdateCourseLessonForbidden{} +} + +/* +UpdateCourseLessonForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type UpdateCourseLessonForbidden struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update course lesson forbidden response has a 2xx status code +func (o *UpdateCourseLessonForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course lesson forbidden response has a 3xx status code +func (o *UpdateCourseLessonForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course lesson forbidden response has a 4xx status code +func (o *UpdateCourseLessonForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course lesson forbidden response has a 5xx status code +func (o *UpdateCourseLessonForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this update course lesson forbidden response a status code equal to that given +func (o *UpdateCourseLessonForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the update course lesson forbidden response +func (o *UpdateCourseLessonForbidden) Code() int { + return 403 +} + +func (o *UpdateCourseLessonForbidden) Error() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonForbidden %+v", 403, o.Payload) +} + +func (o *UpdateCourseLessonForbidden) String() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonForbidden %+v", 403, o.Payload) +} + +func (o *UpdateCourseLessonForbidden) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateCourseLessonForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseLessonNotFound creates a UpdateCourseLessonNotFound with default headers values +func NewUpdateCourseLessonNotFound() *UpdateCourseLessonNotFound { + return &UpdateCourseLessonNotFound{} +} + +/* +UpdateCourseLessonNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type UpdateCourseLessonNotFound struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update course lesson not found response has a 2xx status code +func (o *UpdateCourseLessonNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course lesson not found response has a 3xx status code +func (o *UpdateCourseLessonNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course lesson not found response has a 4xx status code +func (o *UpdateCourseLessonNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course lesson not found response has a 5xx status code +func (o *UpdateCourseLessonNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this update course lesson not found response a status code equal to that given +func (o *UpdateCourseLessonNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the update course lesson not found response +func (o *UpdateCourseLessonNotFound) Code() int { + return 404 +} + +func (o *UpdateCourseLessonNotFound) Error() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonNotFound %+v", 404, o.Payload) +} + +func (o *UpdateCourseLessonNotFound) String() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonNotFound %+v", 404, o.Payload) +} + +func (o *UpdateCourseLessonNotFound) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateCourseLessonNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseLessonUnprocessableEntity creates a UpdateCourseLessonUnprocessableEntity with default headers values +func NewUpdateCourseLessonUnprocessableEntity() *UpdateCourseLessonUnprocessableEntity { + return &UpdateCourseLessonUnprocessableEntity{} +} + +/* +UpdateCourseLessonUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type UpdateCourseLessonUnprocessableEntity struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update course lesson unprocessable entity response has a 2xx status code +func (o *UpdateCourseLessonUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course lesson unprocessable entity response has a 3xx status code +func (o *UpdateCourseLessonUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course lesson unprocessable entity response has a 4xx status code +func (o *UpdateCourseLessonUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course lesson unprocessable entity response has a 5xx status code +func (o *UpdateCourseLessonUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this update course lesson unprocessable entity response a status code equal to that given +func (o *UpdateCourseLessonUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the update course lesson unprocessable entity response +func (o *UpdateCourseLessonUnprocessableEntity) Code() int { + return 422 +} + +func (o *UpdateCourseLessonUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateCourseLessonUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateCourseLessonUnprocessableEntity) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateCourseLessonUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseLessonInternalServerError creates a UpdateCourseLessonInternalServerError with default headers values +func NewUpdateCourseLessonInternalServerError() *UpdateCourseLessonInternalServerError { + return &UpdateCourseLessonInternalServerError{} +} + +/* +UpdateCourseLessonInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type UpdateCourseLessonInternalServerError struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update course lesson internal server error response has a 2xx status code +func (o *UpdateCourseLessonInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course lesson internal server error response has a 3xx status code +func (o *UpdateCourseLessonInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course lesson internal server error response has a 4xx status code +func (o *UpdateCourseLessonInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this update course lesson internal server error response has a 5xx status code +func (o *UpdateCourseLessonInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this update course lesson internal server error response a status code equal to that given +func (o *UpdateCourseLessonInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the update course lesson internal server error response +func (o *UpdateCourseLessonInternalServerError) Code() int { + return 500 +} + +func (o *UpdateCourseLessonInternalServerError) Error() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateCourseLessonInternalServerError) String() string { + return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateCourseLessonInternalServerError) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateCourseLessonInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/members/members_client/course_sections/update_course_section_parameters.go b/api/sfgate/sfgate_client/courses/update_course_section_parameters.go similarity index 83% rename from api/members/members_client/course_sections/update_course_section_parameters.go rename to api/sfgate/sfgate_client/courses/update_course_section_parameters.go index 2936b49..307c824 100644 --- a/api/members/members_client/course_sections/update_course_section_parameters.go +++ b/api/sfgate/sfgate_client/courses/update_course_section_parameters.go @@ -4,7 +4,7 @@ // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed -package course_sections +package courses // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -18,6 +18,8 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" ) // NewUpdateCourseSectionParams creates a new UpdateCourseSectionParams object, @@ -65,11 +67,11 @@ UpdateCourseSectionParams contains all the parameters to send to the API endpoin */ type UpdateCourseSectionParams struct { - /* ID. + /* CoursesectionRequest. - Unique Record ID + An array of new CourseSection records */ - ID *string + CoursesectionRequest *sfgate_models.CourseSectionRequest timeout time.Duration Context context.Context @@ -124,15 +126,15 @@ func (o *UpdateCourseSectionParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithID adds the id to the update course section params -func (o *UpdateCourseSectionParams) WithID(id *string) *UpdateCourseSectionParams { - o.SetID(id) +// WithCoursesectionRequest adds the coursesectionRequest to the update course section params +func (o *UpdateCourseSectionParams) WithCoursesectionRequest(coursesectionRequest *sfgate_models.CourseSectionRequest) *UpdateCourseSectionParams { + o.SetCoursesectionRequest(coursesectionRequest) return o } -// SetID adds the id to the update course section params -func (o *UpdateCourseSectionParams) SetID(id *string) { - o.ID = id +// SetCoursesectionRequest adds the coursesectionRequest to the update course section params +func (o *UpdateCourseSectionParams) SetCoursesectionRequest(coursesectionRequest *sfgate_models.CourseSectionRequest) { + o.CoursesectionRequest = coursesectionRequest } // WriteToRequest writes these params to a swagger request @@ -142,21 +144,9 @@ func (o *UpdateCourseSectionParams) WriteToRequest(r runtime.ClientRequest, reg 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.CoursesectionRequest != nil { + if err := r.SetBodyParam(o.CoursesectionRequest); err != nil { + return err } } diff --git a/api/sfgate/sfgate_client/courses/update_course_section_responses.go b/api/sfgate/sfgate_client/courses/update_course_section_responses.go new file mode 100644 index 0000000..004e97b --- /dev/null +++ b/api/sfgate/sfgate_client/courses/update_course_section_responses.go @@ -0,0 +1,477 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package courses + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// UpdateCourseSectionReader is a Reader for the UpdateCourseSection structure. +type UpdateCourseSectionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdateCourseSectionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUpdateCourseSectionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewUpdateCourseSectionUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewUpdateCourseSectionForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewUpdateCourseSectionNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewUpdateCourseSectionUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUpdateCourseSectionInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewUpdateCourseSectionOK creates a UpdateCourseSectionOK with default headers values +func NewUpdateCourseSectionOK() *UpdateCourseSectionOK { + return &UpdateCourseSectionOK{} +} + +/* +UpdateCourseSectionOK describes a response with status code 200, with default header values. + +CourseSection Response Object +*/ +type UpdateCourseSectionOK struct { + Payload *sfgate_models.CourseSectionResponse +} + +// IsSuccess returns true when this update course section o k response has a 2xx status code +func (o *UpdateCourseSectionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update course section o k response has a 3xx status code +func (o *UpdateCourseSectionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course section o k response has a 4xx status code +func (o *UpdateCourseSectionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update course section o k response has a 5xx status code +func (o *UpdateCourseSectionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update course section o k response a status code equal to that given +func (o *UpdateCourseSectionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the update course section o k response +func (o *UpdateCourseSectionOK) Code() int { + return 200 +} + +func (o *UpdateCourseSectionOK) Error() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionOK %+v", 200, o.Payload) +} + +func (o *UpdateCourseSectionOK) String() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionOK %+v", 200, o.Payload) +} + +func (o *UpdateCourseSectionOK) GetPayload() *sfgate_models.CourseSectionResponse { + return o.Payload +} + +func (o *UpdateCourseSectionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.CourseSectionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseSectionUnauthorized creates a UpdateCourseSectionUnauthorized with default headers values +func NewUpdateCourseSectionUnauthorized() *UpdateCourseSectionUnauthorized { + return &UpdateCourseSectionUnauthorized{} +} + +/* +UpdateCourseSectionUnauthorized describes a response with status code 401, with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type UpdateCourseSectionUnauthorized struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update course section unauthorized response has a 2xx status code +func (o *UpdateCourseSectionUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course section unauthorized response has a 3xx status code +func (o *UpdateCourseSectionUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course section unauthorized response has a 4xx status code +func (o *UpdateCourseSectionUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course section unauthorized response has a 5xx status code +func (o *UpdateCourseSectionUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this update course section unauthorized response a status code equal to that given +func (o *UpdateCourseSectionUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the update course section unauthorized response +func (o *UpdateCourseSectionUnauthorized) Code() int { + return 401 +} + +func (o *UpdateCourseSectionUnauthorized) Error() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateCourseSectionUnauthorized) String() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateCourseSectionUnauthorized) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateCourseSectionUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseSectionForbidden creates a UpdateCourseSectionForbidden with default headers values +func NewUpdateCourseSectionForbidden() *UpdateCourseSectionForbidden { + return &UpdateCourseSectionForbidden{} +} + +/* +UpdateCourseSectionForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type UpdateCourseSectionForbidden struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update course section forbidden response has a 2xx status code +func (o *UpdateCourseSectionForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course section forbidden response has a 3xx status code +func (o *UpdateCourseSectionForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course section forbidden response has a 4xx status code +func (o *UpdateCourseSectionForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course section forbidden response has a 5xx status code +func (o *UpdateCourseSectionForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this update course section forbidden response a status code equal to that given +func (o *UpdateCourseSectionForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the update course section forbidden response +func (o *UpdateCourseSectionForbidden) Code() int { + return 403 +} + +func (o *UpdateCourseSectionForbidden) Error() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionForbidden %+v", 403, o.Payload) +} + +func (o *UpdateCourseSectionForbidden) String() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionForbidden %+v", 403, o.Payload) +} + +func (o *UpdateCourseSectionForbidden) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateCourseSectionForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseSectionNotFound creates a UpdateCourseSectionNotFound with default headers values +func NewUpdateCourseSectionNotFound() *UpdateCourseSectionNotFound { + return &UpdateCourseSectionNotFound{} +} + +/* +UpdateCourseSectionNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type UpdateCourseSectionNotFound struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update course section not found response has a 2xx status code +func (o *UpdateCourseSectionNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course section not found response has a 3xx status code +func (o *UpdateCourseSectionNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course section not found response has a 4xx status code +func (o *UpdateCourseSectionNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course section not found response has a 5xx status code +func (o *UpdateCourseSectionNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this update course section not found response a status code equal to that given +func (o *UpdateCourseSectionNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the update course section not found response +func (o *UpdateCourseSectionNotFound) Code() int { + return 404 +} + +func (o *UpdateCourseSectionNotFound) Error() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionNotFound %+v", 404, o.Payload) +} + +func (o *UpdateCourseSectionNotFound) String() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionNotFound %+v", 404, o.Payload) +} + +func (o *UpdateCourseSectionNotFound) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateCourseSectionNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseSectionUnprocessableEntity creates a UpdateCourseSectionUnprocessableEntity with default headers values +func NewUpdateCourseSectionUnprocessableEntity() *UpdateCourseSectionUnprocessableEntity { + return &UpdateCourseSectionUnprocessableEntity{} +} + +/* +UpdateCourseSectionUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type UpdateCourseSectionUnprocessableEntity struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update course section unprocessable entity response has a 2xx status code +func (o *UpdateCourseSectionUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course section unprocessable entity response has a 3xx status code +func (o *UpdateCourseSectionUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course section unprocessable entity response has a 4xx status code +func (o *UpdateCourseSectionUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this update course section unprocessable entity response has a 5xx status code +func (o *UpdateCourseSectionUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this update course section unprocessable entity response a status code equal to that given +func (o *UpdateCourseSectionUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the update course section unprocessable entity response +func (o *UpdateCourseSectionUnprocessableEntity) Code() int { + return 422 +} + +func (o *UpdateCourseSectionUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateCourseSectionUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateCourseSectionUnprocessableEntity) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateCourseSectionUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateCourseSectionInternalServerError creates a UpdateCourseSectionInternalServerError with default headers values +func NewUpdateCourseSectionInternalServerError() *UpdateCourseSectionInternalServerError { + return &UpdateCourseSectionInternalServerError{} +} + +/* +UpdateCourseSectionInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type UpdateCourseSectionInternalServerError struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update course section internal server error response has a 2xx status code +func (o *UpdateCourseSectionInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update course section internal server error response has a 3xx status code +func (o *UpdateCourseSectionInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update course section internal server error response has a 4xx status code +func (o *UpdateCourseSectionInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this update course section internal server error response has a 5xx status code +func (o *UpdateCourseSectionInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this update course section internal server error response a status code equal to that given +func (o *UpdateCourseSectionInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the update course section internal server error response +func (o *UpdateCourseSectionInternalServerError) Code() int { + return 500 +} + +func (o *UpdateCourseSectionInternalServerError) Error() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateCourseSectionInternalServerError) String() string { + return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateCourseSectionInternalServerError) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateCourseSectionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/sfgate/sfgate_client/databases/get_databases_responses.go b/api/sfgate/sfgate_client/databases/get_databases_responses.go index 78c90f2..321973e 100644 --- a/api/sfgate/sfgate_client/databases/get_databases_responses.go +++ b/api/sfgate/sfgate_client/databases/get_databases_responses.go @@ -147,8 +147,6 @@ GetDatabasesUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type GetDatabasesUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetDatabasesUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetDatabasesUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetDatabasesForbidden describes a response with status code 403, with default he Access forbidden, account lacks access */ type GetDatabasesForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetDatabasesForbidden) GetPayload() *sfgate_models.Error { func (o *GetDatabasesForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetDatabasesNotFound describes a response with status code 404, with default hea Resource was not found */ type GetDatabasesNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetDatabasesNotFound) GetPayload() *sfgate_models.Error { func (o *GetDatabasesNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetDatabasesUnprocessableEntity describes a response with status code 422, with Unprocessable Entity, likely a bad parameter */ type GetDatabasesUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetDatabasesUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetDatabasesUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetDatabasesInternalServerError describes a response with status code 500, with Server Internal Error */ type GetDatabasesInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetDatabasesInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetDatabasesInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/databases/post_databases_responses.go b/api/sfgate/sfgate_client/databases/post_databases_responses.go index 0ed464d..dff453d 100644 --- a/api/sfgate/sfgate_client/databases/post_databases_responses.go +++ b/api/sfgate/sfgate_client/databases/post_databases_responses.go @@ -147,8 +147,6 @@ PostDatabasesUnauthorized describes a response with status code 401, with defaul Access unauthorized, invalid API-KEY was used */ type PostDatabasesUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PostDatabasesUnauthorized) GetPayload() *sfgate_models.Error { func (o *PostDatabasesUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PostDatabasesForbidden describes a response with status code 403, with default h Access forbidden, account lacks access */ type PostDatabasesForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PostDatabasesForbidden) GetPayload() *sfgate_models.Error { func (o *PostDatabasesForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PostDatabasesNotFound describes a response with status code 404, with default he Resource was not found */ type PostDatabasesNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PostDatabasesNotFound) GetPayload() *sfgate_models.Error { func (o *PostDatabasesNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PostDatabasesUnprocessableEntity describes a response with status code 422, with Unprocessable Entity, likely a bad parameter */ type PostDatabasesUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PostDatabasesUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PostDatabasesUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PostDatabasesInternalServerError describes a response with status code 500, with Server Internal Error */ type PostDatabasesInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PostDatabasesInternalServerError) GetPayload() *sfgate_models.Error { func (o *PostDatabasesInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/databases/put_databases_responses.go b/api/sfgate/sfgate_client/databases/put_databases_responses.go index bec5bfd..2591b9f 100644 --- a/api/sfgate/sfgate_client/databases/put_databases_responses.go +++ b/api/sfgate/sfgate_client/databases/put_databases_responses.go @@ -147,8 +147,6 @@ PutDatabasesUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type PutDatabasesUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PutDatabasesUnauthorized) GetPayload() *sfgate_models.Error { func (o *PutDatabasesUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PutDatabasesForbidden describes a response with status code 403, with default he Access forbidden, account lacks access */ type PutDatabasesForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PutDatabasesForbidden) GetPayload() *sfgate_models.Error { func (o *PutDatabasesForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PutDatabasesNotFound describes a response with status code 404, with default hea Resource was not found */ type PutDatabasesNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PutDatabasesNotFound) GetPayload() *sfgate_models.Error { func (o *PutDatabasesNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PutDatabasesUnprocessableEntity describes a response with status code 422, with Unprocessable Entity, likely a bad parameter */ type PutDatabasesUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PutDatabasesUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PutDatabasesUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PutDatabasesInternalServerError describes a response with status code 500, with Server Internal Error */ type PutDatabasesInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PutDatabasesInternalServerError) GetPayload() *sfgate_models.Error { func (o *PutDatabasesInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/members/members_client/events/delete_event_parameters.go b/api/sfgate/sfgate_client/events/delete_event_parameters.go similarity index 100% rename from api/members/members_client/events/delete_event_parameters.go rename to api/sfgate/sfgate_client/events/delete_event_parameters.go diff --git a/api/members/members_client/events/delete_event_responses.go b/api/sfgate/sfgate_client/events/delete_event_responses.go similarity index 100% rename from api/members/members_client/events/delete_event_responses.go rename to api/sfgate/sfgate_client/events/delete_event_responses.go diff --git a/api/sfgate/sfgate_client/events/events_client.go b/api/sfgate/sfgate_client/events/events_client.go new file mode 100644 index 0000000..c50a0f0 --- /dev/null +++ b/api/sfgate/sfgate_client/events/events_client.go @@ -0,0 +1,166 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package events + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new events API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for events API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteEvent(params *DeleteEventParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteEventNoContent, error) + + GetEvents(params *GetEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventsOK, error) + + UpdateEvent(params *UpdateEventParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateEventOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +DeleteEvent deletes a event +*/ +func (a *Client) DeleteEvent(params *DeleteEventParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteEventNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteEventParams() + } + op := &runtime.ClientOperation{ + ID: "deleteEvent", + Method: "DELETE", + PathPattern: "/events", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteEventReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteEventNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteEvent: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +GetEvents gets a list of events +*/ +func (a *Client) GetEvents(params *GetEventsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEventsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetEventsParams() + } + op := &runtime.ClientOperation{ + ID: "getEvents", + Method: "GET", + PathPattern: "/events", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetEventsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetEventsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getEvents: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +UpdateEvent updates an existing event +*/ +func (a *Client) UpdateEvent(params *UpdateEventParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateEventOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUpdateEventParams() + } + op := &runtime.ClientOperation{ + ID: "updateEvent", + Method: "PUT", + PathPattern: "/events", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UpdateEventReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UpdateEventOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for updateEvent: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/sfgate/sfgate_client/events/get_events_parameters.go b/api/sfgate/sfgate_client/events/get_events_parameters.go new file mode 100644 index 0000000..64cfe14 --- /dev/null +++ b/api/sfgate/sfgate_client/events/get_events_parameters.go @@ -0,0 +1,240 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package events + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetEventsParams creates a new GetEventsParams 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 NewGetEventsParams() *GetEventsParams { + return &GetEventsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetEventsParamsWithTimeout creates a new GetEventsParams object +// with the ability to set a timeout on a request. +func NewGetEventsParamsWithTimeout(timeout time.Duration) *GetEventsParams { + return &GetEventsParams{ + timeout: timeout, + } +} + +// NewGetEventsParamsWithContext creates a new GetEventsParams object +// with the ability to set a context for a request. +func NewGetEventsParamsWithContext(ctx context.Context) *GetEventsParams { + return &GetEventsParams{ + Context: ctx, + } +} + +// NewGetEventsParamsWithHTTPClient creates a new GetEventsParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetEventsParamsWithHTTPClient(client *http.Client) *GetEventsParams { + return &GetEventsParams{ + HTTPClient: client, + } +} + +/* +GetEventsParams contains all the parameters to send to the API endpoint + + for the get events operation. + + Typically these are written to a http.Request. +*/ +type GetEventsParams struct { + + /* ID. + + Unique Record ID + */ + ID *string + + /* Limit. + + How many objects to return at one time + + Format: int64 + */ + Limit *int64 + + /* Offset. + + How many objects to skip? + + Format: int64 + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get events params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetEventsParams) WithDefaults() *GetEventsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get events params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetEventsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get events params +func (o *GetEventsParams) WithTimeout(timeout time.Duration) *GetEventsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get events params +func (o *GetEventsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get events params +func (o *GetEventsParams) WithContext(ctx context.Context) *GetEventsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get events params +func (o *GetEventsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get events params +func (o *GetEventsParams) WithHTTPClient(client *http.Client) *GetEventsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get events params +func (o *GetEventsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the get events params +func (o *GetEventsParams) WithID(id *string) *GetEventsParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get events params +func (o *GetEventsParams) SetID(id *string) { + o.ID = id +} + +// WithLimit adds the limit to the get events params +func (o *GetEventsParams) WithLimit(limit *int64) *GetEventsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get events params +func (o *GetEventsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get events params +func (o *GetEventsParams) WithOffset(offset *int64) *GetEventsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get events params +func (o *GetEventsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetEventsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/sfgate/sfgate_client/events/get_events_responses.go b/api/sfgate/sfgate_client/events/get_events_responses.go new file mode 100644 index 0000000..0348c65 --- /dev/null +++ b/api/sfgate/sfgate_client/events/get_events_responses.go @@ -0,0 +1,477 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package events + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// GetEventsReader is a Reader for the GetEvents structure. +type GetEventsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetEventsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetEventsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetEventsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetEventsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetEventsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetEventsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetEventsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewGetEventsOK creates a GetEventsOK with default headers values +func NewGetEventsOK() *GetEventsOK { + return &GetEventsOK{} +} + +/* +GetEventsOK describes a response with status code 200, with default header values. + +Event Response Object +*/ +type GetEventsOK struct { + Payload *sfgate_models.EventResponse +} + +// IsSuccess returns true when this get events o k response has a 2xx status code +func (o *GetEventsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get events o k response has a 3xx status code +func (o *GetEventsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get events o k response has a 4xx status code +func (o *GetEventsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get events o k response has a 5xx status code +func (o *GetEventsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get events o k response a status code equal to that given +func (o *GetEventsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get events o k response +func (o *GetEventsOK) Code() int { + return 200 +} + +func (o *GetEventsOK) Error() string { + return fmt.Sprintf("[GET /events][%d] getEventsOK %+v", 200, o.Payload) +} + +func (o *GetEventsOK) String() string { + return fmt.Sprintf("[GET /events][%d] getEventsOK %+v", 200, o.Payload) +} + +func (o *GetEventsOK) GetPayload() *sfgate_models.EventResponse { + return o.Payload +} + +func (o *GetEventsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.EventResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEventsUnauthorized creates a GetEventsUnauthorized with default headers values +func NewGetEventsUnauthorized() *GetEventsUnauthorized { + return &GetEventsUnauthorized{} +} + +/* +GetEventsUnauthorized describes a response with status code 401, with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetEventsUnauthorized struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get events unauthorized response has a 2xx status code +func (o *GetEventsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get events unauthorized response has a 3xx status code +func (o *GetEventsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get events unauthorized response has a 4xx status code +func (o *GetEventsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get events unauthorized response has a 5xx status code +func (o *GetEventsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get events unauthorized response a status code equal to that given +func (o *GetEventsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get events unauthorized response +func (o *GetEventsUnauthorized) Code() int { + return 401 +} + +func (o *GetEventsUnauthorized) Error() string { + return fmt.Sprintf("[GET /events][%d] getEventsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetEventsUnauthorized) String() string { + return fmt.Sprintf("[GET /events][%d] getEventsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetEventsUnauthorized) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetEventsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEventsForbidden creates a GetEventsForbidden with default headers values +func NewGetEventsForbidden() *GetEventsForbidden { + return &GetEventsForbidden{} +} + +/* +GetEventsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type GetEventsForbidden struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get events forbidden response has a 2xx status code +func (o *GetEventsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get events forbidden response has a 3xx status code +func (o *GetEventsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get events forbidden response has a 4xx status code +func (o *GetEventsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get events forbidden response has a 5xx status code +func (o *GetEventsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get events forbidden response a status code equal to that given +func (o *GetEventsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get events forbidden response +func (o *GetEventsForbidden) Code() int { + return 403 +} + +func (o *GetEventsForbidden) Error() string { + return fmt.Sprintf("[GET /events][%d] getEventsForbidden %+v", 403, o.Payload) +} + +func (o *GetEventsForbidden) String() string { + return fmt.Sprintf("[GET /events][%d] getEventsForbidden %+v", 403, o.Payload) +} + +func (o *GetEventsForbidden) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetEventsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEventsNotFound creates a GetEventsNotFound with default headers values +func NewGetEventsNotFound() *GetEventsNotFound { + return &GetEventsNotFound{} +} + +/* +GetEventsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type GetEventsNotFound struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get events not found response has a 2xx status code +func (o *GetEventsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get events not found response has a 3xx status code +func (o *GetEventsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get events not found response has a 4xx status code +func (o *GetEventsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get events not found response has a 5xx status code +func (o *GetEventsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get events not found response a status code equal to that given +func (o *GetEventsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get events not found response +func (o *GetEventsNotFound) Code() int { + return 404 +} + +func (o *GetEventsNotFound) Error() string { + return fmt.Sprintf("[GET /events][%d] getEventsNotFound %+v", 404, o.Payload) +} + +func (o *GetEventsNotFound) String() string { + return fmt.Sprintf("[GET /events][%d] getEventsNotFound %+v", 404, o.Payload) +} + +func (o *GetEventsNotFound) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetEventsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEventsUnprocessableEntity creates a GetEventsUnprocessableEntity with default headers values +func NewGetEventsUnprocessableEntity() *GetEventsUnprocessableEntity { + return &GetEventsUnprocessableEntity{} +} + +/* +GetEventsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetEventsUnprocessableEntity struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get events unprocessable entity response has a 2xx status code +func (o *GetEventsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get events unprocessable entity response has a 3xx status code +func (o *GetEventsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get events unprocessable entity response has a 4xx status code +func (o *GetEventsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this get events unprocessable entity response has a 5xx status code +func (o *GetEventsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this get events unprocessable entity response a status code equal to that given +func (o *GetEventsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the get events unprocessable entity response +func (o *GetEventsUnprocessableEntity) Code() int { + return 422 +} + +func (o *GetEventsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /events][%d] getEventsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetEventsUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /events][%d] getEventsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetEventsUnprocessableEntity) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetEventsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEventsInternalServerError creates a GetEventsInternalServerError with default headers values +func NewGetEventsInternalServerError() *GetEventsInternalServerError { + return &GetEventsInternalServerError{} +} + +/* +GetEventsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type GetEventsInternalServerError struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this get events internal server error response has a 2xx status code +func (o *GetEventsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get events internal server error response has a 3xx status code +func (o *GetEventsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get events internal server error response has a 4xx status code +func (o *GetEventsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get events internal server error response has a 5xx status code +func (o *GetEventsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get events internal server error response a status code equal to that given +func (o *GetEventsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get events internal server error response +func (o *GetEventsInternalServerError) Code() int { + return 500 +} + +func (o *GetEventsInternalServerError) Error() string { + return fmt.Sprintf("[GET /events][%d] getEventsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetEventsInternalServerError) String() string { + return fmt.Sprintf("[GET /events][%d] getEventsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetEventsInternalServerError) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *GetEventsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/sfgate/sfgate_client/events/update_event_parameters.go b/api/sfgate/sfgate_client/events/update_event_parameters.go new file mode 100644 index 0000000..c28a4bb --- /dev/null +++ b/api/sfgate/sfgate_client/events/update_event_parameters.go @@ -0,0 +1,167 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package events + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewUpdateEventParams creates a new UpdateEventParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUpdateEventParams() *UpdateEventParams { + return &UpdateEventParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUpdateEventParamsWithTimeout creates a new UpdateEventParams object +// with the ability to set a timeout on a request. +func NewUpdateEventParamsWithTimeout(timeout time.Duration) *UpdateEventParams { + return &UpdateEventParams{ + timeout: timeout, + } +} + +// NewUpdateEventParamsWithContext creates a new UpdateEventParams object +// with the ability to set a context for a request. +func NewUpdateEventParamsWithContext(ctx context.Context) *UpdateEventParams { + return &UpdateEventParams{ + Context: ctx, + } +} + +// NewUpdateEventParamsWithHTTPClient creates a new UpdateEventParams object +// with the ability to set a custom HTTPClient for a request. +func NewUpdateEventParamsWithHTTPClient(client *http.Client) *UpdateEventParams { + return &UpdateEventParams{ + HTTPClient: client, + } +} + +/* +UpdateEventParams contains all the parameters to send to the API endpoint + + for the update event operation. + + Typically these are written to a http.Request. +*/ +type UpdateEventParams struct { + + /* ID. + + Unique Record ID + */ + ID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the update event params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateEventParams) WithDefaults() *UpdateEventParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the update event params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateEventParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the update event params +func (o *UpdateEventParams) WithTimeout(timeout time.Duration) *UpdateEventParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the update event params +func (o *UpdateEventParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the update event params +func (o *UpdateEventParams) WithContext(ctx context.Context) *UpdateEventParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the update event params +func (o *UpdateEventParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the update event params +func (o *UpdateEventParams) WithHTTPClient(client *http.Client) *UpdateEventParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the update event params +func (o *UpdateEventParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the update event params +func (o *UpdateEventParams) WithID(id *string) *UpdateEventParams { + o.SetID(id) + return o +} + +// SetID adds the id to the update event params +func (o *UpdateEventParams) SetID(id *string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *UpdateEventParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/sfgate/sfgate_client/events/update_event_responses.go b/api/sfgate/sfgate_client/events/update_event_responses.go new file mode 100644 index 0000000..7df9d9b --- /dev/null +++ b/api/sfgate/sfgate_client/events/update_event_responses.go @@ -0,0 +1,477 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package events + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models" +) + +// UpdateEventReader is a Reader for the UpdateEvent structure. +type UpdateEventReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdateEventReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUpdateEventOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewUpdateEventUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewUpdateEventForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewUpdateEventNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewUpdateEventUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUpdateEventInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewUpdateEventOK creates a UpdateEventOK with default headers values +func NewUpdateEventOK() *UpdateEventOK { + return &UpdateEventOK{} +} + +/* +UpdateEventOK describes a response with status code 200, with default header values. + +Event Response Object +*/ +type UpdateEventOK struct { + Payload *sfgate_models.EventResponse +} + +// IsSuccess returns true when this update event o k response has a 2xx status code +func (o *UpdateEventOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update event o k response has a 3xx status code +func (o *UpdateEventOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update event o k response has a 4xx status code +func (o *UpdateEventOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update event o k response has a 5xx status code +func (o *UpdateEventOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update event o k response a status code equal to that given +func (o *UpdateEventOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the update event o k response +func (o *UpdateEventOK) Code() int { + return 200 +} + +func (o *UpdateEventOK) Error() string { + return fmt.Sprintf("[PUT /events][%d] updateEventOK %+v", 200, o.Payload) +} + +func (o *UpdateEventOK) String() string { + return fmt.Sprintf("[PUT /events][%d] updateEventOK %+v", 200, o.Payload) +} + +func (o *UpdateEventOK) GetPayload() *sfgate_models.EventResponse { + return o.Payload +} + +func (o *UpdateEventOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.EventResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateEventUnauthorized creates a UpdateEventUnauthorized with default headers values +func NewUpdateEventUnauthorized() *UpdateEventUnauthorized { + return &UpdateEventUnauthorized{} +} + +/* +UpdateEventUnauthorized describes a response with status code 401, with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type UpdateEventUnauthorized struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update event unauthorized response has a 2xx status code +func (o *UpdateEventUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update event unauthorized response has a 3xx status code +func (o *UpdateEventUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update event unauthorized response has a 4xx status code +func (o *UpdateEventUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this update event unauthorized response has a 5xx status code +func (o *UpdateEventUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this update event unauthorized response a status code equal to that given +func (o *UpdateEventUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the update event unauthorized response +func (o *UpdateEventUnauthorized) Code() int { + return 401 +} + +func (o *UpdateEventUnauthorized) Error() string { + return fmt.Sprintf("[PUT /events][%d] updateEventUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateEventUnauthorized) String() string { + return fmt.Sprintf("[PUT /events][%d] updateEventUnauthorized %+v", 401, o.Payload) +} + +func (o *UpdateEventUnauthorized) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateEventUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateEventForbidden creates a UpdateEventForbidden with default headers values +func NewUpdateEventForbidden() *UpdateEventForbidden { + return &UpdateEventForbidden{} +} + +/* +UpdateEventForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type UpdateEventForbidden struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update event forbidden response has a 2xx status code +func (o *UpdateEventForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update event forbidden response has a 3xx status code +func (o *UpdateEventForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update event forbidden response has a 4xx status code +func (o *UpdateEventForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this update event forbidden response has a 5xx status code +func (o *UpdateEventForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this update event forbidden response a status code equal to that given +func (o *UpdateEventForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the update event forbidden response +func (o *UpdateEventForbidden) Code() int { + return 403 +} + +func (o *UpdateEventForbidden) Error() string { + return fmt.Sprintf("[PUT /events][%d] updateEventForbidden %+v", 403, o.Payload) +} + +func (o *UpdateEventForbidden) String() string { + return fmt.Sprintf("[PUT /events][%d] updateEventForbidden %+v", 403, o.Payload) +} + +func (o *UpdateEventForbidden) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateEventForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateEventNotFound creates a UpdateEventNotFound with default headers values +func NewUpdateEventNotFound() *UpdateEventNotFound { + return &UpdateEventNotFound{} +} + +/* +UpdateEventNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type UpdateEventNotFound struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update event not found response has a 2xx status code +func (o *UpdateEventNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update event not found response has a 3xx status code +func (o *UpdateEventNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update event not found response has a 4xx status code +func (o *UpdateEventNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this update event not found response has a 5xx status code +func (o *UpdateEventNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this update event not found response a status code equal to that given +func (o *UpdateEventNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the update event not found response +func (o *UpdateEventNotFound) Code() int { + return 404 +} + +func (o *UpdateEventNotFound) Error() string { + return fmt.Sprintf("[PUT /events][%d] updateEventNotFound %+v", 404, o.Payload) +} + +func (o *UpdateEventNotFound) String() string { + return fmt.Sprintf("[PUT /events][%d] updateEventNotFound %+v", 404, o.Payload) +} + +func (o *UpdateEventNotFound) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateEventNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateEventUnprocessableEntity creates a UpdateEventUnprocessableEntity with default headers values +func NewUpdateEventUnprocessableEntity() *UpdateEventUnprocessableEntity { + return &UpdateEventUnprocessableEntity{} +} + +/* +UpdateEventUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type UpdateEventUnprocessableEntity struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update event unprocessable entity response has a 2xx status code +func (o *UpdateEventUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update event unprocessable entity response has a 3xx status code +func (o *UpdateEventUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update event unprocessable entity response has a 4xx status code +func (o *UpdateEventUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this update event unprocessable entity response has a 5xx status code +func (o *UpdateEventUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this update event unprocessable entity response a status code equal to that given +func (o *UpdateEventUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the update event unprocessable entity response +func (o *UpdateEventUnprocessableEntity) Code() int { + return 422 +} + +func (o *UpdateEventUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /events][%d] updateEventUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateEventUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /events][%d] updateEventUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *UpdateEventUnprocessableEntity) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateEventUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateEventInternalServerError creates a UpdateEventInternalServerError with default headers values +func NewUpdateEventInternalServerError() *UpdateEventInternalServerError { + return &UpdateEventInternalServerError{} +} + +/* +UpdateEventInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type UpdateEventInternalServerError struct { + Payload *sfgate_models.Error +} + +// IsSuccess returns true when this update event internal server error response has a 2xx status code +func (o *UpdateEventInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update event internal server error response has a 3xx status code +func (o *UpdateEventInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update event internal server error response has a 4xx status code +func (o *UpdateEventInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this update event internal server error response has a 5xx status code +func (o *UpdateEventInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this update event internal server error response a status code equal to that given +func (o *UpdateEventInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the update event internal server error response +func (o *UpdateEventInternalServerError) Code() int { + return 500 +} + +func (o *UpdateEventInternalServerError) Error() string { + return fmt.Sprintf("[PUT /events][%d] updateEventInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateEventInternalServerError) String() string { + return fmt.Sprintf("[PUT /events][%d] updateEventInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateEventInternalServerError) GetPayload() *sfgate_models.Error { + return o.Payload +} + +func (o *UpdateEventInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(sfgate_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/sfgate/sfgate_client/factors/get_factors_responses.go b/api/sfgate/sfgate_client/factors/get_factors_responses.go index 618ac21..ec2ef3e 100644 --- a/api/sfgate/sfgate_client/factors/get_factors_responses.go +++ b/api/sfgate/sfgate_client/factors/get_factors_responses.go @@ -147,8 +147,6 @@ GetFactorsUnauthorized describes a response with status code 401, with default h Access unauthorized, invalid API-KEY was used */ type GetFactorsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetFactorsUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetFactorsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetFactorsForbidden describes a response with status code 403, with default head Access forbidden, account lacks access */ type GetFactorsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetFactorsForbidden) GetPayload() *sfgate_models.Error { func (o *GetFactorsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetFactorsNotFound describes a response with status code 404, with default heade Resource was not found */ type GetFactorsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetFactorsNotFound) GetPayload() *sfgate_models.Error { func (o *GetFactorsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetFactorsUnprocessableEntity describes a response with status code 422, with de Unprocessable Entity, likely a bad parameter */ type GetFactorsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetFactorsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetFactorsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetFactorsInternalServerError describes a response with status code 500, with de Server Internal Error */ type GetFactorsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetFactorsInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetFactorsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/factors/post_factors_responses.go b/api/sfgate/sfgate_client/factors/post_factors_responses.go index 07edd74..d3f10aa 100644 --- a/api/sfgate/sfgate_client/factors/post_factors_responses.go +++ b/api/sfgate/sfgate_client/factors/post_factors_responses.go @@ -147,8 +147,6 @@ PostFactorsUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type PostFactorsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PostFactorsUnauthorized) GetPayload() *sfgate_models.Error { func (o *PostFactorsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PostFactorsForbidden describes a response with status code 403, with default hea Access forbidden, account lacks access */ type PostFactorsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PostFactorsForbidden) GetPayload() *sfgate_models.Error { func (o *PostFactorsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PostFactorsNotFound describes a response with status code 404, with default head Resource was not found */ type PostFactorsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PostFactorsNotFound) GetPayload() *sfgate_models.Error { func (o *PostFactorsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PostFactorsUnprocessableEntity describes a response with status code 422, with d Unprocessable Entity, likely a bad parameter */ type PostFactorsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PostFactorsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PostFactorsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PostFactorsInternalServerError describes a response with status code 500, with d Server Internal Error */ type PostFactorsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PostFactorsInternalServerError) GetPayload() *sfgate_models.Error { func (o *PostFactorsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/financial_statements/get_financial_statements_responses.go b/api/sfgate/sfgate_client/financial_statements/get_financial_statements_responses.go index 6d02175..93a2074 100644 --- a/api/sfgate/sfgate_client/financial_statements/get_financial_statements_responses.go +++ b/api/sfgate/sfgate_client/financial_statements/get_financial_statements_responses.go @@ -147,8 +147,6 @@ GetFinancialStatementsUnauthorized describes a response with status code 401, wi Access unauthorized, invalid API-KEY was used */ type GetFinancialStatementsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetFinancialStatementsUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetFinancialStatementsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetFinancialStatementsForbidden describes a response with status code 403, with Access forbidden, account lacks access */ type GetFinancialStatementsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetFinancialStatementsForbidden) GetPayload() *sfgate_models.Error { func (o *GetFinancialStatementsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetFinancialStatementsNotFound describes a response with status code 404, with d Resource was not found */ type GetFinancialStatementsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetFinancialStatementsNotFound) GetPayload() *sfgate_models.Error { func (o *GetFinancialStatementsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetFinancialStatementsUnprocessableEntity describes a response with status code Unprocessable Entity, likely a bad parameter */ type GetFinancialStatementsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetFinancialStatementsUnprocessableEntity) GetPayload() *sfgate_models. func (o *GetFinancialStatementsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetFinancialStatementsInternalServerError describes a response with status code Server Internal Error */ type GetFinancialStatementsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetFinancialStatementsInternalServerError) GetPayload() *sfgate_models. func (o *GetFinancialStatementsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/financial_statements/post_financial_statements_responses.go b/api/sfgate/sfgate_client/financial_statements/post_financial_statements_responses.go index b07d3d8..2d2a536 100644 --- a/api/sfgate/sfgate_client/financial_statements/post_financial_statements_responses.go +++ b/api/sfgate/sfgate_client/financial_statements/post_financial_statements_responses.go @@ -147,8 +147,6 @@ PostFinancialStatementsUnauthorized describes a response with status code 401, w Access unauthorized, invalid API-KEY was used */ type PostFinancialStatementsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PostFinancialStatementsUnauthorized) GetPayload() *sfgate_models.Error func (o *PostFinancialStatementsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PostFinancialStatementsForbidden describes a response with status code 403, with Access forbidden, account lacks access */ type PostFinancialStatementsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PostFinancialStatementsForbidden) GetPayload() *sfgate_models.Error { func (o *PostFinancialStatementsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PostFinancialStatementsNotFound describes a response with status code 404, with Resource was not found */ type PostFinancialStatementsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PostFinancialStatementsNotFound) GetPayload() *sfgate_models.Error { func (o *PostFinancialStatementsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PostFinancialStatementsUnprocessableEntity describes a response with status code Unprocessable Entity, likely a bad parameter */ type PostFinancialStatementsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PostFinancialStatementsUnprocessableEntity) GetPayload() *sfgate_models func (o *PostFinancialStatementsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PostFinancialStatementsInternalServerError describes a response with status code Server Internal Error */ type PostFinancialStatementsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PostFinancialStatementsInternalServerError) GetPayload() *sfgate_models func (o *PostFinancialStatementsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/industries/get_industries_responses.go b/api/sfgate/sfgate_client/industries/get_industries_responses.go index afe5bc7..2437e49 100644 --- a/api/sfgate/sfgate_client/industries/get_industries_responses.go +++ b/api/sfgate/sfgate_client/industries/get_industries_responses.go @@ -147,8 +147,6 @@ GetIndustriesUnauthorized describes a response with status code 401, with defaul Access unauthorized, invalid API-KEY was used */ type GetIndustriesUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetIndustriesUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetIndustriesUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetIndustriesForbidden describes a response with status code 403, with default h Access forbidden, account lacks access */ type GetIndustriesForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetIndustriesForbidden) GetPayload() *sfgate_models.Error { func (o *GetIndustriesForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetIndustriesNotFound describes a response with status code 404, with default he Resource was not found */ type GetIndustriesNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetIndustriesNotFound) GetPayload() *sfgate_models.Error { func (o *GetIndustriesNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetIndustriesUnprocessableEntity describes a response with status code 422, with Unprocessable Entity, likely a bad parameter */ type GetIndustriesUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetIndustriesUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetIndustriesUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetIndustriesInternalServerError describes a response with status code 500, with Server Internal Error */ type GetIndustriesInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetIndustriesInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetIndustriesInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/industries/post_industries_responses.go b/api/sfgate/sfgate_client/industries/post_industries_responses.go index aa16ebe..f71f7ca 100644 --- a/api/sfgate/sfgate_client/industries/post_industries_responses.go +++ b/api/sfgate/sfgate_client/industries/post_industries_responses.go @@ -147,8 +147,6 @@ PostIndustriesUnauthorized describes a response with status code 401, with defau Access unauthorized, invalid API-KEY was used */ type PostIndustriesUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PostIndustriesUnauthorized) GetPayload() *sfgate_models.Error { func (o *PostIndustriesUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PostIndustriesForbidden describes a response with status code 403, with default Access forbidden, account lacks access */ type PostIndustriesForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PostIndustriesForbidden) GetPayload() *sfgate_models.Error { func (o *PostIndustriesForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PostIndustriesNotFound describes a response with status code 404, with default h Resource was not found */ type PostIndustriesNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PostIndustriesNotFound) GetPayload() *sfgate_models.Error { func (o *PostIndustriesNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PostIndustriesUnprocessableEntity describes a response with status code 422, wit Unprocessable Entity, likely a bad parameter */ type PostIndustriesUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PostIndustriesUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PostIndustriesUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PostIndustriesInternalServerError describes a response with status code 500, wit Server Internal Error */ type PostIndustriesInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PostIndustriesInternalServerError) GetPayload() *sfgate_models.Error { func (o *PostIndustriesInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/industry_companies/get_industry_companies_responses.go b/api/sfgate/sfgate_client/industry_companies/get_industry_companies_responses.go index 2fd53cd..d966e2f 100644 --- a/api/sfgate/sfgate_client/industry_companies/get_industry_companies_responses.go +++ b/api/sfgate/sfgate_client/industry_companies/get_industry_companies_responses.go @@ -147,8 +147,6 @@ GetIndustryCompaniesUnauthorized describes a response with status code 401, with Access unauthorized, invalid API-KEY was used */ type GetIndustryCompaniesUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetIndustryCompaniesUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetIndustryCompaniesUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetIndustryCompaniesForbidden describes a response with status code 403, with de Access forbidden, account lacks access */ type GetIndustryCompaniesForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetIndustryCompaniesForbidden) GetPayload() *sfgate_models.Error { func (o *GetIndustryCompaniesForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetIndustryCompaniesNotFound describes a response with status code 404, with def Resource was not found */ type GetIndustryCompaniesNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetIndustryCompaniesNotFound) GetPayload() *sfgate_models.Error { func (o *GetIndustryCompaniesNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetIndustryCompaniesUnprocessableEntity describes a response with status code 42 Unprocessable Entity, likely a bad parameter */ type GetIndustryCompaniesUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetIndustryCompaniesUnprocessableEntity) GetPayload() *sfgate_models.Er func (o *GetIndustryCompaniesUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetIndustryCompaniesInternalServerError describes a response with status code 50 Server Internal Error */ type GetIndustryCompaniesInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetIndustryCompaniesInternalServerError) GetPayload() *sfgate_models.Er func (o *GetIndustryCompaniesInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/industry_companies/post_industry_companies_responses.go b/api/sfgate/sfgate_client/industry_companies/post_industry_companies_responses.go index 2adba8a..c2adf6f 100644 --- a/api/sfgate/sfgate_client/industry_companies/post_industry_companies_responses.go +++ b/api/sfgate/sfgate_client/industry_companies/post_industry_companies_responses.go @@ -147,8 +147,6 @@ PostIndustryCompaniesUnauthorized describes a response with status code 401, wit Access unauthorized, invalid API-KEY was used */ type PostIndustryCompaniesUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PostIndustryCompaniesUnauthorized) GetPayload() *sfgate_models.Error { func (o *PostIndustryCompaniesUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PostIndustryCompaniesForbidden describes a response with status code 403, with d Access forbidden, account lacks access */ type PostIndustryCompaniesForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PostIndustryCompaniesForbidden) GetPayload() *sfgate_models.Error { func (o *PostIndustryCompaniesForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PostIndustryCompaniesNotFound describes a response with status code 404, with de Resource was not found */ type PostIndustryCompaniesNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PostIndustryCompaniesNotFound) GetPayload() *sfgate_models.Error { func (o *PostIndustryCompaniesNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PostIndustryCompaniesUnprocessableEntity describes a response with status code 4 Unprocessable Entity, likely a bad parameter */ type PostIndustryCompaniesUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PostIndustryCompaniesUnprocessableEntity) GetPayload() *sfgate_models.E func (o *PostIndustryCompaniesUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PostIndustryCompaniesInternalServerError describes a response with status code 5 Server Internal Error */ type PostIndustryCompaniesInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PostIndustryCompaniesInternalServerError) GetPayload() *sfgate_models.E func (o *PostIndustryCompaniesInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/industry_products/get_industry_products_responses.go b/api/sfgate/sfgate_client/industry_products/get_industry_products_responses.go index 2cbc5ec..7f0bb6f 100644 --- a/api/sfgate/sfgate_client/industry_products/get_industry_products_responses.go +++ b/api/sfgate/sfgate_client/industry_products/get_industry_products_responses.go @@ -147,8 +147,6 @@ GetIndustryProductsUnauthorized describes a response with status code 401, with Access unauthorized, invalid API-KEY was used */ type GetIndustryProductsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetIndustryProductsUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetIndustryProductsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetIndustryProductsForbidden describes a response with status code 403, with def Access forbidden, account lacks access */ type GetIndustryProductsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetIndustryProductsForbidden) GetPayload() *sfgate_models.Error { func (o *GetIndustryProductsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetIndustryProductsNotFound describes a response with status code 404, with defa Resource was not found */ type GetIndustryProductsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetIndustryProductsNotFound) GetPayload() *sfgate_models.Error { func (o *GetIndustryProductsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetIndustryProductsUnprocessableEntity describes a response with status code 422 Unprocessable Entity, likely a bad parameter */ type GetIndustryProductsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetIndustryProductsUnprocessableEntity) GetPayload() *sfgate_models.Err func (o *GetIndustryProductsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetIndustryProductsInternalServerError describes a response with status code 500 Server Internal Error */ type GetIndustryProductsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetIndustryProductsInternalServerError) GetPayload() *sfgate_models.Err func (o *GetIndustryProductsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/industry_products/post_industryproducts_responses.go b/api/sfgate/sfgate_client/industry_products/post_industryproducts_responses.go index 135ec05..fcefb5d 100644 --- a/api/sfgate/sfgate_client/industry_products/post_industryproducts_responses.go +++ b/api/sfgate/sfgate_client/industry_products/post_industryproducts_responses.go @@ -147,8 +147,6 @@ PostIndustryproductsUnauthorized describes a response with status code 401, with Access unauthorized, invalid API-KEY was used */ type PostIndustryproductsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PostIndustryproductsUnauthorized) GetPayload() *sfgate_models.Error { func (o *PostIndustryproductsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PostIndustryproductsForbidden describes a response with status code 403, with de Access forbidden, account lacks access */ type PostIndustryproductsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PostIndustryproductsForbidden) GetPayload() *sfgate_models.Error { func (o *PostIndustryproductsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PostIndustryproductsNotFound describes a response with status code 404, with def Resource was not found */ type PostIndustryproductsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PostIndustryproductsNotFound) GetPayload() *sfgate_models.Error { func (o *PostIndustryproductsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PostIndustryproductsUnprocessableEntity describes a response with status code 42 Unprocessable Entity, likely a bad parameter */ type PostIndustryproductsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PostIndustryproductsUnprocessableEntity) GetPayload() *sfgate_models.Er func (o *PostIndustryproductsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PostIndustryproductsInternalServerError describes a response with status code 50 Server Internal Error */ type PostIndustryproductsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PostIndustryproductsInternalServerError) GetPayload() *sfgate_models.Er func (o *PostIndustryproductsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/observations/get_observations_responses.go b/api/sfgate/sfgate_client/observations/get_observations_responses.go index 5b5d6e3..6ad63e2 100644 --- a/api/sfgate/sfgate_client/observations/get_observations_responses.go +++ b/api/sfgate/sfgate_client/observations/get_observations_responses.go @@ -147,8 +147,6 @@ GetObservationsUnauthorized describes a response with status code 401, with defa Access unauthorized, invalid API-KEY was used */ type GetObservationsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetObservationsUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetObservationsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetObservationsForbidden describes a response with status code 403, with default Access forbidden, account lacks access */ type GetObservationsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetObservationsForbidden) GetPayload() *sfgate_models.Error { func (o *GetObservationsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetObservationsNotFound describes a response with status code 404, with default Resource was not found */ type GetObservationsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetObservationsNotFound) GetPayload() *sfgate_models.Error { func (o *GetObservationsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetObservationsUnprocessableEntity describes a response with status code 422, wi Unprocessable Entity, likely a bad parameter */ type GetObservationsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetObservationsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetObservationsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetObservationsInternalServerError describes a response with status code 500, wi Server Internal Error */ type GetObservationsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetObservationsInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetObservationsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/observations/post_observations_responses.go b/api/sfgate/sfgate_client/observations/post_observations_responses.go index c41daed..af4081d 100644 --- a/api/sfgate/sfgate_client/observations/post_observations_responses.go +++ b/api/sfgate/sfgate_client/observations/post_observations_responses.go @@ -147,8 +147,6 @@ PostObservationsUnauthorized describes a response with status code 401, with def Access unauthorized, invalid API-KEY was used */ type PostObservationsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PostObservationsUnauthorized) GetPayload() *sfgate_models.Error { func (o *PostObservationsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PostObservationsForbidden describes a response with status code 403, with defaul Access forbidden, account lacks access */ type PostObservationsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PostObservationsForbidden) GetPayload() *sfgate_models.Error { func (o *PostObservationsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PostObservationsNotFound describes a response with status code 404, with default Resource was not found */ type PostObservationsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PostObservationsNotFound) GetPayload() *sfgate_models.Error { func (o *PostObservationsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PostObservationsUnprocessableEntity describes a response with status code 422, w Unprocessable Entity, likely a bad parameter */ type PostObservationsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PostObservationsUnprocessableEntity) GetPayload() *sfgate_models.Error func (o *PostObservationsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PostObservationsInternalServerError describes a response with status code 500, w Server Internal Error */ type PostObservationsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PostObservationsInternalServerError) GetPayload() *sfgate_models.Error func (o *PostObservationsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/roles/get_roles_responses.go b/api/sfgate/sfgate_client/roles/get_roles_responses.go index d784d33..d8c037b 100644 --- a/api/sfgate/sfgate_client/roles/get_roles_responses.go +++ b/api/sfgate/sfgate_client/roles/get_roles_responses.go @@ -147,8 +147,6 @@ GetRolesUnauthorized describes a response with status code 401, with default hea Access unauthorized, invalid API-KEY was used */ type GetRolesUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetRolesUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetRolesUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetRolesForbidden describes a response with status code 403, with default header Access forbidden, account lacks access */ type GetRolesForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetRolesForbidden) GetPayload() *sfgate_models.Error { func (o *GetRolesForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetRolesNotFound describes a response with status code 404, with default header Resource was not found */ type GetRolesNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetRolesNotFound) GetPayload() *sfgate_models.Error { func (o *GetRolesNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetRolesUnprocessableEntity describes a response with status code 422, with defa Unprocessable Entity, likely a bad parameter */ type GetRolesUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetRolesUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetRolesUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetRolesInternalServerError describes a response with status code 500, with defa Server Internal Error */ type GetRolesInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetRolesInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetRolesInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/sfgate_client.go b/api/sfgate/sfgate_client/sfgate_client.go index 24ae85f..fcb6457 100644 --- a/api/sfgate/sfgate_client/sfgate_client.go +++ b/api/sfgate/sfgate_client/sfgate_client.go @@ -20,7 +20,9 @@ import ( "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/company_products" "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/contacts" "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/contracts" + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/courses" "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/databases" + "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/events" "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/factors" "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/financial_statements" "code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industries" @@ -82,7 +84,9 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Sfgate { cli.CompanyProducts = company_products.New(transport, formats) cli.Contacts = contacts.New(transport, formats) cli.Contracts = contracts.New(transport, formats) + cli.Courses = courses.New(transport, formats) cli.Databases = databases.New(transport, formats) + cli.Events = events.New(transport, formats) cli.Factors = factors.New(transport, formats) cli.FinancialStatements = financial_statements.New(transport, formats) cli.Industries = industries.New(transport, formats) @@ -150,8 +154,12 @@ type Sfgate struct { Contracts contracts.ClientService + Courses courses.ClientService + Databases databases.ClientService + Events events.ClientService + Factors factors.ClientService FinancialStatements financial_statements.ClientService @@ -186,7 +194,9 @@ func (c *Sfgate) SetTransport(transport runtime.ClientTransport) { c.CompanyProducts.SetTransport(transport) c.Contacts.SetTransport(transport) c.Contracts.SetTransport(transport) + c.Courses.SetTransport(transport) c.Databases.SetTransport(transport) + c.Events.SetTransport(transport) c.Factors.SetTransport(transport) c.FinancialStatements.SetTransport(transport) c.Industries.SetTransport(transport) diff --git a/api/sfgate/sfgate_client/templates/get_templates_responses.go b/api/sfgate/sfgate_client/templates/get_templates_responses.go index 281f37b..4a14d56 100644 --- a/api/sfgate/sfgate_client/templates/get_templates_responses.go +++ b/api/sfgate/sfgate_client/templates/get_templates_responses.go @@ -147,8 +147,6 @@ GetTemplatesUnauthorized describes a response with status code 401, with default Access unauthorized, invalid API-KEY was used */ type GetTemplatesUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetTemplatesUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetTemplatesUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetTemplatesForbidden describes a response with status code 403, with default he Access forbidden, account lacks access */ type GetTemplatesForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetTemplatesForbidden) GetPayload() *sfgate_models.Error { func (o *GetTemplatesForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetTemplatesNotFound describes a response with status code 404, with default hea Resource was not found */ type GetTemplatesNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetTemplatesNotFound) GetPayload() *sfgate_models.Error { func (o *GetTemplatesNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetTemplatesUnprocessableEntity describes a response with status code 422, with Unprocessable Entity, likely a bad parameter */ type GetTemplatesUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetTemplatesUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetTemplatesUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetTemplatesInternalServerError describes a response with status code 500, with Server Internal Error */ type GetTemplatesInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetTemplatesInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetTemplatesInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/tenants/get_tenants_responses.go b/api/sfgate/sfgate_client/tenants/get_tenants_responses.go index 97ec509..70c49c6 100644 --- a/api/sfgate/sfgate_client/tenants/get_tenants_responses.go +++ b/api/sfgate/sfgate_client/tenants/get_tenants_responses.go @@ -147,8 +147,6 @@ GetTenantsUnauthorized describes a response with status code 401, with default h Access unauthorized, invalid API-KEY was used */ type GetTenantsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetTenantsUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetTenantsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetTenantsForbidden describes a response with status code 403, with default head Access forbidden, account lacks access */ type GetTenantsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetTenantsForbidden) GetPayload() *sfgate_models.Error { func (o *GetTenantsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetTenantsNotFound describes a response with status code 404, with default heade Resource was not found */ type GetTenantsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetTenantsNotFound) GetPayload() *sfgate_models.Error { func (o *GetTenantsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetTenantsUnprocessableEntity describes a response with status code 422, with de Unprocessable Entity, likely a bad parameter */ type GetTenantsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetTenantsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetTenantsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetTenantsInternalServerError describes a response with status code 500, with de Server Internal Error */ type GetTenantsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetTenantsInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetTenantsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/tenants/put_tenants_responses.go b/api/sfgate/sfgate_client/tenants/put_tenants_responses.go index 8b4c2d2..2fbf79e 100644 --- a/api/sfgate/sfgate_client/tenants/put_tenants_responses.go +++ b/api/sfgate/sfgate_client/tenants/put_tenants_responses.go @@ -147,8 +147,6 @@ PutTenantsUnauthorized describes a response with status code 401, with default h Access unauthorized, invalid API-KEY was used */ type PutTenantsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PutTenantsUnauthorized) GetPayload() *sfgate_models.Error { func (o *PutTenantsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PutTenantsForbidden describes a response with status code 403, with default head Access forbidden, account lacks access */ type PutTenantsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PutTenantsForbidden) GetPayload() *sfgate_models.Error { func (o *PutTenantsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PutTenantsNotFound describes a response with status code 404, with default heade Resource was not found */ type PutTenantsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PutTenantsNotFound) GetPayload() *sfgate_models.Error { func (o *PutTenantsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PutTenantsUnprocessableEntity describes a response with status code 422, with de Unprocessable Entity, likely a bad parameter */ type PutTenantsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PutTenantsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PutTenantsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PutTenantsInternalServerError describes a response with status code 500, with de Server Internal Error */ type PutTenantsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PutTenantsInternalServerError) GetPayload() *sfgate_models.Error { func (o *PutTenantsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/tenants/tenants_responses.go b/api/sfgate/sfgate_client/tenants/tenants_responses.go index ba92453..89e03e1 100644 --- a/api/sfgate/sfgate_client/tenants/tenants_responses.go +++ b/api/sfgate/sfgate_client/tenants/tenants_responses.go @@ -147,8 +147,6 @@ TenantsUnauthorized describes a response with status code 401, with default head Access unauthorized, invalid API-KEY was used */ type TenantsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *TenantsUnauthorized) GetPayload() *sfgate_models.Error { func (o *TenantsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ TenantsForbidden describes a response with status code 403, with default header Access forbidden, account lacks access */ type TenantsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *TenantsForbidden) GetPayload() *sfgate_models.Error { func (o *TenantsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ TenantsNotFound describes a response with status code 404, with default header v Resource was not found */ type TenantsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *TenantsNotFound) GetPayload() *sfgate_models.Error { func (o *TenantsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ TenantsUnprocessableEntity describes a response with status code 422, with defau Unprocessable Entity, likely a bad parameter */ type TenantsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *TenantsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *TenantsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ TenantsInternalServerError describes a response with status code 500, with defau Server Internal Error */ type TenantsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *TenantsInternalServerError) GetPayload() *sfgate_models.Error { func (o *TenantsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/topics/get_topics_responses.go b/api/sfgate/sfgate_client/topics/get_topics_responses.go index f4132d8..3e4f73d 100644 --- a/api/sfgate/sfgate_client/topics/get_topics_responses.go +++ b/api/sfgate/sfgate_client/topics/get_topics_responses.go @@ -147,8 +147,6 @@ GetTopicsUnauthorized describes a response with status code 401, with default he Access unauthorized, invalid API-KEY was used */ type GetTopicsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetTopicsUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetTopicsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetTopicsForbidden describes a response with status code 403, with default heade Access forbidden, account lacks access */ type GetTopicsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetTopicsForbidden) GetPayload() *sfgate_models.Error { func (o *GetTopicsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetTopicsNotFound describes a response with status code 404, with default header Resource was not found */ type GetTopicsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetTopicsNotFound) GetPayload() *sfgate_models.Error { func (o *GetTopicsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetTopicsUnprocessableEntity describes a response with status code 422, with def Unprocessable Entity, likely a bad parameter */ type GetTopicsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetTopicsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetTopicsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetTopicsInternalServerError describes a response with status code 500, with def Server Internal Error */ type GetTopicsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetTopicsInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetTopicsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/topics/post_topics_responses.go b/api/sfgate/sfgate_client/topics/post_topics_responses.go index b78d197..69b6ce7 100644 --- a/api/sfgate/sfgate_client/topics/post_topics_responses.go +++ b/api/sfgate/sfgate_client/topics/post_topics_responses.go @@ -147,8 +147,6 @@ PostTopicsUnauthorized describes a response with status code 401, with default h Access unauthorized, invalid API-KEY was used */ type PostTopicsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PostTopicsUnauthorized) GetPayload() *sfgate_models.Error { func (o *PostTopicsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PostTopicsForbidden describes a response with status code 403, with default head Access forbidden, account lacks access */ type PostTopicsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PostTopicsForbidden) GetPayload() *sfgate_models.Error { func (o *PostTopicsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PostTopicsNotFound describes a response with status code 404, with default heade Resource was not found */ type PostTopicsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PostTopicsNotFound) GetPayload() *sfgate_models.Error { func (o *PostTopicsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PostTopicsUnprocessableEntity describes a response with status code 422, with de Unprocessable Entity, likely a bad parameter */ type PostTopicsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PostTopicsUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PostTopicsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PostTopicsInternalServerError describes a response with status code 500, with de Server Internal Error */ type PostTopicsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PostTopicsInternalServerError) GetPayload() *sfgate_models.Error { func (o *PostTopicsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/users/get_users_responses.go b/api/sfgate/sfgate_client/users/get_users_responses.go index c59fc0d..f1f859f 100644 --- a/api/sfgate/sfgate_client/users/get_users_responses.go +++ b/api/sfgate/sfgate_client/users/get_users_responses.go @@ -147,8 +147,6 @@ GetUsersUnauthorized describes a response with status code 401, with default hea Access unauthorized, invalid API-KEY was used */ type GetUsersUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *GetUsersUnauthorized) GetPayload() *sfgate_models.Error { func (o *GetUsersUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ GetUsersForbidden describes a response with status code 403, with default header Access forbidden, account lacks access */ type GetUsersForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *GetUsersForbidden) GetPayload() *sfgate_models.Error { func (o *GetUsersForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ GetUsersNotFound describes a response with status code 404, with default header Resource was not found */ type GetUsersNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *GetUsersNotFound) GetPayload() *sfgate_models.Error { func (o *GetUsersNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ GetUsersUnprocessableEntity describes a response with status code 422, with defa Unprocessable Entity, likely a bad parameter */ type GetUsersUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *GetUsersUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *GetUsersUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ GetUsersInternalServerError describes a response with status code 500, with defa Server Internal Error */ type GetUsersInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *GetUsersInternalServerError) GetPayload() *sfgate_models.Error { func (o *GetUsersInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/users/post_users_responses.go b/api/sfgate/sfgate_client/users/post_users_responses.go index 5a3b62c..8f2598b 100644 --- a/api/sfgate/sfgate_client/users/post_users_responses.go +++ b/api/sfgate/sfgate_client/users/post_users_responses.go @@ -147,8 +147,6 @@ PostUsersUnauthorized describes a response with status code 401, with default he Access unauthorized, invalid API-KEY was used */ type PostUsersUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PostUsersUnauthorized) GetPayload() *sfgate_models.Error { func (o *PostUsersUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PostUsersForbidden describes a response with status code 403, with default heade Access forbidden, account lacks access */ type PostUsersForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PostUsersForbidden) GetPayload() *sfgate_models.Error { func (o *PostUsersForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PostUsersNotFound describes a response with status code 404, with default header Resource was not found */ type PostUsersNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PostUsersNotFound) GetPayload() *sfgate_models.Error { func (o *PostUsersNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PostUsersUnprocessableEntity describes a response with status code 422, with def Unprocessable Entity, likely a bad parameter */ type PostUsersUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PostUsersUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PostUsersUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PostUsersInternalServerError describes a response with status code 500, with def Server Internal Error */ type PostUsersInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PostUsersInternalServerError) GetPayload() *sfgate_models.Error { func (o *PostUsersInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/users/put_users_responses.go b/api/sfgate/sfgate_client/users/put_users_responses.go index 0c5dfb3..10afa5b 100644 --- a/api/sfgate/sfgate_client/users/put_users_responses.go +++ b/api/sfgate/sfgate_client/users/put_users_responses.go @@ -147,8 +147,6 @@ PutUsersUnauthorized describes a response with status code 401, with default hea Access unauthorized, invalid API-KEY was used */ type PutUsersUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PutUsersUnauthorized) GetPayload() *sfgate_models.Error { func (o *PutUsersUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PutUsersForbidden describes a response with status code 403, with default header Access forbidden, account lacks access */ type PutUsersForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PutUsersForbidden) GetPayload() *sfgate_models.Error { func (o *PutUsersForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PutUsersNotFound describes a response with status code 404, with default header Resource was not found */ type PutUsersNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PutUsersNotFound) GetPayload() *sfgate_models.Error { func (o *PutUsersNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PutUsersUnprocessableEntity describes a response with status code 422, with defa Unprocessable Entity, likely a bad parameter */ type PutUsersUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PutUsersUnprocessableEntity) GetPayload() *sfgate_models.Error { func (o *PutUsersUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PutUsersInternalServerError describes a response with status code 500, with defa Server Internal Error */ type PutUsersInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PutUsersInternalServerError) GetPayload() *sfgate_models.Error { func (o *PutUsersInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_client/users/put_users_sessions_responses.go b/api/sfgate/sfgate_client/users/put_users_sessions_responses.go index 168198f..6f9f385 100644 --- a/api/sfgate/sfgate_client/users/put_users_sessions_responses.go +++ b/api/sfgate/sfgate_client/users/put_users_sessions_responses.go @@ -147,8 +147,6 @@ PutUsersSessionsUnauthorized describes a response with status code 401, with def Access unauthorized, invalid API-KEY was used */ type PutUsersSessionsUnauthorized struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -196,13 +194,6 @@ func (o *PutUsersSessionsUnauthorized) GetPayload() *sfgate_models.Error { func (o *PutUsersSessionsUnauthorized) 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(sfgate_models.Error) // response payload @@ -224,8 +215,6 @@ PutUsersSessionsForbidden describes a response with status code 403, with defaul Access forbidden, account lacks access */ type PutUsersSessionsForbidden struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -273,13 +262,6 @@ func (o *PutUsersSessionsForbidden) GetPayload() *sfgate_models.Error { func (o *PutUsersSessionsForbidden) 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(sfgate_models.Error) // response payload @@ -301,8 +283,6 @@ PutUsersSessionsNotFound describes a response with status code 404, with default Resource was not found */ type PutUsersSessionsNotFound struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -350,13 +330,6 @@ func (o *PutUsersSessionsNotFound) GetPayload() *sfgate_models.Error { func (o *PutUsersSessionsNotFound) 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(sfgate_models.Error) // response payload @@ -378,8 +351,6 @@ PutUsersSessionsUnprocessableEntity describes a response with status code 422, w Unprocessable Entity, likely a bad parameter */ type PutUsersSessionsUnprocessableEntity struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -427,13 +398,6 @@ func (o *PutUsersSessionsUnprocessableEntity) GetPayload() *sfgate_models.Error func (o *PutUsersSessionsUnprocessableEntity) 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(sfgate_models.Error) // response payload @@ -455,8 +419,6 @@ PutUsersSessionsInternalServerError describes a response with status code 500, w Server Internal Error */ type PutUsersSessionsInternalServerError struct { - AccessControlAllowOrigin string - Payload *sfgate_models.Error } @@ -504,13 +466,6 @@ func (o *PutUsersSessionsInternalServerError) GetPayload() *sfgate_models.Error func (o *PutUsersSessionsInternalServerError) 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(sfgate_models.Error) // response payload diff --git a/api/sfgate/sfgate_models/course.go b/api/sfgate/sfgate_models/course.go new file mode 100644 index 0000000..b3e266d --- /dev/null +++ b/api/sfgate/sfgate_models/course.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package sfgate_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Course course +// +// swagger:model course +type Course struct { + + // created by ID + CreatedByID *string `json:"CreatedByID,omitempty"` + + // created date + CreatedDate *string `json:"CreatedDate,omitempty"` + + // description + Description *string `json:"Description,omitempty"` + + // fulldescription + Fulldescription *string `json:"Fulldescription,omitempty"` + + // ID + ID string `json:"ID,omitempty"` + + // image alt text + ImageAltText *string `json:"ImageAltText,omitempty"` + + // image URL + ImageURL *string `json:"ImageURL,omitempty"` + + // instructor ID + InstructorID *string `json:"InstructorID,omitempty"` + + // last modified by ID + LastModifiedByID *string `json:"LastModifiedByID,omitempty"` + + // last modified date + LastModifiedDate *string `json:"LastModifiedDate,omitempty"` + + // logo + Logo *string `json:"Logo,omitempty"` + + // price + Price *float64 `json:"Price,omitempty"` + + // sections + Sections []*CourseSection `json:"Sections"` + + // slug + Slug *string `json:"Slug,omitempty"` + + // template ID + TemplateID *string `json:"TemplateID,omitempty"` + + // title + Title *string `json:"Title,omitempty"` +} + +// Validate validates this course +func (m *Course) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSections(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Course) validateSections(formats strfmt.Registry) error { + if swag.IsZero(m.Sections) { // not required + return nil + } + + for i := 0; i < len(m.Sections); i++ { + if swag.IsZero(m.Sections[i]) { // not required + continue + } + + if m.Sections[i] != nil { + if err := m.Sections[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Sections" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Sections" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this course based on the context it is used +func (m *Course) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSections(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Course) contextValidateSections(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Sections); i++ { + + if m.Sections[i] != nil { + if err := m.Sections[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Sections" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Sections" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Course) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Course) UnmarshalBinary(b []byte) error { + var res Course + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/sfgate/sfgate_models/course_lesson.go b/api/sfgate/sfgate_models/course_lesson.go new file mode 100644 index 0000000..a987c81 --- /dev/null +++ b/api/sfgate/sfgate_models/course_lesson.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package sfgate_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CourseLesson course lesson +// +// swagger:model courseLesson +type CourseLesson struct { + + // asset ID + AssetID *string `json:"AssetID,omitempty"` + + // content + Content *string `json:"Content,omitempty"` + + // created by ID + CreatedByID *string `json:"CreatedByID,omitempty"` + + // created date + CreatedDate *string `json:"CreatedDate,omitempty"` + + // ID + ID string `json:"ID,omitempty"` + + // image alt text + ImageAltText *string `json:"ImageAltText,omitempty"` + + // image URL + ImageURL *string `json:"ImageURL,omitempty"` + + // last modified by ID + LastModifiedByID *string `json:"LastModifiedByID,omitempty"` + + // last modified date + LastModifiedDate *string `json:"LastModifiedDate,omitempty"` + + // logo + Logo *string `json:"Logo,omitempty"` + + // order + Order *int64 `json:"Order,omitempty"` + + // section ID + SectionID *string `json:"SectionID,omitempty"` + + // slug + Slug *string `json:"Slug,omitempty"` + + // title + Title *string `json:"Title,omitempty"` + + // video URL + VideoURL *string `json:"VideoURL,omitempty"` +} + +// Validate validates this course lesson +func (m *CourseLesson) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this course lesson based on context it is used +func (m *CourseLesson) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *CourseLesson) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CourseLesson) UnmarshalBinary(b []byte) error { + var res CourseLesson + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/members/members_models/event_category_assignment_request.go b/api/sfgate/sfgate_models/course_lesson_request.go similarity index 66% rename from api/members/members_models/event_category_assignment_request.go rename to api/sfgate/sfgate_models/course_lesson_request.go index 632d110..118a4df 100644 --- a/api/members/members_models/event_category_assignment_request.go +++ b/api/sfgate/sfgate_models/course_lesson_request.go @@ -4,7 +4,7 @@ // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed -package members_models +package sfgate_models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -18,17 +18,17 @@ import ( "github.com/go-openapi/swag" ) -// EventCategoryAssignmentRequest An array of EventCategoryAssignment objects +// CourseLessonRequest An array of CourseLesson objects // -// swagger:model EventCategoryAssignmentRequest -type EventCategoryAssignmentRequest struct { +// swagger:model CourseLessonRequest +type CourseLessonRequest struct { // data - Data []*EventCategoryAssignment `json:"Data"` + Data []*CourseLesson `json:"Data"` } -// Validate validates this event category assignment request -func (m *EventCategoryAssignmentRequest) Validate(formats strfmt.Registry) error { +// Validate validates this course lesson request +func (m *CourseLessonRequest) Validate(formats strfmt.Registry) error { var res []error if err := m.validateData(formats); err != nil { @@ -41,7 +41,7 @@ func (m *EventCategoryAssignmentRequest) Validate(formats strfmt.Registry) error return nil } -func (m *EventCategoryAssignmentRequest) validateData(formats strfmt.Registry) error { +func (m *CourseLessonRequest) validateData(formats strfmt.Registry) error { if swag.IsZero(m.Data) { // not required return nil } @@ -67,8 +67,8 @@ func (m *EventCategoryAssignmentRequest) validateData(formats strfmt.Registry) e return nil } -// ContextValidate validate this event category assignment request based on the context it is used -func (m *EventCategoryAssignmentRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this course lesson request based on the context it is used +func (m *CourseLessonRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateData(ctx, formats); err != nil { @@ -81,7 +81,7 @@ func (m *EventCategoryAssignmentRequest) ContextValidate(ctx context.Context, fo return nil } -func (m *EventCategoryAssignmentRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error { +func (m *CourseLessonRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Data); i++ { @@ -102,7 +102,7 @@ func (m *EventCategoryAssignmentRequest) contextValidateData(ctx context.Context } // MarshalBinary interface implementation -func (m *EventCategoryAssignmentRequest) MarshalBinary() ([]byte, error) { +func (m *CourseLessonRequest) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -110,8 +110,8 @@ func (m *EventCategoryAssignmentRequest) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *EventCategoryAssignmentRequest) UnmarshalBinary(b []byte) error { - var res EventCategoryAssignmentRequest +func (m *CourseLessonRequest) UnmarshalBinary(b []byte) error { + var res CourseLessonRequest if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/api/members/members_models/event_category_request.go b/api/sfgate/sfgate_models/course_lesson_response.go similarity index 74% rename from api/members/members_models/event_category_request.go rename to api/sfgate/sfgate_models/course_lesson_response.go index 1d52d98..189f6e9 100644 --- a/api/members/members_models/event_category_request.go +++ b/api/sfgate/sfgate_models/course_lesson_response.go @@ -4,7 +4,7 @@ // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed -package members_models +package sfgate_models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -18,17 +18,17 @@ import ( "github.com/go-openapi/swag" ) -// EventCategoryRequest An array of EventCategory objects +// CourseLessonResponse An array of CourseLesson objects // -// swagger:model EventCategoryRequest -type EventCategoryRequest struct { +// swagger:model CourseLessonResponse +type CourseLessonResponse struct { // data - Data []*EventCategory `json:"Data"` + Data []*CourseLesson `json:"Data"` } -// Validate validates this event category request -func (m *EventCategoryRequest) Validate(formats strfmt.Registry) error { +// Validate validates this course lesson response +func (m *CourseLessonResponse) Validate(formats strfmt.Registry) error { var res []error if err := m.validateData(formats); err != nil { @@ -41,7 +41,7 @@ func (m *EventCategoryRequest) Validate(formats strfmt.Registry) error { return nil } -func (m *EventCategoryRequest) validateData(formats strfmt.Registry) error { +func (m *CourseLessonResponse) validateData(formats strfmt.Registry) error { if swag.IsZero(m.Data) { // not required return nil } @@ -67,8 +67,8 @@ func (m *EventCategoryRequest) validateData(formats strfmt.Registry) error { return nil } -// ContextValidate validate this event category request based on the context it is used -func (m *EventCategoryRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this course lesson response based on the context it is used +func (m *CourseLessonResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateData(ctx, formats); err != nil { @@ -81,7 +81,7 @@ func (m *EventCategoryRequest) ContextValidate(ctx context.Context, formats strf return nil } -func (m *EventCategoryRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error { +func (m *CourseLessonResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Data); i++ { @@ -102,7 +102,7 @@ func (m *EventCategoryRequest) contextValidateData(ctx context.Context, formats } // MarshalBinary interface implementation -func (m *EventCategoryRequest) MarshalBinary() ([]byte, error) { +func (m *CourseLessonResponse) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -110,8 +110,8 @@ func (m *EventCategoryRequest) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *EventCategoryRequest) UnmarshalBinary(b []byte) error { - var res EventCategoryRequest +func (m *CourseLessonResponse) UnmarshalBinary(b []byte) error { + var res CourseLessonResponse if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/api/members/members_models/event_category_assignment_response.go b/api/sfgate/sfgate_models/course_request.go similarity index 66% rename from api/members/members_models/event_category_assignment_response.go rename to api/sfgate/sfgate_models/course_request.go index 2e5c8e3..d6e5283 100644 --- a/api/members/members_models/event_category_assignment_response.go +++ b/api/sfgate/sfgate_models/course_request.go @@ -4,7 +4,7 @@ // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed -package members_models +package sfgate_models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -18,17 +18,17 @@ import ( "github.com/go-openapi/swag" ) -// EventCategoryAssignmentResponse An array of EventCategoryAssignment objects +// CourseRequest An array of Course objects // -// swagger:model EventCategoryAssignmentResponse -type EventCategoryAssignmentResponse struct { +// swagger:model CourseRequest +type CourseRequest struct { // data - Data []*EventCategoryAssignment `json:"Data"` + Data []*Course `json:"Data"` } -// Validate validates this event category assignment response -func (m *EventCategoryAssignmentResponse) Validate(formats strfmt.Registry) error { +// Validate validates this course request +func (m *CourseRequest) Validate(formats strfmt.Registry) error { var res []error if err := m.validateData(formats); err != nil { @@ -41,7 +41,7 @@ func (m *EventCategoryAssignmentResponse) Validate(formats strfmt.Registry) erro return nil } -func (m *EventCategoryAssignmentResponse) validateData(formats strfmt.Registry) error { +func (m *CourseRequest) validateData(formats strfmt.Registry) error { if swag.IsZero(m.Data) { // not required return nil } @@ -67,8 +67,8 @@ func (m *EventCategoryAssignmentResponse) validateData(formats strfmt.Registry) return nil } -// ContextValidate validate this event category assignment response based on the context it is used -func (m *EventCategoryAssignmentResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this course request based on the context it is used +func (m *CourseRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateData(ctx, formats); err != nil { @@ -81,7 +81,7 @@ func (m *EventCategoryAssignmentResponse) ContextValidate(ctx context.Context, f return nil } -func (m *EventCategoryAssignmentResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error { +func (m *CourseRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Data); i++ { @@ -102,7 +102,7 @@ func (m *EventCategoryAssignmentResponse) contextValidateData(ctx context.Contex } // MarshalBinary interface implementation -func (m *EventCategoryAssignmentResponse) MarshalBinary() ([]byte, error) { +func (m *CourseRequest) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -110,8 +110,8 @@ func (m *EventCategoryAssignmentResponse) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *EventCategoryAssignmentResponse) UnmarshalBinary(b []byte) error { - var res EventCategoryAssignmentResponse +func (m *CourseRequest) UnmarshalBinary(b []byte) error { + var res CourseRequest if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/api/sfgate/sfgate_models/course_response.go b/api/sfgate/sfgate_models/course_response.go new file mode 100644 index 0000000..c67491a --- /dev/null +++ b/api/sfgate/sfgate_models/course_response.go @@ -0,0 +1,120 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package sfgate_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CourseResponse An array of Course objects +// +// swagger:model CourseResponse +type CourseResponse struct { + + // data + Data []*Course `json:"Data"` +} + +// Validate validates this course response +func (m *CourseResponse) 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 *CourseResponse) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this course response based on the context it is used +func (m *CourseResponse) 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 *CourseResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CourseResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CourseResponse) UnmarshalBinary(b []byte) error { + var res CourseResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/sfgate/sfgate_models/course_section.go b/api/sfgate/sfgate_models/course_section.go new file mode 100644 index 0000000..b612ee2 --- /dev/null +++ b/api/sfgate/sfgate_models/course_section.go @@ -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 sfgate_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CourseSection course section +// +// swagger:model courseSection +type CourseSection struct { + + // content + Content *string `json:"Content,omitempty"` + + // course ID + CourseID *string `json:"CourseID,omitempty"` + + // created by ID + CreatedByID *string `json:"CreatedByID,omitempty"` + + // created date + CreatedDate *string `json:"CreatedDate,omitempty"` + + // ID + ID string `json:"ID,omitempty"` + + // image alt text + ImageAltText *string `json:"ImageAltText,omitempty"` + + // image URL + ImageURL *string `json:"ImageURL,omitempty"` + + // last modified by ID + LastModifiedByID *string `json:"LastModifiedByID,omitempty"` + + // last modified date + LastModifiedDate *string `json:"LastModifiedDate,omitempty"` + + // lessons + Lessons []*CourseLesson `json:"Lessons"` + + // logo + Logo *string `json:"Logo,omitempty"` + + // order + Order *int64 `json:"Order,omitempty"` + + // slug + Slug *string `json:"Slug,omitempty"` + + // title + Title *string `json:"Title,omitempty"` +} + +// Validate validates this course section +func (m *CourseSection) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLessons(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CourseSection) validateLessons(formats strfmt.Registry) error { + if swag.IsZero(m.Lessons) { // not required + return nil + } + + for i := 0; i < len(m.Lessons); i++ { + if swag.IsZero(m.Lessons[i]) { // not required + continue + } + + if m.Lessons[i] != nil { + if err := m.Lessons[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Lessons" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Lessons" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this course section based on the context it is used +func (m *CourseSection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLessons(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CourseSection) contextValidateLessons(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Lessons); i++ { + + if m.Lessons[i] != nil { + if err := m.Lessons[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Lessons" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Lessons" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CourseSection) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CourseSection) UnmarshalBinary(b []byte) error { + var res CourseSection + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/sfgate/sfgate_models/course_section_request.go b/api/sfgate/sfgate_models/course_section_request.go new file mode 100644 index 0000000..b1fe27a --- /dev/null +++ b/api/sfgate/sfgate_models/course_section_request.go @@ -0,0 +1,120 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package sfgate_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CourseSectionRequest An array of CourseSection objects +// +// swagger:model CourseSectionRequest +type CourseSectionRequest struct { + + // data + Data []*CourseSection `json:"Data"` +} + +// Validate validates this course section request +func (m *CourseSectionRequest) 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 *CourseSectionRequest) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this course section request based on the context it is used +func (m *CourseSectionRequest) 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 *CourseSectionRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CourseSectionRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CourseSectionRequest) UnmarshalBinary(b []byte) error { + var res CourseSectionRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/members/members_models/event_category_response.go b/api/sfgate/sfgate_models/course_section_response.go similarity index 74% rename from api/members/members_models/event_category_response.go rename to api/sfgate/sfgate_models/course_section_response.go index 2278e90..0f2020c 100644 --- a/api/members/members_models/event_category_response.go +++ b/api/sfgate/sfgate_models/course_section_response.go @@ -4,7 +4,7 @@ // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed -package members_models +package sfgate_models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -18,17 +18,17 @@ import ( "github.com/go-openapi/swag" ) -// EventCategoryResponse An array of EventCategory objects +// CourseSectionResponse An array of CourseSection objects // -// swagger:model EventCategoryResponse -type EventCategoryResponse struct { +// swagger:model CourseSectionResponse +type CourseSectionResponse struct { // data - Data []*EventCategory `json:"Data"` + Data []*CourseSection `json:"Data"` } -// Validate validates this event category response -func (m *EventCategoryResponse) Validate(formats strfmt.Registry) error { +// Validate validates this course section response +func (m *CourseSectionResponse) Validate(formats strfmt.Registry) error { var res []error if err := m.validateData(formats); err != nil { @@ -41,7 +41,7 @@ func (m *EventCategoryResponse) Validate(formats strfmt.Registry) error { return nil } -func (m *EventCategoryResponse) validateData(formats strfmt.Registry) error { +func (m *CourseSectionResponse) validateData(formats strfmt.Registry) error { if swag.IsZero(m.Data) { // not required return nil } @@ -67,8 +67,8 @@ func (m *EventCategoryResponse) validateData(formats strfmt.Registry) error { return nil } -// ContextValidate validate this event category response based on the context it is used -func (m *EventCategoryResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this course section response based on the context it is used +func (m *CourseSectionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateData(ctx, formats); err != nil { @@ -81,7 +81,7 @@ func (m *EventCategoryResponse) ContextValidate(ctx context.Context, formats str return nil } -func (m *EventCategoryResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error { +func (m *CourseSectionResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Data); i++ { @@ -102,7 +102,7 @@ func (m *EventCategoryResponse) contextValidateData(ctx context.Context, formats } // MarshalBinary interface implementation -func (m *EventCategoryResponse) MarshalBinary() ([]byte, error) { +func (m *CourseSectionResponse) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -110,8 +110,8 @@ func (m *EventCategoryResponse) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *EventCategoryResponse) UnmarshalBinary(b []byte) error { - var res EventCategoryResponse +func (m *CourseSectionResponse) UnmarshalBinary(b []byte) error { + var res CourseSectionResponse if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/api/sfgate/sfgate_models/event.go b/api/sfgate/sfgate_models/event.go new file mode 100644 index 0000000..f316676 --- /dev/null +++ b/api/sfgate/sfgate_models/event.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package sfgate_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Event event +// +// swagger:model event +type Event struct { + + // account ID + AccountID *string `json:"AccountID,omitempty"` + + // capacity + Capacity *int64 `json:"Capacity,omitempty"` + + // created by ID + CreatedByID *string `json:"CreatedByID,omitempty"` + + // created date + CreatedDate *string `json:"CreatedDate,omitempty"` + + // description + Description *string `json:"Description,omitempty"` + + // end date + EndDate *string `json:"EndDate,omitempty"` + + // ID + ID string `json:"ID,omitempty"` + + // image alt text + ImageAltText *string `json:"ImageAltText,omitempty"` + + // image URL + ImageURL *string `json:"ImageURL,omitempty"` + + // last modified by ID + LastModifiedByID *string `json:"LastModifiedByID,omitempty"` + + // last modified date + LastModifiedDate *string `json:"LastModifiedDate,omitempty"` + + // location + Location *string `json:"Location,omitempty"` + + // logo + Logo *string `json:"Logo,omitempty"` + + // online + Online *bool `json:"Online,omitempty"` + + // organizer user ID + OrganizerUserID *string `json:"OrganizerUserID,omitempty"` + + // reg URL + RegURL *string `json:"RegURL,omitempty"` + + // slug + Slug *string `json:"Slug,omitempty"` + + // start date + StartDate *string `json:"StartDate,omitempty"` + + // title + Title *string `json:"Title,omitempty"` +} + +// Validate validates this event +func (m *Event) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this event based on context it is used +func (m *Event) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Event) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Event) UnmarshalBinary(b []byte) error { + var res Event + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/sfgate/sfgate_models/event_request.go b/api/sfgate/sfgate_models/event_request.go new file mode 100644 index 0000000..bccd5a4 --- /dev/null +++ b/api/sfgate/sfgate_models/event_request.go @@ -0,0 +1,120 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package sfgate_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// EventRequest An array of Event objects +// +// swagger:model EventRequest +type EventRequest struct { + + // data + Data []*Event `json:"Data"` +} + +// Validate validates this event request +func (m *EventRequest) 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 *EventRequest) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this event request based on the context it is used +func (m *EventRequest) 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 *EventRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *EventRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EventRequest) UnmarshalBinary(b []byte) error { + var res EventRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/sfgate/sfgate_models/event_response.go b/api/sfgate/sfgate_models/event_response.go new file mode 100644 index 0000000..c04bfdf --- /dev/null +++ b/api/sfgate/sfgate_models/event_response.go @@ -0,0 +1,166 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package sfgate_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// EventResponse An array of Event objects +// +// swagger:model EventResponse +type EventResponse struct { + + // data + Data []*Event `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this event response +func (m *EventResponse) 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 *EventResponse) validateData(formats strfmt.Registry) error { + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *EventResponse) validateMeta(formats strfmt.Registry) error { + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// ContextValidate validate this event response based on the context it is used +func (m *EventResponse) 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 *EventResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Data); i++ { + + if m.Data[i] != nil { + if err := m.Data[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *EventResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.Meta != nil { + if err := m.Meta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *EventResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EventResponse) UnmarshalBinary(b []byte) error { + var res EventResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/app/service-helpers.go b/app/service-helpers.go index 515bc56..0733c0c 100644 --- a/app/service-helpers.go +++ b/app/service-helpers.go @@ -10,6 +10,36 @@ import ( const dateFormat = "2006-01-02" const dateTimeFormat = "2006-01-02T15:04:05-0800" +// String takes a string and returns a pointer to the string. +func String(s string) *string { + return &s +} + +// Bool takes a bool and returns a pointer to the bool. +func Bool(b bool) *bool { + return &b +} + +// Int64 takes an int64 and returns a pointer to the int64. +func Int64(i int64) *int64 { + return &i +} + +// Int takes an int and returns a pointer to the int. +func Int(i int) *int { + return &i +} + +// Time takes a time.Time and returns a pointer to the time.Time. +func Time(t time.Time) *time.Time { + return &t +} + +// Float64 takes a float64 and returns a pointer to the float64. +func Float64(f float64) *float64 { + return &f +} + // FieldsAndValues is a struct that holds field names and corresponding values for an object. type FieldsAndValues struct { fieldNames []string diff --git a/swagger/defs/course-lesson.yaml b/swagger/defs/course-lesson.yaml new file mode 100644 index 0000000..4eaf658 --- /dev/null +++ b/swagger/defs/course-lesson.yaml @@ -0,0 +1,47 @@ +CourseLesson: + properties: + ID: + type: string + AssetID: + type: string + x-nullable: true + Content: + type: string + x-nullable: true + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true + ImageAltText: + type: string + x-nullable: true + ImageURL: + type: string + x-nullable: true + Logo: + type: string + x-nullable: true + LastModifiedByID: + type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + Order: + type: integer + x-nullable: true + Slug: + type: string + x-nullable: true + SectionID: + type: string + x-nullable: true + Title: + type: string + x-nullable: true + VideoURL: + type: string + x-nullable: true + type: object diff --git a/swagger/defs/course-section.yaml b/swagger/defs/course-section.yaml new file mode 100644 index 0000000..fd1e007 --- /dev/null +++ b/swagger/defs/course-section.yaml @@ -0,0 +1,45 @@ +CourseSection: + properties: + ID: + type: string + Content: + type: string + x-nullable: true + CourseID: + type: string + x-nullable: true + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true + ImageAltText: + type: string + x-nullable: true + ImageURL: + type: string + x-nullable: true + Logo: + type: string + x-nullable: true + LastModifiedByID: + type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + Order: + type: integer + x-nullable: true + Slug: + type: string + x-nullable: true + Title: + type: string + x-nullable: true + Lessons: + items: + $ref: "./course-lesson.yaml#/CourseLesson" + type: array + type: object diff --git a/swagger/defs/course.yaml b/swagger/defs/course.yaml new file mode 100644 index 0000000..fda66f9 --- /dev/null +++ b/swagger/defs/course.yaml @@ -0,0 +1,51 @@ +Course: + properties: + ID: + type: string + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true + Description: + type: string + x-nullable: true + Fulldescription: + type: string + x-nullable: true + ImageAltText: + type: string + x-nullable: true + ImageURL: + type: string + x-nullable: true + InstructorID: + type: string + x-nullable: true + LastModifiedByID: + type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + Logo: + type: string + x-nullable: true + Price: + type: number + x-nullable: true + Slug: + type: string + x-nullable: true + TemplateID: + type: string + x-nullable: true + Title: + type: string + x-nullable: true + Sections: + items: + $ref: "./course-section.yaml#/CourseSection" + type: array + type: object diff --git a/swagger/defs/event.yaml b/swagger/defs/event.yaml new file mode 100644 index 0000000..904ab97 --- /dev/null +++ b/swagger/defs/event.yaml @@ -0,0 +1,59 @@ +Event: + properties: + ID: + type: string + AccountID: + type: string + x-nullable: true + Capacity: + type: integer + x-nullable: true + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true + Description: + type: string + x-nullable: true + EndDate: + type: string + x-nullable: true + ImageAltText: + type: string + x-nullable: true + ImageURL: + type: string + x-nullable: true + Logo: + type: string + x-nullable: true + LastModifiedByID: + type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + Location: + type: string + x-nullable: true + Online: + type: boolean + x-nullable: true + OrganizerUserID: + type: string + x-nullable: true + RegURL: + type: string + x-nullable: true + Slug: + type: string + x-nullable: true + StartDate: + type: string + x-nullable: true + Title: + type: string + x-nullable: true + type: object diff --git a/swagger/external/members-vernonkeenan.yaml b/swagger/external/members-vernonkeenan.yaml index fafbabd..f6b9a34 100644 --- a/swagger/external/members-vernonkeenan.yaml +++ b/swagger/external/members-vernonkeenan.yaml @@ -5,7 +5,7 @@ info: description: "Membership Microservice" termsOfService: "https://salesforcedevops.net/terms/" contact: - email: "vern@vernonkeenan.com" + email: "vern@salesforcedevops.net" license: name: "Proprietary - Copyright (c) 2018-2023 by Vernon Keenan" securityDefinitions: @@ -84,20 +84,6 @@ parameters: required: true schema: $ref: "#/definitions/EnrollmentRequest" - EventCategoryAssignmentRequest: - description: An array of new EventCategoryAssignment records - in: body - name: eventcategoryassignmentRequest - required: true - schema: - $ref: "#/definitions/EventCategoryAssignmentRequest" - EventCategoryRequest: - description: An array of new EventCategory records - in: body - name: eventcategoryRequest - required: true - schema: - $ref: "#/definitions/EventCategoryRequest" EventRequest: description: An array of new Event records in: body @@ -180,6 +166,13 @@ parameters: required: true schema: $ref: "#/definitions/TemplateRequest" + EmailMessageRequest: + description: An array of Email Message records + in: body + name: EmailMessageRequest + required: true + schema: + $ref: "#/definitions/EmailMessageRequest" tenantIdQuery: description: Record Id of a Tenant in: query @@ -333,32 +326,21 @@ responses: schema: $ref: "#/definitions/CourseSectionResponse" DatabaseResponse: - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true description: Response with Database objects schema: $ref: "#/definitions/DatabaseResponse" EmailMessagesResponse: description: "Array of Email Messages" - headers: - Access-Control-Allow-Origin: - type: string schema: $ref: "#/definitions/EmailMessagesResponse" + OutgoingEmailMessagesResponse: + description: "Array of Outgoing Email Messages" + schema: + $ref: "#/definitions/OutgoingEmailMessagesResponse" EnrollmentResponse: description: Enrollment Response Object schema: $ref: "#/definitions/EnrollmentResponse" - EventCategoryAssignmentResponse: - description: EventCategoryAssignment Response Object - schema: - $ref: "#/definitions/EventCategoryAssignmentResponse" - EventCategoryResponse: - description: EventCategory Response Object - schema: - $ref: "#/definitions/EventCategoryResponse" EventResponse: description: Event Response Object schema: @@ -381,10 +363,6 @@ responses: $ref: "#/definitions/LessonProgressResponse" NotFound: description: Resource was not found - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" OrderResponse: @@ -409,17 +387,9 @@ responses: $ref: "#/definitions/ResearchProjectTopicResponse" ServerError: description: Server Internal Error - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" TenantResponse: - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true description: Response with Tenant objects schema: $ref: "#/definitions/TenantResponse" @@ -454,6 +424,8 @@ responses: paths: /attendees: delete: + security: + - ApiKeyAuth: [] operationId: deleteAttendee parameters: - $ref: "#/parameters/idQuery" @@ -464,6 +436,8 @@ paths: tags: - Attendees get: + security: + - ApiKeyAuth: [] operationId: getAttendees parameters: - $ref: "#/parameters/idQuery" @@ -476,6 +450,8 @@ paths: tags: - Attendees post: + security: + - ApiKeyAuth: [] operationId: createAttendee parameters: - $ref: "#/parameters/AttendeeRequest" @@ -486,6 +462,8 @@ paths: tags: - Attendees put: + security: + - ApiKeyAuth: [] operationId: updateAttendee parameters: - $ref: "#/parameters/idQuery" @@ -497,6 +475,8 @@ paths: - Attendees /certificates: delete: + security: + - ApiKeyAuth: [] operationId: deleteCertificate parameters: - $ref: "#/parameters/idQuery" @@ -507,6 +487,8 @@ paths: tags: - Certificates get: + security: + - ApiKeyAuth: [] operationId: getCertificates parameters: - $ref: "#/parameters/idQuery" @@ -519,6 +501,8 @@ paths: tags: - Certificates post: + security: + - ApiKeyAuth: [] operationId: createCertificate parameters: - $ref: "#/parameters/CertificateRequest" @@ -529,6 +513,8 @@ paths: tags: - Certificates put: + security: + - ApiKeyAuth: [] operationId: updateCertificate parameters: - $ref: "#/parameters/idQuery" @@ -611,60 +597,78 @@ paths: tags: - Clusters /courselessons: - delete: - operationId: deleteCourseLesson - parameters: - - $ref: "#/parameters/idQuery" - responses: - "204": - description: No Content - summary: Delete a CourseLesson - tags: - - CourseLessons get: operationId: getCourseLessons + security: + - ApiKeyAuth: [] parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" responses: "200": - description: OK + $ref: "#/responses/CourseLessonResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Get a list of CourseLessons tags: - - CourseLessons + - Courses post: - operationId: createCourseLesson + operationId: postCourseLessons + security: + - ApiKeyAuth: [] parameters: - $ref: "#/parameters/CourseLessonRequest" responses: - "201": - description: Created + "200": + $ref: "#/responses/CourseLessonResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Create a new CourseLesson tags: - - CourseLessons + - Courses put: - operationId: updateCourseLesson + security: + - ApiKeyAuth: [] + operationId: updateCourseLessons parameters: - - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/CourseLessonRequest" responses: "200": - description: OK + $ref: "#/responses/CourseLessonResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Update an existing CourseLesson - tags: - - CourseLessons - /courses: - delete: - operationId: deleteCourse - parameters: - - $ref: "#/parameters/idQuery" - responses: - "204": - description: No Content - summary: Delete a Course tags: - Courses + /courses: get: + security: + - ApiKeyAuth: [] operationId: getCourses parameters: - $ref: "#/parameters/idQuery" @@ -672,42 +676,68 @@ paths: - $ref: "#/parameters/offsetQuery" responses: "200": - description: OK + $ref: "#/responses/CourseResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Get a list of Courses tags: - Courses post: - operationId: createCourse + security: + - ApiKeyAuth: [] + operationId: postCourses parameters: - $ref: "#/parameters/CourseRequest" responses: - "201": - description: Created + "200": + $ref: "#/responses/CourseResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Create a new Course tags: - Courses put: - operationId: updateCourse + security: + - ApiKeyAuth: [] + operationId: updateCourses parameters: - - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/CourseRequest" responses: "200": - description: OK + $ref: "#/responses/CourseResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Update an existing Course tags: - Courses /coursesections: - delete: - operationId: deleteCourseSection - parameters: - - $ref: "#/parameters/idQuery" - responses: - "204": - description: No Content - summary: Delete a CourseSection - tags: - - CourseSections get: + security: + - ApiKeyAuth: [] operationId: getCourseSections parameters: - $ref: "#/parameters/idQuery" @@ -715,30 +745,64 @@ paths: - $ref: "#/parameters/offsetQuery" responses: "200": - description: OK + $ref: "#/responses/CourseSectionResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Get a list of CourseSections tags: - - CourseSections + - Courses post: - operationId: createCourseSection + security: + - ApiKeyAuth: [] + operationId: postCourseSections parameters: - $ref: "#/parameters/CourseSectionRequest" responses: - "201": - description: Created + "200": + $ref: "#/responses/CourseSectionResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Create a new CourseSection tags: - - CourseSections + - Courses put: - operationId: updateCourseSection + security: + - ApiKeyAuth: [] + operationId: updateCourseSections parameters: - - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/CourseSectionRequest" responses: "200": - description: OK + $ref: "#/responses/CourseSectionResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Update an existing CourseSection tags: - - CourseSections + - Courses /databases: get: description: Return a list of Database records from the datastore @@ -811,7 +875,7 @@ paths: summary: Update Databases tags: - Databases - /emails: + /emailmessages: get: security: - ApiKeyAuth: [] @@ -841,10 +905,10 @@ paths: security: - ApiKeyAuth: [] summary: Add new email messages to the outgoing queue - operationId: postOutgoingEmailMessages + operationId: postEmailMessages description: Insert new email messages into workflow storage parameters: - - $ref: "#/parameters/OutgoingEmailMessageRequest" + - $ref: "#/parameters/EmailMessageRequest" responses: "200": $ref: "#/responses/EmailMessagesResponse" @@ -860,8 +924,59 @@ paths: $ref: "#/responses/ServerError" tags: - Emails + /outgoingemailmessages: + get: + security: + - ApiKeyAuth: [] + summary: "Get email messages from data store" + operationId: getOutgoingEmailMessages + description: "Retrieves email messages from workflow storage" + parameters: + - $ref: "#/parameters/emailMessageIdQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + tags: + - Emails + responses: + "200": + $ref: "#/responses/OutgoingEmailMessagesResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + post: + security: + - ApiKeyAuth: [] + summary: Add new email messages to the outgoing queue + operationId: postOutgoingEmailMessages + description: Insert new email messages into workflow storage + parameters: + - $ref: "#/parameters/OutgoingEmailMessageRequest" + responses: + "200": + $ref: "#/responses/OutgoingEmailMessagesResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + tags: + - Emails /enrollments: delete: + security: + - ApiKeyAuth: [] operationId: deleteEnrollment parameters: - $ref: "#/parameters/idQuery" @@ -872,6 +987,8 @@ paths: tags: - Enrollments get: + security: + - ApiKeyAuth: [] operationId: getEnrollments parameters: - $ref: "#/parameters/idQuery" @@ -879,12 +996,24 @@ paths: - $ref: "#/parameters/offsetQuery" responses: "200": - description: OK + $ref: "#/responses/EnrollmentResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Get a list of Enrollments tags: - Enrollments post: - operationId: createEnrollment + security: + - ApiKeyAuth: [] + operationId: postEnrollment parameters: - $ref: "#/parameters/EnrollmentRequest" responses: @@ -894,6 +1023,8 @@ paths: tags: - Enrollments put: + security: + - ApiKeyAuth: [] operationId: updateEnrollment parameters: - $ref: "#/parameters/idQuery" @@ -903,104 +1034,10 @@ paths: summary: Update an existing Enrollment tags: - Enrollments - /eventcategories: - delete: - operationId: deleteEventCategory - parameters: - - $ref: "#/parameters/idQuery" - responses: - "204": - description: No Content - summary: Delete a EventCategory - tags: - - EventCategories - get: - operationId: getEventCategorys - parameters: - - $ref: "#/parameters/limitQuery" - - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/idQuery" - responses: - "200": - description: OK - summary: Get a list of EventCategories - tags: - - EventCategories - post: - operationId: createEventCategory - parameters: - - $ref: "#/parameters/EventCategoryRequest" - responses: - "201": - description: Created - summary: Create a new EventCategory - tags: - - EventCategories - put: - operationId: updateEventCategory - parameters: - - $ref: "#/parameters/idQuery" - responses: - "200": - description: OK - summary: Update an existing EventCategory - tags: - - EventCategories - /eventcategoryassignments: - delete: - operationId: deleteEventCategoryAssignment - parameters: - - $ref: "#/parameters/idQuery" - responses: - "204": - description: No Content - summary: Delete a EventCategoryAssignment - tags: - - EventCategoryAssignments - get: - operationId: getEventCategoryAssignments - parameters: - - $ref: "#/parameters/idQuery" - - $ref: "#/parameters/limitQuery" - - $ref: "#/parameters/offsetQuery" - responses: - "200": - description: OK - summary: Get a list of EventCategoryassignments - tags: - - EventCategoryAssignments - post: - operationId: createEventCategoryAssignment - parameters: - - $ref: "#/parameters/EventCategoryAssignmentRequest" - responses: - "201": - description: Created - summary: Create a new EventCategoryAssignment - tags: - - EventCategoryAssignments - put: - operationId: updateEventCategoryAssignment - parameters: - - $ref: "#/parameters/idQuery" - responses: - "200": - description: OK - summary: Update an existing EventCategoryAssignment - tags: - - EventCategoryAssignments /events: - delete: - operationId: deleteEvent - parameters: - - $ref: "#/parameters/idQuery" - responses: - "204": - description: No Content - summary: Delete a Event - tags: - - Events get: + security: + - ApiKeyAuth: [] operationId: getEvents parameters: - $ref: "#/parameters/limitQuery" @@ -1008,32 +1045,68 @@ paths: - $ref: "#/parameters/idQuery" responses: "200": - description: OK + $ref: "#/responses/EventResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Get a list of Events tags: - Events post: - operationId: createEvent + security: + - ApiKeyAuth: [] + operationId: postEvents parameters: - $ref: "#/parameters/EventRequest" responses: - "201": - description: Created + "200": + $ref: "#/responses/EventResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Create a new Event tags: - Events put: + security: + - ApiKeyAuth: [] operationId: updateEvent parameters: - $ref: "#/parameters/idQuery" responses: "200": - description: OK + $ref: "#/responses/EventResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Update an existing Event tags: - Events /favorites: delete: + security: + - ApiKeyAuth: [] operationId: deleteFavorite parameters: - $ref: "#/parameters/idQuery" @@ -1044,6 +1117,8 @@ paths: tags: - Favorites get: + security: + - ApiKeyAuth: [] operationId: getFavorites parameters: - $ref: "#/parameters/idQuery" @@ -1056,7 +1131,9 @@ paths: tags: - Favorites post: - operationId: createFavorite + security: + - ApiKeyAuth: [] + operationId: postFavorite parameters: - $ref: "#/parameters/FavoriteRequest" responses: @@ -1066,6 +1143,8 @@ paths: tags: - Favorites put: + security: + - ApiKeyAuth: [] operationId: updateFavorite parameters: - $ref: "#/parameters/idQuery" @@ -1077,6 +1156,8 @@ paths: - Favorites /invoices: delete: + security: + - ApiKeyAuth: [] operationId: deleteInvoice parameters: - $ref: "#/parameters/idQuery" @@ -1087,6 +1168,8 @@ paths: tags: - Invoices get: + security: + - ApiKeyAuth: [] operationId: getInvoices parameters: - $ref: "#/parameters/idQuery" @@ -1099,7 +1182,9 @@ paths: tags: - Invoices post: - operationId: createInvoice + security: + - ApiKeyAuth: [] + operationId: postInvoice parameters: - $ref: "#/parameters/InvoiceRequest" responses: @@ -1109,6 +1194,8 @@ paths: tags: - Invoices put: + security: + - ApiKeyAuth: [] operationId: updateInvoice parameters: - $ref: "#/parameters/idQuery" @@ -1120,6 +1207,8 @@ paths: - Invoices /issuedcertificates: delete: + security: + - ApiKeyAuth: [] operationId: deleteIssuedCertificate parameters: - $ref: "#/parameters/idQuery" @@ -1130,6 +1219,8 @@ paths: tags: - IssuedCertificates get: + security: + - ApiKeyAuth: [] operationId: getIssuedCertificates parameters: - $ref: "#/parameters/limitQuery" @@ -1142,7 +1233,9 @@ paths: tags: - IssuedCertificates post: - operationId: createIssuedCertificate + security: + - ApiKeyAuth: [] + operationId: postIssuedCertificate parameters: - $ref: "#/parameters/IssuedCertificateRequest" responses: @@ -1152,6 +1245,8 @@ paths: tags: - IssuedCertificates put: + security: + - ApiKeyAuth: [] operationId: updateIssuedCertificate parameters: - $ref: "#/parameters/idQuery" @@ -1163,6 +1258,8 @@ paths: - IssuedCertificates /lessonprogress: delete: + security: + - ApiKeyAuth: [] operationId: deleteLessonProgress parameters: - $ref: "#/parameters/idQuery" @@ -1173,6 +1270,8 @@ paths: tags: - LessonProgress get: + security: + - ApiKeyAuth: [] operationId: getLessonProgress parameters: - $ref: "#/parameters/limitQuery" @@ -1185,7 +1284,9 @@ paths: tags: - LessonProgress post: - operationId: createLessonProgress + security: + - ApiKeyAuth: [] + operationId: postLessonProgress parameters: - $ref: "#/parameters/LessonProgressRequest" responses: @@ -1195,6 +1296,8 @@ paths: tags: - LessonProgress put: + security: + - ApiKeyAuth: [] operationId: updateLessonProgress parameters: - $ref: "#/parameters/idQuery" @@ -1206,6 +1309,8 @@ paths: - LessonProgress /orders: delete: + security: + - ApiKeyAuth: [] operationId: deleteOrder parameters: - $ref: "#/parameters/idQuery" @@ -1216,6 +1321,8 @@ paths: tags: - Orders get: + security: + - ApiKeyAuth: [] operationId: getOrders parameters: - $ref: "#/parameters/limitQuery" @@ -1228,7 +1335,9 @@ paths: tags: - Orders post: - operationId: createOrder + security: + - ApiKeyAuth: [] + operationId: postOrder parameters: - $ref: "#/parameters/OrderRequest" responses: @@ -1238,6 +1347,8 @@ paths: tags: - Orders put: + security: + - ApiKeyAuth: [] operationId: updateOrder parameters: - $ref: "#/parameters/idQuery" @@ -1249,6 +1360,8 @@ paths: - Orders /paymentmethods: delete: + security: + - ApiKeyAuth: [] operationId: deletePaymentMethod parameters: - $ref: "#/parameters/idQuery" @@ -1259,6 +1372,8 @@ paths: tags: - PaymentMethods get: + security: + - ApiKeyAuth: [] operationId: getPaymentMethods parameters: - $ref: "#/parameters/limitQuery" @@ -1271,7 +1386,9 @@ paths: tags: - PaymentMethods post: - operationId: createPaymentMethod + security: + - ApiKeyAuth: [] + operationId: postPaymentMethod parameters: - $ref: "#/parameters/PaymentMethodRequest" responses: @@ -1281,6 +1398,8 @@ paths: tags: - PaymentMethods put: + security: + - ApiKeyAuth: [] operationId: updatePaymentMethod parameters: - $ref: "#/parameters/idQuery" @@ -1292,6 +1411,8 @@ paths: - PaymentMethods /researchprojectcompanys: delete: + security: + - ApiKeyAuth: [] operationId: deleteResearchProjectCompany parameters: - $ref: "#/parameters/idQuery" @@ -1302,6 +1423,8 @@ paths: tags: - ResearchProjectCompanies get: + security: + - ApiKeyAuth: [] operationId: getResearchProjectCompanies parameters: - $ref: "#/parameters/limitQuery" @@ -1314,7 +1437,9 @@ paths: tags: - ResearchProjectCompanies post: - operationId: createResearchProjectCompany + security: + - ApiKeyAuth: [] + operationId: postResearchProjectCompany parameters: - $ref: "#/parameters/ResearchProjectCompanyRequest" responses: @@ -1324,6 +1449,8 @@ paths: tags: - ResearchProjectCompanies put: + security: + - ApiKeyAuth: [] operationId: updateResearchProjectCompany parameters: - $ref: "#/parameters/idQuery" @@ -1335,6 +1462,8 @@ paths: - ResearchProjectCompanies /researchprojects: delete: + security: + - ApiKeyAuth: [] operationId: deleteResearchProject parameters: - $ref: "#/parameters/idQuery" @@ -1345,6 +1474,8 @@ paths: tags: - ResearchProjects get: + security: + - ApiKeyAuth: [] operationId: getResearchProjects parameters: - $ref: "#/parameters/limitQuery" @@ -1357,7 +1488,9 @@ paths: tags: - ResearchProjects post: - operationId: createResearchProject + security: + - ApiKeyAuth: [] + operationId: postResearchProject parameters: - $ref: "#/parameters/ResearchProjectRequest" responses: @@ -1367,6 +1500,8 @@ paths: tags: - ResearchProjects put: + security: + - ApiKeyAuth: [] operationId: updateResearchProject parameters: - $ref: "#/parameters/idQuery" @@ -1378,6 +1513,8 @@ paths: - ResearchProjects /researchprojecttopics: delete: + security: + - ApiKeyAuth: [] operationId: deleteResearchProjectTopic parameters: - $ref: "#/parameters/idQuery" @@ -1388,6 +1525,8 @@ paths: tags: - ResearchProjectTopics get: + security: + - ApiKeyAuth: [] operationId: getResearchProjectTopics parameters: - $ref: "#/parameters/limitQuery" @@ -1400,7 +1539,9 @@ paths: tags: - ResearchProjectTopics post: - operationId: createResearchProjectTopic + security: + - ApiKeyAuth: [] + operationId: postResearchProjectTopic parameters: - $ref: "#/parameters/ResearchProjectTopicRequest" responses: @@ -1410,6 +1551,8 @@ paths: tags: - ResearchProjectTopics put: + security: + - ApiKeyAuth: [] operationId: updateResearchProjectTopic parameters: - $ref: "#/parameters/idQuery" @@ -1545,6 +1688,8 @@ paths: - Templates /tickets: delete: + security: + - ApiKeyAuth: [] operationId: deleteTicket parameters: - $ref: "#/parameters/idQuery" @@ -1555,6 +1700,8 @@ paths: tags: - Tickets get: + security: + - ApiKeyAuth: [] operationId: getTickets parameters: - $ref: "#/parameters/limitQuery" @@ -1567,7 +1714,9 @@ paths: tags: - Tickets post: - operationId: createTicket + security: + - ApiKeyAuth: [] + operationId: postTicket parameters: - $ref: "#/parameters/TicketRequest" responses: @@ -1577,6 +1726,8 @@ paths: tags: - Tickets put: + security: + - ApiKeyAuth: [] operationId: updateTicket parameters: - $ref: "#/parameters/idQuery" @@ -1588,6 +1739,8 @@ paths: - Tickets /transactions: delete: + security: + - ApiKeyAuth: [] operationId: deleteTransaction parameters: - $ref: "#/parameters/idQuery" @@ -1598,6 +1751,8 @@ paths: tags: - Transactions get: + security: + - ApiKeyAuth: [] operationId: getTransactions parameters: - $ref: "#/parameters/limitQuery" @@ -1610,7 +1765,9 @@ paths: tags: - Transactions post: - operationId: createTransaction + security: + - ApiKeyAuth: [] + operationId: postTransaction parameters: - $ref: "#/parameters/TransactionRequest" responses: @@ -1620,6 +1777,8 @@ paths: tags: - Transactions put: + security: + - ApiKeyAuth: [] operationId: updateTransaction parameters: - $ref: "#/parameters/idQuery" @@ -1952,74 +2111,12 @@ definitions: Meta: $ref: "#/definitions/ResponseMeta" type: object - Course: - properties: - CreatedByID: - type: string - x-nullable: true - CreatedDate: - type: string - x-nullable: true - Description: - type: string - x-nullable: true - Fulldescription: - type: string - x-nullable: true - ID: - type: string - InstructorID: - type: string - x-nullable: true - LastModifiedByID: - type: string - x-nullable: true - LastModifiedDate: - type: string - x-nullable: true - Price: - type: number - Title: - type: string - x-nullable: true - type: object - CourseLesson: - properties: - Content: - type: string - x-nullable: true - CreatedByID: - type: string - x-nullable: true - CreatedDate: - type: string - x-nullable: true - ID: - type: string - LastModifiedByID: - type: string - x-nullable: true - LastModifiedDate: - type: string - x-nullable: true - Order: - type: integer - SectionID: - type: string - x-nullable: true - Title: - type: string - x-nullable: true - VideoURL: - type: string - x-nullable: true - type: object CourseLessonRequest: description: An array of CourseLesson objects properties: Data: items: - $ref: "#/definitions/CourseLesson" + $ref: "../../lib/swagger/defs/course-lesson.yaml#/CourseLesson" type: array type: object CourseLessonResponse: @@ -2027,67 +2124,45 @@ definitions: properties: Data: items: - $ref: "#/definitions/CourseLesson" + $ref: "../../lib/swagger/defs/course-lesson.yaml#/CourseLesson" type: array + Meta: + $ref: "#/definitions/ResponseMeta" type: object CourseRequest: description: An array of Course objects properties: Data: items: - $ref: "#/definitions/Course" + $ref: "../../lib/swagger/defs/course.yaml#/Course" type: array type: object CourseResponse: description: An array of Course objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: - $ref: "#/definitions/Course" + $ref: "../../lib/swagger/defs/course.yaml#/Course" type: array type: object - CourseSection: - properties: - CourseID: - type: string - x-nullable: true - CreatedByID: - type: string - x-nullable: true - CreatedDate: - type: string - x-nullable: true - Description: - type: string - x-nullable: true - ID: - type: string - LastModifiedByID: - type: string - x-nullable: true - LastModifiedDate: - type: string - x-nullable: true - Order: - type: integer - Title: - type: string - x-nullable: true - type: object CourseSectionRequest: description: An array of CourseSection objects properties: Data: items: - $ref: "#/definitions/CourseSection" + $ref: "../../lib/swagger/defs/course-section.yaml#/CourseSection" type: array type: object CourseSectionResponse: description: An array of CourseSection objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: - $ref: "#/definitions/CourseSection" + $ref: "../../lib/swagger/defs/course-section.yaml#/CourseSection" type: array type: object Database: @@ -2161,9 +2236,6 @@ definitions: type: object EmailMessage: properties: - ActivityID: - type: string - x-nullable: true BCCAddress: type: string x-nullable: true @@ -2176,22 +2248,18 @@ definitions: CreatedDate: type: string x-nullable: true - EmailMessageID: - type: string - x-nullable: true FromAddress: type: string x-nullable: true FromName: type: string x-nullable: true - HTML: - format: byte - type: string - x-nullable: true HasAttachment: type: boolean x-nullable: true + HTML: + type: string + x-nullable: true Headers: $ref: "#/definitions/Headers" x-nullable: true @@ -2200,12 +2268,6 @@ definitions: Incoming: type: boolean x-nullable: true - IsClientManaged: - type: boolean - x-nullable: true - IsExternallyManaged: - type: boolean - x-nullable: true LastModifiedByID: type: string x-nullable: true @@ -2218,22 +2280,7 @@ definitions: MessageIdentifier: type: string x-nullable: true - ParentID: - type: string - x-nullable: true - RelatedToID: - type: string - x-nullable: true - RelationAddress: - type: string - x-nullable: true - RelationID: - type: string - x-nullable: true - RelationObjectType: - type: string - x-nullable: true - RelationType: + OutgoingEmailID: type: string x-nullable: true ReplyToEmailMessageID: @@ -2245,8 +2292,7 @@ definitions: Subject: type: string x-nullable: true - Text: - format: byte + TextBody: x-nullable: true type: string ThreadIdentifier: @@ -2255,7 +2301,7 @@ definitions: ToAddress: type: string x-nullable: true - ValidatedFromAddress: + ToName: type: string x-nullable: true type: object @@ -2334,119 +2380,28 @@ definitions: message: type: string type: object - Event: - properties: - Capacity: - type: integer - x-nullable: true - Createdat: - type: string - x-nullable: true - Description: - type: string - x-nullable: true - EndDate: - type: string - x-nullable: true - ID: - type: string - Location: - type: string - x-nullable: true - OrganizeruserID: - type: string - x-nullable: true - StartDate: - type: string - x-nullable: true - Title: - type: string - x-nullable: true - UpDatedat: - type: string - x-nullable: true - type: object - EventCategory: - properties: - CreatedDate: - type: string - x-nullable: true - ID: - type: string - LastModifiedDate: - type: string - x-nullable: true - Name: - type: string - x-nullable: true - type: object - EventCategoryAssignment: - properties: - Createdat: - type: string - x-nullable: true - EventCategoryID: - type: string - x-nullable: true - EventID: - type: string - x-nullable: true - ID: - type: string - UpDatedat: - type: string - x-nullable: true - type: object - EventCategoryAssignmentRequest: - description: An array of EventCategoryAssignment objects - properties: - Data: - items: - $ref: "#/definitions/EventCategoryAssignment" - type: array - type: object - EventCategoryAssignmentResponse: - description: An array of EventCategoryAssignment objects - properties: - Data: - items: - $ref: "#/definitions/EventCategoryAssignment" - type: array - type: object - EventCategoryRequest: - description: An array of EventCategory objects - properties: - Data: - items: - $ref: "#/definitions/EventCategory" - type: array - type: object - EventCategoryResponse: - description: An array of EventCategory objects - properties: - Data: - items: - $ref: "#/definitions/EventCategory" - type: array - type: object EventRequest: description: An array of Event objects properties: Data: items: - $ref: "#/definitions/Event" + $ref: "../../lib/swagger/defs/event.yaml#/Event" type: array type: object EventResponse: description: An array of Event objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: - $ref: "#/definitions/Event" + $ref: "../../lib/swagger/defs/event.yaml#/Event" type: array type: object Favorite: properties: + ID: + type: string CreatedByID: type: string x-nullable: true @@ -2459,11 +2414,9 @@ definitions: FavoriteID: type: string x-nullable: true - Favoritetype: + FavoriteType: type: string x-nullable: true - ID: - type: string LastModifiedByID: type: string x-nullable: true @@ -2494,6 +2447,8 @@ definitions: FavoriteResponse: description: An array of Favorite objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/Favorite" @@ -2550,6 +2505,8 @@ definitions: InvoiceResponse: description: An array of Invoice objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/Invoice" @@ -2601,6 +2558,8 @@ definitions: IssuedCertificateResponse: description: An array of IssuedCertificate objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/IssuedCertificate" @@ -2648,6 +2607,8 @@ definitions: LessonProgressResponse: description: An array of LessonProgress objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/LessonProgress" @@ -2678,19 +2639,30 @@ definitions: OutgoingEmailMessage: description: A new email message to be sent properties: + ID: + type: string BCCAddress: type: string x-nullable: true + Bounced: + type: boolean + x-nullable: true CCAddress: type: string x-nullable: true + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true EmailMessageID: type: string x-nullable: true - EmailTemplateID: + ExternalID: type: string x-nullable: true - ExternalID: + FromAddress: type: string x-nullable: true FromContactID: @@ -2705,28 +2677,55 @@ definitions: HTML: type: string x-nullable: true - ID: + LastModifiedByID: type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + ObjectID: + type: string + x-nullable: true + ObjectType: + type: string + x-nullable: true + Queued: + type: boolean + x-nullable: true + QueuedDate: + type: string + x-nullable: true + Sent: + type: boolean + x-nullable: true + SentDate: + type: string + x-nullable: true Subject: type: string x-nullable: true - Text: + TemplateID: type: string x-nullable: true + TextBody: + x-nullable: true + type: string ToAddress: type: string x-nullable: true ToName: type: string x-nullable: true - ValidatedFromAddress: - type: string - x-nullable: true - WhoID: - type: string - x-nullable: true type: object OutgoingEmailMessageRequest: + description: An array Taxnexus New Email Message objects + properties: + data: + items: + $ref: "#/definitions/OutgoingEmailMessage" + type: array + type: object + OutgoingEmailMessagesResponse: description: An array Taxnexus New Email Message objects properties: data: @@ -2734,7 +2733,7 @@ definitions: $ref: "#/definitions/OutgoingEmailMessage" type: array meta: - $ref: "#/definitions/RequestMeta" + $ref: "#/definitions/ResponseMeta" type: object Order: properties: @@ -2842,6 +2841,8 @@ definitions: PaymentMethodResponse: description: An array of PaymentMethod objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/PaymentMethod" @@ -2925,6 +2926,8 @@ definitions: ResearchProjectCompanyResponse: description: An array of ResearchProjectCompany objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/ResearchProjectCompany" @@ -2941,6 +2944,8 @@ definitions: ResearchProjectResponse: description: An array of ResearchProject objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/ResearchProject" @@ -2983,6 +2988,8 @@ definitions: ResearchProjectTopicResponse: description: An array of ResearchProjectTopic objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/ResearchProjectTopic" @@ -3169,8 +3176,8 @@ definitions: x-nullable: true HTML: description: HTML Body - format: byte type: string + x-nullable: true ID: description: Record Id type: string @@ -3344,6 +3351,8 @@ definitions: TicketResponse: description: An array of Ticket objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/Ticket" @@ -3400,6 +3409,8 @@ definitions: TransactionResponse: description: An array of Transaction objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/Transaction" diff --git a/swagger/external/sf-gate-vernonkeenan.yaml b/swagger/external/sf-gate-vernonkeenan.yaml index e6c4caf..1fc4742 100644 --- a/swagger/external/sf-gate-vernonkeenan.yaml +++ b/swagger/external/sf-gate-vernonkeenan.yaml @@ -28,6 +28,12 @@ parameters: name: accountId required: false type: string + idQuery: + description: Unique Record ID + in: query + name: id + required: false + type: string industryCompanyIdQuery: description: Record Id of an IndustryCompany in: query @@ -41,6 +47,20 @@ parameters: required: true schema: $ref: "#/definitions/AccountRequest" + CourseRequest: + description: An array of new Course records + in: body + name: courseRequest + required: true + schema: + $ref: "#/definitions/CourseRequest" + CourseSectionRequest: + description: An array of new CourseSection records + in: body + name: coursesectionRequest + required: true + schema: + $ref: "#/definitions/CourseSectionRequest" industryCompanyRequest: description: A request with an array of IndustryCompany Objects in: body @@ -86,6 +106,13 @@ parameters: name: clusterId required: false type: string + CourseLessonRequest: + description: An array of new CourseLesson records + in: body + name: courselessonRequest + required: true + schema: + $ref: "#/definitions/CourseLessonRequest" clusterRequest: description: An array of Cluster records in: body @@ -151,6 +178,13 @@ parameters: name: email required: false type: string + EventRequest: + description: An array of new Event records + in: body + name: eventRequest + required: true + schema: + $ref: "#/definitions/EventRequest" factorIdQuery: description: Record Id of a Factor in: query @@ -290,16 +324,16 @@ parameters: responses: AccessForbidden: description: Access forbidden, account lacks access - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" AccountResponse: description: Response with Account objects schema: $ref: "#/definitions/AccountResponse" + EventResponse: + description: Event Response Object + schema: + $ref: "#/definitions/EventResponse" IndustryCompanyResponse: description: Response with IndustryCompany objects schema: @@ -330,12 +364,12 @@ responses: $ref: "#/definitions/DatabaseResponse" DeleteResponse: description: Response with Message Objects with Delete Status - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/DeleteResponse" + CourseResponse: + description: Course Response Object + schema: + $ref: "#/definitions/CourseResponse" FactorResponse: description: Response with Factor objects schema: @@ -348,24 +382,24 @@ responses: description: Response with Industry objects schema: $ref: "#/definitions/IndustryProductResponse" + CourseSectionResponse: + description: CourseSection Response Object + schema: + $ref: "#/definitions/CourseSectionResponse" + CourseLessonResponse: + description: CourseLesson Response Object + schema: + $ref: "#/definitions/CourseLessonResponse" IndustryResponse: description: Response with Industry objects schema: $ref: "#/definitions/IndustryResponse" InvalidDataError: description: Invalid data was sent - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/InvalidError" NotFound: description: Resource was not found - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" ObservationResponse: @@ -382,10 +416,6 @@ responses: $ref: "#/definitions/SalesforcePostResponse" ServerError: description: Server Internal Error - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" TemplateResponse: @@ -402,18 +432,10 @@ responses: $ref: "#/definitions/TopicResponse" Unauthorized: description: Access unauthorized, invalid API-KEY was used - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" UnprocessableEntity: description: Unprocessable Entity, likely a bad parameter - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" UserResponse: @@ -815,6 +837,216 @@ paths: summary: Get a list of contracts tags: - Contracts + /courselessons: + get: + operationId: getCourseLessons + security: + - ApiKeyAuth: [] + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + responses: + "200": + $ref: "#/responses/CourseLessonResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Get a list of CourseLessons + tags: + - Courses + post: + operationId: postCourseLesson + security: + - ApiKeyAuth: [] + parameters: + - $ref: "#/parameters/CourseLessonRequest" + responses: + "200": + $ref: "#/responses/CourseLessonResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Create a new CourseLesson + tags: + - Courses + put: + security: + - ApiKeyAuth: [] + operationId: updateCourseLesson + parameters: + - $ref: "#/parameters/CourseLessonRequest" + responses: + "200": + $ref: "#/responses/CourseLessonResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Update an existing CourseLesson + tags: + - Courses + /courses: + get: + description: Return a list of Course records from the datastore + operationId: getCourses + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + responses: + "200": + $ref: "#/responses/CourseResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + summary: Get a list Courses + tags: + - Courses + post: + description: Create Courses in Salesforce + operationId: postCourses + parameters: + - $ref: "#/parameters/CourseRequest" + responses: + "201": + $ref: "#/responses/SalesforcePostResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + summary: Create new Courses + tags: + - Courses + put: + description: Update Course in Salesforce + operationId: putCourses + parameters: + - $ref: "#/parameters/CourseRequest" + responses: + "200": + $ref: "#/responses/CourseResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + summary: Update Courses + tags: + - Courses + /coursesections: + get: + security: + - ApiKeyAuth: [] + operationId: getCourseSections + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + responses: + "200": + $ref: "#/responses/CourseSectionResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Get a list of CourseSections + tags: + - Courses + post: + security: + - ApiKeyAuth: [] + operationId: postCourseSection + parameters: + - $ref: "#/parameters/CourseSectionRequest" + responses: + "200": + $ref: "#/responses/CourseSectionResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Create a new CourseSection + tags: + - Courses + put: + security: + - ApiKeyAuth: [] + operationId: updateCourseSection + parameters: + - $ref: "#/parameters/CourseSectionRequest" + responses: + "200": + $ref: "#/responses/CourseSectionResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Update an existing CourseSection + tags: + - Courses /databases: get: description: Return a list of Database records from the datastore @@ -887,6 +1119,65 @@ paths: summary: Update Databases tags: - Databases + /events: + delete: + security: + - ApiKeyAuth: [] + operationId: deleteEvent + parameters: + - $ref: "#/parameters/idQuery" + responses: + "204": + description: No Content + summary: Delete a Event + tags: + - Events + get: + security: + - ApiKeyAuth: [] + operationId: getEvents + parameters: + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/idQuery" + responses: + "200": + $ref: "#/responses/EventResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Get a list of Events + tags: + - Events + put: + security: + - ApiKeyAuth: [] + operationId: updateEvent + parameters: + - $ref: "#/parameters/idQuery" + responses: + "200": + $ref: "#/responses/EventResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Update an existing Event + tags: + - Events /factors: get: description: Return a list of all available Factors @@ -3640,3 +3931,69 @@ definitions: type: string x-nullable: true type: object + EventRequest: + description: An array of Event objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/event.yaml#/Event" + type: array + type: object + EventResponse: + description: An array of Event objects + properties: + Meta: + $ref: "#/definitions/ResponseMeta" + Data: + items: + $ref: "../../lib/swagger/defs/event.yaml#/Event" + type: array + type: object + CourseLessonRequest: + description: An array of CourseLesson objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/course-lesson.yaml#/CourseLesson" + type: array + type: object + CourseLessonResponse: + description: An array of CourseLesson objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/course-lesson.yaml#/CourseLesson" + type: array + type: object + CourseRequest: + description: An array of Course objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/course.yaml#/Course" + type: array + type: object + CourseResponse: + description: An array of Course objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/course.yaml#/Course" + type: array + type: object + CourseSectionRequest: + description: An array of CourseSection objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/course-section.yaml#/CourseSection" + type: array + type: object + CourseSectionResponse: + description: An array of CourseSection objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/course-section.yaml#/CourseSection" + type: array + type: object diff --git a/swagger/members-vernonkeenan.yaml b/swagger/members-vernonkeenan.yaml index 071402a..cd82b5f 100644 --- a/swagger/members-vernonkeenan.yaml +++ b/swagger/members-vernonkeenan.yaml @@ -5,7 +5,7 @@ info: description: "Membership Microservice" termsOfService: "https://salesforcedevops.net/terms/" contact: - email: "vern@vernonkeenan.com" + email: "vern@salesforcedevops.net" license: name: "Proprietary - Copyright (c) 2018-2023 by Vernon Keenan" securityDefinitions: @@ -84,20 +84,6 @@ parameters: required: true schema: $ref: "#/definitions/EnrollmentRequest" - EventCategoryAssignmentRequest: - description: An array of new EventCategoryAssignment records - in: body - name: eventcategoryassignmentRequest - required: true - schema: - $ref: "#/definitions/EventCategoryAssignmentRequest" - EventCategoryRequest: - description: An array of new EventCategory records - in: body - name: eventcategoryRequest - required: true - schema: - $ref: "#/definitions/EventCategoryRequest" EventRequest: description: An array of new Event records in: body @@ -180,6 +166,13 @@ parameters: required: true schema: $ref: "#/definitions/TemplateRequest" + EmailMessageRequest: + description: An array of Email Message records + in: body + name: EmailMessageRequest + required: true + schema: + $ref: "#/definitions/EmailMessageRequest" tenantIdQuery: description: Record Id of a Tenant in: query @@ -333,32 +326,21 @@ responses: schema: $ref: "#/definitions/CourseSectionResponse" DatabaseResponse: - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true description: Response with Database objects schema: $ref: "#/definitions/DatabaseResponse" EmailMessagesResponse: description: "Array of Email Messages" - headers: - Access-Control-Allow-Origin: - type: string schema: $ref: "#/definitions/EmailMessagesResponse" + OutgoingEmailMessagesResponse: + description: "Array of Outgoing Email Messages" + schema: + $ref: "#/definitions/OutgoingEmailMessagesResponse" EnrollmentResponse: description: Enrollment Response Object schema: $ref: "#/definitions/EnrollmentResponse" - EventCategoryAssignmentResponse: - description: EventCategoryAssignment Response Object - schema: - $ref: "#/definitions/EventCategoryAssignmentResponse" - EventCategoryResponse: - description: EventCategory Response Object - schema: - $ref: "#/definitions/EventCategoryResponse" EventResponse: description: Event Response Object schema: @@ -381,10 +363,6 @@ responses: $ref: "#/definitions/LessonProgressResponse" NotFound: description: Resource was not found - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" OrderResponse: @@ -409,17 +387,9 @@ responses: $ref: "#/definitions/ResearchProjectTopicResponse" ServerError: description: Server Internal Error - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" TenantResponse: - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true description: Response with Tenant objects schema: $ref: "#/definitions/TenantResponse" @@ -454,6 +424,8 @@ responses: paths: /attendees: delete: + security: + - ApiKeyAuth: [] operationId: deleteAttendee parameters: - $ref: "#/parameters/idQuery" @@ -464,6 +436,8 @@ paths: tags: - Attendees get: + security: + - ApiKeyAuth: [] operationId: getAttendees parameters: - $ref: "#/parameters/idQuery" @@ -476,6 +450,8 @@ paths: tags: - Attendees post: + security: + - ApiKeyAuth: [] operationId: createAttendee parameters: - $ref: "#/parameters/AttendeeRequest" @@ -486,6 +462,8 @@ paths: tags: - Attendees put: + security: + - ApiKeyAuth: [] operationId: updateAttendee parameters: - $ref: "#/parameters/idQuery" @@ -497,6 +475,8 @@ paths: - Attendees /certificates: delete: + security: + - ApiKeyAuth: [] operationId: deleteCertificate parameters: - $ref: "#/parameters/idQuery" @@ -507,6 +487,8 @@ paths: tags: - Certificates get: + security: + - ApiKeyAuth: [] operationId: getCertificates parameters: - $ref: "#/parameters/idQuery" @@ -519,6 +501,8 @@ paths: tags: - Certificates post: + security: + - ApiKeyAuth: [] operationId: createCertificate parameters: - $ref: "#/parameters/CertificateRequest" @@ -529,6 +513,8 @@ paths: tags: - Certificates put: + security: + - ApiKeyAuth: [] operationId: updateCertificate parameters: - $ref: "#/parameters/idQuery" @@ -611,60 +597,78 @@ paths: tags: - Clusters /courselessons: - delete: - operationId: deleteCourseLesson - parameters: - - $ref: "#/parameters/idQuery" - responses: - "204": - description: No Content - summary: Delete a CourseLesson - tags: - - CourseLessons get: operationId: getCourseLessons + security: + - ApiKeyAuth: [] parameters: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" responses: "200": - description: OK + $ref: "#/responses/CourseLessonResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Get a list of CourseLessons tags: - - CourseLessons + - Courses post: - operationId: createCourseLesson + operationId: postCourseLessons + security: + - ApiKeyAuth: [] parameters: - $ref: "#/parameters/CourseLessonRequest" responses: - "201": - description: Created + "200": + $ref: "#/responses/CourseLessonResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Create a new CourseLesson tags: - - CourseLessons + - Courses put: - operationId: updateCourseLesson + security: + - ApiKeyAuth: [] + operationId: updateCourseLessons parameters: - - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/CourseLessonRequest" responses: "200": - description: OK + $ref: "#/responses/CourseLessonResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Update an existing CourseLesson - tags: - - CourseLessons - /courses: - delete: - operationId: deleteCourse - parameters: - - $ref: "#/parameters/idQuery" - responses: - "204": - description: No Content - summary: Delete a Course tags: - Courses + /courses: get: + security: + - ApiKeyAuth: [] operationId: getCourses parameters: - $ref: "#/parameters/idQuery" @@ -672,42 +676,68 @@ paths: - $ref: "#/parameters/offsetQuery" responses: "200": - description: OK + $ref: "#/responses/CourseResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Get a list of Courses tags: - Courses post: - operationId: createCourse + security: + - ApiKeyAuth: [] + operationId: postCourses parameters: - $ref: "#/parameters/CourseRequest" responses: - "201": - description: Created + "200": + $ref: "#/responses/CourseResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Create a new Course tags: - Courses put: - operationId: updateCourse + security: + - ApiKeyAuth: [] + operationId: updateCourses parameters: - - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/CourseRequest" responses: "200": - description: OK + $ref: "#/responses/CourseResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Update an existing Course tags: - Courses /coursesections: - delete: - operationId: deleteCourseSection - parameters: - - $ref: "#/parameters/idQuery" - responses: - "204": - description: No Content - summary: Delete a CourseSection - tags: - - CourseSections get: + security: + - ApiKeyAuth: [] operationId: getCourseSections parameters: - $ref: "#/parameters/idQuery" @@ -715,30 +745,64 @@ paths: - $ref: "#/parameters/offsetQuery" responses: "200": - description: OK + $ref: "#/responses/CourseSectionResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Get a list of CourseSections tags: - - CourseSections + - Courses post: - operationId: createCourseSection + security: + - ApiKeyAuth: [] + operationId: postCourseSections parameters: - $ref: "#/parameters/CourseSectionRequest" responses: - "201": - description: Created + "200": + $ref: "#/responses/CourseSectionResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Create a new CourseSection tags: - - CourseSections + - Courses put: - operationId: updateCourseSection + security: + - ApiKeyAuth: [] + operationId: updateCourseSections parameters: - - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/CourseSectionRequest" responses: "200": - description: OK + $ref: "#/responses/CourseSectionResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Update an existing CourseSection tags: - - CourseSections + - Courses /databases: get: description: Return a list of Database records from the datastore @@ -811,7 +875,7 @@ paths: summary: Update Databases tags: - Databases - /emails: + /emailmessages: get: security: - ApiKeyAuth: [] @@ -841,10 +905,10 @@ paths: security: - ApiKeyAuth: [] summary: Add new email messages to the outgoing queue - operationId: postOutgoingEmailMessages + operationId: postEmailMessages description: Insert new email messages into workflow storage parameters: - - $ref: "#/parameters/OutgoingEmailMessageRequest" + - $ref: "#/parameters/EmailMessageRequest" responses: "200": $ref: "#/responses/EmailMessagesResponse" @@ -860,8 +924,59 @@ paths: $ref: "#/responses/ServerError" tags: - Emails + /outgoingemailmessages: + get: + security: + - ApiKeyAuth: [] + summary: "Get email messages from data store" + operationId: getOutgoingEmailMessages + description: "Retrieves email messages from workflow storage" + parameters: + - $ref: "#/parameters/emailMessageIdQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + tags: + - Emails + responses: + "200": + $ref: "#/responses/OutgoingEmailMessagesResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + post: + security: + - ApiKeyAuth: [] + summary: Add new email messages to the outgoing queue + operationId: postOutgoingEmailMessages + description: Insert new email messages into workflow storage + parameters: + - $ref: "#/parameters/OutgoingEmailMessageRequest" + responses: + "200": + $ref: "#/responses/OutgoingEmailMessagesResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + tags: + - Emails /enrollments: delete: + security: + - ApiKeyAuth: [] operationId: deleteEnrollment parameters: - $ref: "#/parameters/idQuery" @@ -872,6 +987,8 @@ paths: tags: - Enrollments get: + security: + - ApiKeyAuth: [] operationId: getEnrollments parameters: - $ref: "#/parameters/idQuery" @@ -879,12 +996,24 @@ paths: - $ref: "#/parameters/offsetQuery" responses: "200": - description: OK + $ref: "#/responses/EnrollmentResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Get a list of Enrollments tags: - Enrollments post: - operationId: createEnrollment + security: + - ApiKeyAuth: [] + operationId: postEnrollment parameters: - $ref: "#/parameters/EnrollmentRequest" responses: @@ -894,6 +1023,8 @@ paths: tags: - Enrollments put: + security: + - ApiKeyAuth: [] operationId: updateEnrollment parameters: - $ref: "#/parameters/idQuery" @@ -903,104 +1034,10 @@ paths: summary: Update an existing Enrollment tags: - Enrollments - /eventcategories: - delete: - operationId: deleteEventCategory - parameters: - - $ref: "#/parameters/idQuery" - responses: - "204": - description: No Content - summary: Delete a EventCategory - tags: - - EventCategories - get: - operationId: getEventCategorys - parameters: - - $ref: "#/parameters/limitQuery" - - $ref: "#/parameters/offsetQuery" - - $ref: "#/parameters/idQuery" - responses: - "200": - description: OK - summary: Get a list of EventCategories - tags: - - EventCategories - post: - operationId: createEventCategory - parameters: - - $ref: "#/parameters/EventCategoryRequest" - responses: - "201": - description: Created - summary: Create a new EventCategory - tags: - - EventCategories - put: - operationId: updateEventCategory - parameters: - - $ref: "#/parameters/idQuery" - responses: - "200": - description: OK - summary: Update an existing EventCategory - tags: - - EventCategories - /eventcategoryassignments: - delete: - operationId: deleteEventCategoryAssignment - parameters: - - $ref: "#/parameters/idQuery" - responses: - "204": - description: No Content - summary: Delete a EventCategoryAssignment - tags: - - EventCategoryAssignments - get: - operationId: getEventCategoryAssignments - parameters: - - $ref: "#/parameters/idQuery" - - $ref: "#/parameters/limitQuery" - - $ref: "#/parameters/offsetQuery" - responses: - "200": - description: OK - summary: Get a list of EventCategoryassignments - tags: - - EventCategoryAssignments - post: - operationId: createEventCategoryAssignment - parameters: - - $ref: "#/parameters/EventCategoryAssignmentRequest" - responses: - "201": - description: Created - summary: Create a new EventCategoryAssignment - tags: - - EventCategoryAssignments - put: - operationId: updateEventCategoryAssignment - parameters: - - $ref: "#/parameters/idQuery" - responses: - "200": - description: OK - summary: Update an existing EventCategoryAssignment - tags: - - EventCategoryAssignments /events: - delete: - operationId: deleteEvent - parameters: - - $ref: "#/parameters/idQuery" - responses: - "204": - description: No Content - summary: Delete a Event - tags: - - Events get: + security: + - ApiKeyAuth: [] operationId: getEvents parameters: - $ref: "#/parameters/limitQuery" @@ -1008,32 +1045,68 @@ paths: - $ref: "#/parameters/idQuery" responses: "200": - description: OK + $ref: "#/responses/EventResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Get a list of Events tags: - Events post: - operationId: createEvent + security: + - ApiKeyAuth: [] + operationId: postEvents parameters: - $ref: "#/parameters/EventRequest" responses: - "201": - description: Created + "200": + $ref: "#/responses/EventResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Create a new Event tags: - Events put: + security: + - ApiKeyAuth: [] operationId: updateEvent parameters: - $ref: "#/parameters/idQuery" responses: "200": - description: OK + $ref: "#/responses/EventResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" summary: Update an existing Event tags: - Events /favorites: delete: + security: + - ApiKeyAuth: [] operationId: deleteFavorite parameters: - $ref: "#/parameters/idQuery" @@ -1044,6 +1117,8 @@ paths: tags: - Favorites get: + security: + - ApiKeyAuth: [] operationId: getFavorites parameters: - $ref: "#/parameters/idQuery" @@ -1056,7 +1131,9 @@ paths: tags: - Favorites post: - operationId: createFavorite + security: + - ApiKeyAuth: [] + operationId: postFavorite parameters: - $ref: "#/parameters/FavoriteRequest" responses: @@ -1066,6 +1143,8 @@ paths: tags: - Favorites put: + security: + - ApiKeyAuth: [] operationId: updateFavorite parameters: - $ref: "#/parameters/idQuery" @@ -1077,6 +1156,8 @@ paths: - Favorites /invoices: delete: + security: + - ApiKeyAuth: [] operationId: deleteInvoice parameters: - $ref: "#/parameters/idQuery" @@ -1087,6 +1168,8 @@ paths: tags: - Invoices get: + security: + - ApiKeyAuth: [] operationId: getInvoices parameters: - $ref: "#/parameters/idQuery" @@ -1099,7 +1182,9 @@ paths: tags: - Invoices post: - operationId: createInvoice + security: + - ApiKeyAuth: [] + operationId: postInvoice parameters: - $ref: "#/parameters/InvoiceRequest" responses: @@ -1109,6 +1194,8 @@ paths: tags: - Invoices put: + security: + - ApiKeyAuth: [] operationId: updateInvoice parameters: - $ref: "#/parameters/idQuery" @@ -1120,6 +1207,8 @@ paths: - Invoices /issuedcertificates: delete: + security: + - ApiKeyAuth: [] operationId: deleteIssuedCertificate parameters: - $ref: "#/parameters/idQuery" @@ -1130,6 +1219,8 @@ paths: tags: - IssuedCertificates get: + security: + - ApiKeyAuth: [] operationId: getIssuedCertificates parameters: - $ref: "#/parameters/limitQuery" @@ -1142,7 +1233,9 @@ paths: tags: - IssuedCertificates post: - operationId: createIssuedCertificate + security: + - ApiKeyAuth: [] + operationId: postIssuedCertificate parameters: - $ref: "#/parameters/IssuedCertificateRequest" responses: @@ -1152,6 +1245,8 @@ paths: tags: - IssuedCertificates put: + security: + - ApiKeyAuth: [] operationId: updateIssuedCertificate parameters: - $ref: "#/parameters/idQuery" @@ -1163,6 +1258,8 @@ paths: - IssuedCertificates /lessonprogress: delete: + security: + - ApiKeyAuth: [] operationId: deleteLessonProgress parameters: - $ref: "#/parameters/idQuery" @@ -1173,6 +1270,8 @@ paths: tags: - LessonProgress get: + security: + - ApiKeyAuth: [] operationId: getLessonProgress parameters: - $ref: "#/parameters/limitQuery" @@ -1185,7 +1284,9 @@ paths: tags: - LessonProgress post: - operationId: createLessonProgress + security: + - ApiKeyAuth: [] + operationId: postLessonProgress parameters: - $ref: "#/parameters/LessonProgressRequest" responses: @@ -1195,6 +1296,8 @@ paths: tags: - LessonProgress put: + security: + - ApiKeyAuth: [] operationId: updateLessonProgress parameters: - $ref: "#/parameters/idQuery" @@ -1206,6 +1309,8 @@ paths: - LessonProgress /orders: delete: + security: + - ApiKeyAuth: [] operationId: deleteOrder parameters: - $ref: "#/parameters/idQuery" @@ -1216,6 +1321,8 @@ paths: tags: - Orders get: + security: + - ApiKeyAuth: [] operationId: getOrders parameters: - $ref: "#/parameters/limitQuery" @@ -1228,7 +1335,9 @@ paths: tags: - Orders post: - operationId: createOrder + security: + - ApiKeyAuth: [] + operationId: postOrder parameters: - $ref: "#/parameters/OrderRequest" responses: @@ -1238,6 +1347,8 @@ paths: tags: - Orders put: + security: + - ApiKeyAuth: [] operationId: updateOrder parameters: - $ref: "#/parameters/idQuery" @@ -1249,6 +1360,8 @@ paths: - Orders /paymentmethods: delete: + security: + - ApiKeyAuth: [] operationId: deletePaymentMethod parameters: - $ref: "#/parameters/idQuery" @@ -1259,6 +1372,8 @@ paths: tags: - PaymentMethods get: + security: + - ApiKeyAuth: [] operationId: getPaymentMethods parameters: - $ref: "#/parameters/limitQuery" @@ -1271,7 +1386,9 @@ paths: tags: - PaymentMethods post: - operationId: createPaymentMethod + security: + - ApiKeyAuth: [] + operationId: postPaymentMethod parameters: - $ref: "#/parameters/PaymentMethodRequest" responses: @@ -1281,6 +1398,8 @@ paths: tags: - PaymentMethods put: + security: + - ApiKeyAuth: [] operationId: updatePaymentMethod parameters: - $ref: "#/parameters/idQuery" @@ -1292,6 +1411,8 @@ paths: - PaymentMethods /researchprojectcompanys: delete: + security: + - ApiKeyAuth: [] operationId: deleteResearchProjectCompany parameters: - $ref: "#/parameters/idQuery" @@ -1302,6 +1423,8 @@ paths: tags: - ResearchProjectCompanies get: + security: + - ApiKeyAuth: [] operationId: getResearchProjectCompanies parameters: - $ref: "#/parameters/limitQuery" @@ -1314,7 +1437,9 @@ paths: tags: - ResearchProjectCompanies post: - operationId: createResearchProjectCompany + security: + - ApiKeyAuth: [] + operationId: postResearchProjectCompany parameters: - $ref: "#/parameters/ResearchProjectCompanyRequest" responses: @@ -1324,6 +1449,8 @@ paths: tags: - ResearchProjectCompanies put: + security: + - ApiKeyAuth: [] operationId: updateResearchProjectCompany parameters: - $ref: "#/parameters/idQuery" @@ -1335,6 +1462,8 @@ paths: - ResearchProjectCompanies /researchprojects: delete: + security: + - ApiKeyAuth: [] operationId: deleteResearchProject parameters: - $ref: "#/parameters/idQuery" @@ -1345,6 +1474,8 @@ paths: tags: - ResearchProjects get: + security: + - ApiKeyAuth: [] operationId: getResearchProjects parameters: - $ref: "#/parameters/limitQuery" @@ -1357,7 +1488,9 @@ paths: tags: - ResearchProjects post: - operationId: createResearchProject + security: + - ApiKeyAuth: [] + operationId: postResearchProject parameters: - $ref: "#/parameters/ResearchProjectRequest" responses: @@ -1367,6 +1500,8 @@ paths: tags: - ResearchProjects put: + security: + - ApiKeyAuth: [] operationId: updateResearchProject parameters: - $ref: "#/parameters/idQuery" @@ -1378,6 +1513,8 @@ paths: - ResearchProjects /researchprojecttopics: delete: + security: + - ApiKeyAuth: [] operationId: deleteResearchProjectTopic parameters: - $ref: "#/parameters/idQuery" @@ -1388,6 +1525,8 @@ paths: tags: - ResearchProjectTopics get: + security: + - ApiKeyAuth: [] operationId: getResearchProjectTopics parameters: - $ref: "#/parameters/limitQuery" @@ -1400,7 +1539,9 @@ paths: tags: - ResearchProjectTopics post: - operationId: createResearchProjectTopic + security: + - ApiKeyAuth: [] + operationId: postResearchProjectTopic parameters: - $ref: "#/parameters/ResearchProjectTopicRequest" responses: @@ -1410,6 +1551,8 @@ paths: tags: - ResearchProjectTopics put: + security: + - ApiKeyAuth: [] operationId: updateResearchProjectTopic parameters: - $ref: "#/parameters/idQuery" @@ -1545,6 +1688,8 @@ paths: - Templates /tickets: delete: + security: + - ApiKeyAuth: [] operationId: deleteTicket parameters: - $ref: "#/parameters/idQuery" @@ -1555,6 +1700,8 @@ paths: tags: - Tickets get: + security: + - ApiKeyAuth: [] operationId: getTickets parameters: - $ref: "#/parameters/limitQuery" @@ -1567,7 +1714,9 @@ paths: tags: - Tickets post: - operationId: createTicket + security: + - ApiKeyAuth: [] + operationId: postTicket parameters: - $ref: "#/parameters/TicketRequest" responses: @@ -1577,6 +1726,8 @@ paths: tags: - Tickets put: + security: + - ApiKeyAuth: [] operationId: updateTicket parameters: - $ref: "#/parameters/idQuery" @@ -1588,6 +1739,8 @@ paths: - Tickets /transactions: delete: + security: + - ApiKeyAuth: [] operationId: deleteTransaction parameters: - $ref: "#/parameters/idQuery" @@ -1598,6 +1751,8 @@ paths: tags: - Transactions get: + security: + - ApiKeyAuth: [] operationId: getTransactions parameters: - $ref: "#/parameters/limitQuery" @@ -1610,7 +1765,9 @@ paths: tags: - Transactions post: - operationId: createTransaction + security: + - ApiKeyAuth: [] + operationId: postTransaction parameters: - $ref: "#/parameters/TransactionRequest" responses: @@ -1620,6 +1777,8 @@ paths: tags: - Transactions put: + security: + - ApiKeyAuth: [] operationId: updateTransaction parameters: - $ref: "#/parameters/idQuery" @@ -1952,74 +2111,12 @@ definitions: Meta: $ref: "#/definitions/ResponseMeta" type: object - Course: - properties: - CreatedByID: - type: string - x-nullable: true - CreatedDate: - type: string - x-nullable: true - Description: - type: string - x-nullable: true - Fulldescription: - type: string - x-nullable: true - ID: - type: string - InstructorID: - type: string - x-nullable: true - LastModifiedByID: - type: string - x-nullable: true - LastModifiedDate: - type: string - x-nullable: true - Price: - type: number - Title: - type: string - x-nullable: true - type: object - CourseLesson: - properties: - Content: - type: string - x-nullable: true - CreatedByID: - type: string - x-nullable: true - CreatedDate: - type: string - x-nullable: true - ID: - type: string - LastModifiedByID: - type: string - x-nullable: true - LastModifiedDate: - type: string - x-nullable: true - Order: - type: integer - SectionID: - type: string - x-nullable: true - Title: - type: string - x-nullable: true - VideoURL: - type: string - x-nullable: true - type: object CourseLessonRequest: description: An array of CourseLesson objects properties: Data: items: - $ref: "#/definitions/CourseLesson" + $ref: "../../lib/swagger/defs/course-lesson.yaml#/CourseLesson" type: array type: object CourseLessonResponse: @@ -2027,67 +2124,45 @@ definitions: properties: Data: items: - $ref: "#/definitions/CourseLesson" + $ref: "../../lib/swagger/defs/course-lesson.yaml#/CourseLesson" type: array + Meta: + $ref: "#/definitions/ResponseMeta" type: object CourseRequest: description: An array of Course objects properties: Data: items: - $ref: "#/definitions/Course" + $ref: "../../lib/swagger/defs/course.yaml#/Course" type: array type: object CourseResponse: description: An array of Course objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: - $ref: "#/definitions/Course" + $ref: "../../lib/swagger/defs/course.yaml#/Course" type: array type: object - CourseSection: - properties: - CourseID: - type: string - x-nullable: true - CreatedByID: - type: string - x-nullable: true - CreatedDate: - type: string - x-nullable: true - Description: - type: string - x-nullable: true - ID: - type: string - LastModifiedByID: - type: string - x-nullable: true - LastModifiedDate: - type: string - x-nullable: true - Order: - type: integer - Title: - type: string - x-nullable: true - type: object CourseSectionRequest: description: An array of CourseSection objects properties: Data: items: - $ref: "#/definitions/CourseSection" + $ref: "../../lib/swagger/defs/course-section.yaml#/CourseSection" type: array type: object CourseSectionResponse: description: An array of CourseSection objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: - $ref: "#/definitions/CourseSection" + $ref: "../../lib/swagger/defs/course-section.yaml#/CourseSection" type: array type: object Database: @@ -2161,9 +2236,6 @@ definitions: type: object EmailMessage: properties: - ActivityID: - type: string - x-nullable: true BCCAddress: type: string x-nullable: true @@ -2176,22 +2248,18 @@ definitions: CreatedDate: type: string x-nullable: true - EmailMessageID: - type: string - x-nullable: true FromAddress: type: string x-nullable: true FromName: type: string x-nullable: true - HTML: - format: byte - type: string - x-nullable: true HasAttachment: type: boolean x-nullable: true + HTML: + type: string + x-nullable: true Headers: $ref: "#/definitions/Headers" x-nullable: true @@ -2200,12 +2268,6 @@ definitions: Incoming: type: boolean x-nullable: true - IsClientManaged: - type: boolean - x-nullable: true - IsExternallyManaged: - type: boolean - x-nullable: true LastModifiedByID: type: string x-nullable: true @@ -2218,22 +2280,7 @@ definitions: MessageIdentifier: type: string x-nullable: true - ParentID: - type: string - x-nullable: true - RelatedToID: - type: string - x-nullable: true - RelationAddress: - type: string - x-nullable: true - RelationID: - type: string - x-nullable: true - RelationObjectType: - type: string - x-nullable: true - RelationType: + OutgoingEmailID: type: string x-nullable: true ReplyToEmailMessageID: @@ -2245,8 +2292,7 @@ definitions: Subject: type: string x-nullable: true - Text: - format: byte + TextBody: x-nullable: true type: string ThreadIdentifier: @@ -2255,7 +2301,7 @@ definitions: ToAddress: type: string x-nullable: true - ValidatedFromAddress: + ToName: type: string x-nullable: true type: object @@ -2334,119 +2380,28 @@ definitions: message: type: string type: object - Event: - properties: - Capacity: - type: integer - x-nullable: true - Createdat: - type: string - x-nullable: true - Description: - type: string - x-nullable: true - EndDate: - type: string - x-nullable: true - ID: - type: string - Location: - type: string - x-nullable: true - OrganizeruserID: - type: string - x-nullable: true - StartDate: - type: string - x-nullable: true - Title: - type: string - x-nullable: true - UpDatedat: - type: string - x-nullable: true - type: object - EventCategory: - properties: - CreatedDate: - type: string - x-nullable: true - ID: - type: string - LastModifiedDate: - type: string - x-nullable: true - Name: - type: string - x-nullable: true - type: object - EventCategoryAssignment: - properties: - Createdat: - type: string - x-nullable: true - EventCategoryID: - type: string - x-nullable: true - EventID: - type: string - x-nullable: true - ID: - type: string - UpDatedat: - type: string - x-nullable: true - type: object - EventCategoryAssignmentRequest: - description: An array of EventCategoryAssignment objects - properties: - Data: - items: - $ref: "#/definitions/EventCategoryAssignment" - type: array - type: object - EventCategoryAssignmentResponse: - description: An array of EventCategoryAssignment objects - properties: - Data: - items: - $ref: "#/definitions/EventCategoryAssignment" - type: array - type: object - EventCategoryRequest: - description: An array of EventCategory objects - properties: - Data: - items: - $ref: "#/definitions/EventCategory" - type: array - type: object - EventCategoryResponse: - description: An array of EventCategory objects - properties: - Data: - items: - $ref: "#/definitions/EventCategory" - type: array - type: object EventRequest: description: An array of Event objects properties: Data: items: - $ref: "#/definitions/Event" + $ref: "../../lib/swagger/defs/event.yaml#/Event" type: array type: object EventResponse: description: An array of Event objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: - $ref: "#/definitions/Event" + $ref: "../../lib/swagger/defs/event.yaml#/Event" type: array type: object Favorite: properties: + ID: + type: string CreatedByID: type: string x-nullable: true @@ -2459,11 +2414,9 @@ definitions: FavoriteID: type: string x-nullable: true - Favoritetype: + FavoriteType: type: string x-nullable: true - ID: - type: string LastModifiedByID: type: string x-nullable: true @@ -2494,6 +2447,8 @@ definitions: FavoriteResponse: description: An array of Favorite objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/Favorite" @@ -2550,6 +2505,8 @@ definitions: InvoiceResponse: description: An array of Invoice objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/Invoice" @@ -2601,6 +2558,8 @@ definitions: IssuedCertificateResponse: description: An array of IssuedCertificate objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/IssuedCertificate" @@ -2648,6 +2607,8 @@ definitions: LessonProgressResponse: description: An array of LessonProgress objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/LessonProgress" @@ -2678,19 +2639,30 @@ definitions: OutgoingEmailMessage: description: A new email message to be sent properties: + ID: + type: string BCCAddress: type: string x-nullable: true + Bounced: + type: boolean + x-nullable: true CCAddress: type: string x-nullable: true + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true EmailMessageID: type: string x-nullable: true - EmailTemplateID: + ExternalID: type: string x-nullable: true - ExternalID: + FromAddress: type: string x-nullable: true FromContactID: @@ -2705,28 +2677,55 @@ definitions: HTML: type: string x-nullable: true - ID: + LastModifiedByID: type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + ObjectID: + type: string + x-nullable: true + ObjectType: + type: string + x-nullable: true + Queued: + type: boolean + x-nullable: true + QueuedDate: + type: string + x-nullable: true + Sent: + type: boolean + x-nullable: true + SentDate: + type: string + x-nullable: true Subject: type: string x-nullable: true - Text: + TemplateID: type: string x-nullable: true + TextBody: + x-nullable: true + type: string ToAddress: type: string x-nullable: true ToName: type: string x-nullable: true - ValidatedFromAddress: - type: string - x-nullable: true - WhoID: - type: string - x-nullable: true type: object OutgoingEmailMessageRequest: + description: An array Taxnexus New Email Message objects + properties: + data: + items: + $ref: "#/definitions/OutgoingEmailMessage" + type: array + type: object + OutgoingEmailMessagesResponse: description: An array Taxnexus New Email Message objects properties: data: @@ -2734,7 +2733,7 @@ definitions: $ref: "#/definitions/OutgoingEmailMessage" type: array meta: - $ref: "#/definitions/RequestMeta" + $ref: "#/definitions/ResponseMeta" type: object Order: properties: @@ -2842,6 +2841,8 @@ definitions: PaymentMethodResponse: description: An array of PaymentMethod objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/PaymentMethod" @@ -2925,6 +2926,8 @@ definitions: ResearchProjectCompanyResponse: description: An array of ResearchProjectCompany objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/ResearchProjectCompany" @@ -2941,6 +2944,8 @@ definitions: ResearchProjectResponse: description: An array of ResearchProject objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/ResearchProject" @@ -2983,6 +2988,8 @@ definitions: ResearchProjectTopicResponse: description: An array of ResearchProjectTopic objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/ResearchProjectTopic" @@ -3169,8 +3176,8 @@ definitions: x-nullable: true HTML: description: HTML Body - format: byte type: string + x-nullable: true ID: description: Record Id type: string @@ -3344,6 +3351,8 @@ definitions: TicketResponse: description: An array of Ticket objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/Ticket" @@ -3400,6 +3409,8 @@ definitions: TransactionResponse: description: An array of Transaction objects properties: + Meta: + $ref: "#/definitions/ResponseMeta" Data: items: $ref: "#/definitions/Transaction" diff --git a/swagger/sf-gate-vernonkeenan.yaml b/swagger/sf-gate-vernonkeenan.yaml index b330870..0679efd 100644 --- a/swagger/sf-gate-vernonkeenan.yaml +++ b/swagger/sf-gate-vernonkeenan.yaml @@ -28,6 +28,12 @@ parameters: name: accountId required: false type: string + idQuery: + description: Unique Record ID + in: query + name: id + required: false + type: string industryCompanyIdQuery: description: Record Id of an IndustryCompany in: query @@ -41,6 +47,20 @@ parameters: required: true schema: $ref: "#/definitions/AccountRequest" + CourseRequest: + description: An array of new Course records + in: body + name: courseRequest + required: true + schema: + $ref: "#/definitions/CourseRequest" + CourseSectionRequest: + description: An array of new CourseSection records + in: body + name: coursesectionRequest + required: true + schema: + $ref: "#/definitions/CourseSectionRequest" industryCompanyRequest: description: A request with an array of IndustryCompany Objects in: body @@ -86,6 +106,13 @@ parameters: name: clusterId required: false type: string + CourseLessonRequest: + description: An array of new CourseLesson records + in: body + name: courselessonRequest + required: true + schema: + $ref: "#/definitions/CourseLessonRequest" clusterRequest: description: An array of Cluster records in: body @@ -151,6 +178,13 @@ parameters: name: email required: false type: string + EventRequest: + description: An array of new Event records + in: body + name: eventRequest + required: true + schema: + $ref: "#/definitions/EventRequest" factorIdQuery: description: Record Id of a Factor in: query @@ -290,16 +324,16 @@ parameters: responses: AccessForbidden: description: Access forbidden, account lacks access - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" AccountResponse: description: Response with Account objects schema: $ref: "#/definitions/AccountResponse" + EventResponse: + description: Event Response Object + schema: + $ref: "#/definitions/EventResponse" IndustryCompanyResponse: description: Response with IndustryCompany objects schema: @@ -330,12 +364,12 @@ responses: $ref: "#/definitions/DatabaseResponse" DeleteResponse: description: Response with Message Objects with Delete Status - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/DeleteResponse" + CourseResponse: + description: Course Response Object + schema: + $ref: "#/definitions/CourseResponse" FactorResponse: description: Response with Factor objects schema: @@ -348,24 +382,24 @@ responses: description: Response with Industry objects schema: $ref: "#/definitions/IndustryProductResponse" + CourseSectionResponse: + description: CourseSection Response Object + schema: + $ref: "#/definitions/CourseSectionResponse" + CourseLessonResponse: + description: CourseLesson Response Object + schema: + $ref: "#/definitions/CourseLessonResponse" IndustryResponse: description: Response with Industry objects schema: $ref: "#/definitions/IndustryResponse" InvalidDataError: description: Invalid data was sent - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/InvalidError" NotFound: description: Resource was not found - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" ObservationResponse: @@ -382,10 +416,6 @@ responses: $ref: "#/definitions/SalesforcePostResponse" ServerError: description: Server Internal Error - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" TemplateResponse: @@ -402,18 +432,10 @@ responses: $ref: "#/definitions/TopicResponse" Unauthorized: description: Access unauthorized, invalid API-KEY was used - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" UnprocessableEntity: description: Unprocessable Entity, likely a bad parameter - headers: - Access-Control-Allow-Origin: - type: string - x-nullable: true schema: $ref: "#/definitions/Error" UserResponse: @@ -815,6 +837,216 @@ paths: summary: Get a list of contracts tags: - Contracts + /courselessons: + get: + operationId: getCourseLessons + security: + - ApiKeyAuth: [] + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + responses: + "200": + $ref: "#/responses/CourseLessonResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Get a list of CourseLessons + tags: + - Courses + post: + operationId: postCourseLesson + security: + - ApiKeyAuth: [] + parameters: + - $ref: "#/parameters/CourseLessonRequest" + responses: + "200": + $ref: "#/responses/CourseLessonResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Create a new CourseLesson + tags: + - Courses + put: + security: + - ApiKeyAuth: [] + operationId: updateCourseLesson + parameters: + - $ref: "#/parameters/CourseLessonRequest" + responses: + "200": + $ref: "#/responses/CourseLessonResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Update an existing CourseLesson + tags: + - Courses + /courses: + get: + description: Return a list of Course records from the datastore + operationId: getCourses + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + responses: + "200": + $ref: "#/responses/CourseResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + summary: Get a list Courses + tags: + - Courses + post: + description: Create Courses in Salesforce + operationId: postCourses + parameters: + - $ref: "#/parameters/CourseRequest" + responses: + "201": + $ref: "#/responses/SalesforcePostResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + summary: Create new Courses + tags: + - Courses + put: + description: Update Course in Salesforce + operationId: putCourses + parameters: + - $ref: "#/parameters/CourseRequest" + responses: + "200": + $ref: "#/responses/CourseResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + summary: Update Courses + tags: + - Courses + /coursesections: + get: + security: + - ApiKeyAuth: [] + operationId: getCourseSections + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + responses: + "200": + $ref: "#/responses/CourseSectionResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Get a list of CourseSections + tags: + - Courses + post: + security: + - ApiKeyAuth: [] + operationId: postCourseSection + parameters: + - $ref: "#/parameters/CourseSectionRequest" + responses: + "200": + $ref: "#/responses/CourseSectionResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Create a new CourseSection + tags: + - Courses + put: + security: + - ApiKeyAuth: [] + operationId: updateCourseSection + parameters: + - $ref: "#/parameters/CourseSectionRequest" + responses: + "200": + $ref: "#/responses/CourseSectionResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Update an existing CourseSection + tags: + - Courses /databases: get: description: Return a list of Database records from the datastore @@ -887,6 +1119,65 @@ paths: summary: Update Databases tags: - Databases + /events: + delete: + security: + - ApiKeyAuth: [] + operationId: deleteEvent + parameters: + - $ref: "#/parameters/idQuery" + responses: + "204": + description: No Content + summary: Delete a Event + tags: + - Events + get: + security: + - ApiKeyAuth: [] + operationId: getEvents + parameters: + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/idQuery" + responses: + "200": + $ref: "#/responses/EventResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Get a list of Events + tags: + - Events + put: + security: + - ApiKeyAuth: [] + operationId: updateEvent + parameters: + - $ref: "#/parameters/idQuery" + responses: + "200": + $ref: "#/responses/EventResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + summary: Update an existing Event + tags: + - Events /factors: get: description: Return a list of all available Factors @@ -3640,3 +3931,69 @@ definitions: type: string x-nullable: true type: object + EventRequest: + description: An array of Event objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/event.yaml#/Event" + type: array + type: object + EventResponse: + description: An array of Event objects + properties: + Meta: + $ref: "#/definitions/ResponseMeta" + Data: + items: + $ref: "../../lib/swagger/defs/event.yaml#/Event" + type: array + type: object + CourseLessonRequest: + description: An array of CourseLesson objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/course-lesson.yaml#/CourseLesson" + type: array + type: object + CourseLessonResponse: + description: An array of CourseLesson objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/course-lesson.yaml#/CourseLesson" + type: array + type: object + CourseRequest: + description: An array of Course objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/course.yaml#/Course" + type: array + type: object + CourseResponse: + description: An array of Course objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/course.yaml#/Course" + type: array + type: object + CourseSectionRequest: + description: An array of CourseSection objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/course-section.yaml#/CourseSection" + type: array + type: object + CourseSectionResponse: + description: An array of CourseSection objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/course-section.yaml#/CourseSection" + type: array + type: object