From 8e1826b7348ea7eac759bf7a1a94c5431330767e Mon Sep 17 00:00:00 2001 From: Vernon Keenan Date: Fri, 19 May 2023 23:55:12 +0000 Subject: [PATCH] Documents --- .../documents/documents_client.go | 172 +++++++ .../documents/get_documents_parameters.go | 240 +++++++++ .../documents/get_documents_responses.go | 486 ++++++++++++++++++ .../documents/post_documents_parameters.go | 157 ++++++ .../documents/post_documents_responses.go | 486 ++++++++++++++++++ .../documents/put_documents_parameters.go | 157 ++++++ .../documents/put_documents_responses.go | 486 ++++++++++++++++++ .../favorites/get_favorites_parameters.go | 49 +- api/members/members_client/members_client.go | 5 + ...t_research_project_companies_parameters.go | 22 + ...t_research_project_documents_parameters.go | 262 ++++++++++ ...et_research_project_documents_responses.go | 486 ++++++++++++++++++ ...et_research_project_products_parameters.go | 22 + .../get_research_project_topics_parameters.go | 22 + .../get_research_projects_parameters.go | 22 + ...t_research_project_companies_parameters.go | 22 + ...t_research_project_documents_parameters.go | 179 +++++++ ...st_research_project_documents_responses.go | 486 ++++++++++++++++++ ...st_research_project_products_parameters.go | 22 + ...post_research_project_topics_parameters.go | 22 + .../post_research_projects_parameters.go | 22 + ...t_research_project_companies_parameters.go | 22 + ...t_research_project_documents_parameters.go | 179 +++++++ ...ut_research_project_documents_responses.go | 486 ++++++++++++++++++ ...ut_research_project_products_parameters.go | 22 + .../put_research_project_topics_parameters.go | 22 + .../put_research_projects_parameters.go | 22 + .../research_projects_client.go | 129 +++++ api/members/members_models/document.go | 117 +++++ .../members_models/document_request.go | 120 +++++ .../members_models/document_response.go | 166 ++++++ .../members_models/research_project.go | 242 ++++++++- .../research_project_document.go | 81 +++ .../research_project_document_request.go | 120 +++++ .../research_project_document_response.go | 166 ++++++ .../research_project_product.go | 6 + .../members_models/research_project_topic.go | 3 + api/sfgate/sfgate_models/research_project.go | 242 ++++++++- .../research_project_document.go | 81 +++ .../sfgate_models/research_project_product.go | 6 + .../sfgate_models/research_project_topic.go | 3 + swagger/defs/document.yaml | 90 ++++ swagger/defs/research-project-document.yaml | 32 ++ swagger/defs/research-project-product.yaml | 6 + swagger/defs/research-project-topic.yaml | 3 + swagger/defs/research-project.yaml | 20 + swagger/external/members-vernonkeenan.yaml | 225 +++++++- swagger/members-vernonkeenan.yaml | 225 +++++++- 48 files changed, 6632 insertions(+), 31 deletions(-) create mode 100644 api/members/members_client/documents/documents_client.go create mode 100644 api/members/members_client/documents/get_documents_parameters.go create mode 100644 api/members/members_client/documents/get_documents_responses.go create mode 100644 api/members/members_client/documents/post_documents_parameters.go create mode 100644 api/members/members_client/documents/post_documents_responses.go create mode 100644 api/members/members_client/documents/put_documents_parameters.go create mode 100644 api/members/members_client/documents/put_documents_responses.go create mode 100644 api/members/members_client/research_projects/get_research_project_documents_parameters.go create mode 100644 api/members/members_client/research_projects/get_research_project_documents_responses.go create mode 100644 api/members/members_client/research_projects/post_research_project_documents_parameters.go create mode 100644 api/members/members_client/research_projects/post_research_project_documents_responses.go create mode 100644 api/members/members_client/research_projects/put_research_project_documents_parameters.go create mode 100644 api/members/members_client/research_projects/put_research_project_documents_responses.go create mode 100644 api/members/members_models/document.go create mode 100644 api/members/members_models/document_request.go create mode 100644 api/members/members_models/document_response.go create mode 100644 api/members/members_models/research_project_document.go create mode 100644 api/members/members_models/research_project_document_request.go create mode 100644 api/members/members_models/research_project_document_response.go create mode 100644 api/sfgate/sfgate_models/research_project_document.go create mode 100644 swagger/defs/document.yaml create mode 100644 swagger/defs/research-project-document.yaml diff --git a/api/members/members_client/documents/documents_client.go b/api/members/members_client/documents/documents_client.go new file mode 100644 index 0000000..b033545 --- /dev/null +++ b/api/members/members_client/documents/documents_client.go @@ -0,0 +1,172 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package documents + +// 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 documents API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for documents 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 { + GetDocuments(params *GetDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDocumentsOK, error) + + PostDocuments(params *PostDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostDocumentsOK, error) + + PutDocuments(params *PutDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutDocumentsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +GetDocuments gets a list documents + +Return a list of Document records from the datastore +*/ +func (a *Client) GetDocuments(params *GetDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDocumentsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetDocumentsParams() + } + op := &runtime.ClientOperation{ + ID: "getDocuments", + Method: "GET", + PathPattern: "/documents", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetDocumentsReader{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.(*GetDocumentsOK) + 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 getDocuments: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PostDocuments creates new documents + +Create Documents +*/ +func (a *Client) PostDocuments(params *PostDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostDocumentsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostDocumentsParams() + } + op := &runtime.ClientOperation{ + ID: "postDocuments", + Method: "POST", + PathPattern: "/documents", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostDocumentsReader{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.(*PostDocumentsOK) + 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 postDocuments: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PutDocuments updates documents + +Update Document +*/ +func (a *Client) PutDocuments(params *PutDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutDocumentsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutDocumentsParams() + } + op := &runtime.ClientOperation{ + ID: "putDocuments", + Method: "PUT", + PathPattern: "/documents", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutDocumentsReader{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.(*PutDocumentsOK) + 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 putDocuments: 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/documents/get_documents_parameters.go b/api/members/members_client/documents/get_documents_parameters.go new file mode 100644 index 0000000..033ca48 --- /dev/null +++ b/api/members/members_client/documents/get_documents_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 documents + +// 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" +) + +// NewGetDocumentsParams creates a new GetDocumentsParams 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 NewGetDocumentsParams() *GetDocumentsParams { + return &GetDocumentsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetDocumentsParamsWithTimeout creates a new GetDocumentsParams object +// with the ability to set a timeout on a request. +func NewGetDocumentsParamsWithTimeout(timeout time.Duration) *GetDocumentsParams { + return &GetDocumentsParams{ + timeout: timeout, + } +} + +// NewGetDocumentsParamsWithContext creates a new GetDocumentsParams object +// with the ability to set a context for a request. +func NewGetDocumentsParamsWithContext(ctx context.Context) *GetDocumentsParams { + return &GetDocumentsParams{ + Context: ctx, + } +} + +// NewGetDocumentsParamsWithHTTPClient creates a new GetDocumentsParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetDocumentsParamsWithHTTPClient(client *http.Client) *GetDocumentsParams { + return &GetDocumentsParams{ + HTTPClient: client, + } +} + +/* +GetDocumentsParams contains all the parameters to send to the API endpoint + + for the get documents operation. + + Typically these are written to a http.Request. +*/ +type GetDocumentsParams 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 documents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetDocumentsParams) WithDefaults() *GetDocumentsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get documents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetDocumentsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get documents params +func (o *GetDocumentsParams) WithTimeout(timeout time.Duration) *GetDocumentsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get documents params +func (o *GetDocumentsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get documents params +func (o *GetDocumentsParams) WithContext(ctx context.Context) *GetDocumentsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get documents params +func (o *GetDocumentsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get documents params +func (o *GetDocumentsParams) WithHTTPClient(client *http.Client) *GetDocumentsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get documents params +func (o *GetDocumentsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the get documents params +func (o *GetDocumentsParams) WithID(id *string) *GetDocumentsParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get documents params +func (o *GetDocumentsParams) SetID(id *string) { + o.ID = id +} + +// WithLimit adds the limit to the get documents params +func (o *GetDocumentsParams) WithLimit(limit *int64) *GetDocumentsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get documents params +func (o *GetDocumentsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get documents params +func (o *GetDocumentsParams) WithOffset(offset *int64) *GetDocumentsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get documents params +func (o *GetDocumentsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetDocumentsParams) 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/documents/get_documents_responses.go b/api/members/members_client/documents/get_documents_responses.go new file mode 100644 index 0000000..14b20e5 --- /dev/null +++ b/api/members/members_client/documents/get_documents_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 documents + +// 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" +) + +// GetDocumentsReader is a Reader for the GetDocuments structure. +type GetDocumentsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetDocumentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetDocumentsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetDocumentsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetDocumentsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetDocumentsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetDocumentsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetDocumentsInternalServerError() + 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()) + } +} + +// NewGetDocumentsOK creates a GetDocumentsOK with default headers values +func NewGetDocumentsOK() *GetDocumentsOK { + return &GetDocumentsOK{} +} + +/* +GetDocumentsOK describes a response with status code 200, with default header values. + +Document Response Object +*/ +type GetDocumentsOK struct { + Payload *members_models.DocumentResponse +} + +// IsSuccess returns true when this get documents o k response has a 2xx status code +func (o *GetDocumentsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get documents o k response has a 3xx status code +func (o *GetDocumentsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get documents o k response has a 4xx status code +func (o *GetDocumentsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get documents o k response has a 5xx status code +func (o *GetDocumentsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get documents o k response a status code equal to that given +func (o *GetDocumentsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get documents o k response +func (o *GetDocumentsOK) Code() int { + return 200 +} + +func (o *GetDocumentsOK) Error() string { + return fmt.Sprintf("[GET /documents][%d] getDocumentsOK %+v", 200, o.Payload) +} + +func (o *GetDocumentsOK) String() string { + return fmt.Sprintf("[GET /documents][%d] getDocumentsOK %+v", 200, o.Payload) +} + +func (o *GetDocumentsOK) GetPayload() *members_models.DocumentResponse { + return o.Payload +} + +func (o *GetDocumentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.DocumentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDocumentsUnauthorized creates a GetDocumentsUnauthorized with default headers values +func NewGetDocumentsUnauthorized() *GetDocumentsUnauthorized { + return &GetDocumentsUnauthorized{} +} + +/* +GetDocumentsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetDocumentsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get documents unauthorized response has a 2xx status code +func (o *GetDocumentsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get documents unauthorized response has a 3xx status code +func (o *GetDocumentsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get documents unauthorized response has a 4xx status code +func (o *GetDocumentsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get documents unauthorized response has a 5xx status code +func (o *GetDocumentsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get documents unauthorized response a status code equal to that given +func (o *GetDocumentsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get documents unauthorized response +func (o *GetDocumentsUnauthorized) Code() int { + return 401 +} + +func (o *GetDocumentsUnauthorized) Error() string { + return fmt.Sprintf("[GET /documents][%d] getDocumentsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetDocumentsUnauthorized) String() string { + return fmt.Sprintf("[GET /documents][%d] getDocumentsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetDocumentsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetDocumentsUnauthorized) 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 +} + +// NewGetDocumentsForbidden creates a GetDocumentsForbidden with default headers values +func NewGetDocumentsForbidden() *GetDocumentsForbidden { + return &GetDocumentsForbidden{} +} + +/* +GetDocumentsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type GetDocumentsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this get documents forbidden response has a 2xx status code +func (o *GetDocumentsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get documents forbidden response has a 3xx status code +func (o *GetDocumentsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get documents forbidden response has a 4xx status code +func (o *GetDocumentsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get documents forbidden response has a 5xx status code +func (o *GetDocumentsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get documents forbidden response a status code equal to that given +func (o *GetDocumentsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get documents forbidden response +func (o *GetDocumentsForbidden) Code() int { + return 403 +} + +func (o *GetDocumentsForbidden) Error() string { + return fmt.Sprintf("[GET /documents][%d] getDocumentsForbidden %+v", 403, o.Payload) +} + +func (o *GetDocumentsForbidden) String() string { + return fmt.Sprintf("[GET /documents][%d] getDocumentsForbidden %+v", 403, o.Payload) +} + +func (o *GetDocumentsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetDocumentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.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 +} + +// NewGetDocumentsNotFound creates a GetDocumentsNotFound with default headers values +func NewGetDocumentsNotFound() *GetDocumentsNotFound { + return &GetDocumentsNotFound{} +} + +/* +GetDocumentsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type GetDocumentsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get documents not found response has a 2xx status code +func (o *GetDocumentsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get documents not found response has a 3xx status code +func (o *GetDocumentsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get documents not found response has a 4xx status code +func (o *GetDocumentsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get documents not found response has a 5xx status code +func (o *GetDocumentsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get documents not found response a status code equal to that given +func (o *GetDocumentsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get documents not found response +func (o *GetDocumentsNotFound) Code() int { + return 404 +} + +func (o *GetDocumentsNotFound) Error() string { + return fmt.Sprintf("[GET /documents][%d] getDocumentsNotFound %+v", 404, o.Payload) +} + +func (o *GetDocumentsNotFound) String() string { + return fmt.Sprintf("[GET /documents][%d] getDocumentsNotFound %+v", 404, o.Payload) +} + +func (o *GetDocumentsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetDocumentsNotFound) 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 +} + +// NewGetDocumentsUnprocessableEntity creates a GetDocumentsUnprocessableEntity with default headers values +func NewGetDocumentsUnprocessableEntity() *GetDocumentsUnprocessableEntity { + return &GetDocumentsUnprocessableEntity{} +} + +/* +GetDocumentsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetDocumentsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get documents unprocessable entity response has a 2xx status code +func (o *GetDocumentsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get documents unprocessable entity response has a 3xx status code +func (o *GetDocumentsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get documents unprocessable entity response has a 4xx status code +func (o *GetDocumentsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this get documents unprocessable entity response has a 5xx status code +func (o *GetDocumentsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this get documents unprocessable entity response a status code equal to that given +func (o *GetDocumentsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the get documents unprocessable entity response +func (o *GetDocumentsUnprocessableEntity) Code() int { + return 422 +} + +func (o *GetDocumentsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /documents][%d] getDocumentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetDocumentsUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /documents][%d] getDocumentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetDocumentsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetDocumentsUnprocessableEntity) 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 +} + +// NewGetDocumentsInternalServerError creates a GetDocumentsInternalServerError with default headers values +func NewGetDocumentsInternalServerError() *GetDocumentsInternalServerError { + return &GetDocumentsInternalServerError{} +} + +/* +GetDocumentsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type GetDocumentsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get documents internal server error response has a 2xx status code +func (o *GetDocumentsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get documents internal server error response has a 3xx status code +func (o *GetDocumentsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get documents internal server error response has a 4xx status code +func (o *GetDocumentsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get documents internal server error response has a 5xx status code +func (o *GetDocumentsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get documents internal server error response a status code equal to that given +func (o *GetDocumentsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get documents internal server error response +func (o *GetDocumentsInternalServerError) Code() int { + return 500 +} + +func (o *GetDocumentsInternalServerError) Error() string { + return fmt.Sprintf("[GET /documents][%d] getDocumentsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetDocumentsInternalServerError) String() string { + return fmt.Sprintf("[GET /documents][%d] getDocumentsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetDocumentsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetDocumentsInternalServerError) 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/documents/post_documents_parameters.go b/api/members/members_client/documents/post_documents_parameters.go new file mode 100644 index 0000000..94b9d12 --- /dev/null +++ b/api/members/members_client/documents/post_documents_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 documents + +// 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" +) + +// NewPostDocumentsParams creates a new PostDocumentsParams 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 NewPostDocumentsParams() *PostDocumentsParams { + return &PostDocumentsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostDocumentsParamsWithTimeout creates a new PostDocumentsParams object +// with the ability to set a timeout on a request. +func NewPostDocumentsParamsWithTimeout(timeout time.Duration) *PostDocumentsParams { + return &PostDocumentsParams{ + timeout: timeout, + } +} + +// NewPostDocumentsParamsWithContext creates a new PostDocumentsParams object +// with the ability to set a context for a request. +func NewPostDocumentsParamsWithContext(ctx context.Context) *PostDocumentsParams { + return &PostDocumentsParams{ + Context: ctx, + } +} + +// NewPostDocumentsParamsWithHTTPClient creates a new PostDocumentsParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostDocumentsParamsWithHTTPClient(client *http.Client) *PostDocumentsParams { + return &PostDocumentsParams{ + HTTPClient: client, + } +} + +/* +PostDocumentsParams contains all the parameters to send to the API endpoint + + for the post documents operation. + + Typically these are written to a http.Request. +*/ +type PostDocumentsParams struct { + + /* DocumentRequest. + + An array of Document records + */ + DocumentRequest *members_models.DocumentRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post documents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostDocumentsParams) WithDefaults() *PostDocumentsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post documents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostDocumentsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post documents params +func (o *PostDocumentsParams) WithTimeout(timeout time.Duration) *PostDocumentsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post documents params +func (o *PostDocumentsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post documents params +func (o *PostDocumentsParams) WithContext(ctx context.Context) *PostDocumentsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post documents params +func (o *PostDocumentsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post documents params +func (o *PostDocumentsParams) WithHTTPClient(client *http.Client) *PostDocumentsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post documents params +func (o *PostDocumentsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDocumentRequest adds the documentRequest to the post documents params +func (o *PostDocumentsParams) WithDocumentRequest(documentRequest *members_models.DocumentRequest) *PostDocumentsParams { + o.SetDocumentRequest(documentRequest) + return o +} + +// SetDocumentRequest adds the documentRequest to the post documents params +func (o *PostDocumentsParams) SetDocumentRequest(documentRequest *members_models.DocumentRequest) { + o.DocumentRequest = documentRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostDocumentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.DocumentRequest != nil { + if err := r.SetBodyParam(o.DocumentRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/documents/post_documents_responses.go b/api/members/members_client/documents/post_documents_responses.go new file mode 100644 index 0000000..ce2abe8 --- /dev/null +++ b/api/members/members_client/documents/post_documents_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 documents + +// 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" +) + +// PostDocumentsReader is a Reader for the PostDocuments structure. +type PostDocumentsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostDocumentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostDocumentsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostDocumentsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostDocumentsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostDocumentsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostDocumentsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostDocumentsInternalServerError() + 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()) + } +} + +// NewPostDocumentsOK creates a PostDocumentsOK with default headers values +func NewPostDocumentsOK() *PostDocumentsOK { + return &PostDocumentsOK{} +} + +/* +PostDocumentsOK describes a response with status code 200, with default header values. + +Document Response Object +*/ +type PostDocumentsOK struct { + Payload *members_models.DocumentResponse +} + +// IsSuccess returns true when this post documents o k response has a 2xx status code +func (o *PostDocumentsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post documents o k response has a 3xx status code +func (o *PostDocumentsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post documents o k response has a 4xx status code +func (o *PostDocumentsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this post documents o k response has a 5xx status code +func (o *PostDocumentsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this post documents o k response a status code equal to that given +func (o *PostDocumentsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the post documents o k response +func (o *PostDocumentsOK) Code() int { + return 200 +} + +func (o *PostDocumentsOK) Error() string { + return fmt.Sprintf("[POST /documents][%d] postDocumentsOK %+v", 200, o.Payload) +} + +func (o *PostDocumentsOK) String() string { + return fmt.Sprintf("[POST /documents][%d] postDocumentsOK %+v", 200, o.Payload) +} + +func (o *PostDocumentsOK) GetPayload() *members_models.DocumentResponse { + return o.Payload +} + +func (o *PostDocumentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.DocumentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostDocumentsUnauthorized creates a PostDocumentsUnauthorized with default headers values +func NewPostDocumentsUnauthorized() *PostDocumentsUnauthorized { + return &PostDocumentsUnauthorized{} +} + +/* +PostDocumentsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostDocumentsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post documents unauthorized response has a 2xx status code +func (o *PostDocumentsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post documents unauthorized response has a 3xx status code +func (o *PostDocumentsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post documents unauthorized response has a 4xx status code +func (o *PostDocumentsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this post documents unauthorized response has a 5xx status code +func (o *PostDocumentsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this post documents unauthorized response a status code equal to that given +func (o *PostDocumentsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the post documents unauthorized response +func (o *PostDocumentsUnauthorized) Code() int { + return 401 +} + +func (o *PostDocumentsUnauthorized) Error() string { + return fmt.Sprintf("[POST /documents][%d] postDocumentsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostDocumentsUnauthorized) String() string { + return fmt.Sprintf("[POST /documents][%d] postDocumentsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostDocumentsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostDocumentsUnauthorized) 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 +} + +// NewPostDocumentsForbidden creates a PostDocumentsForbidden with default headers values +func NewPostDocumentsForbidden() *PostDocumentsForbidden { + return &PostDocumentsForbidden{} +} + +/* +PostDocumentsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PostDocumentsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this post documents forbidden response has a 2xx status code +func (o *PostDocumentsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post documents forbidden response has a 3xx status code +func (o *PostDocumentsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post documents forbidden response has a 4xx status code +func (o *PostDocumentsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this post documents forbidden response has a 5xx status code +func (o *PostDocumentsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this post documents forbidden response a status code equal to that given +func (o *PostDocumentsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the post documents forbidden response +func (o *PostDocumentsForbidden) Code() int { + return 403 +} + +func (o *PostDocumentsForbidden) Error() string { + return fmt.Sprintf("[POST /documents][%d] postDocumentsForbidden %+v", 403, o.Payload) +} + +func (o *PostDocumentsForbidden) String() string { + return fmt.Sprintf("[POST /documents][%d] postDocumentsForbidden %+v", 403, o.Payload) +} + +func (o *PostDocumentsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostDocumentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.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 +} + +// NewPostDocumentsNotFound creates a PostDocumentsNotFound with default headers values +func NewPostDocumentsNotFound() *PostDocumentsNotFound { + return &PostDocumentsNotFound{} +} + +/* +PostDocumentsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PostDocumentsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post documents not found response has a 2xx status code +func (o *PostDocumentsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post documents not found response has a 3xx status code +func (o *PostDocumentsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post documents not found response has a 4xx status code +func (o *PostDocumentsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this post documents not found response has a 5xx status code +func (o *PostDocumentsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this post documents not found response a status code equal to that given +func (o *PostDocumentsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the post documents not found response +func (o *PostDocumentsNotFound) Code() int { + return 404 +} + +func (o *PostDocumentsNotFound) Error() string { + return fmt.Sprintf("[POST /documents][%d] postDocumentsNotFound %+v", 404, o.Payload) +} + +func (o *PostDocumentsNotFound) String() string { + return fmt.Sprintf("[POST /documents][%d] postDocumentsNotFound %+v", 404, o.Payload) +} + +func (o *PostDocumentsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostDocumentsNotFound) 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 +} + +// NewPostDocumentsUnprocessableEntity creates a PostDocumentsUnprocessableEntity with default headers values +func NewPostDocumentsUnprocessableEntity() *PostDocumentsUnprocessableEntity { + return &PostDocumentsUnprocessableEntity{} +} + +/* +PostDocumentsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostDocumentsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post documents unprocessable entity response has a 2xx status code +func (o *PostDocumentsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post documents unprocessable entity response has a 3xx status code +func (o *PostDocumentsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post documents unprocessable entity response has a 4xx status code +func (o *PostDocumentsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this post documents unprocessable entity response has a 5xx status code +func (o *PostDocumentsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this post documents unprocessable entity response a status code equal to that given +func (o *PostDocumentsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the post documents unprocessable entity response +func (o *PostDocumentsUnprocessableEntity) Code() int { + return 422 +} + +func (o *PostDocumentsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /documents][%d] postDocumentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostDocumentsUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /documents][%d] postDocumentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostDocumentsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostDocumentsUnprocessableEntity) 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 +} + +// NewPostDocumentsInternalServerError creates a PostDocumentsInternalServerError with default headers values +func NewPostDocumentsInternalServerError() *PostDocumentsInternalServerError { + return &PostDocumentsInternalServerError{} +} + +/* +PostDocumentsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PostDocumentsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post documents internal server error response has a 2xx status code +func (o *PostDocumentsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post documents internal server error response has a 3xx status code +func (o *PostDocumentsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post documents internal server error response has a 4xx status code +func (o *PostDocumentsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this post documents internal server error response has a 5xx status code +func (o *PostDocumentsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this post documents internal server error response a status code equal to that given +func (o *PostDocumentsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the post documents internal server error response +func (o *PostDocumentsInternalServerError) Code() int { + return 500 +} + +func (o *PostDocumentsInternalServerError) Error() string { + return fmt.Sprintf("[POST /documents][%d] postDocumentsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostDocumentsInternalServerError) String() string { + return fmt.Sprintf("[POST /documents][%d] postDocumentsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostDocumentsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostDocumentsInternalServerError) 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/documents/put_documents_parameters.go b/api/members/members_client/documents/put_documents_parameters.go new file mode 100644 index 0000000..a6b022f --- /dev/null +++ b/api/members/members_client/documents/put_documents_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 documents + +// 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" +) + +// NewPutDocumentsParams creates a new PutDocumentsParams 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 NewPutDocumentsParams() *PutDocumentsParams { + return &PutDocumentsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPutDocumentsParamsWithTimeout creates a new PutDocumentsParams object +// with the ability to set a timeout on a request. +func NewPutDocumentsParamsWithTimeout(timeout time.Duration) *PutDocumentsParams { + return &PutDocumentsParams{ + timeout: timeout, + } +} + +// NewPutDocumentsParamsWithContext creates a new PutDocumentsParams object +// with the ability to set a context for a request. +func NewPutDocumentsParamsWithContext(ctx context.Context) *PutDocumentsParams { + return &PutDocumentsParams{ + Context: ctx, + } +} + +// NewPutDocumentsParamsWithHTTPClient creates a new PutDocumentsParams object +// with the ability to set a custom HTTPClient for a request. +func NewPutDocumentsParamsWithHTTPClient(client *http.Client) *PutDocumentsParams { + return &PutDocumentsParams{ + HTTPClient: client, + } +} + +/* +PutDocumentsParams contains all the parameters to send to the API endpoint + + for the put documents operation. + + Typically these are written to a http.Request. +*/ +type PutDocumentsParams struct { + + /* DocumentRequest. + + An array of Document records + */ + DocumentRequest *members_models.DocumentRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the put documents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PutDocumentsParams) WithDefaults() *PutDocumentsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the put documents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PutDocumentsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the put documents params +func (o *PutDocumentsParams) WithTimeout(timeout time.Duration) *PutDocumentsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put documents params +func (o *PutDocumentsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put documents params +func (o *PutDocumentsParams) WithContext(ctx context.Context) *PutDocumentsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put documents params +func (o *PutDocumentsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put documents params +func (o *PutDocumentsParams) WithHTTPClient(client *http.Client) *PutDocumentsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put documents params +func (o *PutDocumentsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDocumentRequest adds the documentRequest to the put documents params +func (o *PutDocumentsParams) WithDocumentRequest(documentRequest *members_models.DocumentRequest) *PutDocumentsParams { + o.SetDocumentRequest(documentRequest) + return o +} + +// SetDocumentRequest adds the documentRequest to the put documents params +func (o *PutDocumentsParams) SetDocumentRequest(documentRequest *members_models.DocumentRequest) { + o.DocumentRequest = documentRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutDocumentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.DocumentRequest != nil { + if err := r.SetBodyParam(o.DocumentRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/documents/put_documents_responses.go b/api/members/members_client/documents/put_documents_responses.go new file mode 100644 index 0000000..f58c0ea --- /dev/null +++ b/api/members/members_client/documents/put_documents_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 documents + +// 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" +) + +// PutDocumentsReader is a Reader for the PutDocuments structure. +type PutDocumentsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutDocumentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutDocumentsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutDocumentsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutDocumentsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutDocumentsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutDocumentsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutDocumentsInternalServerError() + 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()) + } +} + +// NewPutDocumentsOK creates a PutDocumentsOK with default headers values +func NewPutDocumentsOK() *PutDocumentsOK { + return &PutDocumentsOK{} +} + +/* +PutDocumentsOK describes a response with status code 200, with default header values. + +Document Response Object +*/ +type PutDocumentsOK struct { + Payload *members_models.DocumentResponse +} + +// IsSuccess returns true when this put documents o k response has a 2xx status code +func (o *PutDocumentsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this put documents o k response has a 3xx status code +func (o *PutDocumentsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put documents o k response has a 4xx status code +func (o *PutDocumentsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this put documents o k response has a 5xx status code +func (o *PutDocumentsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this put documents o k response a status code equal to that given +func (o *PutDocumentsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the put documents o k response +func (o *PutDocumentsOK) Code() int { + return 200 +} + +func (o *PutDocumentsOK) Error() string { + return fmt.Sprintf("[PUT /documents][%d] putDocumentsOK %+v", 200, o.Payload) +} + +func (o *PutDocumentsOK) String() string { + return fmt.Sprintf("[PUT /documents][%d] putDocumentsOK %+v", 200, o.Payload) +} + +func (o *PutDocumentsOK) GetPayload() *members_models.DocumentResponse { + return o.Payload +} + +func (o *PutDocumentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.DocumentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutDocumentsUnauthorized creates a PutDocumentsUnauthorized with default headers values +func NewPutDocumentsUnauthorized() *PutDocumentsUnauthorized { + return &PutDocumentsUnauthorized{} +} + +/* +PutDocumentsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutDocumentsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put documents unauthorized response has a 2xx status code +func (o *PutDocumentsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put documents unauthorized response has a 3xx status code +func (o *PutDocumentsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put documents unauthorized response has a 4xx status code +func (o *PutDocumentsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this put documents unauthorized response has a 5xx status code +func (o *PutDocumentsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this put documents unauthorized response a status code equal to that given +func (o *PutDocumentsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the put documents unauthorized response +func (o *PutDocumentsUnauthorized) Code() int { + return 401 +} + +func (o *PutDocumentsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /documents][%d] putDocumentsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutDocumentsUnauthorized) String() string { + return fmt.Sprintf("[PUT /documents][%d] putDocumentsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutDocumentsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutDocumentsUnauthorized) 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 +} + +// NewPutDocumentsForbidden creates a PutDocumentsForbidden with default headers values +func NewPutDocumentsForbidden() *PutDocumentsForbidden { + return &PutDocumentsForbidden{} +} + +/* +PutDocumentsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PutDocumentsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this put documents forbidden response has a 2xx status code +func (o *PutDocumentsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put documents forbidden response has a 3xx status code +func (o *PutDocumentsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put documents forbidden response has a 4xx status code +func (o *PutDocumentsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this put documents forbidden response has a 5xx status code +func (o *PutDocumentsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this put documents forbidden response a status code equal to that given +func (o *PutDocumentsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the put documents forbidden response +func (o *PutDocumentsForbidden) Code() int { + return 403 +} + +func (o *PutDocumentsForbidden) Error() string { + return fmt.Sprintf("[PUT /documents][%d] putDocumentsForbidden %+v", 403, o.Payload) +} + +func (o *PutDocumentsForbidden) String() string { + return fmt.Sprintf("[PUT /documents][%d] putDocumentsForbidden %+v", 403, o.Payload) +} + +func (o *PutDocumentsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutDocumentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.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 +} + +// NewPutDocumentsNotFound creates a PutDocumentsNotFound with default headers values +func NewPutDocumentsNotFound() *PutDocumentsNotFound { + return &PutDocumentsNotFound{} +} + +/* +PutDocumentsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PutDocumentsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put documents not found response has a 2xx status code +func (o *PutDocumentsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put documents not found response has a 3xx status code +func (o *PutDocumentsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put documents not found response has a 4xx status code +func (o *PutDocumentsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this put documents not found response has a 5xx status code +func (o *PutDocumentsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this put documents not found response a status code equal to that given +func (o *PutDocumentsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the put documents not found response +func (o *PutDocumentsNotFound) Code() int { + return 404 +} + +func (o *PutDocumentsNotFound) Error() string { + return fmt.Sprintf("[PUT /documents][%d] putDocumentsNotFound %+v", 404, o.Payload) +} + +func (o *PutDocumentsNotFound) String() string { + return fmt.Sprintf("[PUT /documents][%d] putDocumentsNotFound %+v", 404, o.Payload) +} + +func (o *PutDocumentsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutDocumentsNotFound) 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 +} + +// NewPutDocumentsUnprocessableEntity creates a PutDocumentsUnprocessableEntity with default headers values +func NewPutDocumentsUnprocessableEntity() *PutDocumentsUnprocessableEntity { + return &PutDocumentsUnprocessableEntity{} +} + +/* +PutDocumentsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutDocumentsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put documents unprocessable entity response has a 2xx status code +func (o *PutDocumentsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put documents unprocessable entity response has a 3xx status code +func (o *PutDocumentsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put documents unprocessable entity response has a 4xx status code +func (o *PutDocumentsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this put documents unprocessable entity response has a 5xx status code +func (o *PutDocumentsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this put documents unprocessable entity response a status code equal to that given +func (o *PutDocumentsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the put documents unprocessable entity response +func (o *PutDocumentsUnprocessableEntity) Code() int { + return 422 +} + +func (o *PutDocumentsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /documents][%d] putDocumentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutDocumentsUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /documents][%d] putDocumentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutDocumentsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutDocumentsUnprocessableEntity) 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 +} + +// NewPutDocumentsInternalServerError creates a PutDocumentsInternalServerError with default headers values +func NewPutDocumentsInternalServerError() *PutDocumentsInternalServerError { + return &PutDocumentsInternalServerError{} +} + +/* +PutDocumentsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PutDocumentsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put documents internal server error response has a 2xx status code +func (o *PutDocumentsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put documents internal server error response has a 3xx status code +func (o *PutDocumentsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put documents internal server error response has a 4xx status code +func (o *PutDocumentsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this put documents internal server error response has a 5xx status code +func (o *PutDocumentsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this put documents internal server error response a status code equal to that given +func (o *PutDocumentsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the put documents internal server error response +func (o *PutDocumentsInternalServerError) Code() int { + return 500 +} + +func (o *PutDocumentsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /documents][%d] putDocumentsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutDocumentsInternalServerError) String() string { + return fmt.Sprintf("[PUT /documents][%d] putDocumentsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutDocumentsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutDocumentsInternalServerError) 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/get_favorites_parameters.go b/api/members/members_client/favorites/get_favorites_parameters.go index 30fecf5..676219e 100644 --- a/api/members/members_client/favorites/get_favorites_parameters.go +++ b/api/members/members_client/favorites/get_favorites_parameters.go @@ -66,6 +66,12 @@ GetFavoritesParams contains all the parameters to send to the API endpoint */ type GetFavoritesParams struct { + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + /* ID. Unique Record ID @@ -88,12 +94,6 @@ type GetFavoritesParams struct { */ Offset *int64 - /* UserID. - - Internal User ID - */ - UserID string - timeout time.Duration Context context.Context HTTPClient *http.Client @@ -147,6 +147,17 @@ func (o *GetFavoritesParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithXAuth0UserID adds the xAuth0UserID to the get favorites params +func (o *GetFavoritesParams) WithXAuth0UserID(xAuth0UserID string) *GetFavoritesParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the get favorites params +func (o *GetFavoritesParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + // WithID adds the id to the get favorites params func (o *GetFavoritesParams) WithID(id *string) *GetFavoritesParams { o.SetID(id) @@ -180,17 +191,6 @@ func (o *GetFavoritesParams) SetOffset(offset *int64) { o.Offset = offset } -// WithUserID adds the userID to the get favorites params -func (o *GetFavoritesParams) WithUserID(userID string) *GetFavoritesParams { - o.SetUserID(userID) - return o -} - -// SetUserID adds the userId to the get favorites params -func (o *GetFavoritesParams) SetUserID(userID string) { - o.UserID = userID -} - // WriteToRequest writes these params to a swagger request func (o *GetFavoritesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -199,6 +199,11 @@ func (o *GetFavoritesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } var res []error + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } + if o.ID != nil { // query param id @@ -250,16 +255,6 @@ func (o *GetFavoritesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } - // query param userId - qrUserID := o.UserID - qUserID := qrUserID - if qUserID != "" { - - if err := r.SetQueryParam("userId", qUserID); err != nil { - return err - } - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/api/members/members_client/members_client.go b/api/members/members_client/members_client.go index 6d87fd2..bc65ceb 100644 --- a/api/members/members_client/members_client.go +++ b/api/members/members_client/members_client.go @@ -19,6 +19,7 @@ import ( "code.tnxs.net/vernonkeenan/lib/api/members/members_client/clusters" "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/documents" "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/events" @@ -84,6 +85,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Members { cli.Clusters = clusters.New(transport, formats) cli.Courses = courses.New(transport, formats) cli.Databases = databases.New(transport, formats) + cli.Documents = documents.New(transport, formats) cli.Emails = emails.New(transport, formats) cli.Enrollments = enrollments.New(transport, formats) cli.Events = events.New(transport, formats) @@ -154,6 +156,8 @@ type Members struct { Databases databases.ClientService + Documents documents.ClientService + Emails emails.ClientService Enrollments enrollments.ClientService @@ -197,6 +201,7 @@ func (c *Members) SetTransport(transport runtime.ClientTransport) { c.Clusters.SetTransport(transport) c.Courses.SetTransport(transport) c.Databases.SetTransport(transport) + c.Documents.SetTransport(transport) c.Emails.SetTransport(transport) c.Enrollments.SetTransport(transport) c.Events.SetTransport(transport) diff --git a/api/members/members_client/research_projects/get_research_project_companies_parameters.go b/api/members/members_client/research_projects/get_research_project_companies_parameters.go index c131c11..c5d0b2a 100644 --- a/api/members/members_client/research_projects/get_research_project_companies_parameters.go +++ b/api/members/members_client/research_projects/get_research_project_companies_parameters.go @@ -66,6 +66,12 @@ GetResearchProjectCompaniesParams contains all the parameters to send to the API */ type GetResearchProjectCompaniesParams struct { + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + /* ID. Unique Record ID @@ -141,6 +147,17 @@ func (o *GetResearchProjectCompaniesParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithXAuth0UserID adds the xAuth0UserID to the get research project companies params +func (o *GetResearchProjectCompaniesParams) WithXAuth0UserID(xAuth0UserID string) *GetResearchProjectCompaniesParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the get research project companies params +func (o *GetResearchProjectCompaniesParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + // WithID adds the id to the get research project companies params func (o *GetResearchProjectCompaniesParams) WithID(id *string) *GetResearchProjectCompaniesParams { o.SetID(id) @@ -182,6 +199,11 @@ func (o *GetResearchProjectCompaniesParams) WriteToRequest(r runtime.ClientReque } var res []error + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } + if o.ID != nil { // query param id diff --git a/api/members/members_client/research_projects/get_research_project_documents_parameters.go b/api/members/members_client/research_projects/get_research_project_documents_parameters.go new file mode 100644 index 0000000..91bfcbc --- /dev/null +++ b/api/members/members_client/research_projects/get_research_project_documents_parameters.go @@ -0,0 +1,262 @@ +// 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" + "github.com/go-openapi/swag" +) + +// NewGetResearchProjectDocumentsParams creates a new GetResearchProjectDocumentsParams 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 NewGetResearchProjectDocumentsParams() *GetResearchProjectDocumentsParams { + return &GetResearchProjectDocumentsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetResearchProjectDocumentsParamsWithTimeout creates a new GetResearchProjectDocumentsParams object +// with the ability to set a timeout on a request. +func NewGetResearchProjectDocumentsParamsWithTimeout(timeout time.Duration) *GetResearchProjectDocumentsParams { + return &GetResearchProjectDocumentsParams{ + timeout: timeout, + } +} + +// NewGetResearchProjectDocumentsParamsWithContext creates a new GetResearchProjectDocumentsParams object +// with the ability to set a context for a request. +func NewGetResearchProjectDocumentsParamsWithContext(ctx context.Context) *GetResearchProjectDocumentsParams { + return &GetResearchProjectDocumentsParams{ + Context: ctx, + } +} + +// NewGetResearchProjectDocumentsParamsWithHTTPClient creates a new GetResearchProjectDocumentsParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetResearchProjectDocumentsParamsWithHTTPClient(client *http.Client) *GetResearchProjectDocumentsParams { + return &GetResearchProjectDocumentsParams{ + HTTPClient: client, + } +} + +/* +GetResearchProjectDocumentsParams contains all the parameters to send to the API endpoint + + for the get research project documents operation. + + Typically these are written to a http.Request. +*/ +type GetResearchProjectDocumentsParams struct { + + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + + /* 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 research project documents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetResearchProjectDocumentsParams) WithDefaults() *GetResearchProjectDocumentsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get research project documents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetResearchProjectDocumentsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get research project documents params +func (o *GetResearchProjectDocumentsParams) WithTimeout(timeout time.Duration) *GetResearchProjectDocumentsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get research project documents params +func (o *GetResearchProjectDocumentsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get research project documents params +func (o *GetResearchProjectDocumentsParams) WithContext(ctx context.Context) *GetResearchProjectDocumentsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get research project documents params +func (o *GetResearchProjectDocumentsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get research project documents params +func (o *GetResearchProjectDocumentsParams) WithHTTPClient(client *http.Client) *GetResearchProjectDocumentsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get research project documents params +func (o *GetResearchProjectDocumentsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithXAuth0UserID adds the xAuth0UserID to the get research project documents params +func (o *GetResearchProjectDocumentsParams) WithXAuth0UserID(xAuth0UserID string) *GetResearchProjectDocumentsParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the get research project documents params +func (o *GetResearchProjectDocumentsParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + +// WithID adds the id to the get research project documents params +func (o *GetResearchProjectDocumentsParams) WithID(id *string) *GetResearchProjectDocumentsParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get research project documents params +func (o *GetResearchProjectDocumentsParams) SetID(id *string) { + o.ID = id +} + +// WithLimit adds the limit to the get research project documents params +func (o *GetResearchProjectDocumentsParams) WithLimit(limit *int64) *GetResearchProjectDocumentsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get research project documents params +func (o *GetResearchProjectDocumentsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get research project documents params +func (o *GetResearchProjectDocumentsParams) WithOffset(offset *int64) *GetResearchProjectDocumentsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get research project documents params +func (o *GetResearchProjectDocumentsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetResearchProjectDocumentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } + + 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/research_projects/get_research_project_documents_responses.go b/api/members/members_client/research_projects/get_research_project_documents_responses.go new file mode 100644 index 0000000..df76879 --- /dev/null +++ b/api/members/members_client/research_projects/get_research_project_documents_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 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// GetResearchProjectDocumentsReader is a Reader for the GetResearchProjectDocuments structure. +type GetResearchProjectDocumentsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetResearchProjectDocumentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetResearchProjectDocumentsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetResearchProjectDocumentsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetResearchProjectDocumentsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetResearchProjectDocumentsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetResearchProjectDocumentsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetResearchProjectDocumentsInternalServerError() + 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()) + } +} + +// NewGetResearchProjectDocumentsOK creates a GetResearchProjectDocumentsOK with default headers values +func NewGetResearchProjectDocumentsOK() *GetResearchProjectDocumentsOK { + return &GetResearchProjectDocumentsOK{} +} + +/* +GetResearchProjectDocumentsOK describes a response with status code 200, with default header values. + +ResearchProjectDocument Response Object +*/ +type GetResearchProjectDocumentsOK struct { + Payload *members_models.ResearchProjectDocumentResponse +} + +// IsSuccess returns true when this get research project documents o k response has a 2xx status code +func (o *GetResearchProjectDocumentsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get research project documents o k response has a 3xx status code +func (o *GetResearchProjectDocumentsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get research project documents o k response has a 4xx status code +func (o *GetResearchProjectDocumentsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get research project documents o k response has a 5xx status code +func (o *GetResearchProjectDocumentsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get research project documents o k response a status code equal to that given +func (o *GetResearchProjectDocumentsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get research project documents o k response +func (o *GetResearchProjectDocumentsOK) Code() int { + return 200 +} + +func (o *GetResearchProjectDocumentsOK) Error() string { + return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsOK %+v", 200, o.Payload) +} + +func (o *GetResearchProjectDocumentsOK) String() string { + return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsOK %+v", 200, o.Payload) +} + +func (o *GetResearchProjectDocumentsOK) GetPayload() *members_models.ResearchProjectDocumentResponse { + return o.Payload +} + +func (o *GetResearchProjectDocumentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.ResearchProjectDocumentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetResearchProjectDocumentsUnauthorized creates a GetResearchProjectDocumentsUnauthorized with default headers values +func NewGetResearchProjectDocumentsUnauthorized() *GetResearchProjectDocumentsUnauthorized { + return &GetResearchProjectDocumentsUnauthorized{} +} + +/* +GetResearchProjectDocumentsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetResearchProjectDocumentsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get research project documents unauthorized response has a 2xx status code +func (o *GetResearchProjectDocumentsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get research project documents unauthorized response has a 3xx status code +func (o *GetResearchProjectDocumentsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get research project documents unauthorized response has a 4xx status code +func (o *GetResearchProjectDocumentsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get research project documents unauthorized response has a 5xx status code +func (o *GetResearchProjectDocumentsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get research project documents unauthorized response a status code equal to that given +func (o *GetResearchProjectDocumentsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get research project documents unauthorized response +func (o *GetResearchProjectDocumentsUnauthorized) Code() int { + return 401 +} + +func (o *GetResearchProjectDocumentsUnauthorized) Error() string { + return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetResearchProjectDocumentsUnauthorized) String() string { + return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetResearchProjectDocumentsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetResearchProjectDocumentsUnauthorized) 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 +} + +// NewGetResearchProjectDocumentsForbidden creates a GetResearchProjectDocumentsForbidden with default headers values +func NewGetResearchProjectDocumentsForbidden() *GetResearchProjectDocumentsForbidden { + return &GetResearchProjectDocumentsForbidden{} +} + +/* +GetResearchProjectDocumentsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type GetResearchProjectDocumentsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this get research project documents forbidden response has a 2xx status code +func (o *GetResearchProjectDocumentsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get research project documents forbidden response has a 3xx status code +func (o *GetResearchProjectDocumentsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get research project documents forbidden response has a 4xx status code +func (o *GetResearchProjectDocumentsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get research project documents forbidden response has a 5xx status code +func (o *GetResearchProjectDocumentsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get research project documents forbidden response a status code equal to that given +func (o *GetResearchProjectDocumentsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get research project documents forbidden response +func (o *GetResearchProjectDocumentsForbidden) Code() int { + return 403 +} + +func (o *GetResearchProjectDocumentsForbidden) Error() string { + return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsForbidden %+v", 403, o.Payload) +} + +func (o *GetResearchProjectDocumentsForbidden) String() string { + return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsForbidden %+v", 403, o.Payload) +} + +func (o *GetResearchProjectDocumentsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetResearchProjectDocumentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.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 +} + +// NewGetResearchProjectDocumentsNotFound creates a GetResearchProjectDocumentsNotFound with default headers values +func NewGetResearchProjectDocumentsNotFound() *GetResearchProjectDocumentsNotFound { + return &GetResearchProjectDocumentsNotFound{} +} + +/* +GetResearchProjectDocumentsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type GetResearchProjectDocumentsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get research project documents not found response has a 2xx status code +func (o *GetResearchProjectDocumentsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get research project documents not found response has a 3xx status code +func (o *GetResearchProjectDocumentsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get research project documents not found response has a 4xx status code +func (o *GetResearchProjectDocumentsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get research project documents not found response has a 5xx status code +func (o *GetResearchProjectDocumentsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get research project documents not found response a status code equal to that given +func (o *GetResearchProjectDocumentsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get research project documents not found response +func (o *GetResearchProjectDocumentsNotFound) Code() int { + return 404 +} + +func (o *GetResearchProjectDocumentsNotFound) Error() string { + return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsNotFound %+v", 404, o.Payload) +} + +func (o *GetResearchProjectDocumentsNotFound) String() string { + return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsNotFound %+v", 404, o.Payload) +} + +func (o *GetResearchProjectDocumentsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetResearchProjectDocumentsNotFound) 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 +} + +// NewGetResearchProjectDocumentsUnprocessableEntity creates a GetResearchProjectDocumentsUnprocessableEntity with default headers values +func NewGetResearchProjectDocumentsUnprocessableEntity() *GetResearchProjectDocumentsUnprocessableEntity { + return &GetResearchProjectDocumentsUnprocessableEntity{} +} + +/* +GetResearchProjectDocumentsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetResearchProjectDocumentsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get research project documents unprocessable entity response has a 2xx status code +func (o *GetResearchProjectDocumentsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get research project documents unprocessable entity response has a 3xx status code +func (o *GetResearchProjectDocumentsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get research project documents unprocessable entity response has a 4xx status code +func (o *GetResearchProjectDocumentsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this get research project documents unprocessable entity response has a 5xx status code +func (o *GetResearchProjectDocumentsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this get research project documents unprocessable entity response a status code equal to that given +func (o *GetResearchProjectDocumentsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the get research project documents unprocessable entity response +func (o *GetResearchProjectDocumentsUnprocessableEntity) Code() int { + return 422 +} + +func (o *GetResearchProjectDocumentsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetResearchProjectDocumentsUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetResearchProjectDocumentsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetResearchProjectDocumentsUnprocessableEntity) 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 +} + +// NewGetResearchProjectDocumentsInternalServerError creates a GetResearchProjectDocumentsInternalServerError with default headers values +func NewGetResearchProjectDocumentsInternalServerError() *GetResearchProjectDocumentsInternalServerError { + return &GetResearchProjectDocumentsInternalServerError{} +} + +/* +GetResearchProjectDocumentsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type GetResearchProjectDocumentsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this get research project documents internal server error response has a 2xx status code +func (o *GetResearchProjectDocumentsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get research project documents internal server error response has a 3xx status code +func (o *GetResearchProjectDocumentsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get research project documents internal server error response has a 4xx status code +func (o *GetResearchProjectDocumentsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get research project documents internal server error response has a 5xx status code +func (o *GetResearchProjectDocumentsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get research project documents internal server error response a status code equal to that given +func (o *GetResearchProjectDocumentsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get research project documents internal server error response +func (o *GetResearchProjectDocumentsInternalServerError) Code() int { + return 500 +} + +func (o *GetResearchProjectDocumentsInternalServerError) Error() string { + return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetResearchProjectDocumentsInternalServerError) String() string { + return fmt.Sprintf("[GET /researchprojectdocuments][%d] getResearchProjectDocumentsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetResearchProjectDocumentsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *GetResearchProjectDocumentsInternalServerError) 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/research_projects/get_research_project_products_parameters.go b/api/members/members_client/research_projects/get_research_project_products_parameters.go index 486334d..0e26744 100644 --- a/api/members/members_client/research_projects/get_research_project_products_parameters.go +++ b/api/members/members_client/research_projects/get_research_project_products_parameters.go @@ -66,6 +66,12 @@ GetResearchProjectProductsParams contains all the parameters to send to the API */ type GetResearchProjectProductsParams struct { + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + /* ID. Unique Record ID @@ -141,6 +147,17 @@ func (o *GetResearchProjectProductsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithXAuth0UserID adds the xAuth0UserID to the get research project products params +func (o *GetResearchProjectProductsParams) WithXAuth0UserID(xAuth0UserID string) *GetResearchProjectProductsParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the get research project products params +func (o *GetResearchProjectProductsParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + // WithID adds the id to the get research project products params func (o *GetResearchProjectProductsParams) WithID(id *string) *GetResearchProjectProductsParams { o.SetID(id) @@ -182,6 +199,11 @@ func (o *GetResearchProjectProductsParams) WriteToRequest(r runtime.ClientReques } var res []error + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } + if o.ID != nil { // query param id diff --git a/api/members/members_client/research_projects/get_research_project_topics_parameters.go b/api/members/members_client/research_projects/get_research_project_topics_parameters.go index a5719d7..e049191 100644 --- a/api/members/members_client/research_projects/get_research_project_topics_parameters.go +++ b/api/members/members_client/research_projects/get_research_project_topics_parameters.go @@ -66,6 +66,12 @@ GetResearchProjectTopicsParams contains all the parameters to send to the API en */ type GetResearchProjectTopicsParams struct { + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + /* ID. Unique Record ID @@ -141,6 +147,17 @@ func (o *GetResearchProjectTopicsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithXAuth0UserID adds the xAuth0UserID to the get research project topics params +func (o *GetResearchProjectTopicsParams) WithXAuth0UserID(xAuth0UserID string) *GetResearchProjectTopicsParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the get research project topics params +func (o *GetResearchProjectTopicsParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + // WithID adds the id to the get research project topics params func (o *GetResearchProjectTopicsParams) WithID(id *string) *GetResearchProjectTopicsParams { o.SetID(id) @@ -182,6 +199,11 @@ func (o *GetResearchProjectTopicsParams) WriteToRequest(r runtime.ClientRequest, } var res []error + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } + if o.ID != nil { // query param id diff --git a/api/members/members_client/research_projects/get_research_projects_parameters.go b/api/members/members_client/research_projects/get_research_projects_parameters.go index 2c262ff..5026af4 100644 --- a/api/members/members_client/research_projects/get_research_projects_parameters.go +++ b/api/members/members_client/research_projects/get_research_projects_parameters.go @@ -66,6 +66,12 @@ GetResearchProjectsParams contains all the parameters to send to the API endpoin */ type GetResearchProjectsParams struct { + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + /* ID. Unique Record ID @@ -141,6 +147,17 @@ func (o *GetResearchProjectsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithXAuth0UserID adds the xAuth0UserID to the get research projects params +func (o *GetResearchProjectsParams) WithXAuth0UserID(xAuth0UserID string) *GetResearchProjectsParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the get research projects params +func (o *GetResearchProjectsParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + // WithID adds the id to the get research projects params func (o *GetResearchProjectsParams) WithID(id *string) *GetResearchProjectsParams { o.SetID(id) @@ -182,6 +199,11 @@ func (o *GetResearchProjectsParams) WriteToRequest(r runtime.ClientRequest, reg } var res []error + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } + if o.ID != nil { // query param id diff --git a/api/members/members_client/research_projects/post_research_project_companies_parameters.go b/api/members/members_client/research_projects/post_research_project_companies_parameters.go index 797d15e..93cf49d 100644 --- a/api/members/members_client/research_projects/post_research_project_companies_parameters.go +++ b/api/members/members_client/research_projects/post_research_project_companies_parameters.go @@ -67,6 +67,12 @@ PostResearchProjectCompaniesParams contains all the parameters to send to the AP */ type PostResearchProjectCompaniesParams struct { + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + /* ResearchProjectCompanyRequest. An array of new ResearchProjectCompany records @@ -126,6 +132,17 @@ func (o *PostResearchProjectCompaniesParams) SetHTTPClient(client *http.Client) o.HTTPClient = client } +// WithXAuth0UserID adds the xAuth0UserID to the post research project companies params +func (o *PostResearchProjectCompaniesParams) WithXAuth0UserID(xAuth0UserID string) *PostResearchProjectCompaniesParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the post research project companies params +func (o *PostResearchProjectCompaniesParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + // WithResearchProjectCompanyRequest adds the researchProjectCompanyRequest to the post research project companies params func (o *PostResearchProjectCompaniesParams) WithResearchProjectCompanyRequest(researchProjectCompanyRequest *members_models.ResearchProjectCompanyRequest) *PostResearchProjectCompaniesParams { o.SetResearchProjectCompanyRequest(researchProjectCompanyRequest) @@ -144,6 +161,11 @@ func (o *PostResearchProjectCompaniesParams) WriteToRequest(r runtime.ClientRequ return err } var res []error + + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } if o.ResearchProjectCompanyRequest != nil { if err := r.SetBodyParam(o.ResearchProjectCompanyRequest); err != nil { return err diff --git a/api/members/members_client/research_projects/post_research_project_documents_parameters.go b/api/members/members_client/research_projects/post_research_project_documents_parameters.go new file mode 100644 index 0000000..f089b4e --- /dev/null +++ b/api/members/members_client/research_projects/post_research_project_documents_parameters.go @@ -0,0 +1,179 @@ +// 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" +) + +// NewPostResearchProjectDocumentsParams creates a new PostResearchProjectDocumentsParams 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 NewPostResearchProjectDocumentsParams() *PostResearchProjectDocumentsParams { + return &PostResearchProjectDocumentsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPostResearchProjectDocumentsParamsWithTimeout creates a new PostResearchProjectDocumentsParams object +// with the ability to set a timeout on a request. +func NewPostResearchProjectDocumentsParamsWithTimeout(timeout time.Duration) *PostResearchProjectDocumentsParams { + return &PostResearchProjectDocumentsParams{ + timeout: timeout, + } +} + +// NewPostResearchProjectDocumentsParamsWithContext creates a new PostResearchProjectDocumentsParams object +// with the ability to set a context for a request. +func NewPostResearchProjectDocumentsParamsWithContext(ctx context.Context) *PostResearchProjectDocumentsParams { + return &PostResearchProjectDocumentsParams{ + Context: ctx, + } +} + +// NewPostResearchProjectDocumentsParamsWithHTTPClient creates a new PostResearchProjectDocumentsParams object +// with the ability to set a custom HTTPClient for a request. +func NewPostResearchProjectDocumentsParamsWithHTTPClient(client *http.Client) *PostResearchProjectDocumentsParams { + return &PostResearchProjectDocumentsParams{ + HTTPClient: client, + } +} + +/* +PostResearchProjectDocumentsParams contains all the parameters to send to the API endpoint + + for the post research project documents operation. + + Typically these are written to a http.Request. +*/ +type PostResearchProjectDocumentsParams struct { + + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + + /* ResearchProjectDocumentRequest. + + An array of new ResearchProjectDocument records + */ + ResearchProjectDocumentRequest *members_models.ResearchProjectDocumentRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the post research project documents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostResearchProjectDocumentsParams) WithDefaults() *PostResearchProjectDocumentsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the post research project documents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PostResearchProjectDocumentsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the post research project documents params +func (o *PostResearchProjectDocumentsParams) WithTimeout(timeout time.Duration) *PostResearchProjectDocumentsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post research project documents params +func (o *PostResearchProjectDocumentsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post research project documents params +func (o *PostResearchProjectDocumentsParams) WithContext(ctx context.Context) *PostResearchProjectDocumentsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post research project documents params +func (o *PostResearchProjectDocumentsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post research project documents params +func (o *PostResearchProjectDocumentsParams) WithHTTPClient(client *http.Client) *PostResearchProjectDocumentsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post research project documents params +func (o *PostResearchProjectDocumentsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithXAuth0UserID adds the xAuth0UserID to the post research project documents params +func (o *PostResearchProjectDocumentsParams) WithXAuth0UserID(xAuth0UserID string) *PostResearchProjectDocumentsParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the post research project documents params +func (o *PostResearchProjectDocumentsParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + +// WithResearchProjectDocumentRequest adds the researchProjectDocumentRequest to the post research project documents params +func (o *PostResearchProjectDocumentsParams) WithResearchProjectDocumentRequest(researchProjectDocumentRequest *members_models.ResearchProjectDocumentRequest) *PostResearchProjectDocumentsParams { + o.SetResearchProjectDocumentRequest(researchProjectDocumentRequest) + return o +} + +// SetResearchProjectDocumentRequest adds the researchProjectDocumentRequest to the post research project documents params +func (o *PostResearchProjectDocumentsParams) SetResearchProjectDocumentRequest(researchProjectDocumentRequest *members_models.ResearchProjectDocumentRequest) { + o.ResearchProjectDocumentRequest = researchProjectDocumentRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostResearchProjectDocumentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } + if o.ResearchProjectDocumentRequest != nil { + if err := r.SetBodyParam(o.ResearchProjectDocumentRequest); 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_documents_responses.go b/api/members/members_client/research_projects/post_research_project_documents_responses.go new file mode 100644 index 0000000..f50b922 --- /dev/null +++ b/api/members/members_client/research_projects/post_research_project_documents_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 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// PostResearchProjectDocumentsReader is a Reader for the PostResearchProjectDocuments structure. +type PostResearchProjectDocumentsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostResearchProjectDocumentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostResearchProjectDocumentsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostResearchProjectDocumentsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostResearchProjectDocumentsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostResearchProjectDocumentsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostResearchProjectDocumentsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostResearchProjectDocumentsInternalServerError() + 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()) + } +} + +// NewPostResearchProjectDocumentsOK creates a PostResearchProjectDocumentsOK with default headers values +func NewPostResearchProjectDocumentsOK() *PostResearchProjectDocumentsOK { + return &PostResearchProjectDocumentsOK{} +} + +/* +PostResearchProjectDocumentsOK describes a response with status code 200, with default header values. + +ResearchProjectDocument Response Object +*/ +type PostResearchProjectDocumentsOK struct { + Payload *members_models.ResearchProjectDocumentResponse +} + +// IsSuccess returns true when this post research project documents o k response has a 2xx status code +func (o *PostResearchProjectDocumentsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this post research project documents o k response has a 3xx status code +func (o *PostResearchProjectDocumentsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post research project documents o k response has a 4xx status code +func (o *PostResearchProjectDocumentsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this post research project documents o k response has a 5xx status code +func (o *PostResearchProjectDocumentsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this post research project documents o k response a status code equal to that given +func (o *PostResearchProjectDocumentsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the post research project documents o k response +func (o *PostResearchProjectDocumentsOK) Code() int { + return 200 +} + +func (o *PostResearchProjectDocumentsOK) Error() string { + return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsOK %+v", 200, o.Payload) +} + +func (o *PostResearchProjectDocumentsOK) String() string { + return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsOK %+v", 200, o.Payload) +} + +func (o *PostResearchProjectDocumentsOK) GetPayload() *members_models.ResearchProjectDocumentResponse { + return o.Payload +} + +func (o *PostResearchProjectDocumentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.ResearchProjectDocumentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostResearchProjectDocumentsUnauthorized creates a PostResearchProjectDocumentsUnauthorized with default headers values +func NewPostResearchProjectDocumentsUnauthorized() *PostResearchProjectDocumentsUnauthorized { + return &PostResearchProjectDocumentsUnauthorized{} +} + +/* +PostResearchProjectDocumentsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostResearchProjectDocumentsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post research project documents unauthorized response has a 2xx status code +func (o *PostResearchProjectDocumentsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post research project documents unauthorized response has a 3xx status code +func (o *PostResearchProjectDocumentsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post research project documents unauthorized response has a 4xx status code +func (o *PostResearchProjectDocumentsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this post research project documents unauthorized response has a 5xx status code +func (o *PostResearchProjectDocumentsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this post research project documents unauthorized response a status code equal to that given +func (o *PostResearchProjectDocumentsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the post research project documents unauthorized response +func (o *PostResearchProjectDocumentsUnauthorized) Code() int { + return 401 +} + +func (o *PostResearchProjectDocumentsUnauthorized) Error() string { + return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostResearchProjectDocumentsUnauthorized) String() string { + return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostResearchProjectDocumentsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostResearchProjectDocumentsUnauthorized) 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 +} + +// NewPostResearchProjectDocumentsForbidden creates a PostResearchProjectDocumentsForbidden with default headers values +func NewPostResearchProjectDocumentsForbidden() *PostResearchProjectDocumentsForbidden { + return &PostResearchProjectDocumentsForbidden{} +} + +/* +PostResearchProjectDocumentsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PostResearchProjectDocumentsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this post research project documents forbidden response has a 2xx status code +func (o *PostResearchProjectDocumentsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post research project documents forbidden response has a 3xx status code +func (o *PostResearchProjectDocumentsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post research project documents forbidden response has a 4xx status code +func (o *PostResearchProjectDocumentsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this post research project documents forbidden response has a 5xx status code +func (o *PostResearchProjectDocumentsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this post research project documents forbidden response a status code equal to that given +func (o *PostResearchProjectDocumentsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the post research project documents forbidden response +func (o *PostResearchProjectDocumentsForbidden) Code() int { + return 403 +} + +func (o *PostResearchProjectDocumentsForbidden) Error() string { + return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsForbidden %+v", 403, o.Payload) +} + +func (o *PostResearchProjectDocumentsForbidden) String() string { + return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsForbidden %+v", 403, o.Payload) +} + +func (o *PostResearchProjectDocumentsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostResearchProjectDocumentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.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 +} + +// NewPostResearchProjectDocumentsNotFound creates a PostResearchProjectDocumentsNotFound with default headers values +func NewPostResearchProjectDocumentsNotFound() *PostResearchProjectDocumentsNotFound { + return &PostResearchProjectDocumentsNotFound{} +} + +/* +PostResearchProjectDocumentsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PostResearchProjectDocumentsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post research project documents not found response has a 2xx status code +func (o *PostResearchProjectDocumentsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post research project documents not found response has a 3xx status code +func (o *PostResearchProjectDocumentsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post research project documents not found response has a 4xx status code +func (o *PostResearchProjectDocumentsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this post research project documents not found response has a 5xx status code +func (o *PostResearchProjectDocumentsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this post research project documents not found response a status code equal to that given +func (o *PostResearchProjectDocumentsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the post research project documents not found response +func (o *PostResearchProjectDocumentsNotFound) Code() int { + return 404 +} + +func (o *PostResearchProjectDocumentsNotFound) Error() string { + return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsNotFound %+v", 404, o.Payload) +} + +func (o *PostResearchProjectDocumentsNotFound) String() string { + return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsNotFound %+v", 404, o.Payload) +} + +func (o *PostResearchProjectDocumentsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostResearchProjectDocumentsNotFound) 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 +} + +// NewPostResearchProjectDocumentsUnprocessableEntity creates a PostResearchProjectDocumentsUnprocessableEntity with default headers values +func NewPostResearchProjectDocumentsUnprocessableEntity() *PostResearchProjectDocumentsUnprocessableEntity { + return &PostResearchProjectDocumentsUnprocessableEntity{} +} + +/* +PostResearchProjectDocumentsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostResearchProjectDocumentsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post research project documents unprocessable entity response has a 2xx status code +func (o *PostResearchProjectDocumentsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post research project documents unprocessable entity response has a 3xx status code +func (o *PostResearchProjectDocumentsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post research project documents unprocessable entity response has a 4xx status code +func (o *PostResearchProjectDocumentsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this post research project documents unprocessable entity response has a 5xx status code +func (o *PostResearchProjectDocumentsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this post research project documents unprocessable entity response a status code equal to that given +func (o *PostResearchProjectDocumentsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the post research project documents unprocessable entity response +func (o *PostResearchProjectDocumentsUnprocessableEntity) Code() int { + return 422 +} + +func (o *PostResearchProjectDocumentsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostResearchProjectDocumentsUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostResearchProjectDocumentsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostResearchProjectDocumentsUnprocessableEntity) 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 +} + +// NewPostResearchProjectDocumentsInternalServerError creates a PostResearchProjectDocumentsInternalServerError with default headers values +func NewPostResearchProjectDocumentsInternalServerError() *PostResearchProjectDocumentsInternalServerError { + return &PostResearchProjectDocumentsInternalServerError{} +} + +/* +PostResearchProjectDocumentsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PostResearchProjectDocumentsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this post research project documents internal server error response has a 2xx status code +func (o *PostResearchProjectDocumentsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this post research project documents internal server error response has a 3xx status code +func (o *PostResearchProjectDocumentsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this post research project documents internal server error response has a 4xx status code +func (o *PostResearchProjectDocumentsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this post research project documents internal server error response has a 5xx status code +func (o *PostResearchProjectDocumentsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this post research project documents internal server error response a status code equal to that given +func (o *PostResearchProjectDocumentsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the post research project documents internal server error response +func (o *PostResearchProjectDocumentsInternalServerError) Code() int { + return 500 +} + +func (o *PostResearchProjectDocumentsInternalServerError) Error() string { + return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostResearchProjectDocumentsInternalServerError) String() string { + return fmt.Sprintf("[POST /researchprojectdocuments][%d] postResearchProjectDocumentsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostResearchProjectDocumentsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PostResearchProjectDocumentsInternalServerError) 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/research_projects/post_research_project_products_parameters.go b/api/members/members_client/research_projects/post_research_project_products_parameters.go index 14a645c..385f8f2 100644 --- a/api/members/members_client/research_projects/post_research_project_products_parameters.go +++ b/api/members/members_client/research_projects/post_research_project_products_parameters.go @@ -67,6 +67,12 @@ PostResearchProjectProductsParams contains all the parameters to send to the API */ type PostResearchProjectProductsParams struct { + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + /* ResearchProjectProductRequest. An array of new ResearchProjectProduct records @@ -126,6 +132,17 @@ func (o *PostResearchProjectProductsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithXAuth0UserID adds the xAuth0UserID to the post research project products params +func (o *PostResearchProjectProductsParams) WithXAuth0UserID(xAuth0UserID string) *PostResearchProjectProductsParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the post research project products params +func (o *PostResearchProjectProductsParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + // WithResearchProjectProductRequest adds the researchProjectProductRequest to the post research project products params func (o *PostResearchProjectProductsParams) WithResearchProjectProductRequest(researchProjectProductRequest *members_models.ResearchProjectProductRequest) *PostResearchProjectProductsParams { o.SetResearchProjectProductRequest(researchProjectProductRequest) @@ -144,6 +161,11 @@ func (o *PostResearchProjectProductsParams) WriteToRequest(r runtime.ClientReque return err } var res []error + + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } if o.ResearchProjectProductRequest != nil { if err := r.SetBodyParam(o.ResearchProjectProductRequest); err != nil { return err diff --git a/api/members/members_client/research_projects/post_research_project_topics_parameters.go b/api/members/members_client/research_projects/post_research_project_topics_parameters.go index 6dbbc7b..8ce27d0 100644 --- a/api/members/members_client/research_projects/post_research_project_topics_parameters.go +++ b/api/members/members_client/research_projects/post_research_project_topics_parameters.go @@ -67,6 +67,12 @@ PostResearchProjectTopicsParams contains all the parameters to send to the API e */ type PostResearchProjectTopicsParams struct { + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + /* ResearchProjectTopicRequest. An array of new ResearchProjectTopic records @@ -126,6 +132,17 @@ func (o *PostResearchProjectTopicsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithXAuth0UserID adds the xAuth0UserID to the post research project topics params +func (o *PostResearchProjectTopicsParams) WithXAuth0UserID(xAuth0UserID string) *PostResearchProjectTopicsParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the post research project topics params +func (o *PostResearchProjectTopicsParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + // WithResearchProjectTopicRequest adds the researchProjectTopicRequest to the post research project topics params func (o *PostResearchProjectTopicsParams) WithResearchProjectTopicRequest(researchProjectTopicRequest *members_models.ResearchProjectTopicRequest) *PostResearchProjectTopicsParams { o.SetResearchProjectTopicRequest(researchProjectTopicRequest) @@ -144,6 +161,11 @@ func (o *PostResearchProjectTopicsParams) WriteToRequest(r runtime.ClientRequest return err } var res []error + + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } if o.ResearchProjectTopicRequest != nil { if err := r.SetBodyParam(o.ResearchProjectTopicRequest); err != nil { return err diff --git a/api/members/members_client/research_projects/post_research_projects_parameters.go b/api/members/members_client/research_projects/post_research_projects_parameters.go index 0ec234b..35f0dd2 100644 --- a/api/members/members_client/research_projects/post_research_projects_parameters.go +++ b/api/members/members_client/research_projects/post_research_projects_parameters.go @@ -67,6 +67,12 @@ PostResearchProjectsParams contains all the parameters to send to the API endpoi */ type PostResearchProjectsParams struct { + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + /* ResearchProjectRequest. An array of new ResearchProject records @@ -126,6 +132,17 @@ func (o *PostResearchProjectsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithXAuth0UserID adds the xAuth0UserID to the post research projects params +func (o *PostResearchProjectsParams) WithXAuth0UserID(xAuth0UserID string) *PostResearchProjectsParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the post research projects params +func (o *PostResearchProjectsParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + // WithResearchProjectRequest adds the researchProjectRequest to the post research projects params func (o *PostResearchProjectsParams) WithResearchProjectRequest(researchProjectRequest *members_models.ResearchProjectRequest) *PostResearchProjectsParams { o.SetResearchProjectRequest(researchProjectRequest) @@ -144,6 +161,11 @@ func (o *PostResearchProjectsParams) WriteToRequest(r runtime.ClientRequest, reg return err } var res []error + + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } if o.ResearchProjectRequest != nil { if err := r.SetBodyParam(o.ResearchProjectRequest); err != nil { return err diff --git a/api/members/members_client/research_projects/put_research_project_companies_parameters.go b/api/members/members_client/research_projects/put_research_project_companies_parameters.go index 32be016..503937c 100644 --- a/api/members/members_client/research_projects/put_research_project_companies_parameters.go +++ b/api/members/members_client/research_projects/put_research_project_companies_parameters.go @@ -67,6 +67,12 @@ PutResearchProjectCompaniesParams contains all the parameters to send to the API */ type PutResearchProjectCompaniesParams struct { + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + /* ResearchProjectCompanyRequest. An array of new ResearchProjectCompany records @@ -126,6 +132,17 @@ func (o *PutResearchProjectCompaniesParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithXAuth0UserID adds the xAuth0UserID to the put research project companies params +func (o *PutResearchProjectCompaniesParams) WithXAuth0UserID(xAuth0UserID string) *PutResearchProjectCompaniesParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the put research project companies params +func (o *PutResearchProjectCompaniesParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + // WithResearchProjectCompanyRequest adds the researchProjectCompanyRequest to the put research project companies params func (o *PutResearchProjectCompaniesParams) WithResearchProjectCompanyRequest(researchProjectCompanyRequest *members_models.ResearchProjectCompanyRequest) *PutResearchProjectCompaniesParams { o.SetResearchProjectCompanyRequest(researchProjectCompanyRequest) @@ -144,6 +161,11 @@ func (o *PutResearchProjectCompaniesParams) WriteToRequest(r runtime.ClientReque return err } var res []error + + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } if o.ResearchProjectCompanyRequest != nil { if err := r.SetBodyParam(o.ResearchProjectCompanyRequest); err != nil { return err diff --git a/api/members/members_client/research_projects/put_research_project_documents_parameters.go b/api/members/members_client/research_projects/put_research_project_documents_parameters.go new file mode 100644 index 0000000..6e328a1 --- /dev/null +++ b/api/members/members_client/research_projects/put_research_project_documents_parameters.go @@ -0,0 +1,179 @@ +// 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" +) + +// NewPutResearchProjectDocumentsParams creates a new PutResearchProjectDocumentsParams 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 NewPutResearchProjectDocumentsParams() *PutResearchProjectDocumentsParams { + return &PutResearchProjectDocumentsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPutResearchProjectDocumentsParamsWithTimeout creates a new PutResearchProjectDocumentsParams object +// with the ability to set a timeout on a request. +func NewPutResearchProjectDocumentsParamsWithTimeout(timeout time.Duration) *PutResearchProjectDocumentsParams { + return &PutResearchProjectDocumentsParams{ + timeout: timeout, + } +} + +// NewPutResearchProjectDocumentsParamsWithContext creates a new PutResearchProjectDocumentsParams object +// with the ability to set a context for a request. +func NewPutResearchProjectDocumentsParamsWithContext(ctx context.Context) *PutResearchProjectDocumentsParams { + return &PutResearchProjectDocumentsParams{ + Context: ctx, + } +} + +// NewPutResearchProjectDocumentsParamsWithHTTPClient creates a new PutResearchProjectDocumentsParams object +// with the ability to set a custom HTTPClient for a request. +func NewPutResearchProjectDocumentsParamsWithHTTPClient(client *http.Client) *PutResearchProjectDocumentsParams { + return &PutResearchProjectDocumentsParams{ + HTTPClient: client, + } +} + +/* +PutResearchProjectDocumentsParams contains all the parameters to send to the API endpoint + + for the put research project documents operation. + + Typically these are written to a http.Request. +*/ +type PutResearchProjectDocumentsParams struct { + + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + + /* ResearchProjectDocumentRequest. + + An array of new ResearchProjectDocument records + */ + ResearchProjectDocumentRequest *members_models.ResearchProjectDocumentRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the put research project documents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PutResearchProjectDocumentsParams) WithDefaults() *PutResearchProjectDocumentsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the put research project documents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PutResearchProjectDocumentsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the put research project documents params +func (o *PutResearchProjectDocumentsParams) WithTimeout(timeout time.Duration) *PutResearchProjectDocumentsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put research project documents params +func (o *PutResearchProjectDocumentsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put research project documents params +func (o *PutResearchProjectDocumentsParams) WithContext(ctx context.Context) *PutResearchProjectDocumentsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put research project documents params +func (o *PutResearchProjectDocumentsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put research project documents params +func (o *PutResearchProjectDocumentsParams) WithHTTPClient(client *http.Client) *PutResearchProjectDocumentsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put research project documents params +func (o *PutResearchProjectDocumentsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithXAuth0UserID adds the xAuth0UserID to the put research project documents params +func (o *PutResearchProjectDocumentsParams) WithXAuth0UserID(xAuth0UserID string) *PutResearchProjectDocumentsParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the put research project documents params +func (o *PutResearchProjectDocumentsParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + +// WithResearchProjectDocumentRequest adds the researchProjectDocumentRequest to the put research project documents params +func (o *PutResearchProjectDocumentsParams) WithResearchProjectDocumentRequest(researchProjectDocumentRequest *members_models.ResearchProjectDocumentRequest) *PutResearchProjectDocumentsParams { + o.SetResearchProjectDocumentRequest(researchProjectDocumentRequest) + return o +} + +// SetResearchProjectDocumentRequest adds the researchProjectDocumentRequest to the put research project documents params +func (o *PutResearchProjectDocumentsParams) SetResearchProjectDocumentRequest(researchProjectDocumentRequest *members_models.ResearchProjectDocumentRequest) { + o.ResearchProjectDocumentRequest = researchProjectDocumentRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutResearchProjectDocumentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } + if o.ResearchProjectDocumentRequest != nil { + if err := r.SetBodyParam(o.ResearchProjectDocumentRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/members/members_client/research_projects/put_research_project_documents_responses.go b/api/members/members_client/research_projects/put_research_project_documents_responses.go new file mode 100644 index 0000000..6e2d6a9 --- /dev/null +++ b/api/members/members_client/research_projects/put_research_project_documents_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 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "code.tnxs.net/vernonkeenan/lib/api/members/members_models" +) + +// PutResearchProjectDocumentsReader is a Reader for the PutResearchProjectDocuments structure. +type PutResearchProjectDocumentsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutResearchProjectDocumentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutResearchProjectDocumentsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutResearchProjectDocumentsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutResearchProjectDocumentsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutResearchProjectDocumentsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutResearchProjectDocumentsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutResearchProjectDocumentsInternalServerError() + 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()) + } +} + +// NewPutResearchProjectDocumentsOK creates a PutResearchProjectDocumentsOK with default headers values +func NewPutResearchProjectDocumentsOK() *PutResearchProjectDocumentsOK { + return &PutResearchProjectDocumentsOK{} +} + +/* +PutResearchProjectDocumentsOK describes a response with status code 200, with default header values. + +ResearchProjectDocument Response Object +*/ +type PutResearchProjectDocumentsOK struct { + Payload *members_models.ResearchProjectDocumentResponse +} + +// IsSuccess returns true when this put research project documents o k response has a 2xx status code +func (o *PutResearchProjectDocumentsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this put research project documents o k response has a 3xx status code +func (o *PutResearchProjectDocumentsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put research project documents o k response has a 4xx status code +func (o *PutResearchProjectDocumentsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this put research project documents o k response has a 5xx status code +func (o *PutResearchProjectDocumentsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this put research project documents o k response a status code equal to that given +func (o *PutResearchProjectDocumentsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the put research project documents o k response +func (o *PutResearchProjectDocumentsOK) Code() int { + return 200 +} + +func (o *PutResearchProjectDocumentsOK) Error() string { + return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsOK %+v", 200, o.Payload) +} + +func (o *PutResearchProjectDocumentsOK) String() string { + return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsOK %+v", 200, o.Payload) +} + +func (o *PutResearchProjectDocumentsOK) GetPayload() *members_models.ResearchProjectDocumentResponse { + return o.Payload +} + +func (o *PutResearchProjectDocumentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(members_models.ResearchProjectDocumentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutResearchProjectDocumentsUnauthorized creates a PutResearchProjectDocumentsUnauthorized with default headers values +func NewPutResearchProjectDocumentsUnauthorized() *PutResearchProjectDocumentsUnauthorized { + return &PutResearchProjectDocumentsUnauthorized{} +} + +/* +PutResearchProjectDocumentsUnauthorized describes a response with status code 401, with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutResearchProjectDocumentsUnauthorized struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put research project documents unauthorized response has a 2xx status code +func (o *PutResearchProjectDocumentsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put research project documents unauthorized response has a 3xx status code +func (o *PutResearchProjectDocumentsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put research project documents unauthorized response has a 4xx status code +func (o *PutResearchProjectDocumentsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this put research project documents unauthorized response has a 5xx status code +func (o *PutResearchProjectDocumentsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this put research project documents unauthorized response a status code equal to that given +func (o *PutResearchProjectDocumentsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the put research project documents unauthorized response +func (o *PutResearchProjectDocumentsUnauthorized) Code() int { + return 401 +} + +func (o *PutResearchProjectDocumentsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutResearchProjectDocumentsUnauthorized) String() string { + return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutResearchProjectDocumentsUnauthorized) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutResearchProjectDocumentsUnauthorized) 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 +} + +// NewPutResearchProjectDocumentsForbidden creates a PutResearchProjectDocumentsForbidden with default headers values +func NewPutResearchProjectDocumentsForbidden() *PutResearchProjectDocumentsForbidden { + return &PutResearchProjectDocumentsForbidden{} +} + +/* +PutResearchProjectDocumentsForbidden describes a response with status code 403, with default header values. + +Access forbidden, account lacks access +*/ +type PutResearchProjectDocumentsForbidden struct { + AccessControlAllowOrigin string + + Payload *members_models.Error +} + +// IsSuccess returns true when this put research project documents forbidden response has a 2xx status code +func (o *PutResearchProjectDocumentsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put research project documents forbidden response has a 3xx status code +func (o *PutResearchProjectDocumentsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put research project documents forbidden response has a 4xx status code +func (o *PutResearchProjectDocumentsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this put research project documents forbidden response has a 5xx status code +func (o *PutResearchProjectDocumentsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this put research project documents forbidden response a status code equal to that given +func (o *PutResearchProjectDocumentsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the put research project documents forbidden response +func (o *PutResearchProjectDocumentsForbidden) Code() int { + return 403 +} + +func (o *PutResearchProjectDocumentsForbidden) Error() string { + return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsForbidden %+v", 403, o.Payload) +} + +func (o *PutResearchProjectDocumentsForbidden) String() string { + return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsForbidden %+v", 403, o.Payload) +} + +func (o *PutResearchProjectDocumentsForbidden) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutResearchProjectDocumentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.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 +} + +// NewPutResearchProjectDocumentsNotFound creates a PutResearchProjectDocumentsNotFound with default headers values +func NewPutResearchProjectDocumentsNotFound() *PutResearchProjectDocumentsNotFound { + return &PutResearchProjectDocumentsNotFound{} +} + +/* +PutResearchProjectDocumentsNotFound describes a response with status code 404, with default header values. + +Resource was not found +*/ +type PutResearchProjectDocumentsNotFound struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put research project documents not found response has a 2xx status code +func (o *PutResearchProjectDocumentsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put research project documents not found response has a 3xx status code +func (o *PutResearchProjectDocumentsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put research project documents not found response has a 4xx status code +func (o *PutResearchProjectDocumentsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this put research project documents not found response has a 5xx status code +func (o *PutResearchProjectDocumentsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this put research project documents not found response a status code equal to that given +func (o *PutResearchProjectDocumentsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the put research project documents not found response +func (o *PutResearchProjectDocumentsNotFound) Code() int { + return 404 +} + +func (o *PutResearchProjectDocumentsNotFound) Error() string { + return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsNotFound %+v", 404, o.Payload) +} + +func (o *PutResearchProjectDocumentsNotFound) String() string { + return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsNotFound %+v", 404, o.Payload) +} + +func (o *PutResearchProjectDocumentsNotFound) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutResearchProjectDocumentsNotFound) 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 +} + +// NewPutResearchProjectDocumentsUnprocessableEntity creates a PutResearchProjectDocumentsUnprocessableEntity with default headers values +func NewPutResearchProjectDocumentsUnprocessableEntity() *PutResearchProjectDocumentsUnprocessableEntity { + return &PutResearchProjectDocumentsUnprocessableEntity{} +} + +/* +PutResearchProjectDocumentsUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutResearchProjectDocumentsUnprocessableEntity struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put research project documents unprocessable entity response has a 2xx status code +func (o *PutResearchProjectDocumentsUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put research project documents unprocessable entity response has a 3xx status code +func (o *PutResearchProjectDocumentsUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put research project documents unprocessable entity response has a 4xx status code +func (o *PutResearchProjectDocumentsUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this put research project documents unprocessable entity response has a 5xx status code +func (o *PutResearchProjectDocumentsUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this put research project documents unprocessable entity response a status code equal to that given +func (o *PutResearchProjectDocumentsUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the put research project documents unprocessable entity response +func (o *PutResearchProjectDocumentsUnprocessableEntity) Code() int { + return 422 +} + +func (o *PutResearchProjectDocumentsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutResearchProjectDocumentsUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutResearchProjectDocumentsUnprocessableEntity) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutResearchProjectDocumentsUnprocessableEntity) 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 +} + +// NewPutResearchProjectDocumentsInternalServerError creates a PutResearchProjectDocumentsInternalServerError with default headers values +func NewPutResearchProjectDocumentsInternalServerError() *PutResearchProjectDocumentsInternalServerError { + return &PutResearchProjectDocumentsInternalServerError{} +} + +/* +PutResearchProjectDocumentsInternalServerError describes a response with status code 500, with default header values. + +Server Internal Error +*/ +type PutResearchProjectDocumentsInternalServerError struct { + Payload *members_models.Error +} + +// IsSuccess returns true when this put research project documents internal server error response has a 2xx status code +func (o *PutResearchProjectDocumentsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this put research project documents internal server error response has a 3xx status code +func (o *PutResearchProjectDocumentsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this put research project documents internal server error response has a 4xx status code +func (o *PutResearchProjectDocumentsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this put research project documents internal server error response has a 5xx status code +func (o *PutResearchProjectDocumentsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this put research project documents internal server error response a status code equal to that given +func (o *PutResearchProjectDocumentsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the put research project documents internal server error response +func (o *PutResearchProjectDocumentsInternalServerError) Code() int { + return 500 +} + +func (o *PutResearchProjectDocumentsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutResearchProjectDocumentsInternalServerError) String() string { + return fmt.Sprintf("[PUT /researchprojectdocuments][%d] putResearchProjectDocumentsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutResearchProjectDocumentsInternalServerError) GetPayload() *members_models.Error { + return o.Payload +} + +func (o *PutResearchProjectDocumentsInternalServerError) 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/research_projects/put_research_project_products_parameters.go b/api/members/members_client/research_projects/put_research_project_products_parameters.go index ab6f8b4..5fb09fc 100644 --- a/api/members/members_client/research_projects/put_research_project_products_parameters.go +++ b/api/members/members_client/research_projects/put_research_project_products_parameters.go @@ -67,6 +67,12 @@ PutResearchProjectProductsParams contains all the parameters to send to the API */ type PutResearchProjectProductsParams struct { + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + /* ResearchProjectProductRequest. An array of new ResearchProjectProduct records @@ -126,6 +132,17 @@ func (o *PutResearchProjectProductsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithXAuth0UserID adds the xAuth0UserID to the put research project products params +func (o *PutResearchProjectProductsParams) WithXAuth0UserID(xAuth0UserID string) *PutResearchProjectProductsParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the put research project products params +func (o *PutResearchProjectProductsParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + // WithResearchProjectProductRequest adds the researchProjectProductRequest to the put research project products params func (o *PutResearchProjectProductsParams) WithResearchProjectProductRequest(researchProjectProductRequest *members_models.ResearchProjectProductRequest) *PutResearchProjectProductsParams { o.SetResearchProjectProductRequest(researchProjectProductRequest) @@ -144,6 +161,11 @@ func (o *PutResearchProjectProductsParams) WriteToRequest(r runtime.ClientReques return err } var res []error + + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } if o.ResearchProjectProductRequest != nil { if err := r.SetBodyParam(o.ResearchProjectProductRequest); err != nil { return err diff --git a/api/members/members_client/research_projects/put_research_project_topics_parameters.go b/api/members/members_client/research_projects/put_research_project_topics_parameters.go index d006c57..9784fb8 100644 --- a/api/members/members_client/research_projects/put_research_project_topics_parameters.go +++ b/api/members/members_client/research_projects/put_research_project_topics_parameters.go @@ -67,6 +67,12 @@ PutResearchProjectTopicsParams contains all the parameters to send to the API en */ type PutResearchProjectTopicsParams struct { + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + /* ResearchProjectTopicRequest. An array of new ResearchProjectTopic records @@ -126,6 +132,17 @@ func (o *PutResearchProjectTopicsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithXAuth0UserID adds the xAuth0UserID to the put research project topics params +func (o *PutResearchProjectTopicsParams) WithXAuth0UserID(xAuth0UserID string) *PutResearchProjectTopicsParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the put research project topics params +func (o *PutResearchProjectTopicsParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + // WithResearchProjectTopicRequest adds the researchProjectTopicRequest to the put research project topics params func (o *PutResearchProjectTopicsParams) WithResearchProjectTopicRequest(researchProjectTopicRequest *members_models.ResearchProjectTopicRequest) *PutResearchProjectTopicsParams { o.SetResearchProjectTopicRequest(researchProjectTopicRequest) @@ -144,6 +161,11 @@ func (o *PutResearchProjectTopicsParams) WriteToRequest(r runtime.ClientRequest, return err } var res []error + + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } if o.ResearchProjectTopicRequest != nil { if err := r.SetBodyParam(o.ResearchProjectTopicRequest); err != nil { return err diff --git a/api/members/members_client/research_projects/put_research_projects_parameters.go b/api/members/members_client/research_projects/put_research_projects_parameters.go index dbd9552..2c06ada 100644 --- a/api/members/members_client/research_projects/put_research_projects_parameters.go +++ b/api/members/members_client/research_projects/put_research_projects_parameters.go @@ -67,6 +67,12 @@ PutResearchProjectsParams contains all the parameters to send to the API endpoin */ type PutResearchProjectsParams struct { + /* XAuth0UserID. + + Auth0 User Id + */ + XAuth0UserID string + /* ResearchProjectRequest. An array of new ResearchProject records @@ -126,6 +132,17 @@ func (o *PutResearchProjectsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithXAuth0UserID adds the xAuth0UserID to the put research projects params +func (o *PutResearchProjectsParams) WithXAuth0UserID(xAuth0UserID string) *PutResearchProjectsParams { + o.SetXAuth0UserID(xAuth0UserID) + return o +} + +// SetXAuth0UserID adds the xAuth0UserId to the put research projects params +func (o *PutResearchProjectsParams) SetXAuth0UserID(xAuth0UserID string) { + o.XAuth0UserID = xAuth0UserID +} + // WithResearchProjectRequest adds the researchProjectRequest to the put research projects params func (o *PutResearchProjectsParams) WithResearchProjectRequest(researchProjectRequest *members_models.ResearchProjectRequest) *PutResearchProjectsParams { o.SetResearchProjectRequest(researchProjectRequest) @@ -144,6 +161,11 @@ func (o *PutResearchProjectsParams) WriteToRequest(r runtime.ClientRequest, reg return err } var res []error + + // header param X-Auth0-UserId + if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil { + return err + } if o.ResearchProjectRequest != nil { if err := r.SetBodyParam(o.ResearchProjectRequest); err != nil { return err 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 c65251b..b34699f 100644 --- a/api/members/members_client/research_projects/research_projects_client.go +++ b/api/members/members_client/research_projects/research_projects_client.go @@ -36,6 +36,8 @@ type ClientOption func(*runtime.ClientOperation) type ClientService interface { GetResearchProjectCompanies(params *GetResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectCompaniesOK, error) + GetResearchProjectDocuments(params *GetResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectDocumentsOK, error) + GetResearchProjectProducts(params *GetResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectProductsOK, error) GetResearchProjectTopics(params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error) @@ -44,6 +46,8 @@ type ClientService interface { PostResearchProjectCompanies(params *PostResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectCompaniesOK, error) + PostResearchProjectDocuments(params *PostResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectDocumentsOK, error) + PostResearchProjectProducts(params *PostResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectProductsOK, error) PostResearchProjectTopics(params *PostResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectTopicsOK, error) @@ -52,6 +56,8 @@ type ClientService interface { PutResearchProjectCompanies(params *PutResearchProjectCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectCompaniesOK, error) + PutResearchProjectDocuments(params *PutResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectDocumentsOK, error) + PutResearchProjectProducts(params *PutResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectProductsOK, error) PutResearchProjectTopics(params *PutResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectTopicsOK, error) @@ -102,6 +108,47 @@ func (a *Client) GetResearchProjectCompanies(params *GetResearchProjectCompanies panic(msg) } +/* +GetResearchProjectDocuments gets a list of research project documents + +Return a list of ResearchProjectDocument records from the datastore +*/ +func (a *Client) GetResearchProjectDocuments(params *GetResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectDocumentsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetResearchProjectDocumentsParams() + } + op := &runtime.ClientOperation{ + ID: "getResearchProjectDocuments", + Method: "GET", + PathPattern: "/researchprojectdocuments", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetResearchProjectDocumentsReader{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.(*GetResearchProjectDocumentsOK) + 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 getResearchProjectDocuments: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* GetResearchProjectProducts gets a list of research project products @@ -266,6 +313,47 @@ func (a *Client) PostResearchProjectCompanies(params *PostResearchProjectCompani panic(msg) } +/* +PostResearchProjectDocuments creates new research project documents + +Create ResearchProjectDocuments in the system +*/ +func (a *Client) PostResearchProjectDocuments(params *PostResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectDocumentsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostResearchProjectDocumentsParams() + } + op := &runtime.ClientOperation{ + ID: "postResearchProjectDocuments", + Method: "POST", + PathPattern: "/researchprojectdocuments", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostResearchProjectDocumentsReader{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.(*PostResearchProjectDocumentsOK) + 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 postResearchProjectDocuments: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* PostResearchProjectProducts creates new research project products @@ -430,6 +518,47 @@ func (a *Client) PutResearchProjectCompanies(params *PutResearchProjectCompanies panic(msg) } +/* +PutResearchProjectDocuments updates research project documents + +Update ResearchProjectDocument in the system +*/ +func (a *Client) PutResearchProjectDocuments(params *PutResearchProjectDocumentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectDocumentsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutResearchProjectDocumentsParams() + } + op := &runtime.ClientOperation{ + ID: "putResearchProjectDocuments", + Method: "PUT", + PathPattern: "/researchprojectdocuments", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutResearchProjectDocumentsReader{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.(*PutResearchProjectDocumentsOK) + 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 putResearchProjectDocuments: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* PutResearchProjectProducts updates research project products diff --git a/api/members/members_models/document.go b/api/members/members_models/document.go new file mode 100644 index 0000000..4504dea --- /dev/null +++ b/api/members/members_models/document.go @@ -0,0 +1,117 @@ +// 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" +) + +// Document A document ingested into SalesforceDevops.net +// +// swagger:model document +type Document struct { + + // Who can access this document? + AccessControlList *string `json:"AccessControlList,omitempty"` + + // The author of the document + Author *string `json:"Author,omitempty"` + + // Created By + CreatedByID *string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate *string `json:"CreatedDate,omitempty"` + + // The date of the document + DocumentDate *string `json:"DocumentDate,omitempty"` + + // The ID of the folder in which this document is stored + FolderID *string `json:"FolderID,omitempty"` + + // Record Id + ID string `json:"ID,omitempty"` + + // Alt text for the image + ImageAltText *string `json:"ImageAltText,omitempty"` + + // Cover image for this document + ImageURL *string `json:"ImageURL,omitempty"` + + // The language of the document + Language *string `json:"Language,omitempty"` + + // Last Modified By + LastModifiedByID *string `json:"LastModifiedByID,omitempty"` + + // Last Modifed Date + LastModifiedDate *string `json:"LastModifiedDate,omitempty"` + + // Logo for this document + Logo *string `json:"Logo,omitempty"` + + // The ID of the object who owns this document + ObjectID *string `json:"ObjectID,omitempty"` + + // The type of object who owns this document + ObjectType *string `json:"ObjectType,omitempty"` + + // Where did the document come from? + Source *string `json:"Source,omitempty"` + + // Ingestion status of this document + Status *string `json:"Status,omitempty"` + + // tenant ID + TenantID *string `json:"TenantID,omitempty"` + + // Document Title + Title *string `json:"Title,omitempty"` + + // Source URL for document ingestion + URL *string `json:"URL,omitempty"` + + // The ID of the user who owns this document + UserID *string `json:"UserID,omitempty"` + + // Version of the document + Version *string `json:"Version,omitempty"` +} + +// Validate validates this document +func (m *Document) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this document based on context it is used +func (m *Document) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Document) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Document) UnmarshalBinary(b []byte) error { + var res Document + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/members/members_models/document_request.go b/api/members/members_models/document_request.go new file mode 100644 index 0000000..275e3c8 --- /dev/null +++ b/api/members/members_models/document_request.go @@ -0,0 +1,120 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package members_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DocumentRequest An array of Document objects +// +// swagger:model DocumentRequest +type DocumentRequest struct { + + // data + Data []*Document `json:"Data"` +} + +// Validate validates this document request +func (m *DocumentRequest) 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 *DocumentRequest) 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 document request based on the context it is used +func (m *DocumentRequest) 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 *DocumentRequest) 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 *DocumentRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DocumentRequest) UnmarshalBinary(b []byte) error { + var res DocumentRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/members/members_models/document_response.go b/api/members/members_models/document_response.go new file mode 100644 index 0000000..811b16e --- /dev/null +++ b/api/members/members_models/document_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" +) + +// DocumentResponse An array of Document objects +// +// swagger:model DocumentResponse +type DocumentResponse struct { + + // data + Data []*Document `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this document response +func (m *DocumentResponse) 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 *DocumentResponse) 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 *DocumentResponse) 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 document response based on the context it is used +func (m *DocumentResponse) 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 *DocumentResponse) 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 *DocumentResponse) 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 *DocumentResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DocumentResponse) UnmarshalBinary(b []byte) error { + var res DocumentResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/members/members_models/research_project.go b/api/members/members_models/research_project.go index a836121..422705c 100644 --- a/api/members/members_models/research_project.go +++ b/api/members/members_models/research_project.go @@ -11,7 +11,9 @@ package members_models import ( "context" + "strconv" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -24,6 +26,9 @@ type ResearchProject struct { // account ID AccountID *string `json:"AccountID,omitempty"` + // companies + Companies []*ResearchProjectCompany `json:"Companies"` + // created by ID CreatedByID *string `json:"CreatedByID,omitempty"` @@ -33,6 +38,9 @@ type ResearchProject struct { // description Description *string `json:"Description,omitempty"` + // documents + Documents []*ResearchProjectDocument `json:"Documents"` + // ID ID string `json:"ID,omitempty"` @@ -54,23 +62,255 @@ type ResearchProject struct { // name Name *string `json:"Name,omitempty"` + // products + Products []*ResearchProjectProduct `json:"Products"` + // slug Slug *string `json:"Slug,omitempty"` // tenant ID TenantID *string `json:"TenantID,omitempty"` + // topics + Topics []*ResearchProjectTopic `json:"Topics"` + // user ID UserID *string `json:"UserID,omitempty"` } // Validate validates this research project func (m *ResearchProject) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCompanies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDocuments(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProducts(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTopics(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } return nil } -// ContextValidate validates this research project based on context it is used +func (m *ResearchProject) validateCompanies(formats strfmt.Registry) error { + if swag.IsZero(m.Companies) { // not required + return nil + } + + for i := 0; i < len(m.Companies); i++ { + if swag.IsZero(m.Companies[i]) { // not required + continue + } + + if m.Companies[i] != nil { + if err := m.Companies[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Companies" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Companies" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ResearchProject) validateDocuments(formats strfmt.Registry) error { + if swag.IsZero(m.Documents) { // not required + return nil + } + + for i := 0; i < len(m.Documents); i++ { + if swag.IsZero(m.Documents[i]) { // not required + continue + } + + if m.Documents[i] != nil { + if err := m.Documents[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Documents" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Documents" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ResearchProject) validateProducts(formats strfmt.Registry) error { + if swag.IsZero(m.Products) { // not required + return nil + } + + for i := 0; i < len(m.Products); i++ { + if swag.IsZero(m.Products[i]) { // not required + continue + } + + if m.Products[i] != nil { + if err := m.Products[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Products" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Products" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ResearchProject) validateTopics(formats strfmt.Registry) error { + if swag.IsZero(m.Topics) { // not required + return nil + } + + for i := 0; i < len(m.Topics); i++ { + if swag.IsZero(m.Topics[i]) { // not required + continue + } + + if m.Topics[i] != nil { + if err := m.Topics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Topics" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Topics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this research project based on the context it is used func (m *ResearchProject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCompanies(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDocuments(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateProducts(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTopics(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ResearchProject) contextValidateCompanies(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Companies); i++ { + + if m.Companies[i] != nil { + if err := m.Companies[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Companies" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Companies" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ResearchProject) contextValidateDocuments(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Documents); i++ { + + if m.Documents[i] != nil { + if err := m.Documents[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Documents" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Documents" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ResearchProject) contextValidateProducts(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Products); i++ { + + if m.Products[i] != nil { + if err := m.Products[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Products" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Products" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ResearchProject) contextValidateTopics(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Topics); i++ { + + if m.Topics[i] != nil { + if err := m.Topics[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Topics" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Topics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } diff --git a/api/members/members_models/research_project_document.go b/api/members/members_models/research_project_document.go new file mode 100644 index 0000000..bd27fbe --- /dev/null +++ b/api/members/members_models/research_project_document.go @@ -0,0 +1,81 @@ +// 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" +) + +// ResearchProjectDocument research project document +// +// swagger:model researchProjectDocument +type ResearchProjectDocument struct { + + // created by ID + CreatedByID *string `json:"CreatedByID,omitempty"` + + // created date + CreatedDate *string `json:"CreatedDate,omitempty"` + + // document ID + DocumentID *string `json:"DocumentID,omitempty"` + + // ID + ID string `json:"ID,omitempty"` + + // last modified by ID + LastModifiedByID *string `json:"LastModifiedByID,omitempty"` + + // last modified date + LastModifiedDate *string `json:"LastModifiedDate,omitempty"` + + // research project ID + ResearchProjectID *string `json:"ResearchProjectID,omitempty"` + + // tenant ID + TenantID *string `json:"TenantID,omitempty"` + + // title + Title *string `json:"Title,omitempty"` + + // user ID + UserID *string `json:"UserID,omitempty"` +} + +// Validate validates this research project document +func (m *ResearchProjectDocument) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this research project document based on context it is used +func (m *ResearchProjectDocument) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ResearchProjectDocument) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResearchProjectDocument) UnmarshalBinary(b []byte) error { + var res ResearchProjectDocument + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/members/members_models/research_project_document_request.go b/api/members/members_models/research_project_document_request.go new file mode 100644 index 0000000..1402360 --- /dev/null +++ b/api/members/members_models/research_project_document_request.go @@ -0,0 +1,120 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// (c) 2012-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package members_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ResearchProjectDocumentRequest An array of ResearchProjectDocumentRequest objects +// +// swagger:model ResearchProjectDocumentRequest +type ResearchProjectDocumentRequest struct { + + // data + Data []*ResearchProjectDocument `json:"Data"` +} + +// Validate validates this research project document request +func (m *ResearchProjectDocumentRequest) 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 *ResearchProjectDocumentRequest) 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 research project document request based on the context it is used +func (m *ResearchProjectDocumentRequest) 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 *ResearchProjectDocumentRequest) 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 *ResearchProjectDocumentRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResearchProjectDocumentRequest) UnmarshalBinary(b []byte) error { + var res ResearchProjectDocumentRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/members/members_models/research_project_document_response.go b/api/members/members_models/research_project_document_response.go new file mode 100644 index 0000000..0ecf086 --- /dev/null +++ b/api/members/members_models/research_project_document_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" +) + +// ResearchProjectDocumentResponse An array of ResearchProjectDocumentResponse objects +// +// swagger:model ResearchProjectDocumentResponse +type ResearchProjectDocumentResponse struct { + + // data + Data []*ResearchProjectDocument `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this research project document response +func (m *ResearchProjectDocumentResponse) 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 *ResearchProjectDocumentResponse) 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 *ResearchProjectDocumentResponse) 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 document response based on the context it is used +func (m *ResearchProjectDocumentResponse) 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 *ResearchProjectDocumentResponse) 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 *ResearchProjectDocumentResponse) 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 *ResearchProjectDocumentResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResearchProjectDocumentResponse) UnmarshalBinary(b []byte) error { + var res ResearchProjectDocumentResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/members/members_models/research_project_product.go b/api/members/members_models/research_project_product.go index 000d209..bdeca52 100644 --- a/api/members/members_models/research_project_product.go +++ b/api/members/members_models/research_project_product.go @@ -44,6 +44,12 @@ type ResearchProjectProduct struct { // tenant ID TenantID *string `json:"TenantID,omitempty"` + + // title + Title *string `json:"Title,omitempty"` + + // user ID + UserID *string `json:"UserID,omitempty"` } // Validate validates this research project product diff --git a/api/members/members_models/research_project_topic.go b/api/members/members_models/research_project_topic.go index b7bcf50..7ec44a8 100644 --- a/api/members/members_models/research_project_topic.go +++ b/api/members/members_models/research_project_topic.go @@ -44,6 +44,9 @@ type ResearchProjectTopic struct { // topic ID TopicID *string `json:"TopicID,omitempty"` + + // user ID + UserID *string `json:"UserID,omitempty"` } // Validate validates this research project topic diff --git a/api/sfgate/sfgate_models/research_project.go b/api/sfgate/sfgate_models/research_project.go index 5003519..f8d1a63 100644 --- a/api/sfgate/sfgate_models/research_project.go +++ b/api/sfgate/sfgate_models/research_project.go @@ -11,7 +11,9 @@ package sfgate_models import ( "context" + "strconv" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -24,6 +26,9 @@ type ResearchProject struct { // account ID AccountID *string `json:"AccountID,omitempty"` + // companies + Companies []*ResearchProjectCompany `json:"Companies"` + // created by ID CreatedByID *string `json:"CreatedByID,omitempty"` @@ -33,6 +38,9 @@ type ResearchProject struct { // description Description *string `json:"Description,omitempty"` + // documents + Documents []*ResearchProjectDocument `json:"Documents"` + // ID ID string `json:"ID,omitempty"` @@ -54,23 +62,255 @@ type ResearchProject struct { // name Name *string `json:"Name,omitempty"` + // products + Products []*ResearchProjectProduct `json:"Products"` + // slug Slug *string `json:"Slug,omitempty"` // tenant ID TenantID *string `json:"TenantID,omitempty"` + // topics + Topics []*ResearchProjectTopic `json:"Topics"` + // user ID UserID *string `json:"UserID,omitempty"` } // Validate validates this research project func (m *ResearchProject) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCompanies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDocuments(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProducts(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTopics(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } return nil } -// ContextValidate validates this research project based on context it is used +func (m *ResearchProject) validateCompanies(formats strfmt.Registry) error { + if swag.IsZero(m.Companies) { // not required + return nil + } + + for i := 0; i < len(m.Companies); i++ { + if swag.IsZero(m.Companies[i]) { // not required + continue + } + + if m.Companies[i] != nil { + if err := m.Companies[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Companies" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Companies" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ResearchProject) validateDocuments(formats strfmt.Registry) error { + if swag.IsZero(m.Documents) { // not required + return nil + } + + for i := 0; i < len(m.Documents); i++ { + if swag.IsZero(m.Documents[i]) { // not required + continue + } + + if m.Documents[i] != nil { + if err := m.Documents[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Documents" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Documents" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ResearchProject) validateProducts(formats strfmt.Registry) error { + if swag.IsZero(m.Products) { // not required + return nil + } + + for i := 0; i < len(m.Products); i++ { + if swag.IsZero(m.Products[i]) { // not required + continue + } + + if m.Products[i] != nil { + if err := m.Products[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Products" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Products" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ResearchProject) validateTopics(formats strfmt.Registry) error { + if swag.IsZero(m.Topics) { // not required + return nil + } + + for i := 0; i < len(m.Topics); i++ { + if swag.IsZero(m.Topics[i]) { // not required + continue + } + + if m.Topics[i] != nil { + if err := m.Topics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Topics" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Topics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this research project based on the context it is used func (m *ResearchProject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCompanies(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDocuments(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateProducts(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTopics(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ResearchProject) contextValidateCompanies(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Companies); i++ { + + if m.Companies[i] != nil { + if err := m.Companies[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Companies" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Companies" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ResearchProject) contextValidateDocuments(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Documents); i++ { + + if m.Documents[i] != nil { + if err := m.Documents[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Documents" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Documents" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ResearchProject) contextValidateProducts(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Products); i++ { + + if m.Products[i] != nil { + if err := m.Products[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Products" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Products" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ResearchProject) contextValidateTopics(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Topics); i++ { + + if m.Topics[i] != nil { + if err := m.Topics[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Topics" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("Topics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } diff --git a/api/sfgate/sfgate_models/research_project_document.go b/api/sfgate/sfgate_models/research_project_document.go new file mode 100644 index 0000000..60d0d22 --- /dev/null +++ b/api/sfgate/sfgate_models/research_project_document.go @@ -0,0 +1,81 @@ +// 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" +) + +// ResearchProjectDocument research project document +// +// swagger:model researchProjectDocument +type ResearchProjectDocument struct { + + // created by ID + CreatedByID *string `json:"CreatedByID,omitempty"` + + // created date + CreatedDate *string `json:"CreatedDate,omitempty"` + + // document ID + DocumentID *string `json:"DocumentID,omitempty"` + + // ID + ID string `json:"ID,omitempty"` + + // last modified by ID + LastModifiedByID *string `json:"LastModifiedByID,omitempty"` + + // last modified date + LastModifiedDate *string `json:"LastModifiedDate,omitempty"` + + // research project ID + ResearchProjectID *string `json:"ResearchProjectID,omitempty"` + + // tenant ID + TenantID *string `json:"TenantID,omitempty"` + + // title + Title *string `json:"Title,omitempty"` + + // user ID + UserID *string `json:"UserID,omitempty"` +} + +// Validate validates this research project document +func (m *ResearchProjectDocument) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this research project document based on context it is used +func (m *ResearchProjectDocument) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ResearchProjectDocument) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResearchProjectDocument) UnmarshalBinary(b []byte) error { + var res ResearchProjectDocument + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/sfgate/sfgate_models/research_project_product.go b/api/sfgate/sfgate_models/research_project_product.go index 6c679dc..6addbb3 100644 --- a/api/sfgate/sfgate_models/research_project_product.go +++ b/api/sfgate/sfgate_models/research_project_product.go @@ -44,6 +44,12 @@ type ResearchProjectProduct struct { // tenant ID TenantID *string `json:"TenantID,omitempty"` + + // title + Title *string `json:"Title,omitempty"` + + // user ID + UserID *string `json:"UserID,omitempty"` } // Validate validates this research project product diff --git a/api/sfgate/sfgate_models/research_project_topic.go b/api/sfgate/sfgate_models/research_project_topic.go index 36e7660..1b642a0 100644 --- a/api/sfgate/sfgate_models/research_project_topic.go +++ b/api/sfgate/sfgate_models/research_project_topic.go @@ -44,6 +44,9 @@ type ResearchProjectTopic struct { // topic ID TopicID *string `json:"TopicID,omitempty"` + + // user ID + UserID *string `json:"UserID,omitempty"` } // Validate validates this research project topic diff --git a/swagger/defs/document.yaml b/swagger/defs/document.yaml new file mode 100644 index 0000000..a2c71d3 --- /dev/null +++ b/swagger/defs/document.yaml @@ -0,0 +1,90 @@ +Document: + description: A document ingested into SalesforceDevops.net + properties: + ID: + description: Record Id + type: string + AccessControlList: + description: Who can access this document? + type: string + x-nullable: true + Author: + description: The author of the document + type: string + x-nullable: true + CreatedByID: + description: Created By + type: string + x-nullable: true + CreatedDate: + description: Created Date + type: string + x-nullable: true + DocumentDate: + description: The date of the document + type: string + x-nullable: true + FolderID: + description: The ID of the folder in which this document is stored + type: string + x-nullable: true + ImageAltText: + description: Alt text for the image + type: string + x-nullable: true + ImageURL: + description: Cover image for this document + type: string + x-nullable: true + LastModifiedByID: + description: Last Modified By + type: string + x-nullable: true + LastModifiedDate: + description: Last Modifed Date + type: string + x-nullable: true + Language: + description: The language of the document + type: string + x-nullable: true + Logo: + description: Logo for this document + type: string + x-nullable: true + ObjectID: + description: The ID of the object who owns this document + type: string + x-nullable: true + ObjectType: + description: The type of object who owns this document + type: string + x-nullable: true + Source: + description: Where did the document come from? + type: string + x-nullable: true + Status: + description: Ingestion status of this document + type: string + x-nullable: true + TenantID: + type: string + x-nullable: true + Title: + description: Document Title + type: string + x-nullable: true + URL: + description: Source URL for document ingestion + type: string + x-nullable: true + UserID: + description: The ID of the user who owns this document + type: string + x-nullable: true + Version: + description: Version of the document + type: string + x-nullable: true + type: object diff --git a/swagger/defs/research-project-document.yaml b/swagger/defs/research-project-document.yaml new file mode 100644 index 0000000..ca17240 --- /dev/null +++ b/swagger/defs/research-project-document.yaml @@ -0,0 +1,32 @@ +ResearchProjectDocument: + properties: + ID: + type: string + CreatedByID: + type: string + x-nullable: true + CreatedDate: + type: string + x-nullable: true + DocumentID: + type: string + x-nullable: true + LastModifiedByID: + type: string + x-nullable: true + LastModifiedDate: + type: string + x-nullable: true + ResearchProjectID: + type: string + x-nullable: true + TenantID: + type: string + x-nullable: true + Title: + type: string + x-nullable: true + UserID: + type: string + x-nullable: true + type: object diff --git a/swagger/defs/research-project-product.yaml b/swagger/defs/research-project-product.yaml index 8cec94f..b151661 100644 --- a/swagger/defs/research-project-product.yaml +++ b/swagger/defs/research-project-product.yaml @@ -23,4 +23,10 @@ ResearchProjectProduct: TenantID: type: string x-nullable: true + Title: + type: string + x-nullable: true + UserID: + type: string + x-nullable: true type: object diff --git a/swagger/defs/research-project-topic.yaml b/swagger/defs/research-project-topic.yaml index 0e8c637..72fd4dd 100644 --- a/swagger/defs/research-project-topic.yaml +++ b/swagger/defs/research-project-topic.yaml @@ -23,4 +23,7 @@ ResearchProjectTopic: TopicID: type: string x-nullable: true + UserID: + type: string + x-nullable: true type: object diff --git a/swagger/defs/research-project.yaml b/swagger/defs/research-project.yaml index 6a015f4..ab441ec 100644 --- a/swagger/defs/research-project.yaml +++ b/swagger/defs/research-project.yaml @@ -41,4 +41,24 @@ ResearchProject: UserID: type: string x-nullable: true + Companies: + items: + $ref: "./research-project-company.yaml#/ResearchProjectCompany" + type: array + x-nullable: true + Documents: + items: + $ref: "./research-project-document.yaml#/ResearchProjectDocument" + type: array + x-nullable: true + Products: + items: + $ref: "./research-project-product.yaml#/ResearchProjectProduct" + type: array + x-nullable: true + Topics: + items: + $ref: "./research-project-topic.yaml#/ResearchProjectTopic" + type: array + x-nullable: true type: object diff --git a/swagger/external/members-vernonkeenan.yaml b/swagger/external/members-vernonkeenan.yaml index 52b8e13..658584d 100644 --- a/swagger/external/members-vernonkeenan.yaml +++ b/swagger/external/members-vernonkeenan.yaml @@ -22,6 +22,12 @@ consumes: produces: - "application/json" parameters: + Auth0UserIdHeader: + description: Auth0 User Id + in: header + name: X-Auth0-UserId + required: true + type: string AttendeeRequest: description: An array of new Attendee records in: body @@ -154,6 +160,13 @@ parameters: required: true schema: $ref: "#/definitions/ResearchProjectProductRequest" + ResearchProjectDocumentRequest: + description: An array of new ResearchProjectDocument records + in: body + name: researchProjectDocumentRequest + required: true + schema: + $ref: "#/definitions/ResearchProjectDocumentRequest" ResearchProjectRequest: description: An array of new ResearchProject records in: body @@ -271,6 +284,13 @@ parameters: required: true schema: $ref: "#/definitions/DatabaseRequest" + documentRequest: + description: An array of Document records + in: body + name: DocumentRequest + required: true + schema: + $ref: "#/definitions/DocumentRequest" emailMessageIdQuery: description: Email Message ID in: query @@ -349,6 +369,10 @@ responses: description: Response with Database objects schema: $ref: "#/definitions/DatabaseResponse" + DocumentResponse: + description: Document Response Object + schema: + $ref: "#/definitions/DocumentResponse" EmailMessagesResponse: description: "Array of Email Messages" schema: @@ -401,6 +425,10 @@ responses: description: ResearchProjectCompany Response Object schema: $ref: "#/definitions/ResearchProjectCompanyResponse" + ResearchProjectDocumentResponse: + description: ResearchProjectDocument Response Object + schema: + $ref: "#/definitions/ResearchProjectDocumentResponse" ResearchProjectProductResponse: description: ResearchProjectProduct Response Object schema: @@ -945,6 +973,78 @@ paths: summary: Update Databases tags: - Databases + /documents: + get: + description: Return a list of Document records from the datastore + operationId: getDocuments + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + responses: + "200": + $ref: "#/responses/DocumentResponse" + "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 Documents + tags: + - Documents + post: + description: Create Documents + operationId: postDocuments + parameters: + - $ref: "#/parameters/documentRequest" + responses: + "200": + $ref: "#/responses/DocumentResponse" + "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 Documents + tags: + - Documents + put: + description: Update Document + operationId: putDocuments + parameters: + - $ref: "#/parameters/documentRequest" + responses: + "200": + $ref: "#/responses/DocumentResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + summary: Update Documents + tags: + - Documents /emailmessages: get: security: @@ -1215,9 +1315,9 @@ paths: operationId: getFavorites parameters: - $ref: "#/parameters/idQuery" - - $ref: "#/parameters/userIdQueryRequired" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/FavoriteResponse" @@ -1650,6 +1750,7 @@ paths: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectCompanyResponse" @@ -1672,6 +1773,7 @@ paths: description: Create ResearchProjectCompanies in the system operationId: postResearchProjectCompanies parameters: + - $ref: "#/parameters/Auth0UserIdHeader" - $ref: "#/parameters/ResearchProjectCompanyRequest" responses: "200": @@ -1695,6 +1797,7 @@ paths: description: Update ResearchProjectCompany in the system operationId: putResearchProjectCompanies parameters: + - $ref: "#/parameters/Auth0UserIdHeader" - $ref: "#/parameters/ResearchProjectCompanyRequest" responses: "200": @@ -1714,6 +1817,81 @@ paths: summary: Update ResearchProjectCompanies tags: - ResearchProjects + /researchprojectdocuments: + get: + description: Return a list of ResearchProjectDocument records from the datastore + operationId: getResearchProjectDocuments + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/Auth0UserIdHeader" + responses: + "200": + $ref: "#/responses/ResearchProjectDocumentResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + summary: Get a list of ResearchProjectDocuments + tags: + - ResearchProjects + post: + description: Create ResearchProjectDocuments in the system + operationId: postResearchProjectDocuments + parameters: + - $ref: "#/parameters/ResearchProjectDocumentRequest" + - $ref: "#/parameters/Auth0UserIdHeader" + responses: + "200": + $ref: "#/responses/ResearchProjectDocumentResponse" + "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 ResearchProjectDocuments + tags: + - ResearchProjects + put: + description: Update ResearchProjectDocument in the system + operationId: putResearchProjectDocuments + parameters: + - $ref: "#/parameters/ResearchProjectDocumentRequest" + - $ref: "#/parameters/Auth0UserIdHeader" + responses: + "200": + $ref: "#/responses/ResearchProjectDocumentResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + summary: Update ResearchProjectDocuments + tags: + - ResearchProjects /researchprojectproducts: get: description: Return a list of ResearchProjectProduct records from the datastore @@ -1722,6 +1900,7 @@ paths: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectProductResponse" @@ -1745,6 +1924,7 @@ paths: operationId: postResearchProjectProducts parameters: - $ref: "#/parameters/researchProjectProductRequest" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectProductResponse" @@ -1768,6 +1948,7 @@ paths: operationId: putResearchProjectProducts parameters: - $ref: "#/parameters/researchProjectProductRequest" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectProductResponse" @@ -1794,6 +1975,7 @@ paths: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectResponse" @@ -1817,6 +1999,7 @@ paths: operationId: postResearchProjects parameters: - $ref: "#/parameters/ResearchProjectRequest" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectResponse" @@ -1840,6 +2023,7 @@ paths: operationId: putResearchProjects parameters: - $ref: "#/parameters/ResearchProjectRequest" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectResponse" @@ -1866,6 +2050,7 @@ paths: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectTopicResponse" @@ -1889,6 +2074,7 @@ paths: operationId: postResearchProjectTopics parameters: - $ref: "#/parameters/ResearchProjectTopicRequest" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectTopicResponse" @@ -1912,6 +2098,7 @@ paths: operationId: putResearchProjectTopics parameters: - $ref: "#/parameters/ResearchProjectTopicRequest" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectTopicResponse" @@ -2441,6 +2628,24 @@ definitions: Meta: $ref: "#/definitions/ResponseMeta" type: object + DocumentRequest: + description: An array of Document objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/document.yaml#/Document" + type: array + type: object + DocumentResponse: + description: An array of Document objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/document.yaml#/Document" + type: array + Meta: + $ref: "#/definitions/ResponseMeta" + type: object EmailMessageRequest: description: An array Taxnexus Send Email Message objects properties: @@ -2697,6 +2902,24 @@ definitions: $ref: "../../lib/swagger/defs/research-project.yaml#/ResearchProject" type: array type: object + ResearchProjectDocumentRequest: + description: An array of ResearchProjectDocumentRequest objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/research-project-document.yaml#/ResearchProjectDocument" + type: array + type: object + ResearchProjectDocumentResponse: + description: An array of ResearchProjectDocumentResponse objects + properties: + Meta: + $ref: "#/definitions/ResponseMeta" + Data: + items: + $ref: "../../lib/swagger/defs/research-project-document.yaml#/ResearchProjectDocument" + type: array + type: object ResearchProjectProductRequest: description: An array of ResearchProjectProduct objects properties: diff --git a/swagger/members-vernonkeenan.yaml b/swagger/members-vernonkeenan.yaml index f58c3ce..075bb4c 100644 --- a/swagger/members-vernonkeenan.yaml +++ b/swagger/members-vernonkeenan.yaml @@ -22,6 +22,12 @@ consumes: produces: - "application/json" parameters: + Auth0UserIdHeader: + description: Auth0 User Id + in: header + name: X-Auth0-UserId + required: true + type: string AttendeeRequest: description: An array of new Attendee records in: body @@ -154,6 +160,13 @@ parameters: required: true schema: $ref: "#/definitions/ResearchProjectProductRequest" + ResearchProjectDocumentRequest: + description: An array of new ResearchProjectDocument records + in: body + name: researchProjectDocumentRequest + required: true + schema: + $ref: "#/definitions/ResearchProjectDocumentRequest" ResearchProjectRequest: description: An array of new ResearchProject records in: body @@ -271,6 +284,13 @@ parameters: required: true schema: $ref: "#/definitions/DatabaseRequest" + documentRequest: + description: An array of Document records + in: body + name: DocumentRequest + required: true + schema: + $ref: "#/definitions/DocumentRequest" emailMessageIdQuery: description: Email Message ID in: query @@ -349,6 +369,10 @@ responses: description: Response with Database objects schema: $ref: "#/definitions/DatabaseResponse" + DocumentResponse: + description: Document Response Object + schema: + $ref: "#/definitions/DocumentResponse" EmailMessagesResponse: description: "Array of Email Messages" schema: @@ -401,6 +425,10 @@ responses: description: ResearchProjectCompany Response Object schema: $ref: "#/definitions/ResearchProjectCompanyResponse" + ResearchProjectDocumentResponse: + description: ResearchProjectDocument Response Object + schema: + $ref: "#/definitions/ResearchProjectDocumentResponse" ResearchProjectProductResponse: description: ResearchProjectProduct Response Object schema: @@ -945,6 +973,78 @@ paths: summary: Update Databases tags: - Databases + /documents: + get: + description: Return a list of Document records from the datastore + operationId: getDocuments + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + responses: + "200": + $ref: "#/responses/DocumentResponse" + "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 Documents + tags: + - Documents + post: + description: Create Documents + operationId: postDocuments + parameters: + - $ref: "#/parameters/documentRequest" + responses: + "200": + $ref: "#/responses/DocumentResponse" + "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 Documents + tags: + - Documents + put: + description: Update Document + operationId: putDocuments + parameters: + - $ref: "#/parameters/documentRequest" + responses: + "200": + $ref: "#/responses/DocumentResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + summary: Update Documents + tags: + - Documents /emailmessages: get: security: @@ -1215,9 +1315,9 @@ paths: operationId: getFavorites parameters: - $ref: "#/parameters/idQuery" - - $ref: "#/parameters/userIdQueryRequired" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/FavoriteResponse" @@ -1650,6 +1750,7 @@ paths: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectCompanyResponse" @@ -1672,6 +1773,7 @@ paths: description: Create ResearchProjectCompanies in the system operationId: postResearchProjectCompanies parameters: + - $ref: "#/parameters/Auth0UserIdHeader" - $ref: "#/parameters/ResearchProjectCompanyRequest" responses: "200": @@ -1695,6 +1797,7 @@ paths: description: Update ResearchProjectCompany in the system operationId: putResearchProjectCompanies parameters: + - $ref: "#/parameters/Auth0UserIdHeader" - $ref: "#/parameters/ResearchProjectCompanyRequest" responses: "200": @@ -1714,6 +1817,81 @@ paths: summary: Update ResearchProjectCompanies tags: - ResearchProjects + /researchprojectdocuments: + get: + description: Return a list of ResearchProjectDocument records from the datastore + operationId: getResearchProjectDocuments + parameters: + - $ref: "#/parameters/idQuery" + - $ref: "#/parameters/limitQuery" + - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/Auth0UserIdHeader" + responses: + "200": + $ref: "#/responses/ResearchProjectDocumentResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + summary: Get a list of ResearchProjectDocuments + tags: + - ResearchProjects + post: + description: Create ResearchProjectDocuments in the system + operationId: postResearchProjectDocuments + parameters: + - $ref: "#/parameters/ResearchProjectDocumentRequest" + - $ref: "#/parameters/Auth0UserIdHeader" + responses: + "200": + $ref: "#/responses/ResearchProjectDocumentResponse" + "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 ResearchProjectDocuments + tags: + - ResearchProjects + put: + description: Update ResearchProjectDocument in the system + operationId: putResearchProjectDocuments + parameters: + - $ref: "#/parameters/ResearchProjectDocumentRequest" + - $ref: "#/parameters/Auth0UserIdHeader" + responses: + "200": + $ref: "#/responses/ResearchProjectDocumentResponse" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/AccessForbidden" + "404": + $ref: "#/responses/NotFound" + "422": + $ref: "#/responses/UnprocessableEntity" + "500": + $ref: "#/responses/ServerError" + security: + - ApiKeyAuth: [] + summary: Update ResearchProjectDocuments + tags: + - ResearchProjects /researchprojectproducts: get: description: Return a list of ResearchProjectProduct records from the datastore @@ -1722,6 +1900,7 @@ paths: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectProductResponse" @@ -1745,6 +1924,7 @@ paths: operationId: postResearchProjectProducts parameters: - $ref: "#/parameters/researchProjectProductRequest" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectProductResponse" @@ -1768,6 +1948,7 @@ paths: operationId: putResearchProjectProducts parameters: - $ref: "#/parameters/researchProjectProductRequest" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectProductResponse" @@ -1794,6 +1975,7 @@ paths: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectResponse" @@ -1817,6 +1999,7 @@ paths: operationId: postResearchProjects parameters: - $ref: "#/parameters/ResearchProjectRequest" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectResponse" @@ -1840,6 +2023,7 @@ paths: operationId: putResearchProjects parameters: - $ref: "#/parameters/ResearchProjectRequest" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectResponse" @@ -1866,6 +2050,7 @@ paths: - $ref: "#/parameters/idQuery" - $ref: "#/parameters/limitQuery" - $ref: "#/parameters/offsetQuery" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectTopicResponse" @@ -1889,6 +2074,7 @@ paths: operationId: postResearchProjectTopics parameters: - $ref: "#/parameters/ResearchProjectTopicRequest" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectTopicResponse" @@ -1912,6 +2098,7 @@ paths: operationId: putResearchProjectTopics parameters: - $ref: "#/parameters/ResearchProjectTopicRequest" + - $ref: "#/parameters/Auth0UserIdHeader" responses: "200": $ref: "#/responses/ResearchProjectTopicResponse" @@ -2441,6 +2628,24 @@ definitions: Meta: $ref: "#/definitions/ResponseMeta" type: object + DocumentRequest: + description: An array of Document objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/document.yaml#/Document" + type: array + type: object + DocumentResponse: + description: An array of Document objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/document.yaml#/Document" + type: array + Meta: + $ref: "#/definitions/ResponseMeta" + type: object EmailMessageRequest: description: An array Taxnexus Send Email Message objects properties: @@ -2697,6 +2902,24 @@ definitions: $ref: "../../lib/swagger/defs/research-project.yaml#/ResearchProject" type: array type: object + ResearchProjectDocumentRequest: + description: An array of ResearchProjectDocumentRequest objects + properties: + Data: + items: + $ref: "../../lib/swagger/defs/research-project-document.yaml#/ResearchProjectDocument" + type: array + type: object + ResearchProjectDocumentResponse: + description: An array of ResearchProjectDocumentResponse objects + properties: + Meta: + $ref: "#/definitions/ResponseMeta" + Data: + items: + $ref: "../../lib/swagger/defs/research-project-document.yaml#/ResearchProjectDocument" + type: array + type: object ResearchProjectProductRequest: description: An array of ResearchProjectProduct objects properties: