From a719cdfcb328efef8fc5c13dc175adc8497822ca Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Wed, 28 Aug 2024 15:18:44 +0200 Subject: [PATCH] chore(client): update swagger client (#153) --- client/operations/add_secrets_responses.go | 29 +- .../close_interactive_session_responses.go | 31 +- .../create_gitlab_webhook_responses.go | 17 +- .../operations/create_workflow_responses.go | 35 +- client/operations/delete_file_responses.go | 25 +- .../delete_gitlab_webhook_responses.go | 21 +- client/operations/delete_secrets_responses.go | 25 +- client/operations/download_file_responses.go | 27 +- client/operations/get_config_responses.go | 13 +- client/operations/get_files_responses.go | 31 +- client/operations/get_secrets_responses.go | 20 +- .../get_users_shared_with_you_parameters.go | 163 ++++ .../get_users_shared_with_you_responses.go | 595 ++++++++++++ .../get_users_you_shared_with_parameters.go | 163 ++++ .../get_users_you_shared_with_responses.go | 595 ++++++++++++ .../operations/get_workflow_diff_responses.go | 31 +- .../get_workflow_disk_usage_responses.go | 31 +- .../operations/get_workflow_logs_responses.go | 31 +- .../get_workflow_parameters_responses.go | 34 +- .../get_workflow_retention_rules_responses.go | 31 +- .../get_workflow_share_status_parameters.go | 185 ++++ .../get_workflow_share_status_responses.go | 718 ++++++++++++++ .../get_workflow_specification_responses.go | 25 +- .../get_workflow_status_responses.go | 31 +- client/operations/get_workflows_parameters.go | 102 ++ client/operations/get_workflows_responses.go | 37 +- client/operations/get_you_responses.go | 25 +- client/operations/gitlab_connect_responses.go | 4 +- client/operations/gitlab_oauth_responses.go | 23 +- .../operations/gitlab_projects_parameters.go | 138 +++ .../operations/gitlab_projects_responses.go | 205 +++- client/operations/info_responses.go | 13 +- client/operations/launch_responses.go | 168 +++- client/operations/move_files_responses.go | 37 +- .../open_interactive_session_responses.go | 31 +- client/operations/operations_client.go | 299 +++++- client/operations/ping_responses.go | 7 +- .../operations/prune_workspace_responses.go | 31 +- client/operations/request_token_responses.go | 25 +- .../set_workflow_status_responses.go | 43 +- .../operations/share_workflow_parameters.go | 205 ++++ client/operations/share_workflow_responses.go | 899 ++++++++++++++++++ client/operations/start_workflow_responses.go | 43 +- client/operations/status_responses.go | 13 +- .../operations/unshare_workflow_parameters.go | 212 +++++ .../operations/unshare_workflow_responses.go | 720 ++++++++++++++ client/operations/upload_file_responses.go | 31 +- 47 files changed, 5919 insertions(+), 299 deletions(-) create mode 100644 client/operations/get_users_shared_with_you_parameters.go create mode 100644 client/operations/get_users_shared_with_you_responses.go create mode 100644 client/operations/get_users_you_shared_with_parameters.go create mode 100644 client/operations/get_users_you_shared_with_responses.go create mode 100644 client/operations/get_workflow_share_status_parameters.go create mode 100644 client/operations/get_workflow_share_status_responses.go create mode 100644 client/operations/share_workflow_parameters.go create mode 100644 client/operations/share_workflow_responses.go create mode 100644 client/operations/unshare_workflow_parameters.go create mode 100644 client/operations/unshare_workflow_responses.go diff --git a/client/operations/add_secrets_responses.go b/client/operations/add_secrets_responses.go index f6b7f58..76bd5c3 100644 --- a/client/operations/add_secrets_responses.go +++ b/client/operations/add_secrets_responses.go @@ -100,11 +100,13 @@ func (o *AddSecretsCreated) Code() int { } func (o *AddSecretsCreated) Error() string { - return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsCreated %s", 201, payload) } func (o *AddSecretsCreated) String() string { - return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsCreated %s", 201, payload) } func (o *AddSecretsCreated) GetPayload() *AddSecretsCreatedBody { @@ -168,11 +170,13 @@ func (o *AddSecretsForbidden) Code() int { } func (o *AddSecretsForbidden) Error() string { - return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsForbidden %s", 403, payload) } func (o *AddSecretsForbidden) String() string { - return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsForbidden %s", 403, payload) } func (o *AddSecretsForbidden) GetPayload() *AddSecretsForbiddenBody { @@ -236,11 +240,13 @@ func (o *AddSecretsConflict) Code() int { } func (o *AddSecretsConflict) Error() string { - return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsConflict %s", 409, payload) } func (o *AddSecretsConflict) String() string { - return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsConflict %s", 409, payload) } func (o *AddSecretsConflict) GetPayload() *AddSecretsConflictBody { @@ -304,11 +310,13 @@ func (o *AddSecretsInternalServerError) Code() int { } func (o *AddSecretsInternalServerError) Error() string { - return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsInternalServerError %s", 500, payload) } func (o *AddSecretsInternalServerError) String() string { - return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/secrets/][%d] addSecretsInternalServerError %s", 500, payload) } func (o *AddSecretsInternalServerError) GetPayload() *AddSecretsInternalServerErrorBody { @@ -485,11 +493,8 @@ swagger:model AddSecretsParamsBodyAnon */ type AddSecretsParamsBodyAnon struct { - // Secret name - Name string `json:"name,omitempty"` - // How will be the secret assigned to the jobs, either exported as an environment variable or mounted as a file. - // Enum: [env file] + // Enum: ["env","file"] Type string `json:"type,omitempty"` // Secret value diff --git a/client/operations/close_interactive_session_responses.go b/client/operations/close_interactive_session_responses.go index 344fdf1..03212c2 100644 --- a/client/operations/close_interactive_session_responses.go +++ b/client/operations/close_interactive_session_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *CloseInteractiveSessionOK) Code() int { } func (o *CloseInteractiveSessionOK) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionOK %s", 200, payload) } func (o *CloseInteractiveSessionOK) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionOK %s", 200, payload) } func (o *CloseInteractiveSessionOK) GetPayload() *CloseInteractiveSessionOKBody { @@ -171,11 +174,13 @@ func (o *CloseInteractiveSessionBadRequest) Code() int { } func (o *CloseInteractiveSessionBadRequest) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionBadRequest %s", 400, payload) } func (o *CloseInteractiveSessionBadRequest) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionBadRequest %s", 400, payload) } func (o *CloseInteractiveSessionBadRequest) GetPayload() *CloseInteractiveSessionBadRequestBody { @@ -239,11 +244,13 @@ func (o *CloseInteractiveSessionForbidden) Code() int { } func (o *CloseInteractiveSessionForbidden) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionForbidden %s", 403, payload) } func (o *CloseInteractiveSessionForbidden) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionForbidden %s", 403, payload) } func (o *CloseInteractiveSessionForbidden) GetPayload() *CloseInteractiveSessionForbiddenBody { @@ -307,11 +314,13 @@ func (o *CloseInteractiveSessionNotFound) Code() int { } func (o *CloseInteractiveSessionNotFound) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionNotFound %s", 404, payload) } func (o *CloseInteractiveSessionNotFound) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionNotFound %s", 404, payload) } func (o *CloseInteractiveSessionNotFound) GetPayload() *CloseInteractiveSessionNotFoundBody { @@ -375,11 +384,13 @@ func (o *CloseInteractiveSessionInternalServerError) Code() int { } func (o *CloseInteractiveSessionInternalServerError) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionInternalServerError %s", 500, payload) } func (o *CloseInteractiveSessionInternalServerError) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/close/][%d] closeInteractiveSessionInternalServerError %s", 500, payload) } func (o *CloseInteractiveSessionInternalServerError) GetPayload() *CloseInteractiveSessionInternalServerErrorBody { diff --git a/client/operations/create_gitlab_webhook_responses.go b/client/operations/create_gitlab_webhook_responses.go index 7d35bdd..962132f 100644 --- a/client/operations/create_gitlab_webhook_responses.go +++ b/client/operations/create_gitlab_webhook_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -92,11 +93,11 @@ func (o *CreateGitlabWebhookCreated) Code() int { } func (o *CreateGitlabWebhookCreated) Error() string { - return fmt.Sprintf("[POST /api/gitlab/webhook][%d] createGitlabWebhookCreated ", 201) + return fmt.Sprintf("[POST /api/gitlab/webhook][%d] createGitlabWebhookCreated", 201) } func (o *CreateGitlabWebhookCreated) String() string { - return fmt.Sprintf("[POST /api/gitlab/webhook][%d] createGitlabWebhookCreated ", 201) + return fmt.Sprintf("[POST /api/gitlab/webhook][%d] createGitlabWebhookCreated", 201) } func (o *CreateGitlabWebhookCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -149,11 +150,13 @@ func (o *CreateGitlabWebhookForbidden) Code() int { } func (o *CreateGitlabWebhookForbidden) Error() string { - return fmt.Sprintf("[POST /api/gitlab/webhook][%d] createGitlabWebhookForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/gitlab/webhook][%d] createGitlabWebhookForbidden %s", 403, payload) } func (o *CreateGitlabWebhookForbidden) String() string { - return fmt.Sprintf("[POST /api/gitlab/webhook][%d] createGitlabWebhookForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/gitlab/webhook][%d] createGitlabWebhookForbidden %s", 403, payload) } func (o *CreateGitlabWebhookForbidden) GetPayload() *CreateGitlabWebhookForbiddenBody { @@ -217,11 +220,13 @@ func (o *CreateGitlabWebhookInternalServerError) Code() int { } func (o *CreateGitlabWebhookInternalServerError) Error() string { - return fmt.Sprintf("[POST /api/gitlab/webhook][%d] createGitlabWebhookInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/gitlab/webhook][%d] createGitlabWebhookInternalServerError %s", 500, payload) } func (o *CreateGitlabWebhookInternalServerError) String() string { - return fmt.Sprintf("[POST /api/gitlab/webhook][%d] createGitlabWebhookInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/gitlab/webhook][%d] createGitlabWebhookInternalServerError %s", 500, payload) } func (o *CreateGitlabWebhookInternalServerError) GetPayload() *CreateGitlabWebhookInternalServerErrorBody { diff --git a/client/operations/create_workflow_responses.go b/client/operations/create_workflow_responses.go index 7e453ac..f1e6e36 100644 --- a/client/operations/create_workflow_responses.go +++ b/client/operations/create_workflow_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *CreateWorkflowCreated) Code() int { } func (o *CreateWorkflowCreated) Error() string { - return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowCreated %s", 201, payload) } func (o *CreateWorkflowCreated) String() string { - return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowCreated %+v", 201, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowCreated %s", 201, payload) } func (o *CreateWorkflowCreated) GetPayload() *CreateWorkflowCreatedBody { @@ -177,11 +180,13 @@ func (o *CreateWorkflowBadRequest) Code() int { } func (o *CreateWorkflowBadRequest) Error() string { - return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowBadRequest %s", 400, payload) } func (o *CreateWorkflowBadRequest) String() string { - return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowBadRequest %s", 400, payload) } func (o *CreateWorkflowBadRequest) GetPayload() *CreateWorkflowBadRequestBody { @@ -245,11 +250,13 @@ func (o *CreateWorkflowForbidden) Code() int { } func (o *CreateWorkflowForbidden) Error() string { - return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowForbidden %s", 403, payload) } func (o *CreateWorkflowForbidden) String() string { - return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowForbidden %s", 403, payload) } func (o *CreateWorkflowForbidden) GetPayload() *CreateWorkflowForbiddenBody { @@ -313,11 +320,13 @@ func (o *CreateWorkflowNotFound) Code() int { } func (o *CreateWorkflowNotFound) Error() string { - return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowNotFound %s", 404, payload) } func (o *CreateWorkflowNotFound) String() string { - return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowNotFound %s", 404, payload) } func (o *CreateWorkflowNotFound) GetPayload() *CreateWorkflowNotFoundBody { @@ -381,11 +390,13 @@ func (o *CreateWorkflowInternalServerError) Code() int { } func (o *CreateWorkflowInternalServerError) Error() string { - return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowInternalServerError %s", 500, payload) } func (o *CreateWorkflowInternalServerError) String() string { - return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowInternalServerError %s", 500, payload) } func (o *CreateWorkflowInternalServerError) GetPayload() *CreateWorkflowInternalServerErrorBody { @@ -448,11 +459,11 @@ func (o *CreateWorkflowNotImplemented) Code() int { } func (o *CreateWorkflowNotImplemented) Error() string { - return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowNotImplemented ", 501) + return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowNotImplemented", 501) } func (o *CreateWorkflowNotImplemented) String() string { - return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowNotImplemented ", 501) + return fmt.Sprintf("[POST /api/workflows][%d] createWorkflowNotImplemented", 501) } func (o *CreateWorkflowNotImplemented) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { diff --git a/client/operations/delete_file_responses.go b/client/operations/delete_file_responses.go index a92f5a7..ed10c17 100644 --- a/client/operations/delete_file_responses.go +++ b/client/operations/delete_file_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -98,11 +99,13 @@ func (o *DeleteFileOK) Code() int { } func (o *DeleteFileOK) Error() string { - return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileOK %s", 200, payload) } func (o *DeleteFileOK) String() string { - return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileOK %s", 200, payload) } func (o *DeleteFileOK) GetPayload() *DeleteFileOKBody { @@ -166,11 +169,13 @@ func (o *DeleteFileForbidden) Code() int { } func (o *DeleteFileForbidden) Error() string { - return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileForbidden %s", 403, payload) } func (o *DeleteFileForbidden) String() string { - return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileForbidden %s", 403, payload) } func (o *DeleteFileForbidden) GetPayload() *DeleteFileForbiddenBody { @@ -234,11 +239,13 @@ func (o *DeleteFileNotFound) Code() int { } func (o *DeleteFileNotFound) Error() string { - return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileNotFound %s", 404, payload) } func (o *DeleteFileNotFound) String() string { - return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileNotFound %s", 404, payload) } func (o *DeleteFileNotFound) GetPayload() *DeleteFileNotFoundBody { @@ -302,11 +309,13 @@ func (o *DeleteFileInternalServerError) Code() int { } func (o *DeleteFileInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileInternalServerError %s", 500, payload) } func (o *DeleteFileInternalServerError) String() string { - return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] deleteFileInternalServerError %s", 500, payload) } func (o *DeleteFileInternalServerError) GetPayload() *DeleteFileInternalServerErrorBody { diff --git a/client/operations/delete_gitlab_webhook_responses.go b/client/operations/delete_gitlab_webhook_responses.go index 7e46c21..e6ee15b 100644 --- a/client/operations/delete_gitlab_webhook_responses.go +++ b/client/operations/delete_gitlab_webhook_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -98,11 +99,11 @@ func (o *DeleteGitlabWebhookNoContent) Code() int { } func (o *DeleteGitlabWebhookNoContent) Error() string { - return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookNoContent ", 204) + return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookNoContent", 204) } func (o *DeleteGitlabWebhookNoContent) String() string { - return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookNoContent ", 204) + return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookNoContent", 204) } func (o *DeleteGitlabWebhookNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -155,11 +156,13 @@ func (o *DeleteGitlabWebhookForbidden) Code() int { } func (o *DeleteGitlabWebhookForbidden) Error() string { - return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookForbidden %s", 403, payload) } func (o *DeleteGitlabWebhookForbidden) String() string { - return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookForbidden %s", 403, payload) } func (o *DeleteGitlabWebhookForbidden) GetPayload() *DeleteGitlabWebhookForbiddenBody { @@ -222,11 +225,11 @@ func (o *DeleteGitlabWebhookNotFound) Code() int { } func (o *DeleteGitlabWebhookNotFound) Error() string { - return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookNotFound ", 404) + return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookNotFound", 404) } func (o *DeleteGitlabWebhookNotFound) String() string { - return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookNotFound ", 404) + return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookNotFound", 404) } func (o *DeleteGitlabWebhookNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -279,11 +282,13 @@ func (o *DeleteGitlabWebhookInternalServerError) Code() int { } func (o *DeleteGitlabWebhookInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookInternalServerError %s", 500, payload) } func (o *DeleteGitlabWebhookInternalServerError) String() string { - return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/gitlab/webhook][%d] deleteGitlabWebhookInternalServerError %s", 500, payload) } func (o *DeleteGitlabWebhookInternalServerError) GetPayload() *DeleteGitlabWebhookInternalServerErrorBody { diff --git a/client/operations/delete_secrets_responses.go b/client/operations/delete_secrets_responses.go index 97ebc79..b54d969 100644 --- a/client/operations/delete_secrets_responses.go +++ b/client/operations/delete_secrets_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *DeleteSecretsOK) Code() int { } func (o *DeleteSecretsOK) Error() string { - return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsOK %s", 200, payload) } func (o *DeleteSecretsOK) String() string { - return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsOK %s", 200, payload) } func (o *DeleteSecretsOK) GetPayload() []string { @@ -163,11 +166,13 @@ func (o *DeleteSecretsForbidden) Code() int { } func (o *DeleteSecretsForbidden) Error() string { - return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsForbidden %s", 403, payload) } func (o *DeleteSecretsForbidden) String() string { - return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsForbidden %s", 403, payload) } func (o *DeleteSecretsForbidden) GetPayload() *DeleteSecretsForbiddenBody { @@ -231,11 +236,13 @@ func (o *DeleteSecretsNotFound) Code() int { } func (o *DeleteSecretsNotFound) Error() string { - return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsNotFound %s", 404, payload) } func (o *DeleteSecretsNotFound) String() string { - return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsNotFound %s", 404, payload) } func (o *DeleteSecretsNotFound) GetPayload() []string { @@ -297,11 +304,13 @@ func (o *DeleteSecretsInternalServerError) Code() int { } func (o *DeleteSecretsInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsInternalServerError %s", 500, payload) } func (o *DeleteSecretsInternalServerError) String() string { - return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /api/secrets/][%d] deleteSecretsInternalServerError %s", 500, payload) } func (o *DeleteSecretsInternalServerError) GetPayload() *DeleteSecretsInternalServerErrorBody { diff --git a/client/operations/download_file_responses.go b/client/operations/download_file_responses.go index 6d14e2d..d86721d 100644 --- a/client/operations/download_file_responses.go +++ b/client/operations/download_file_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -110,11 +111,11 @@ func (o *DownloadFileOK) Code() int { } func (o *DownloadFileOK) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileOK", 200) } func (o *DownloadFileOK) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileOK", 200) } func (o *DownloadFileOK) GetPayload() io.Writer { @@ -189,11 +190,11 @@ func (o *DownloadFileBadRequest) Code() int { } func (o *DownloadFileBadRequest) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileBadRequest ", 400) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileBadRequest", 400) } func (o *DownloadFileBadRequest) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileBadRequest ", 400) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileBadRequest", 400) } func (o *DownloadFileBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -246,11 +247,13 @@ func (o *DownloadFileForbidden) Code() int { } func (o *DownloadFileForbidden) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileForbidden %s", 403, payload) } func (o *DownloadFileForbidden) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileForbidden %s", 403, payload) } func (o *DownloadFileForbidden) GetPayload() *DownloadFileForbiddenBody { @@ -314,11 +317,13 @@ func (o *DownloadFileNotFound) Code() int { } func (o *DownloadFileNotFound) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileNotFound %s", 404, payload) } func (o *DownloadFileNotFound) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileNotFound %s", 404, payload) } func (o *DownloadFileNotFound) GetPayload() *DownloadFileNotFoundBody { @@ -382,11 +387,13 @@ func (o *DownloadFileInternalServerError) Code() int { } func (o *DownloadFileInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileInternalServerError %s", 500, payload) } func (o *DownloadFileInternalServerError) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace/{file_name}][%d] downloadFileInternalServerError %s", 500, payload) } func (o *DownloadFileInternalServerError) GetPayload() *DownloadFileInternalServerErrorBody { diff --git a/client/operations/get_config_responses.go b/client/operations/get_config_responses.go index 810d59a..a8d407a 100644 --- a/client/operations/get_config_responses.go +++ b/client/operations/get_config_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -85,11 +86,13 @@ func (o *GetConfigOK) Code() int { } func (o *GetConfigOK) Error() string { - return fmt.Sprintf("[GET /api/config][%d] getConfigOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/config][%d] getConfigOK %s", 200, payload) } func (o *GetConfigOK) String() string { - return fmt.Sprintf("[GET /api/config][%d] getConfigOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/config][%d] getConfigOK %s", 200, payload) } func (o *GetConfigOK) GetPayload() interface{} { @@ -151,11 +154,13 @@ func (o *GetConfigInternalServerError) Code() int { } func (o *GetConfigInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/config][%d] getConfigInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/config][%d] getConfigInternalServerError %s", 500, payload) } func (o *GetConfigInternalServerError) String() string { - return fmt.Sprintf("[GET /api/config][%d] getConfigInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/config][%d] getConfigInternalServerError %s", 500, payload) } func (o *GetConfigInternalServerError) GetPayload() *GetConfigInternalServerErrorBody { diff --git a/client/operations/get_files_responses.go b/client/operations/get_files_responses.go index 54d83c0..3aef740 100644 --- a/client/operations/get_files_responses.go +++ b/client/operations/get_files_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" "strconv" @@ -105,11 +106,13 @@ func (o *GetFilesOK) Code() int { } func (o *GetFilesOK) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesOK %s", 200, payload) } func (o *GetFilesOK) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesOK %s", 200, payload) } func (o *GetFilesOK) GetPayload() *GetFilesOKBody { @@ -173,11 +176,13 @@ func (o *GetFilesBadRequest) Code() int { } func (o *GetFilesBadRequest) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesBadRequest %s", 400, payload) } func (o *GetFilesBadRequest) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesBadRequest %s", 400, payload) } func (o *GetFilesBadRequest) GetPayload() *GetFilesBadRequestBody { @@ -241,11 +246,13 @@ func (o *GetFilesForbidden) Code() int { } func (o *GetFilesForbidden) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesForbidden %s", 403, payload) } func (o *GetFilesForbidden) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesForbidden %s", 403, payload) } func (o *GetFilesForbidden) GetPayload() *GetFilesForbiddenBody { @@ -309,11 +316,13 @@ func (o *GetFilesNotFound) Code() int { } func (o *GetFilesNotFound) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesNotFound %s", 404, payload) } func (o *GetFilesNotFound) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesNotFound %s", 404, payload) } func (o *GetFilesNotFound) GetPayload() *GetFilesNotFoundBody { @@ -377,11 +386,13 @@ func (o *GetFilesInternalServerError) Code() int { } func (o *GetFilesInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesInternalServerError %s", 500, payload) } func (o *GetFilesInternalServerError) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/workspace][%d] getFilesInternalServerError %s", 500, payload) } func (o *GetFilesInternalServerError) GetPayload() *GetFilesInternalServerErrorBody { diff --git a/client/operations/get_secrets_responses.go b/client/operations/get_secrets_responses.go index 984d305..113fa84 100644 --- a/client/operations/get_secrets_responses.go +++ b/client/operations/get_secrets_responses.go @@ -94,11 +94,13 @@ func (o *GetSecretsOK) Code() int { } func (o *GetSecretsOK) Error() string { - return fmt.Sprintf("[GET /api/secrets][%d] getSecretsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/secrets][%d] getSecretsOK %s", 200, payload) } func (o *GetSecretsOK) String() string { - return fmt.Sprintf("[GET /api/secrets][%d] getSecretsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/secrets][%d] getSecretsOK %s", 200, payload) } func (o *GetSecretsOK) GetPayload() []*GetSecretsOKBodyItems0 { @@ -160,11 +162,13 @@ func (o *GetSecretsForbidden) Code() int { } func (o *GetSecretsForbidden) Error() string { - return fmt.Sprintf("[GET /api/secrets][%d] getSecretsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/secrets][%d] getSecretsForbidden %s", 403, payload) } func (o *GetSecretsForbidden) String() string { - return fmt.Sprintf("[GET /api/secrets][%d] getSecretsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/secrets][%d] getSecretsForbidden %s", 403, payload) } func (o *GetSecretsForbidden) GetPayload() *GetSecretsForbiddenBody { @@ -228,11 +232,13 @@ func (o *GetSecretsInternalServerError) Code() int { } func (o *GetSecretsInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/secrets][%d] getSecretsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/secrets][%d] getSecretsInternalServerError %s", 500, payload) } func (o *GetSecretsInternalServerError) String() string { - return fmt.Sprintf("[GET /api/secrets][%d] getSecretsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/secrets][%d] getSecretsInternalServerError %s", 500, payload) } func (o *GetSecretsInternalServerError) GetPayload() *GetSecretsInternalServerErrorBody { @@ -337,7 +343,7 @@ type GetSecretsOKBodyItems0 struct { Name string `json:"name,omitempty"` // How will be the secret assigned to the jobs, either exported as an environment variable or mounted as a file. - // Enum: [env file] + // Enum: ["env","file"] Type string `json:"type,omitempty"` } diff --git a/client/operations/get_users_shared_with_you_parameters.go b/client/operations/get_users_shared_with_you_parameters.go new file mode 100644 index 0000000..56e48b3 --- /dev/null +++ b/client/operations/get_users_shared_with_you_parameters.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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" +) + +// NewGetUsersSharedWithYouParams creates a new GetUsersSharedWithYouParams 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 NewGetUsersSharedWithYouParams() *GetUsersSharedWithYouParams { + return &GetUsersSharedWithYouParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetUsersSharedWithYouParamsWithTimeout creates a new GetUsersSharedWithYouParams object +// with the ability to set a timeout on a request. +func NewGetUsersSharedWithYouParamsWithTimeout(timeout time.Duration) *GetUsersSharedWithYouParams { + return &GetUsersSharedWithYouParams{ + timeout: timeout, + } +} + +// NewGetUsersSharedWithYouParamsWithContext creates a new GetUsersSharedWithYouParams object +// with the ability to set a context for a request. +func NewGetUsersSharedWithYouParamsWithContext(ctx context.Context) *GetUsersSharedWithYouParams { + return &GetUsersSharedWithYouParams{ + Context: ctx, + } +} + +// NewGetUsersSharedWithYouParamsWithHTTPClient creates a new GetUsersSharedWithYouParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetUsersSharedWithYouParamsWithHTTPClient(client *http.Client) *GetUsersSharedWithYouParams { + return &GetUsersSharedWithYouParams{ + HTTPClient: client, + } +} + +/* +GetUsersSharedWithYouParams contains all the parameters to send to the API endpoint + + for the get users shared with you operation. + + Typically these are written to a http.Request. +*/ +type GetUsersSharedWithYouParams struct { + + /* AccessToken. + + API access_token of user. + */ + AccessToken *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get users shared with you params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetUsersSharedWithYouParams) WithDefaults() *GetUsersSharedWithYouParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get users shared with you params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetUsersSharedWithYouParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get users shared with you params +func (o *GetUsersSharedWithYouParams) WithTimeout(timeout time.Duration) *GetUsersSharedWithYouParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get users shared with you params +func (o *GetUsersSharedWithYouParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get users shared with you params +func (o *GetUsersSharedWithYouParams) WithContext(ctx context.Context) *GetUsersSharedWithYouParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get users shared with you params +func (o *GetUsersSharedWithYouParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get users shared with you params +func (o *GetUsersSharedWithYouParams) WithHTTPClient(client *http.Client) *GetUsersSharedWithYouParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get users shared with you params +func (o *GetUsersSharedWithYouParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccessToken adds the accessToken to the get users shared with you params +func (o *GetUsersSharedWithYouParams) WithAccessToken(accessToken *string) *GetUsersSharedWithYouParams { + o.SetAccessToken(accessToken) + return o +} + +// SetAccessToken adds the accessToken to the get users shared with you params +func (o *GetUsersSharedWithYouParams) SetAccessToken(accessToken *string) { + o.AccessToken = accessToken +} + +// WriteToRequest writes these params to a swagger request +func (o *GetUsersSharedWithYouParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccessToken != nil { + + // query param access_token + var qrAccessToken string + + if o.AccessToken != nil { + qrAccessToken = *o.AccessToken + } + qAccessToken := qrAccessToken + if qAccessToken != "" { + + if err := r.SetQueryParam("access_token", qAccessToken); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/client/operations/get_users_shared_with_you_responses.go b/client/operations/get_users_shared_with_you_responses.go new file mode 100644 index 0000000..69cc74a --- /dev/null +++ b/client/operations/get_users_shared_with_you_responses.go @@ -0,0 +1,595 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GetUsersSharedWithYouReader is a Reader for the GetUsersSharedWithYou structure. +type GetUsersSharedWithYouReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetUsersSharedWithYouReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetUsersSharedWithYouOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetUsersSharedWithYouUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetUsersSharedWithYouForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetUsersSharedWithYouInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /api/users/shared-with-you] get_users_shared_with_you", response, response.Code()) + } +} + +// NewGetUsersSharedWithYouOK creates a GetUsersSharedWithYouOK with default headers values +func NewGetUsersSharedWithYouOK() *GetUsersSharedWithYouOK { + return &GetUsersSharedWithYouOK{} +} + +/* +GetUsersSharedWithYouOK describes a response with status code 200, with default header values. + +Users that shared workflow(s) with the authenticated user. +*/ +type GetUsersSharedWithYouOK struct { + Payload *GetUsersSharedWithYouOKBody +} + +// IsSuccess returns true when this get users shared with you o k response has a 2xx status code +func (o *GetUsersSharedWithYouOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get users shared with you o k response has a 3xx status code +func (o *GetUsersSharedWithYouOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get users shared with you o k response has a 4xx status code +func (o *GetUsersSharedWithYouOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get users shared with you o k response has a 5xx status code +func (o *GetUsersSharedWithYouOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get users shared with you o k response a status code equal to that given +func (o *GetUsersSharedWithYouOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get users shared with you o k response +func (o *GetUsersSharedWithYouOK) Code() int { + return 200 +} + +func (o *GetUsersSharedWithYouOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/shared-with-you][%d] getUsersSharedWithYouOK %s", 200, payload) +} + +func (o *GetUsersSharedWithYouOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/shared-with-you][%d] getUsersSharedWithYouOK %s", 200, payload) +} + +func (o *GetUsersSharedWithYouOK) GetPayload() *GetUsersSharedWithYouOKBody { + return o.Payload +} + +func (o *GetUsersSharedWithYouOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetUsersSharedWithYouOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersSharedWithYouUnauthorized creates a GetUsersSharedWithYouUnauthorized with default headers values +func NewGetUsersSharedWithYouUnauthorized() *GetUsersSharedWithYouUnauthorized { + return &GetUsersSharedWithYouUnauthorized{} +} + +/* +GetUsersSharedWithYouUnauthorized describes a response with status code 401, with default header values. + +Error message indicating that the uses is not authenticated. +*/ +type GetUsersSharedWithYouUnauthorized struct { + Payload *GetUsersSharedWithYouUnauthorizedBody +} + +// IsSuccess returns true when this get users shared with you unauthorized response has a 2xx status code +func (o *GetUsersSharedWithYouUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get users shared with you unauthorized response has a 3xx status code +func (o *GetUsersSharedWithYouUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get users shared with you unauthorized response has a 4xx status code +func (o *GetUsersSharedWithYouUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get users shared with you unauthorized response has a 5xx status code +func (o *GetUsersSharedWithYouUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get users shared with you unauthorized response a status code equal to that given +func (o *GetUsersSharedWithYouUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get users shared with you unauthorized response +func (o *GetUsersSharedWithYouUnauthorized) Code() int { + return 401 +} + +func (o *GetUsersSharedWithYouUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/shared-with-you][%d] getUsersSharedWithYouUnauthorized %s", 401, payload) +} + +func (o *GetUsersSharedWithYouUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/shared-with-you][%d] getUsersSharedWithYouUnauthorized %s", 401, payload) +} + +func (o *GetUsersSharedWithYouUnauthorized) GetPayload() *GetUsersSharedWithYouUnauthorizedBody { + return o.Payload +} + +func (o *GetUsersSharedWithYouUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetUsersSharedWithYouUnauthorizedBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersSharedWithYouForbidden creates a GetUsersSharedWithYouForbidden with default headers values +func NewGetUsersSharedWithYouForbidden() *GetUsersSharedWithYouForbidden { + return &GetUsersSharedWithYouForbidden{} +} + +/* +GetUsersSharedWithYouForbidden describes a response with status code 403, with default header values. + +Request failed. User token not valid. +*/ +type GetUsersSharedWithYouForbidden struct { + Payload *GetUsersSharedWithYouForbiddenBody +} + +// IsSuccess returns true when this get users shared with you forbidden response has a 2xx status code +func (o *GetUsersSharedWithYouForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get users shared with you forbidden response has a 3xx status code +func (o *GetUsersSharedWithYouForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get users shared with you forbidden response has a 4xx status code +func (o *GetUsersSharedWithYouForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get users shared with you forbidden response has a 5xx status code +func (o *GetUsersSharedWithYouForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get users shared with you forbidden response a status code equal to that given +func (o *GetUsersSharedWithYouForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get users shared with you forbidden response +func (o *GetUsersSharedWithYouForbidden) Code() int { + return 403 +} + +func (o *GetUsersSharedWithYouForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/shared-with-you][%d] getUsersSharedWithYouForbidden %s", 403, payload) +} + +func (o *GetUsersSharedWithYouForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/shared-with-you][%d] getUsersSharedWithYouForbidden %s", 403, payload) +} + +func (o *GetUsersSharedWithYouForbidden) GetPayload() *GetUsersSharedWithYouForbiddenBody { + return o.Payload +} + +func (o *GetUsersSharedWithYouForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetUsersSharedWithYouForbiddenBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersSharedWithYouInternalServerError creates a GetUsersSharedWithYouInternalServerError with default headers values +func NewGetUsersSharedWithYouInternalServerError() *GetUsersSharedWithYouInternalServerError { + return &GetUsersSharedWithYouInternalServerError{} +} + +/* +GetUsersSharedWithYouInternalServerError describes a response with status code 500, with default header values. + +Request failed. Internal server error. +*/ +type GetUsersSharedWithYouInternalServerError struct { + Payload *GetUsersSharedWithYouInternalServerErrorBody +} + +// IsSuccess returns true when this get users shared with you internal server error response has a 2xx status code +func (o *GetUsersSharedWithYouInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get users shared with you internal server error response has a 3xx status code +func (o *GetUsersSharedWithYouInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get users shared with you internal server error response has a 4xx status code +func (o *GetUsersSharedWithYouInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get users shared with you internal server error response has a 5xx status code +func (o *GetUsersSharedWithYouInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get users shared with you internal server error response a status code equal to that given +func (o *GetUsersSharedWithYouInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get users shared with you internal server error response +func (o *GetUsersSharedWithYouInternalServerError) Code() int { + return 500 +} + +func (o *GetUsersSharedWithYouInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/shared-with-you][%d] getUsersSharedWithYouInternalServerError %s", 500, payload) +} + +func (o *GetUsersSharedWithYouInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/shared-with-you][%d] getUsersSharedWithYouInternalServerError %s", 500, payload) +} + +func (o *GetUsersSharedWithYouInternalServerError) GetPayload() *GetUsersSharedWithYouInternalServerErrorBody { + return o.Payload +} + +func (o *GetUsersSharedWithYouInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetUsersSharedWithYouInternalServerErrorBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +GetUsersSharedWithYouForbiddenBody get users shared with you forbidden body +swagger:model GetUsersSharedWithYouForbiddenBody +*/ +type GetUsersSharedWithYouForbiddenBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this get users shared with you forbidden body +func (o *GetUsersSharedWithYouForbiddenBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get users shared with you forbidden body based on context it is used +func (o *GetUsersSharedWithYouForbiddenBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetUsersSharedWithYouForbiddenBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetUsersSharedWithYouForbiddenBody) UnmarshalBinary(b []byte) error { + var res GetUsersSharedWithYouForbiddenBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetUsersSharedWithYouInternalServerErrorBody get users shared with you internal server error body +swagger:model GetUsersSharedWithYouInternalServerErrorBody +*/ +type GetUsersSharedWithYouInternalServerErrorBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this get users shared with you internal server error body +func (o *GetUsersSharedWithYouInternalServerErrorBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get users shared with you internal server error body based on context it is used +func (o *GetUsersSharedWithYouInternalServerErrorBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetUsersSharedWithYouInternalServerErrorBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetUsersSharedWithYouInternalServerErrorBody) UnmarshalBinary(b []byte) error { + var res GetUsersSharedWithYouInternalServerErrorBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetUsersSharedWithYouOKBody get users shared with you o k body +swagger:model GetUsersSharedWithYouOKBody +*/ +type GetUsersSharedWithYouOKBody struct { + + // users + Users []*GetUsersSharedWithYouOKBodyUsersItems0 `json:"users"` +} + +// Validate validates this get users shared with you o k body +func (o *GetUsersSharedWithYouOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateUsers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *GetUsersSharedWithYouOKBody) validateUsers(formats strfmt.Registry) error { + if swag.IsZero(o.Users) { // not required + return nil + } + + for i := 0; i < len(o.Users); i++ { + if swag.IsZero(o.Users[i]) { // not required + continue + } + + if o.Users[i] != nil { + if err := o.Users[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("getUsersSharedWithYouOK" + "." + "users" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("getUsersSharedWithYouOK" + "." + "users" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this get users shared with you o k body based on the context it is used +func (o *GetUsersSharedWithYouOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateUsers(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *GetUsersSharedWithYouOKBody) contextValidateUsers(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Users); i++ { + + if o.Users[i] != nil { + + if swag.IsZero(o.Users[i]) { // not required + return nil + } + + if err := o.Users[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("getUsersSharedWithYouOK" + "." + "users" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("getUsersSharedWithYouOK" + "." + "users" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *GetUsersSharedWithYouOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetUsersSharedWithYouOKBody) UnmarshalBinary(b []byte) error { + var res GetUsersSharedWithYouOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetUsersSharedWithYouOKBodyUsersItems0 get users shared with you o k body users items0 +swagger:model GetUsersSharedWithYouOKBodyUsersItems0 +*/ +type GetUsersSharedWithYouOKBodyUsersItems0 struct { + + // email + Email string `json:"email,omitempty"` +} + +// Validate validates this get users shared with you o k body users items0 +func (o *GetUsersSharedWithYouOKBodyUsersItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get users shared with you o k body users items0 based on context it is used +func (o *GetUsersSharedWithYouOKBodyUsersItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetUsersSharedWithYouOKBodyUsersItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetUsersSharedWithYouOKBodyUsersItems0) UnmarshalBinary(b []byte) error { + var res GetUsersSharedWithYouOKBodyUsersItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetUsersSharedWithYouUnauthorizedBody get users shared with you unauthorized body +swagger:model GetUsersSharedWithYouUnauthorizedBody +*/ +type GetUsersSharedWithYouUnauthorizedBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this get users shared with you unauthorized body +func (o *GetUsersSharedWithYouUnauthorizedBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get users shared with you unauthorized body based on context it is used +func (o *GetUsersSharedWithYouUnauthorizedBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetUsersSharedWithYouUnauthorizedBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetUsersSharedWithYouUnauthorizedBody) UnmarshalBinary(b []byte) error { + var res GetUsersSharedWithYouUnauthorizedBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/client/operations/get_users_you_shared_with_parameters.go b/client/operations/get_users_you_shared_with_parameters.go new file mode 100644 index 0000000..1622b02 --- /dev/null +++ b/client/operations/get_users_you_shared_with_parameters.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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" +) + +// NewGetUsersYouSharedWithParams creates a new GetUsersYouSharedWithParams 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 NewGetUsersYouSharedWithParams() *GetUsersYouSharedWithParams { + return &GetUsersYouSharedWithParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetUsersYouSharedWithParamsWithTimeout creates a new GetUsersYouSharedWithParams object +// with the ability to set a timeout on a request. +func NewGetUsersYouSharedWithParamsWithTimeout(timeout time.Duration) *GetUsersYouSharedWithParams { + return &GetUsersYouSharedWithParams{ + timeout: timeout, + } +} + +// NewGetUsersYouSharedWithParamsWithContext creates a new GetUsersYouSharedWithParams object +// with the ability to set a context for a request. +func NewGetUsersYouSharedWithParamsWithContext(ctx context.Context) *GetUsersYouSharedWithParams { + return &GetUsersYouSharedWithParams{ + Context: ctx, + } +} + +// NewGetUsersYouSharedWithParamsWithHTTPClient creates a new GetUsersYouSharedWithParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetUsersYouSharedWithParamsWithHTTPClient(client *http.Client) *GetUsersYouSharedWithParams { + return &GetUsersYouSharedWithParams{ + HTTPClient: client, + } +} + +/* +GetUsersYouSharedWithParams contains all the parameters to send to the API endpoint + + for the get users you shared with operation. + + Typically these are written to a http.Request. +*/ +type GetUsersYouSharedWithParams struct { + + /* AccessToken. + + API access_token of user. + */ + AccessToken *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get users you shared with params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetUsersYouSharedWithParams) WithDefaults() *GetUsersYouSharedWithParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get users you shared with params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetUsersYouSharedWithParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get users you shared with params +func (o *GetUsersYouSharedWithParams) WithTimeout(timeout time.Duration) *GetUsersYouSharedWithParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get users you shared with params +func (o *GetUsersYouSharedWithParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get users you shared with params +func (o *GetUsersYouSharedWithParams) WithContext(ctx context.Context) *GetUsersYouSharedWithParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get users you shared with params +func (o *GetUsersYouSharedWithParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get users you shared with params +func (o *GetUsersYouSharedWithParams) WithHTTPClient(client *http.Client) *GetUsersYouSharedWithParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get users you shared with params +func (o *GetUsersYouSharedWithParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccessToken adds the accessToken to the get users you shared with params +func (o *GetUsersYouSharedWithParams) WithAccessToken(accessToken *string) *GetUsersYouSharedWithParams { + o.SetAccessToken(accessToken) + return o +} + +// SetAccessToken adds the accessToken to the get users you shared with params +func (o *GetUsersYouSharedWithParams) SetAccessToken(accessToken *string) { + o.AccessToken = accessToken +} + +// WriteToRequest writes these params to a swagger request +func (o *GetUsersYouSharedWithParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccessToken != nil { + + // query param access_token + var qrAccessToken string + + if o.AccessToken != nil { + qrAccessToken = *o.AccessToken + } + qAccessToken := qrAccessToken + if qAccessToken != "" { + + if err := r.SetQueryParam("access_token", qAccessToken); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/client/operations/get_users_you_shared_with_responses.go b/client/operations/get_users_you_shared_with_responses.go new file mode 100644 index 0000000..4677076 --- /dev/null +++ b/client/operations/get_users_you_shared_with_responses.go @@ -0,0 +1,595 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GetUsersYouSharedWithReader is a Reader for the GetUsersYouSharedWith structure. +type GetUsersYouSharedWithReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetUsersYouSharedWithReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetUsersYouSharedWithOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetUsersYouSharedWithUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetUsersYouSharedWithForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetUsersYouSharedWithInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /api/users/you-shared-with] get_users_you_shared_with", response, response.Code()) + } +} + +// NewGetUsersYouSharedWithOK creates a GetUsersYouSharedWithOK with default headers values +func NewGetUsersYouSharedWithOK() *GetUsersYouSharedWithOK { + return &GetUsersYouSharedWithOK{} +} + +/* +GetUsersYouSharedWithOK describes a response with status code 200, with default header values. + +Users that the authenticated user shared workflow(s) with. +*/ +type GetUsersYouSharedWithOK struct { + Payload *GetUsersYouSharedWithOKBody +} + +// IsSuccess returns true when this get users you shared with o k response has a 2xx status code +func (o *GetUsersYouSharedWithOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get users you shared with o k response has a 3xx status code +func (o *GetUsersYouSharedWithOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get users you shared with o k response has a 4xx status code +func (o *GetUsersYouSharedWithOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get users you shared with o k response has a 5xx status code +func (o *GetUsersYouSharedWithOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get users you shared with o k response a status code equal to that given +func (o *GetUsersYouSharedWithOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get users you shared with o k response +func (o *GetUsersYouSharedWithOK) Code() int { + return 200 +} + +func (o *GetUsersYouSharedWithOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/you-shared-with][%d] getUsersYouSharedWithOK %s", 200, payload) +} + +func (o *GetUsersYouSharedWithOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/you-shared-with][%d] getUsersYouSharedWithOK %s", 200, payload) +} + +func (o *GetUsersYouSharedWithOK) GetPayload() *GetUsersYouSharedWithOKBody { + return o.Payload +} + +func (o *GetUsersYouSharedWithOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetUsersYouSharedWithOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersYouSharedWithUnauthorized creates a GetUsersYouSharedWithUnauthorized with default headers values +func NewGetUsersYouSharedWithUnauthorized() *GetUsersYouSharedWithUnauthorized { + return &GetUsersYouSharedWithUnauthorized{} +} + +/* +GetUsersYouSharedWithUnauthorized describes a response with status code 401, with default header values. + +Error message indicating that the uses is not authenticated. +*/ +type GetUsersYouSharedWithUnauthorized struct { + Payload *GetUsersYouSharedWithUnauthorizedBody +} + +// IsSuccess returns true when this get users you shared with unauthorized response has a 2xx status code +func (o *GetUsersYouSharedWithUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get users you shared with unauthorized response has a 3xx status code +func (o *GetUsersYouSharedWithUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get users you shared with unauthorized response has a 4xx status code +func (o *GetUsersYouSharedWithUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get users you shared with unauthorized response has a 5xx status code +func (o *GetUsersYouSharedWithUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get users you shared with unauthorized response a status code equal to that given +func (o *GetUsersYouSharedWithUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get users you shared with unauthorized response +func (o *GetUsersYouSharedWithUnauthorized) Code() int { + return 401 +} + +func (o *GetUsersYouSharedWithUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/you-shared-with][%d] getUsersYouSharedWithUnauthorized %s", 401, payload) +} + +func (o *GetUsersYouSharedWithUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/you-shared-with][%d] getUsersYouSharedWithUnauthorized %s", 401, payload) +} + +func (o *GetUsersYouSharedWithUnauthorized) GetPayload() *GetUsersYouSharedWithUnauthorizedBody { + return o.Payload +} + +func (o *GetUsersYouSharedWithUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetUsersYouSharedWithUnauthorizedBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersYouSharedWithForbidden creates a GetUsersYouSharedWithForbidden with default headers values +func NewGetUsersYouSharedWithForbidden() *GetUsersYouSharedWithForbidden { + return &GetUsersYouSharedWithForbidden{} +} + +/* +GetUsersYouSharedWithForbidden describes a response with status code 403, with default header values. + +Request failed. User token not valid. +*/ +type GetUsersYouSharedWithForbidden struct { + Payload *GetUsersYouSharedWithForbiddenBody +} + +// IsSuccess returns true when this get users you shared with forbidden response has a 2xx status code +func (o *GetUsersYouSharedWithForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get users you shared with forbidden response has a 3xx status code +func (o *GetUsersYouSharedWithForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get users you shared with forbidden response has a 4xx status code +func (o *GetUsersYouSharedWithForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get users you shared with forbidden response has a 5xx status code +func (o *GetUsersYouSharedWithForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get users you shared with forbidden response a status code equal to that given +func (o *GetUsersYouSharedWithForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get users you shared with forbidden response +func (o *GetUsersYouSharedWithForbidden) Code() int { + return 403 +} + +func (o *GetUsersYouSharedWithForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/you-shared-with][%d] getUsersYouSharedWithForbidden %s", 403, payload) +} + +func (o *GetUsersYouSharedWithForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/you-shared-with][%d] getUsersYouSharedWithForbidden %s", 403, payload) +} + +func (o *GetUsersYouSharedWithForbidden) GetPayload() *GetUsersYouSharedWithForbiddenBody { + return o.Payload +} + +func (o *GetUsersYouSharedWithForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetUsersYouSharedWithForbiddenBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersYouSharedWithInternalServerError creates a GetUsersYouSharedWithInternalServerError with default headers values +func NewGetUsersYouSharedWithInternalServerError() *GetUsersYouSharedWithInternalServerError { + return &GetUsersYouSharedWithInternalServerError{} +} + +/* +GetUsersYouSharedWithInternalServerError describes a response with status code 500, with default header values. + +Request failed. Internal server error. +*/ +type GetUsersYouSharedWithInternalServerError struct { + Payload *GetUsersYouSharedWithInternalServerErrorBody +} + +// IsSuccess returns true when this get users you shared with internal server error response has a 2xx status code +func (o *GetUsersYouSharedWithInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get users you shared with internal server error response has a 3xx status code +func (o *GetUsersYouSharedWithInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get users you shared with internal server error response has a 4xx status code +func (o *GetUsersYouSharedWithInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get users you shared with internal server error response has a 5xx status code +func (o *GetUsersYouSharedWithInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get users you shared with internal server error response a status code equal to that given +func (o *GetUsersYouSharedWithInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get users you shared with internal server error response +func (o *GetUsersYouSharedWithInternalServerError) Code() int { + return 500 +} + +func (o *GetUsersYouSharedWithInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/you-shared-with][%d] getUsersYouSharedWithInternalServerError %s", 500, payload) +} + +func (o *GetUsersYouSharedWithInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/users/you-shared-with][%d] getUsersYouSharedWithInternalServerError %s", 500, payload) +} + +func (o *GetUsersYouSharedWithInternalServerError) GetPayload() *GetUsersYouSharedWithInternalServerErrorBody { + return o.Payload +} + +func (o *GetUsersYouSharedWithInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetUsersYouSharedWithInternalServerErrorBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +GetUsersYouSharedWithForbiddenBody get users you shared with forbidden body +swagger:model GetUsersYouSharedWithForbiddenBody +*/ +type GetUsersYouSharedWithForbiddenBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this get users you shared with forbidden body +func (o *GetUsersYouSharedWithForbiddenBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get users you shared with forbidden body based on context it is used +func (o *GetUsersYouSharedWithForbiddenBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetUsersYouSharedWithForbiddenBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetUsersYouSharedWithForbiddenBody) UnmarshalBinary(b []byte) error { + var res GetUsersYouSharedWithForbiddenBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetUsersYouSharedWithInternalServerErrorBody get users you shared with internal server error body +swagger:model GetUsersYouSharedWithInternalServerErrorBody +*/ +type GetUsersYouSharedWithInternalServerErrorBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this get users you shared with internal server error body +func (o *GetUsersYouSharedWithInternalServerErrorBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get users you shared with internal server error body based on context it is used +func (o *GetUsersYouSharedWithInternalServerErrorBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetUsersYouSharedWithInternalServerErrorBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetUsersYouSharedWithInternalServerErrorBody) UnmarshalBinary(b []byte) error { + var res GetUsersYouSharedWithInternalServerErrorBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetUsersYouSharedWithOKBody get users you shared with o k body +swagger:model GetUsersYouSharedWithOKBody +*/ +type GetUsersYouSharedWithOKBody struct { + + // users + Users []*GetUsersYouSharedWithOKBodyUsersItems0 `json:"users"` +} + +// Validate validates this get users you shared with o k body +func (o *GetUsersYouSharedWithOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateUsers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *GetUsersYouSharedWithOKBody) validateUsers(formats strfmt.Registry) error { + if swag.IsZero(o.Users) { // not required + return nil + } + + for i := 0; i < len(o.Users); i++ { + if swag.IsZero(o.Users[i]) { // not required + continue + } + + if o.Users[i] != nil { + if err := o.Users[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("getUsersYouSharedWithOK" + "." + "users" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("getUsersYouSharedWithOK" + "." + "users" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this get users you shared with o k body based on the context it is used +func (o *GetUsersYouSharedWithOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateUsers(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *GetUsersYouSharedWithOKBody) contextValidateUsers(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Users); i++ { + + if o.Users[i] != nil { + + if swag.IsZero(o.Users[i]) { // not required + return nil + } + + if err := o.Users[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("getUsersYouSharedWithOK" + "." + "users" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("getUsersYouSharedWithOK" + "." + "users" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *GetUsersYouSharedWithOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetUsersYouSharedWithOKBody) UnmarshalBinary(b []byte) error { + var res GetUsersYouSharedWithOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetUsersYouSharedWithOKBodyUsersItems0 get users you shared with o k body users items0 +swagger:model GetUsersYouSharedWithOKBodyUsersItems0 +*/ +type GetUsersYouSharedWithOKBodyUsersItems0 struct { + + // email + Email string `json:"email,omitempty"` +} + +// Validate validates this get users you shared with o k body users items0 +func (o *GetUsersYouSharedWithOKBodyUsersItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get users you shared with o k body users items0 based on context it is used +func (o *GetUsersYouSharedWithOKBodyUsersItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetUsersYouSharedWithOKBodyUsersItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetUsersYouSharedWithOKBodyUsersItems0) UnmarshalBinary(b []byte) error { + var res GetUsersYouSharedWithOKBodyUsersItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetUsersYouSharedWithUnauthorizedBody get users you shared with unauthorized body +swagger:model GetUsersYouSharedWithUnauthorizedBody +*/ +type GetUsersYouSharedWithUnauthorizedBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this get users you shared with unauthorized body +func (o *GetUsersYouSharedWithUnauthorizedBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get users you shared with unauthorized body based on context it is used +func (o *GetUsersYouSharedWithUnauthorizedBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetUsersYouSharedWithUnauthorizedBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetUsersYouSharedWithUnauthorizedBody) UnmarshalBinary(b []byte) error { + var res GetUsersYouSharedWithUnauthorizedBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/client/operations/get_workflow_diff_responses.go b/client/operations/get_workflow_diff_responses.go index adb45d7..a5e2620 100644 --- a/client/operations/get_workflow_diff_responses.go +++ b/client/operations/get_workflow_diff_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *GetWorkflowDiffOK) Code() int { } func (o *GetWorkflowDiffOK) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffOK %s", 200, payload) } func (o *GetWorkflowDiffOK) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffOK %s", 200, payload) } func (o *GetWorkflowDiffOK) GetPayload() *GetWorkflowDiffOKBody { @@ -171,11 +174,13 @@ func (o *GetWorkflowDiffBadRequest) Code() int { } func (o *GetWorkflowDiffBadRequest) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffBadRequest %s", 400, payload) } func (o *GetWorkflowDiffBadRequest) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffBadRequest %s", 400, payload) } func (o *GetWorkflowDiffBadRequest) GetPayload() *GetWorkflowDiffBadRequestBody { @@ -239,11 +244,13 @@ func (o *GetWorkflowDiffForbidden) Code() int { } func (o *GetWorkflowDiffForbidden) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffForbidden %s", 403, payload) } func (o *GetWorkflowDiffForbidden) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffForbidden %s", 403, payload) } func (o *GetWorkflowDiffForbidden) GetPayload() *GetWorkflowDiffForbiddenBody { @@ -307,11 +314,13 @@ func (o *GetWorkflowDiffNotFound) Code() int { } func (o *GetWorkflowDiffNotFound) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffNotFound %s", 404, payload) } func (o *GetWorkflowDiffNotFound) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffNotFound %s", 404, payload) } func (o *GetWorkflowDiffNotFound) GetPayload() *GetWorkflowDiffNotFoundBody { @@ -375,11 +384,13 @@ func (o *GetWorkflowDiffInternalServerError) Code() int { } func (o *GetWorkflowDiffInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffInternalServerError %s", 500, payload) } func (o *GetWorkflowDiffInternalServerError) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name_a}/diff/{workflow_id_or_name_b}][%d] getWorkflowDiffInternalServerError %s", 500, payload) } func (o *GetWorkflowDiffInternalServerError) GetPayload() *GetWorkflowDiffInternalServerErrorBody { diff --git a/client/operations/get_workflow_disk_usage_responses.go b/client/operations/get_workflow_disk_usage_responses.go index 3294038..a7885eb 100644 --- a/client/operations/get_workflow_disk_usage_responses.go +++ b/client/operations/get_workflow_disk_usage_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" "strconv" @@ -105,11 +106,13 @@ func (o *GetWorkflowDiskUsageOK) Code() int { } func (o *GetWorkflowDiskUsageOK) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageOK %s", 200, payload) } func (o *GetWorkflowDiskUsageOK) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageOK %s", 200, payload) } func (o *GetWorkflowDiskUsageOK) GetPayload() *GetWorkflowDiskUsageOKBody { @@ -173,11 +176,13 @@ func (o *GetWorkflowDiskUsageBadRequest) Code() int { } func (o *GetWorkflowDiskUsageBadRequest) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageBadRequest %s", 400, payload) } func (o *GetWorkflowDiskUsageBadRequest) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageBadRequest %s", 400, payload) } func (o *GetWorkflowDiskUsageBadRequest) GetPayload() *GetWorkflowDiskUsageBadRequestBody { @@ -241,11 +246,13 @@ func (o *GetWorkflowDiskUsageForbidden) Code() int { } func (o *GetWorkflowDiskUsageForbidden) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageForbidden %s", 403, payload) } func (o *GetWorkflowDiskUsageForbidden) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageForbidden %s", 403, payload) } func (o *GetWorkflowDiskUsageForbidden) GetPayload() *GetWorkflowDiskUsageForbiddenBody { @@ -309,11 +316,13 @@ func (o *GetWorkflowDiskUsageNotFound) Code() int { } func (o *GetWorkflowDiskUsageNotFound) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageNotFound %s", 404, payload) } func (o *GetWorkflowDiskUsageNotFound) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageNotFound %s", 404, payload) } func (o *GetWorkflowDiskUsageNotFound) GetPayload() *GetWorkflowDiskUsageNotFoundBody { @@ -377,11 +386,13 @@ func (o *GetWorkflowDiskUsageInternalServerError) Code() int { } func (o *GetWorkflowDiskUsageInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageInternalServerError %s", 500, payload) } func (o *GetWorkflowDiskUsageInternalServerError) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/disk_usage][%d] getWorkflowDiskUsageInternalServerError %s", 500, payload) } func (o *GetWorkflowDiskUsageInternalServerError) GetPayload() *GetWorkflowDiskUsageInternalServerErrorBody { diff --git a/client/operations/get_workflow_logs_responses.go b/client/operations/get_workflow_logs_responses.go index 24a2288..b6889fa 100644 --- a/client/operations/get_workflow_logs_responses.go +++ b/client/operations/get_workflow_logs_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *GetWorkflowLogsOK) Code() int { } func (o *GetWorkflowLogsOK) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsOK %s", 200, payload) } func (o *GetWorkflowLogsOK) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsOK %s", 200, payload) } func (o *GetWorkflowLogsOK) GetPayload() *GetWorkflowLogsOKBody { @@ -171,11 +174,13 @@ func (o *GetWorkflowLogsBadRequest) Code() int { } func (o *GetWorkflowLogsBadRequest) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsBadRequest %s", 400, payload) } func (o *GetWorkflowLogsBadRequest) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsBadRequest %s", 400, payload) } func (o *GetWorkflowLogsBadRequest) GetPayload() *GetWorkflowLogsBadRequestBody { @@ -239,11 +244,13 @@ func (o *GetWorkflowLogsForbidden) Code() int { } func (o *GetWorkflowLogsForbidden) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsForbidden %s", 403, payload) } func (o *GetWorkflowLogsForbidden) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsForbidden %s", 403, payload) } func (o *GetWorkflowLogsForbidden) GetPayload() *GetWorkflowLogsForbiddenBody { @@ -307,11 +314,13 @@ func (o *GetWorkflowLogsNotFound) Code() int { } func (o *GetWorkflowLogsNotFound) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsNotFound %s", 404, payload) } func (o *GetWorkflowLogsNotFound) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsNotFound %s", 404, payload) } func (o *GetWorkflowLogsNotFound) GetPayload() *GetWorkflowLogsNotFoundBody { @@ -375,11 +384,13 @@ func (o *GetWorkflowLogsInternalServerError) Code() int { } func (o *GetWorkflowLogsInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsInternalServerError %s", 500, payload) } func (o *GetWorkflowLogsInternalServerError) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/logs][%d] getWorkflowLogsInternalServerError %s", 500, payload) } func (o *GetWorkflowLogsInternalServerError) GetPayload() *GetWorkflowLogsInternalServerErrorBody { diff --git a/client/operations/get_workflow_parameters_responses.go b/client/operations/get_workflow_parameters_responses.go index 59b536f..c662665 100644 --- a/client/operations/get_workflow_parameters_responses.go +++ b/client/operations/get_workflow_parameters_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -104,11 +105,13 @@ func (o *GetWorkflowParametersOK) Code() int { } func (o *GetWorkflowParametersOK) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersOK %s", 200, payload) } func (o *GetWorkflowParametersOK) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersOK %s", 200, payload) } func (o *GetWorkflowParametersOK) GetPayload() *GetWorkflowParametersOKBody { @@ -172,11 +175,13 @@ func (o *GetWorkflowParametersBadRequest) Code() int { } func (o *GetWorkflowParametersBadRequest) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersBadRequest %s", 400, payload) } func (o *GetWorkflowParametersBadRequest) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersBadRequest %s", 400, payload) } func (o *GetWorkflowParametersBadRequest) GetPayload() *GetWorkflowParametersBadRequestBody { @@ -240,11 +245,13 @@ func (o *GetWorkflowParametersForbidden) Code() int { } func (o *GetWorkflowParametersForbidden) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersForbidden %s", 403, payload) } func (o *GetWorkflowParametersForbidden) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersForbidden %s", 403, payload) } func (o *GetWorkflowParametersForbidden) GetPayload() *GetWorkflowParametersForbiddenBody { @@ -308,11 +315,13 @@ func (o *GetWorkflowParametersNotFound) Code() int { } func (o *GetWorkflowParametersNotFound) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersNotFound %s", 404, payload) } func (o *GetWorkflowParametersNotFound) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersNotFound %s", 404, payload) } func (o *GetWorkflowParametersNotFound) GetPayload() *GetWorkflowParametersNotFoundBody { @@ -376,11 +385,13 @@ func (o *GetWorkflowParametersInternalServerError) Code() int { } func (o *GetWorkflowParametersInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersInternalServerError %s", 500, payload) } func (o *GetWorkflowParametersInternalServerError) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/parameters][%d] getWorkflowParametersInternalServerError %s", 500, payload) } func (o *GetWorkflowParametersInternalServerError) GetPayload() *GetWorkflowParametersInternalServerErrorBody { @@ -565,8 +576,7 @@ type GetWorkflowParametersOKBody struct { // parameters // - // Min Properties: 0 - // Min Properties: 0 + // MinProperties: 0 Parameters map[string]interface{} `json:"parameters,omitempty"` // type diff --git a/client/operations/get_workflow_retention_rules_responses.go b/client/operations/get_workflow_retention_rules_responses.go index cdb1916..425e1f7 100644 --- a/client/operations/get_workflow_retention_rules_responses.go +++ b/client/operations/get_workflow_retention_rules_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" "strconv" @@ -105,11 +106,13 @@ func (o *GetWorkflowRetentionRulesOK) Code() int { } func (o *GetWorkflowRetentionRulesOK) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesOK %s", 200, payload) } func (o *GetWorkflowRetentionRulesOK) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesOK %s", 200, payload) } func (o *GetWorkflowRetentionRulesOK) GetPayload() *GetWorkflowRetentionRulesOKBody { @@ -173,11 +176,13 @@ func (o *GetWorkflowRetentionRulesUnauthorized) Code() int { } func (o *GetWorkflowRetentionRulesUnauthorized) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesUnauthorized %s", 401, payload) } func (o *GetWorkflowRetentionRulesUnauthorized) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesUnauthorized %s", 401, payload) } func (o *GetWorkflowRetentionRulesUnauthorized) GetPayload() *GetWorkflowRetentionRulesUnauthorizedBody { @@ -241,11 +246,13 @@ func (o *GetWorkflowRetentionRulesForbidden) Code() int { } func (o *GetWorkflowRetentionRulesForbidden) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesForbidden %s", 403, payload) } func (o *GetWorkflowRetentionRulesForbidden) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesForbidden %s", 403, payload) } func (o *GetWorkflowRetentionRulesForbidden) GetPayload() *GetWorkflowRetentionRulesForbiddenBody { @@ -309,11 +316,13 @@ func (o *GetWorkflowRetentionRulesNotFound) Code() int { } func (o *GetWorkflowRetentionRulesNotFound) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesNotFound %s", 404, payload) } func (o *GetWorkflowRetentionRulesNotFound) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesNotFound %s", 404, payload) } func (o *GetWorkflowRetentionRulesNotFound) GetPayload() *GetWorkflowRetentionRulesNotFoundBody { @@ -377,11 +386,13 @@ func (o *GetWorkflowRetentionRulesInternalServerError) Code() int { } func (o *GetWorkflowRetentionRulesInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesInternalServerError %s", 500, payload) } func (o *GetWorkflowRetentionRulesInternalServerError) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/retention_rules][%d] getWorkflowRetentionRulesInternalServerError %s", 500, payload) } func (o *GetWorkflowRetentionRulesInternalServerError) GetPayload() *GetWorkflowRetentionRulesInternalServerErrorBody { diff --git a/client/operations/get_workflow_share_status_parameters.go b/client/operations/get_workflow_share_status_parameters.go new file mode 100644 index 0000000..79ce152 --- /dev/null +++ b/client/operations/get_workflow_share_status_parameters.go @@ -0,0 +1,185 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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" +) + +// NewGetWorkflowShareStatusParams creates a new GetWorkflowShareStatusParams 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 NewGetWorkflowShareStatusParams() *GetWorkflowShareStatusParams { + return &GetWorkflowShareStatusParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetWorkflowShareStatusParamsWithTimeout creates a new GetWorkflowShareStatusParams object +// with the ability to set a timeout on a request. +func NewGetWorkflowShareStatusParamsWithTimeout(timeout time.Duration) *GetWorkflowShareStatusParams { + return &GetWorkflowShareStatusParams{ + timeout: timeout, + } +} + +// NewGetWorkflowShareStatusParamsWithContext creates a new GetWorkflowShareStatusParams object +// with the ability to set a context for a request. +func NewGetWorkflowShareStatusParamsWithContext(ctx context.Context) *GetWorkflowShareStatusParams { + return &GetWorkflowShareStatusParams{ + Context: ctx, + } +} + +// NewGetWorkflowShareStatusParamsWithHTTPClient creates a new GetWorkflowShareStatusParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetWorkflowShareStatusParamsWithHTTPClient(client *http.Client) *GetWorkflowShareStatusParams { + return &GetWorkflowShareStatusParams{ + HTTPClient: client, + } +} + +/* +GetWorkflowShareStatusParams contains all the parameters to send to the API endpoint + + for the get workflow share status operation. + + Typically these are written to a http.Request. +*/ +type GetWorkflowShareStatusParams struct { + + /* AccessToken. + + The API access_token of workflow owner. + */ + AccessToken *string + + /* WorkflowIDOrName. + + Required. Workflow UUID or name. + */ + WorkflowIDOrName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get workflow share status params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetWorkflowShareStatusParams) WithDefaults() *GetWorkflowShareStatusParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get workflow share status params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetWorkflowShareStatusParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get workflow share status params +func (o *GetWorkflowShareStatusParams) WithTimeout(timeout time.Duration) *GetWorkflowShareStatusParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get workflow share status params +func (o *GetWorkflowShareStatusParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get workflow share status params +func (o *GetWorkflowShareStatusParams) WithContext(ctx context.Context) *GetWorkflowShareStatusParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get workflow share status params +func (o *GetWorkflowShareStatusParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get workflow share status params +func (o *GetWorkflowShareStatusParams) WithHTTPClient(client *http.Client) *GetWorkflowShareStatusParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get workflow share status params +func (o *GetWorkflowShareStatusParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccessToken adds the accessToken to the get workflow share status params +func (o *GetWorkflowShareStatusParams) WithAccessToken(accessToken *string) *GetWorkflowShareStatusParams { + o.SetAccessToken(accessToken) + return o +} + +// SetAccessToken adds the accessToken to the get workflow share status params +func (o *GetWorkflowShareStatusParams) SetAccessToken(accessToken *string) { + o.AccessToken = accessToken +} + +// WithWorkflowIDOrName adds the workflowIDOrName to the get workflow share status params +func (o *GetWorkflowShareStatusParams) WithWorkflowIDOrName(workflowIDOrName string) *GetWorkflowShareStatusParams { + o.SetWorkflowIDOrName(workflowIDOrName) + return o +} + +// SetWorkflowIDOrName adds the workflowIdOrName to the get workflow share status params +func (o *GetWorkflowShareStatusParams) SetWorkflowIDOrName(workflowIDOrName string) { + o.WorkflowIDOrName = workflowIDOrName +} + +// WriteToRequest writes these params to a swagger request +func (o *GetWorkflowShareStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccessToken != nil { + + // query param access_token + var qrAccessToken string + + if o.AccessToken != nil { + qrAccessToken = *o.AccessToken + } + qAccessToken := qrAccessToken + if qAccessToken != "" { + + if err := r.SetQueryParam("access_token", qAccessToken); err != nil { + return err + } + } + } + + // path param workflow_id_or_name + if err := r.SetPathParam("workflow_id_or_name", o.WorkflowIDOrName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/client/operations/get_workflow_share_status_responses.go b/client/operations/get_workflow_share_status_responses.go new file mode 100644 index 0000000..bb17cf1 --- /dev/null +++ b/client/operations/get_workflow_share_status_responses.go @@ -0,0 +1,718 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GetWorkflowShareStatusReader is a Reader for the GetWorkflowShareStatus structure. +type GetWorkflowShareStatusReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetWorkflowShareStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetWorkflowShareStatusOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetWorkflowShareStatusUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetWorkflowShareStatusForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetWorkflowShareStatusNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetWorkflowShareStatusInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /api/workflows/{workflow_id_or_name}/share-status] get_workflow_share_status", response, response.Code()) + } +} + +// NewGetWorkflowShareStatusOK creates a GetWorkflowShareStatusOK with default headers values +func NewGetWorkflowShareStatusOK() *GetWorkflowShareStatusOK { + return &GetWorkflowShareStatusOK{} +} + +/* +GetWorkflowShareStatusOK describes a response with status code 200, with default header values. + +Request succeeded. The response contains the share status of the workflow. +*/ +type GetWorkflowShareStatusOK struct { + Payload *GetWorkflowShareStatusOKBody +} + +// IsSuccess returns true when this get workflow share status o k response has a 2xx status code +func (o *GetWorkflowShareStatusOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get workflow share status o k response has a 3xx status code +func (o *GetWorkflowShareStatusOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get workflow share status o k response has a 4xx status code +func (o *GetWorkflowShareStatusOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get workflow share status o k response has a 5xx status code +func (o *GetWorkflowShareStatusOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get workflow share status o k response a status code equal to that given +func (o *GetWorkflowShareStatusOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get workflow share status o k response +func (o *GetWorkflowShareStatusOK) Code() int { + return 200 +} + +func (o *GetWorkflowShareStatusOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/share-status][%d] getWorkflowShareStatusOK %s", 200, payload) +} + +func (o *GetWorkflowShareStatusOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/share-status][%d] getWorkflowShareStatusOK %s", 200, payload) +} + +func (o *GetWorkflowShareStatusOK) GetPayload() *GetWorkflowShareStatusOKBody { + return o.Payload +} + +func (o *GetWorkflowShareStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetWorkflowShareStatusOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetWorkflowShareStatusUnauthorized creates a GetWorkflowShareStatusUnauthorized with default headers values +func NewGetWorkflowShareStatusUnauthorized() *GetWorkflowShareStatusUnauthorized { + return &GetWorkflowShareStatusUnauthorized{} +} + +/* +GetWorkflowShareStatusUnauthorized describes a response with status code 401, with default header values. + +Request failed. User not signed in. +*/ +type GetWorkflowShareStatusUnauthorized struct { + Payload *GetWorkflowShareStatusUnauthorizedBody +} + +// IsSuccess returns true when this get workflow share status unauthorized response has a 2xx status code +func (o *GetWorkflowShareStatusUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get workflow share status unauthorized response has a 3xx status code +func (o *GetWorkflowShareStatusUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get workflow share status unauthorized response has a 4xx status code +func (o *GetWorkflowShareStatusUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this get workflow share status unauthorized response has a 5xx status code +func (o *GetWorkflowShareStatusUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this get workflow share status unauthorized response a status code equal to that given +func (o *GetWorkflowShareStatusUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the get workflow share status unauthorized response +func (o *GetWorkflowShareStatusUnauthorized) Code() int { + return 401 +} + +func (o *GetWorkflowShareStatusUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/share-status][%d] getWorkflowShareStatusUnauthorized %s", 401, payload) +} + +func (o *GetWorkflowShareStatusUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/share-status][%d] getWorkflowShareStatusUnauthorized %s", 401, payload) +} + +func (o *GetWorkflowShareStatusUnauthorized) GetPayload() *GetWorkflowShareStatusUnauthorizedBody { + return o.Payload +} + +func (o *GetWorkflowShareStatusUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetWorkflowShareStatusUnauthorizedBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetWorkflowShareStatusForbidden creates a GetWorkflowShareStatusForbidden with default headers values +func NewGetWorkflowShareStatusForbidden() *GetWorkflowShareStatusForbidden { + return &GetWorkflowShareStatusForbidden{} +} + +/* +GetWorkflowShareStatusForbidden describes a response with status code 403, with default header values. + +Request failed. Credentials are invalid or revoked. +*/ +type GetWorkflowShareStatusForbidden struct { + Payload *GetWorkflowShareStatusForbiddenBody +} + +// IsSuccess returns true when this get workflow share status forbidden response has a 2xx status code +func (o *GetWorkflowShareStatusForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get workflow share status forbidden response has a 3xx status code +func (o *GetWorkflowShareStatusForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get workflow share status forbidden response has a 4xx status code +func (o *GetWorkflowShareStatusForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this get workflow share status forbidden response has a 5xx status code +func (o *GetWorkflowShareStatusForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this get workflow share status forbidden response a status code equal to that given +func (o *GetWorkflowShareStatusForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the get workflow share status forbidden response +func (o *GetWorkflowShareStatusForbidden) Code() int { + return 403 +} + +func (o *GetWorkflowShareStatusForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/share-status][%d] getWorkflowShareStatusForbidden %s", 403, payload) +} + +func (o *GetWorkflowShareStatusForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/share-status][%d] getWorkflowShareStatusForbidden %s", 403, payload) +} + +func (o *GetWorkflowShareStatusForbidden) GetPayload() *GetWorkflowShareStatusForbiddenBody { + return o.Payload +} + +func (o *GetWorkflowShareStatusForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetWorkflowShareStatusForbiddenBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetWorkflowShareStatusNotFound creates a GetWorkflowShareStatusNotFound with default headers values +func NewGetWorkflowShareStatusNotFound() *GetWorkflowShareStatusNotFound { + return &GetWorkflowShareStatusNotFound{} +} + +/* +GetWorkflowShareStatusNotFound describes a response with status code 404, with default header values. + +Request failed. Workflow does not exist. +*/ +type GetWorkflowShareStatusNotFound struct { + Payload *GetWorkflowShareStatusNotFoundBody +} + +// IsSuccess returns true when this get workflow share status not found response has a 2xx status code +func (o *GetWorkflowShareStatusNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get workflow share status not found response has a 3xx status code +func (o *GetWorkflowShareStatusNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get workflow share status not found response has a 4xx status code +func (o *GetWorkflowShareStatusNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this get workflow share status not found response has a 5xx status code +func (o *GetWorkflowShareStatusNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this get workflow share status not found response a status code equal to that given +func (o *GetWorkflowShareStatusNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the get workflow share status not found response +func (o *GetWorkflowShareStatusNotFound) Code() int { + return 404 +} + +func (o *GetWorkflowShareStatusNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/share-status][%d] getWorkflowShareStatusNotFound %s", 404, payload) +} + +func (o *GetWorkflowShareStatusNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/share-status][%d] getWorkflowShareStatusNotFound %s", 404, payload) +} + +func (o *GetWorkflowShareStatusNotFound) GetPayload() *GetWorkflowShareStatusNotFoundBody { + return o.Payload +} + +func (o *GetWorkflowShareStatusNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetWorkflowShareStatusNotFoundBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetWorkflowShareStatusInternalServerError creates a GetWorkflowShareStatusInternalServerError with default headers values +func NewGetWorkflowShareStatusInternalServerError() *GetWorkflowShareStatusInternalServerError { + return &GetWorkflowShareStatusInternalServerError{} +} + +/* +GetWorkflowShareStatusInternalServerError describes a response with status code 500, with default header values. + +Request failed. Internal server error. +*/ +type GetWorkflowShareStatusInternalServerError struct { + Payload *GetWorkflowShareStatusInternalServerErrorBody +} + +// IsSuccess returns true when this get workflow share status internal server error response has a 2xx status code +func (o *GetWorkflowShareStatusInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this get workflow share status internal server error response has a 3xx status code +func (o *GetWorkflowShareStatusInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get workflow share status internal server error response has a 4xx status code +func (o *GetWorkflowShareStatusInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this get workflow share status internal server error response has a 5xx status code +func (o *GetWorkflowShareStatusInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this get workflow share status internal server error response a status code equal to that given +func (o *GetWorkflowShareStatusInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the get workflow share status internal server error response +func (o *GetWorkflowShareStatusInternalServerError) Code() int { + return 500 +} + +func (o *GetWorkflowShareStatusInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/share-status][%d] getWorkflowShareStatusInternalServerError %s", 500, payload) +} + +func (o *GetWorkflowShareStatusInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/share-status][%d] getWorkflowShareStatusInternalServerError %s", 500, payload) +} + +func (o *GetWorkflowShareStatusInternalServerError) GetPayload() *GetWorkflowShareStatusInternalServerErrorBody { + return o.Payload +} + +func (o *GetWorkflowShareStatusInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetWorkflowShareStatusInternalServerErrorBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +GetWorkflowShareStatusForbiddenBody get workflow share status forbidden body +swagger:model GetWorkflowShareStatusForbiddenBody +*/ +type GetWorkflowShareStatusForbiddenBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this get workflow share status forbidden body +func (o *GetWorkflowShareStatusForbiddenBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get workflow share status forbidden body based on context it is used +func (o *GetWorkflowShareStatusForbiddenBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetWorkflowShareStatusForbiddenBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetWorkflowShareStatusForbiddenBody) UnmarshalBinary(b []byte) error { + var res GetWorkflowShareStatusForbiddenBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetWorkflowShareStatusInternalServerErrorBody get workflow share status internal server error body +swagger:model GetWorkflowShareStatusInternalServerErrorBody +*/ +type GetWorkflowShareStatusInternalServerErrorBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this get workflow share status internal server error body +func (o *GetWorkflowShareStatusInternalServerErrorBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get workflow share status internal server error body based on context it is used +func (o *GetWorkflowShareStatusInternalServerErrorBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetWorkflowShareStatusInternalServerErrorBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetWorkflowShareStatusInternalServerErrorBody) UnmarshalBinary(b []byte) error { + var res GetWorkflowShareStatusInternalServerErrorBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetWorkflowShareStatusNotFoundBody get workflow share status not found body +swagger:model GetWorkflowShareStatusNotFoundBody +*/ +type GetWorkflowShareStatusNotFoundBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this get workflow share status not found body +func (o *GetWorkflowShareStatusNotFoundBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get workflow share status not found body based on context it is used +func (o *GetWorkflowShareStatusNotFoundBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetWorkflowShareStatusNotFoundBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetWorkflowShareStatusNotFoundBody) UnmarshalBinary(b []byte) error { + var res GetWorkflowShareStatusNotFoundBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetWorkflowShareStatusOKBody get workflow share status o k body +swagger:model GetWorkflowShareStatusOKBody +*/ +type GetWorkflowShareStatusOKBody struct { + + // shared with + SharedWith []*GetWorkflowShareStatusOKBodySharedWithItems0 `json:"shared_with"` + + // workflow id + WorkflowID string `json:"workflow_id,omitempty"` + + // workflow name + WorkflowName string `json:"workflow_name,omitempty"` +} + +// Validate validates this get workflow share status o k body +func (o *GetWorkflowShareStatusOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateSharedWith(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *GetWorkflowShareStatusOKBody) validateSharedWith(formats strfmt.Registry) error { + if swag.IsZero(o.SharedWith) { // not required + return nil + } + + for i := 0; i < len(o.SharedWith); i++ { + if swag.IsZero(o.SharedWith[i]) { // not required + continue + } + + if o.SharedWith[i] != nil { + if err := o.SharedWith[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("getWorkflowShareStatusOK" + "." + "shared_with" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("getWorkflowShareStatusOK" + "." + "shared_with" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this get workflow share status o k body based on the context it is used +func (o *GetWorkflowShareStatusOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateSharedWith(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *GetWorkflowShareStatusOKBody) contextValidateSharedWith(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.SharedWith); i++ { + + if o.SharedWith[i] != nil { + + if swag.IsZero(o.SharedWith[i]) { // not required + return nil + } + + if err := o.SharedWith[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("getWorkflowShareStatusOK" + "." + "shared_with" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("getWorkflowShareStatusOK" + "." + "shared_with" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *GetWorkflowShareStatusOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetWorkflowShareStatusOKBody) UnmarshalBinary(b []byte) error { + var res GetWorkflowShareStatusOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetWorkflowShareStatusOKBodySharedWithItems0 get workflow share status o k body shared with items0 +swagger:model GetWorkflowShareStatusOKBodySharedWithItems0 +*/ +type GetWorkflowShareStatusOKBodySharedWithItems0 struct { + + // user email + UserEmail string `json:"user_email,omitempty"` + + // valid until + ValidUntil *string `json:"valid_until,omitempty"` +} + +// Validate validates this get workflow share status o k body shared with items0 +func (o *GetWorkflowShareStatusOKBodySharedWithItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get workflow share status o k body shared with items0 based on context it is used +func (o *GetWorkflowShareStatusOKBodySharedWithItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetWorkflowShareStatusOKBodySharedWithItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetWorkflowShareStatusOKBodySharedWithItems0) UnmarshalBinary(b []byte) error { + var res GetWorkflowShareStatusOKBodySharedWithItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetWorkflowShareStatusUnauthorizedBody get workflow share status unauthorized body +swagger:model GetWorkflowShareStatusUnauthorizedBody +*/ +type GetWorkflowShareStatusUnauthorizedBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this get workflow share status unauthorized body +func (o *GetWorkflowShareStatusUnauthorizedBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get workflow share status unauthorized body based on context it is used +func (o *GetWorkflowShareStatusUnauthorizedBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetWorkflowShareStatusUnauthorizedBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetWorkflowShareStatusUnauthorizedBody) UnmarshalBinary(b []byte) error { + var res GetWorkflowShareStatusUnauthorizedBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/client/operations/get_workflow_specification_responses.go b/client/operations/get_workflow_specification_responses.go index 368758b..13b0a85 100644 --- a/client/operations/get_workflow_specification_responses.go +++ b/client/operations/get_workflow_specification_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -98,11 +99,13 @@ func (o *GetWorkflowSpecificationOK) Code() int { } func (o *GetWorkflowSpecificationOK) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationOK %s", 200, payload) } func (o *GetWorkflowSpecificationOK) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationOK %s", 200, payload) } func (o *GetWorkflowSpecificationOK) GetPayload() *GetWorkflowSpecificationOKBody { @@ -166,11 +169,13 @@ func (o *GetWorkflowSpecificationForbidden) Code() int { } func (o *GetWorkflowSpecificationForbidden) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationForbidden %s", 403, payload) } func (o *GetWorkflowSpecificationForbidden) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationForbidden %s", 403, payload) } func (o *GetWorkflowSpecificationForbidden) GetPayload() *GetWorkflowSpecificationForbiddenBody { @@ -234,11 +239,13 @@ func (o *GetWorkflowSpecificationNotFound) Code() int { } func (o *GetWorkflowSpecificationNotFound) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationNotFound %s", 404, payload) } func (o *GetWorkflowSpecificationNotFound) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationNotFound %s", 404, payload) } func (o *GetWorkflowSpecificationNotFound) GetPayload() *GetWorkflowSpecificationNotFoundBody { @@ -302,11 +309,13 @@ func (o *GetWorkflowSpecificationInternalServerError) Code() int { } func (o *GetWorkflowSpecificationInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationInternalServerError %s", 500, payload) } func (o *GetWorkflowSpecificationInternalServerError) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/specification][%d] getWorkflowSpecificationInternalServerError %s", 500, payload) } func (o *GetWorkflowSpecificationInternalServerError) GetPayload() *GetWorkflowSpecificationInternalServerErrorBody { diff --git a/client/operations/get_workflow_status_responses.go b/client/operations/get_workflow_status_responses.go index a75a429..8d9490a 100644 --- a/client/operations/get_workflow_status_responses.go +++ b/client/operations/get_workflow_status_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -104,11 +105,13 @@ func (o *GetWorkflowStatusOK) Code() int { } func (o *GetWorkflowStatusOK) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusOK %s", 200, payload) } func (o *GetWorkflowStatusOK) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusOK %s", 200, payload) } func (o *GetWorkflowStatusOK) GetPayload() *GetWorkflowStatusOKBody { @@ -172,11 +175,13 @@ func (o *GetWorkflowStatusBadRequest) Code() int { } func (o *GetWorkflowStatusBadRequest) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusBadRequest %s", 400, payload) } func (o *GetWorkflowStatusBadRequest) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusBadRequest %s", 400, payload) } func (o *GetWorkflowStatusBadRequest) GetPayload() *GetWorkflowStatusBadRequestBody { @@ -240,11 +245,13 @@ func (o *GetWorkflowStatusForbidden) Code() int { } func (o *GetWorkflowStatusForbidden) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusForbidden %s", 403, payload) } func (o *GetWorkflowStatusForbidden) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusForbidden %s", 403, payload) } func (o *GetWorkflowStatusForbidden) GetPayload() *GetWorkflowStatusForbiddenBody { @@ -308,11 +315,13 @@ func (o *GetWorkflowStatusNotFound) Code() int { } func (o *GetWorkflowStatusNotFound) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusNotFound %s", 404, payload) } func (o *GetWorkflowStatusNotFound) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusNotFound %s", 404, payload) } func (o *GetWorkflowStatusNotFound) GetPayload() *GetWorkflowStatusNotFoundBody { @@ -376,11 +385,13 @@ func (o *GetWorkflowStatusInternalServerError) Code() int { } func (o *GetWorkflowStatusInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusInternalServerError %s", 500, payload) } func (o *GetWorkflowStatusInternalServerError) String() string { - return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows/{workflow_id_or_name}/status][%d] getWorkflowStatusInternalServerError %s", 500, payload) } func (o *GetWorkflowStatusInternalServerError) GetPayload() *GetWorkflowStatusInternalServerErrorBody { diff --git a/client/operations/get_workflows_parameters.go b/client/operations/get_workflows_parameters.go index 1568456..7be3967 100644 --- a/client/operations/get_workflows_parameters.go +++ b/client/operations/get_workflows_parameters.go @@ -92,6 +92,24 @@ type GetWorkflowsParams struct { */ Search *string + /* Shared. + + Optional flag to list all shared (owned and unowned) workflows. + */ + Shared *bool + + /* SharedBy. + + Optional argument to list workflows shared by the specified user. + */ + SharedBy *string + + /* SharedWith. + + Optional argument to list workflows shared with the specified user. + */ + SharedWith *string + /* Size. Number of results per page (pagination). @@ -236,6 +254,39 @@ func (o *GetWorkflowsParams) SetSearch(search *string) { o.Search = search } +// WithShared adds the shared to the get workflows params +func (o *GetWorkflowsParams) WithShared(shared *bool) *GetWorkflowsParams { + o.SetShared(shared) + return o +} + +// SetShared adds the shared to the get workflows params +func (o *GetWorkflowsParams) SetShared(shared *bool) { + o.Shared = shared +} + +// WithSharedBy adds the sharedBy to the get workflows params +func (o *GetWorkflowsParams) WithSharedBy(sharedBy *string) *GetWorkflowsParams { + o.SetSharedBy(sharedBy) + return o +} + +// SetSharedBy adds the sharedBy to the get workflows params +func (o *GetWorkflowsParams) SetSharedBy(sharedBy *string) { + o.SharedBy = sharedBy +} + +// WithSharedWith adds the sharedWith to the get workflows params +func (o *GetWorkflowsParams) WithSharedWith(sharedWith *string) *GetWorkflowsParams { + o.SetSharedWith(sharedWith) + return o +} + +// SetSharedWith adds the sharedWith to the get workflows params +func (o *GetWorkflowsParams) SetSharedWith(sharedWith *string) { + o.SharedWith = sharedWith +} + // WithSize adds the size to the get workflows params func (o *GetWorkflowsParams) WithSize(size *int64) *GetWorkflowsParams { o.SetSize(size) @@ -395,6 +446,57 @@ func (o *GetWorkflowsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.Shared != nil { + + // query param shared + var qrShared bool + + if o.Shared != nil { + qrShared = *o.Shared + } + qShared := swag.FormatBool(qrShared) + if qShared != "" { + + if err := r.SetQueryParam("shared", qShared); err != nil { + return err + } + } + } + + if o.SharedBy != nil { + + // query param shared_by + var qrSharedBy string + + if o.SharedBy != nil { + qrSharedBy = *o.SharedBy + } + qSharedBy := qrSharedBy + if qSharedBy != "" { + + if err := r.SetQueryParam("shared_by", qSharedBy); err != nil { + return err + } + } + } + + if o.SharedWith != nil { + + // query param shared_with + var qrSharedWith string + + if o.SharedWith != nil { + qrSharedWith = *o.SharedWith + } + qSharedWith := qrSharedWith + if qSharedWith != "" { + + if err := r.SetQueryParam("shared_with", qSharedWith); err != nil { + return err + } + } + } + if o.Size != nil { // query param size diff --git a/client/operations/get_workflows_responses.go b/client/operations/get_workflows_responses.go index ea0c7f7..c8f85a8 100644 --- a/client/operations/get_workflows_responses.go +++ b/client/operations/get_workflows_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" "strconv" @@ -105,11 +106,13 @@ func (o *GetWorkflowsOK) Code() int { } func (o *GetWorkflowsOK) Error() string { - return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsOK %s", 200, payload) } func (o *GetWorkflowsOK) String() string { - return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsOK %s", 200, payload) } func (o *GetWorkflowsOK) GetPayload() *GetWorkflowsOKBody { @@ -173,11 +176,13 @@ func (o *GetWorkflowsBadRequest) Code() int { } func (o *GetWorkflowsBadRequest) Error() string { - return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsBadRequest %s", 400, payload) } func (o *GetWorkflowsBadRequest) String() string { - return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsBadRequest %s", 400, payload) } func (o *GetWorkflowsBadRequest) GetPayload() *GetWorkflowsBadRequestBody { @@ -241,11 +246,13 @@ func (o *GetWorkflowsForbidden) Code() int { } func (o *GetWorkflowsForbidden) Error() string { - return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsForbidden %s", 403, payload) } func (o *GetWorkflowsForbidden) String() string { - return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsForbidden %s", 403, payload) } func (o *GetWorkflowsForbidden) GetPayload() *GetWorkflowsForbiddenBody { @@ -309,11 +316,13 @@ func (o *GetWorkflowsNotFound) Code() int { } func (o *GetWorkflowsNotFound) Error() string { - return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsNotFound %s", 404, payload) } func (o *GetWorkflowsNotFound) String() string { - return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsNotFound %s", 404, payload) } func (o *GetWorkflowsNotFound) GetPayload() *GetWorkflowsNotFoundBody { @@ -377,11 +386,13 @@ func (o *GetWorkflowsInternalServerError) Code() int { } func (o *GetWorkflowsInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsInternalServerError %s", 500, payload) } func (o *GetWorkflowsInternalServerError) String() string { - return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/workflows][%d] getWorkflowsInternalServerError %s", 500, payload) } func (o *GetWorkflowsInternalServerError) GetPayload() *GetWorkflowsInternalServerErrorBody { @@ -680,6 +691,9 @@ type GetWorkflowsOKBodyItemsItems0 struct { // name Name string `json:"name,omitempty"` + // owner email + OwnerEmail string `json:"owner_email,omitempty"` + // progress Progress *GetWorkflowsOKBodyItemsItems0Progress `json:"progress,omitempty"` @@ -692,6 +706,9 @@ type GetWorkflowsOKBodyItemsItems0 struct { // session uri SessionURI string `json:"session_uri,omitempty"` + // shared with + SharedWith []string `json:"shared_with"` + // size Size *GetWorkflowsOKBodyItemsItems0Size `json:"size,omitempty"` diff --git a/client/operations/get_you_responses.go b/client/operations/get_you_responses.go index 763a45f..df9e069 100644 --- a/client/operations/get_you_responses.go +++ b/client/operations/get_you_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -98,11 +99,13 @@ func (o *GetYouOK) Code() int { } func (o *GetYouOK) Error() string { - return fmt.Sprintf("[GET /api/you][%d] getYouOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/you][%d] getYouOK %s", 200, payload) } func (o *GetYouOK) String() string { - return fmt.Sprintf("[GET /api/you][%d] getYouOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/you][%d] getYouOK %s", 200, payload) } func (o *GetYouOK) GetPayload() *GetYouOKBody { @@ -166,11 +169,13 @@ func (o *GetYouUnauthorized) Code() int { } func (o *GetYouUnauthorized) Error() string { - return fmt.Sprintf("[GET /api/you][%d] getYouUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/you][%d] getYouUnauthorized %s", 401, payload) } func (o *GetYouUnauthorized) String() string { - return fmt.Sprintf("[GET /api/you][%d] getYouUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/you][%d] getYouUnauthorized %s", 401, payload) } func (o *GetYouUnauthorized) GetPayload() *GetYouUnauthorizedBody { @@ -234,11 +239,13 @@ func (o *GetYouForbidden) Code() int { } func (o *GetYouForbidden) Error() string { - return fmt.Sprintf("[GET /api/you][%d] getYouForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/you][%d] getYouForbidden %s", 403, payload) } func (o *GetYouForbidden) String() string { - return fmt.Sprintf("[GET /api/you][%d] getYouForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/you][%d] getYouForbidden %s", 403, payload) } func (o *GetYouForbidden) GetPayload() *GetYouForbiddenBody { @@ -302,11 +309,13 @@ func (o *GetYouInternalServerError) Code() int { } func (o *GetYouInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/you][%d] getYouInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/you][%d] getYouInternalServerError %s", 500, payload) } func (o *GetYouInternalServerError) String() string { - return fmt.Sprintf("[GET /api/you][%d] getYouInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/you][%d] getYouInternalServerError %s", 500, payload) } func (o *GetYouInternalServerError) GetPayload() *GetYouInternalServerErrorBody { diff --git a/client/operations/gitlab_connect_responses.go b/client/operations/gitlab_connect_responses.go index 08b71e4..46f657c 100644 --- a/client/operations/gitlab_connect_responses.go +++ b/client/operations/gitlab_connect_responses.go @@ -75,11 +75,11 @@ func (o *GitlabConnectFound) Code() int { } func (o *GitlabConnectFound) Error() string { - return fmt.Sprintf("[GET /api/gitlab/connect][%d] gitlabConnectFound ", 302) + return fmt.Sprintf("[GET /api/gitlab/connect][%d] gitlabConnectFound", 302) } func (o *GitlabConnectFound) String() string { - return fmt.Sprintf("[GET /api/gitlab/connect][%d] gitlabConnectFound ", 302) + return fmt.Sprintf("[GET /api/gitlab/connect][%d] gitlabConnectFound", 302) } func (o *GitlabConnectFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { diff --git a/client/operations/gitlab_oauth_responses.go b/client/operations/gitlab_oauth_responses.go index 625649c..f51b7cc 100644 --- a/client/operations/gitlab_oauth_responses.go +++ b/client/operations/gitlab_oauth_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -97,11 +98,13 @@ func (o *GitlabOauthOK) Code() int { } func (o *GitlabOauthOK) Error() string { - return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthOK %s", 200, payload) } func (o *GitlabOauthOK) String() string { - return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthOK %s", 200, payload) } func (o *GitlabOauthOK) GetPayload() *GitlabOauthOKBody { @@ -164,11 +167,11 @@ func (o *GitlabOauthFound) Code() int { } func (o *GitlabOauthFound) Error() string { - return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthFound ", 302) + return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthFound", 302) } func (o *GitlabOauthFound) String() string { - return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthFound ", 302) + return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthFound", 302) } func (o *GitlabOauthFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -221,11 +224,13 @@ func (o *GitlabOauthForbidden) Code() int { } func (o *GitlabOauthForbidden) Error() string { - return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthForbidden %s", 403, payload) } func (o *GitlabOauthForbidden) String() string { - return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthForbidden %s", 403, payload) } func (o *GitlabOauthForbidden) GetPayload() *GitlabOauthForbiddenBody { @@ -289,11 +294,13 @@ func (o *GitlabOauthInternalServerError) Code() int { } func (o *GitlabOauthInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthInternalServerError %s", 500, payload) } func (o *GitlabOauthInternalServerError) String() string { - return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/gitlab][%d] gitlabOauthInternalServerError %s", 500, payload) } func (o *GitlabOauthInternalServerError) GetPayload() *GitlabOauthInternalServerErrorBody { diff --git a/client/operations/gitlab_projects_parameters.go b/client/operations/gitlab_projects_parameters.go index fb8ce74..c52d6cf 100644 --- a/client/operations/gitlab_projects_parameters.go +++ b/client/operations/gitlab_projects_parameters.go @@ -14,6 +14,7 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewGitlabProjectsParams creates a new GitlabProjectsParams object, @@ -60,6 +61,31 @@ GitlabProjectsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GitlabProjectsParams struct { + + /* AccessToken. + + The API access_token of the current user. + */ + AccessToken *string + + /* Page. + + Results page number (pagination). + */ + Page *int64 + + /* Search. + + The search string to filter the project list. + */ + Search *string + + /* Size. + + Number of results per page (pagination). + */ + Size *int64 + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -113,6 +139,50 @@ func (o *GitlabProjectsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithAccessToken adds the accessToken to the gitlab projects params +func (o *GitlabProjectsParams) WithAccessToken(accessToken *string) *GitlabProjectsParams { + o.SetAccessToken(accessToken) + return o +} + +// SetAccessToken adds the accessToken to the gitlab projects params +func (o *GitlabProjectsParams) SetAccessToken(accessToken *string) { + o.AccessToken = accessToken +} + +// WithPage adds the page to the gitlab projects params +func (o *GitlabProjectsParams) WithPage(page *int64) *GitlabProjectsParams { + o.SetPage(page) + return o +} + +// SetPage adds the page to the gitlab projects params +func (o *GitlabProjectsParams) SetPage(page *int64) { + o.Page = page +} + +// WithSearch adds the search to the gitlab projects params +func (o *GitlabProjectsParams) WithSearch(search *string) *GitlabProjectsParams { + o.SetSearch(search) + return o +} + +// SetSearch adds the search to the gitlab projects params +func (o *GitlabProjectsParams) SetSearch(search *string) { + o.Search = search +} + +// WithSize adds the size to the gitlab projects params +func (o *GitlabProjectsParams) WithSize(size *int64) *GitlabProjectsParams { + o.SetSize(size) + return o +} + +// SetSize adds the size to the gitlab projects params +func (o *GitlabProjectsParams) SetSize(size *int64) { + o.Size = size +} + // WriteToRequest writes these params to a swagger request func (o *GitlabProjectsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -121,6 +191,74 @@ func (o *GitlabProjectsParams) WriteToRequest(r runtime.ClientRequest, reg strfm } var res []error + if o.AccessToken != nil { + + // query param access_token + var qrAccessToken string + + if o.AccessToken != nil { + qrAccessToken = *o.AccessToken + } + qAccessToken := qrAccessToken + if qAccessToken != "" { + + if err := r.SetQueryParam("access_token", qAccessToken); err != nil { + return err + } + } + } + + if o.Page != nil { + + // query param page + var qrPage int64 + + if o.Page != nil { + qrPage = *o.Page + } + qPage := swag.FormatInt64(qrPage) + if qPage != "" { + + if err := r.SetQueryParam("page", qPage); err != nil { + return err + } + } + } + + if o.Search != nil { + + // query param search + var qrSearch string + + if o.Search != nil { + qrSearch = *o.Search + } + qSearch := qrSearch + if qSearch != "" { + + if err := r.SetQueryParam("search", qSearch); err != nil { + return err + } + } + } + + if o.Size != nil { + + // query param size + var qrSize int64 + + if o.Size != nil { + qrSize = *o.Size + } + qSize := swag.FormatInt64(qrSize) + if qSize != "" { + + if err := r.SetQueryParam("size", qSize); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/client/operations/gitlab_projects_responses.go b/client/operations/gitlab_projects_responses.go index 185759a..8443ef4 100644 --- a/client/operations/gitlab_projects_responses.go +++ b/client/operations/gitlab_projects_responses.go @@ -7,9 +7,12 @@ package operations import ( "context" + "encoding/json" "fmt" "io" + "strconv" + "github.com/go-openapi/errors" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" @@ -57,6 +60,7 @@ GitlabProjectsOK describes a response with status code 200, with default header This resource return all projects owned by the user on GitLab in JSON format. */ type GitlabProjectsOK struct { + Payload *GitlabProjectsOKBody } // IsSuccess returns true when this gitlab projects o k response has a 2xx status code @@ -90,15 +94,28 @@ func (o *GitlabProjectsOK) Code() int { } func (o *GitlabProjectsOK) Error() string { - return fmt.Sprintf("[GET /api/gitlab/projects][%d] gitlabProjectsOK ", 200) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/gitlab/projects][%d] gitlabProjectsOK %s", 200, payload) } func (o *GitlabProjectsOK) String() string { - return fmt.Sprintf("[GET /api/gitlab/projects][%d] gitlabProjectsOK ", 200) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/gitlab/projects][%d] gitlabProjectsOK %s", 200, payload) +} + +func (o *GitlabProjectsOK) GetPayload() *GitlabProjectsOKBody { + return o.Payload } func (o *GitlabProjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GitlabProjectsOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + return nil } @@ -147,11 +164,13 @@ func (o *GitlabProjectsForbidden) Code() int { } func (o *GitlabProjectsForbidden) Error() string { - return fmt.Sprintf("[GET /api/gitlab/projects][%d] gitlabProjectsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/gitlab/projects][%d] gitlabProjectsForbidden %s", 403, payload) } func (o *GitlabProjectsForbidden) String() string { - return fmt.Sprintf("[GET /api/gitlab/projects][%d] gitlabProjectsForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/gitlab/projects][%d] gitlabProjectsForbidden %s", 403, payload) } func (o *GitlabProjectsForbidden) GetPayload() *GitlabProjectsForbiddenBody { @@ -215,11 +234,13 @@ func (o *GitlabProjectsInternalServerError) Code() int { } func (o *GitlabProjectsInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/gitlab/projects][%d] gitlabProjectsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/gitlab/projects][%d] gitlabProjectsInternalServerError %s", 500, payload) } func (o *GitlabProjectsInternalServerError) String() string { - return fmt.Sprintf("[GET /api/gitlab/projects][%d] gitlabProjectsInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/gitlab/projects][%d] gitlabProjectsInternalServerError %s", 500, payload) } func (o *GitlabProjectsInternalServerError) GetPayload() *GitlabProjectsInternalServerErrorBody { @@ -313,3 +334,175 @@ func (o *GitlabProjectsInternalServerErrorBody) UnmarshalBinary(b []byte) error *o = res return nil } + +/* +GitlabProjectsOKBody gitlab projects o k body +swagger:model GitlabProjectsOKBody +*/ +type GitlabProjectsOKBody struct { + + // has next + HasNext bool `json:"has_next,omitempty"` + + // has prev + HasPrev bool `json:"has_prev,omitempty"` + + // items + Items []*GitlabProjectsOKBodyItemsItems0 `json:"items"` + + // page + Page int64 `json:"page,omitempty"` + + // size + Size int64 `json:"size,omitempty"` + + // total + Total *int64 `json:"total,omitempty"` +} + +// Validate validates this gitlab projects o k body +func (o *GitlabProjectsOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *GitlabProjectsOKBody) validateItems(formats strfmt.Registry) error { + if swag.IsZero(o.Items) { // not required + return nil + } + + for i := 0; i < len(o.Items); i++ { + if swag.IsZero(o.Items[i]) { // not required + continue + } + + if o.Items[i] != nil { + if err := o.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gitlabProjectsOK" + "." + "items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("gitlabProjectsOK" + "." + "items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this gitlab projects o k body based on the context it is used +func (o *GitlabProjectsOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateItems(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *GitlabProjectsOKBody) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Items); i++ { + + if o.Items[i] != nil { + + if swag.IsZero(o.Items[i]) { // not required + return nil + } + + if err := o.Items[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gitlabProjectsOK" + "." + "items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("gitlabProjectsOK" + "." + "items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *GitlabProjectsOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GitlabProjectsOKBody) UnmarshalBinary(b []byte) error { + var res GitlabProjectsOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GitlabProjectsOKBodyItemsItems0 gitlab projects o k body items items0 +swagger:model GitlabProjectsOKBodyItemsItems0 +*/ +type GitlabProjectsOKBodyItemsItems0 struct { + + // hook id + HookID *int64 `json:"hook_id,omitempty"` + + // id + ID int64 `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // path + Path string `json:"path,omitempty"` + + // url + URL string `json:"url,omitempty"` +} + +// Validate validates this gitlab projects o k body items items0 +func (o *GitlabProjectsOKBodyItemsItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this gitlab projects o k body items items0 based on context it is used +func (o *GitlabProjectsOKBodyItemsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GitlabProjectsOKBodyItemsItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GitlabProjectsOKBodyItemsItems0) UnmarshalBinary(b []byte) error { + var res GitlabProjectsOKBodyItemsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/client/operations/info_responses.go b/client/operations/info_responses.go index da290a2..f0d0657 100644 --- a/client/operations/info_responses.go +++ b/client/operations/info_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -86,11 +87,13 @@ func (o *InfoOK) Code() int { } func (o *InfoOK) Error() string { - return fmt.Sprintf("[GET /api/info][%d] infoOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/info][%d] infoOK %s", 200, payload) } func (o *InfoOK) String() string { - return fmt.Sprintf("[GET /api/info][%d] infoOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/info][%d] infoOK %s", 200, payload) } func (o *InfoOK) GetPayload() *InfoOKBody { @@ -154,11 +157,13 @@ func (o *InfoInternalServerError) Code() int { } func (o *InfoInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/info][%d] infoInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/info][%d] infoInternalServerError %s", 500, payload) } func (o *InfoInternalServerError) String() string { - return fmt.Sprintf("[GET /api/info][%d] infoInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/info][%d] infoInternalServerError %s", 500, payload) } func (o *InfoInternalServerError) GetPayload() *InfoInternalServerErrorBody { diff --git a/client/operations/launch_responses.go b/client/operations/launch_responses.go index 717c552..d06b366 100644 --- a/client/operations/launch_responses.go +++ b/client/operations/launch_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -93,11 +94,13 @@ func (o *LaunchOK) Code() int { } func (o *LaunchOK) Error() string { - return fmt.Sprintf("[POST /api/launch][%d] launchOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/launch][%d] launchOK %s", 200, payload) } func (o *LaunchOK) String() string { - return fmt.Sprintf("[POST /api/launch][%d] launchOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/launch][%d] launchOK %s", 200, payload) } func (o *LaunchOK) GetPayload() *LaunchOKBody { @@ -161,11 +164,13 @@ func (o *LaunchBadRequest) Code() int { } func (o *LaunchBadRequest) Error() string { - return fmt.Sprintf("[POST /api/launch][%d] launchBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/launch][%d] launchBadRequest %s", 400, payload) } func (o *LaunchBadRequest) String() string { - return fmt.Sprintf("[POST /api/launch][%d] launchBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/launch][%d] launchBadRequest %s", 400, payload) } func (o *LaunchBadRequest) GetPayload() *LaunchBadRequestBody { @@ -229,11 +234,13 @@ func (o *LaunchInternalServerError) Code() int { } func (o *LaunchInternalServerError) Error() string { - return fmt.Sprintf("[POST /api/launch][%d] launchInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/launch][%d] launchInternalServerError %s", 500, payload) } func (o *LaunchInternalServerError) String() string { - return fmt.Sprintf("[POST /api/launch][%d] launchInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/launch][%d] launchInternalServerError %s", 500, payload) } func (o *LaunchInternalServerError) GetPayload() *LaunchInternalServerErrorBody { @@ -401,22 +408,125 @@ swagger:model LaunchOKBody type LaunchOKBody struct { // message - Message string `json:"message,omitempty"` + // Required: true + Message *string `json:"message"` + + // validation warnings + ValidationWarnings *LaunchOKBodyValidationWarnings `json:"validation_warnings,omitempty"` // workflow id - WorkflowID string `json:"workflow_id,omitempty"` + // Required: true + WorkflowID *string `json:"workflow_id"` // workflow name - WorkflowName string `json:"workflow_name,omitempty"` + // Required: true + WorkflowName *string `json:"workflow_name"` } // Validate validates this launch o k body func (o *LaunchOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateMessage(formats); err != nil { + res = append(res, err) + } + + if err := o.validateValidationWarnings(formats); err != nil { + res = append(res, err) + } + + if err := o.validateWorkflowID(formats); err != nil { + res = append(res, err) + } + + if err := o.validateWorkflowName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *LaunchOKBody) validateMessage(formats strfmt.Registry) error { + + if err := validate.Required("launchOK"+"."+"message", "body", o.Message); err != nil { + return err + } + + return nil +} + +func (o *LaunchOKBody) validateValidationWarnings(formats strfmt.Registry) error { + if swag.IsZero(o.ValidationWarnings) { // not required + return nil + } + + if o.ValidationWarnings != nil { + if err := o.ValidationWarnings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("launchOK" + "." + "validation_warnings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("launchOK" + "." + "validation_warnings") + } + return err + } + } + + return nil +} + +func (o *LaunchOKBody) validateWorkflowID(formats strfmt.Registry) error { + + if err := validate.Required("launchOK"+"."+"workflow_id", "body", o.WorkflowID); err != nil { + return err + } + return nil } -// ContextValidate validates this launch o k body based on context it is used +func (o *LaunchOKBody) validateWorkflowName(formats strfmt.Registry) error { + + if err := validate.Required("launchOK"+"."+"workflow_name", "body", o.WorkflowName); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this launch o k body based on the context it is used func (o *LaunchOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateValidationWarnings(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *LaunchOKBody) contextValidateValidationWarnings(ctx context.Context, formats strfmt.Registry) error { + + if o.ValidationWarnings != nil { + + if swag.IsZero(o.ValidationWarnings) { // not required + return nil + } + + if err := o.ValidationWarnings.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("launchOK" + "." + "validation_warnings") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("launchOK" + "." + "validation_warnings") + } + return err + } + } + return nil } @@ -437,3 +547,41 @@ func (o *LaunchOKBody) UnmarshalBinary(b []byte) error { *o = res return nil } + +/* +LaunchOKBodyValidationWarnings Dictionary of validation warnings, if any. Each key is a property that was not correctly validated. +swagger:model LaunchOKBodyValidationWarnings +*/ +type LaunchOKBodyValidationWarnings struct { + + // additional properties + AdditionalProperties []string `json:"additional_properties"` +} + +// Validate validates this launch o k body validation warnings +func (o *LaunchOKBodyValidationWarnings) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this launch o k body validation warnings based on context it is used +func (o *LaunchOKBodyValidationWarnings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *LaunchOKBodyValidationWarnings) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *LaunchOKBodyValidationWarnings) UnmarshalBinary(b []byte) error { + var res LaunchOKBodyValidationWarnings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/client/operations/move_files_responses.go b/client/operations/move_files_responses.go index c184b75..b6b23fe 100644 --- a/client/operations/move_files_responses.go +++ b/client/operations/move_files_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -109,11 +110,13 @@ func (o *MoveFilesOK) Code() int { } func (o *MoveFilesOK) Error() string { - return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesOK %s", 200, payload) } func (o *MoveFilesOK) String() string { - return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesOK %s", 200, payload) } func (o *MoveFilesOK) GetPayload() *MoveFilesOKBody { @@ -177,11 +180,13 @@ func (o *MoveFilesBadRequest) Code() int { } func (o *MoveFilesBadRequest) Error() string { - return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesBadRequest %s", 400, payload) } func (o *MoveFilesBadRequest) String() string { - return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesBadRequest %s", 400, payload) } func (o *MoveFilesBadRequest) GetPayload() *MoveFilesBadRequestBody { @@ -245,11 +250,13 @@ func (o *MoveFilesForbidden) Code() int { } func (o *MoveFilesForbidden) Error() string { - return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesForbidden %s", 403, payload) } func (o *MoveFilesForbidden) String() string { - return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesForbidden %s", 403, payload) } func (o *MoveFilesForbidden) GetPayload() *MoveFilesForbiddenBody { @@ -313,11 +320,13 @@ func (o *MoveFilesNotFound) Code() int { } func (o *MoveFilesNotFound) Error() string { - return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesNotFound %s", 404, payload) } func (o *MoveFilesNotFound) String() string { - return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesNotFound %s", 404, payload) } func (o *MoveFilesNotFound) GetPayload() *MoveFilesNotFoundBody { @@ -381,11 +390,13 @@ func (o *MoveFilesConflict) Code() int { } func (o *MoveFilesConflict) Error() string { - return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesConflict %s", 409, payload) } func (o *MoveFilesConflict) String() string { - return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesConflict %s", 409, payload) } func (o *MoveFilesConflict) GetPayload() *MoveFilesConflictBody { @@ -449,11 +460,13 @@ func (o *MoveFilesInternalServerError) Code() int { } func (o *MoveFilesInternalServerError) Error() string { - return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesInternalServerError %s", 500, payload) } func (o *MoveFilesInternalServerError) String() string { - return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/move_files/{workflow_id_or_name}][%d] moveFilesInternalServerError %s", 500, payload) } func (o *MoveFilesInternalServerError) GetPayload() *MoveFilesInternalServerErrorBody { diff --git a/client/operations/open_interactive_session_responses.go b/client/operations/open_interactive_session_responses.go index 483f216..b017ad1 100644 --- a/client/operations/open_interactive_session_responses.go +++ b/client/operations/open_interactive_session_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *OpenInteractiveSessionOK) Code() int { } func (o *OpenInteractiveSessionOK) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionOK %s", 200, payload) } func (o *OpenInteractiveSessionOK) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionOK %s", 200, payload) } func (o *OpenInteractiveSessionOK) GetPayload() *OpenInteractiveSessionOKBody { @@ -171,11 +174,13 @@ func (o *OpenInteractiveSessionBadRequest) Code() int { } func (o *OpenInteractiveSessionBadRequest) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionBadRequest %s", 400, payload) } func (o *OpenInteractiveSessionBadRequest) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionBadRequest %s", 400, payload) } func (o *OpenInteractiveSessionBadRequest) GetPayload() *OpenInteractiveSessionBadRequestBody { @@ -239,11 +244,13 @@ func (o *OpenInteractiveSessionForbidden) Code() int { } func (o *OpenInteractiveSessionForbidden) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionForbidden %s", 403, payload) } func (o *OpenInteractiveSessionForbidden) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionForbidden %s", 403, payload) } func (o *OpenInteractiveSessionForbidden) GetPayload() *OpenInteractiveSessionForbiddenBody { @@ -307,11 +314,13 @@ func (o *OpenInteractiveSessionNotFound) Code() int { } func (o *OpenInteractiveSessionNotFound) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionNotFound %s", 404, payload) } func (o *OpenInteractiveSessionNotFound) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionNotFound %s", 404, payload) } func (o *OpenInteractiveSessionNotFound) GetPayload() *OpenInteractiveSessionNotFoundBody { @@ -375,11 +384,13 @@ func (o *OpenInteractiveSessionInternalServerError) Code() int { } func (o *OpenInteractiveSessionInternalServerError) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionInternalServerError %s", 500, payload) } func (o *OpenInteractiveSessionInternalServerError) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/open/{interactive_session_type}][%d] openInteractiveSessionInternalServerError %s", 500, payload) } func (o *OpenInteractiveSessionInternalServerError) GetPayload() *OpenInteractiveSessionInternalServerErrorBody { diff --git a/client/operations/operations_client.go b/client/operations/operations_client.go index 5c95f3f..b390cf1 100644 --- a/client/operations/operations_client.go +++ b/client/operations/operations_client.go @@ -10,6 +10,7 @@ import ( "io" "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) @@ -18,6 +19,31 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientServi return &Client{transport: transport, formats: formats} } +// New creates a new operations API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new operations API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for operations API */ @@ -26,9 +52,68 @@ type Client struct { formats strfmt.Registry } -// ClientOption is the option for Client methods +// ClientOption may be used to customize the behavior of Client methods. type ClientOption func(*runtime.ClientOperation) +// This client is generated with a few options you might find useful for your swagger spec. +// +// Feel free to add you own set of options. + +// WithContentType allows the client to force the Content-Type header +// to negotiate a specific Consumer from the server. +// +// You may use this option to set arbitrary extensions to your MIME media type. +func WithContentType(mime string) ClientOption { + return func(r *runtime.ClientOperation) { + r.ConsumesMediaTypes = []string{mime} + } +} + +// WithContentTypeApplicationJSON sets the Content-Type header to "application/json". +func WithContentTypeApplicationJSON(r *runtime.ClientOperation) { + r.ConsumesMediaTypes = []string{"application/json"} +} + +// WithContentTypeApplicationOctetStream sets the Content-Type header to "application/octet-stream". +func WithContentTypeApplicationOctetStream(r *runtime.ClientOperation) { + r.ConsumesMediaTypes = []string{"application/octet-stream"} +} + +// WithAccept allows the client to force the Accept header +// to negotiate a specific Producer from the server. +// +// You may use this option to set arbitrary extensions to your MIME media type. +func WithAccept(mime string) ClientOption { + return func(r *runtime.ClientOperation) { + r.ProducesMediaTypes = []string{mime} + } +} + +// WithAcceptApplicationJSON sets the Accept header to "application/json". +func WithAcceptApplicationJSON(r *runtime.ClientOperation) { + r.ProducesMediaTypes = []string{"application/json"} +} + +// WithAcceptApplicationOctetStream sets the Accept header to "application/octet-stream". +func WithAcceptApplicationOctetStream(r *runtime.ClientOperation) { + r.ProducesMediaTypes = []string{"application/octet-stream"} +} + +// WithAcceptApplicationZip sets the Accept header to "application/zip". +func WithAcceptApplicationZip(r *runtime.ClientOperation) { + r.ProducesMediaTypes = []string{"application/zip"} +} + +// WithAcceptImageStar sets the Accept header to "image/*". +func WithAcceptImageStar(r *runtime.ClientOperation) { + r.ProducesMediaTypes = []string{"image/*"} +} + +// WithAcceptTextHTML sets the Accept header to "text/html". +func WithAcceptTextHTML(r *runtime.ClientOperation) { + r.ProducesMediaTypes = []string{"text/html"} +} + // ClientService is the interface for Client methods type ClientService interface { AddSecrets(params *AddSecretsParams, opts ...ClientOption) (*AddSecretsCreated, error) @@ -53,6 +138,10 @@ type ClientService interface { GetSecrets(params *GetSecretsParams, opts ...ClientOption) (*GetSecretsOK, error) + GetUsersSharedWithYou(params *GetUsersSharedWithYouParams, opts ...ClientOption) (*GetUsersSharedWithYouOK, error) + + GetUsersYouSharedWith(params *GetUsersYouSharedWithParams, opts ...ClientOption) (*GetUsersYouSharedWithOK, error) + GetWorkflowDiff(params *GetWorkflowDiffParams, opts ...ClientOption) (*GetWorkflowDiffOK, error) GetWorkflowDiskUsage(params *GetWorkflowDiskUsageParams, opts ...ClientOption) (*GetWorkflowDiskUsageOK, error) @@ -63,6 +152,8 @@ type ClientService interface { GetWorkflowRetentionRules(params *GetWorkflowRetentionRulesParams, opts ...ClientOption) (*GetWorkflowRetentionRulesOK, error) + GetWorkflowShareStatus(params *GetWorkflowShareStatusParams, opts ...ClientOption) (*GetWorkflowShareStatusOK, error) + GetWorkflowSpecification(params *GetWorkflowSpecificationParams, opts ...ClientOption) (*GetWorkflowSpecificationOK, error) GetWorkflowStatus(params *GetWorkflowStatusParams, opts ...ClientOption) (*GetWorkflowStatusOK, error) @@ -93,10 +184,14 @@ type ClientService interface { SetWorkflowStatus(params *SetWorkflowStatusParams, opts ...ClientOption) (*SetWorkflowStatusOK, error) + ShareWorkflow(params *ShareWorkflowParams, opts ...ClientOption) (*ShareWorkflowOK, error) + StartWorkflow(params *StartWorkflowParams, opts ...ClientOption) (*StartWorkflowOK, error) Status(params *StatusParams, opts ...ClientOption) (*StatusOK, error) + UnshareWorkflow(params *UnshareWorkflowParams, opts ...ClientOption) (*UnshareWorkflowOK, error) + UploadFile(params *UploadFileParams, opts ...ClientOption) (*UploadFileOK, error) SetTransport(transport runtime.ClientTransport) @@ -396,7 +491,7 @@ func (a *Client) DownloadFile(params *DownloadFileParams, writer io.Writer, opts ID: "download_file", Method: "GET", PathPattern: "/api/workflows/{workflow_id_or_name}/workspace/{file_name}", - ProducesMediaTypes: []string{"application/json", "application/octet-stream", "application/zip", "image/*", "text/html"}, + ProducesMediaTypes: []string{"application/octet-stream", "application/json", "application/zip", "image/*", "text/html"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, @@ -542,6 +637,86 @@ func (a *Client) GetSecrets(params *GetSecretsParams, opts ...ClientOption) (*Ge panic(msg) } +/* +GetUsersSharedWithYou gets users that shared workflow s with the authenticated user + +This resource provides information about users that shared workflow(s) with the authenticated user. +*/ +func (a *Client) GetUsersSharedWithYou(params *GetUsersSharedWithYouParams, opts ...ClientOption) (*GetUsersSharedWithYouOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetUsersSharedWithYouParams() + } + op := &runtime.ClientOperation{ + ID: "get_users_shared_with_you", + Method: "GET", + PathPattern: "/api/users/shared-with-you", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetUsersSharedWithYouReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetUsersSharedWithYouOK) + 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 get_users_shared_with_you: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +GetUsersYouSharedWith gets users that the authenticated user shared workflow s with + +This resource provides information about users that the authenticated user shared workflow(s) with. +*/ +func (a *Client) GetUsersYouSharedWith(params *GetUsersYouSharedWithParams, opts ...ClientOption) (*GetUsersYouSharedWithOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetUsersYouSharedWithParams() + } + op := &runtime.ClientOperation{ + ID: "get_users_you_shared_with", + Method: "GET", + PathPattern: "/api/users/you-shared-with", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetUsersYouSharedWithReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetUsersYouSharedWithOK) + 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 get_users_you_shared_with: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* GetWorkflowDiff gets diff between two workflows @@ -742,6 +917,46 @@ func (a *Client) GetWorkflowRetentionRules(params *GetWorkflowRetentionRulesPara panic(msg) } +/* +GetWorkflowShareStatus gets the share status of a workflow + +This resource returns the share status of a given workflow. +*/ +func (a *Client) GetWorkflowShareStatus(params *GetWorkflowShareStatusParams, opts ...ClientOption) (*GetWorkflowShareStatusOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetWorkflowShareStatusParams() + } + op := &runtime.ClientOperation{ + ID: "get_workflow_share_status", + Method: "GET", + PathPattern: "/api/workflows/{workflow_id_or_name}/share-status", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetWorkflowShareStatusReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetWorkflowShareStatusOK) + 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 get_workflow_share_status: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* GetWorkflowSpecification gets the specification used for this workflow run @@ -1335,6 +1550,46 @@ func (a *Client) SetWorkflowStatus(params *SetWorkflowStatusParams, opts ...Clie panic(msg) } +/* +ShareWorkflow shares a workflow with another user + +This resource shares a workflow with another user. This resource is expecting a workflow UUID and some parameters. +*/ +func (a *Client) ShareWorkflow(params *ShareWorkflowParams, opts ...ClientOption) (*ShareWorkflowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewShareWorkflowParams() + } + op := &runtime.ClientOperation{ + ID: "share_workflow", + Method: "POST", + PathPattern: "/api/workflows/{workflow_id_or_name}/share", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ShareWorkflowReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ShareWorkflowOK) + 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 share_workflow: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* StartWorkflow starts workflow @@ -1415,6 +1670,46 @@ func (a *Client) Status(params *StatusParams, opts ...ClientOption) (*StatusOK, panic(msg) } +/* +UnshareWorkflow unshares a workflow with another user + +This resource unshares a workflow with another user. This resource is expecting a workflow UUID and some parameters. +*/ +func (a *Client) UnshareWorkflow(params *UnshareWorkflowParams, opts ...ClientOption) (*UnshareWorkflowOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUnshareWorkflowParams() + } + op := &runtime.ClientOperation{ + ID: "unshare_workflow", + Method: "POST", + PathPattern: "/api/workflows/{workflow_id_or_name}/unshare", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UnshareWorkflowReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UnshareWorkflowOK) + 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 unshare_workflow: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* UploadFile adds a file to the workspace diff --git a/client/operations/ping_responses.go b/client/operations/ping_responses.go index cab0915..0786e1c 100644 --- a/client/operations/ping_responses.go +++ b/client/operations/ping_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -79,11 +80,13 @@ func (o *PingOK) Code() int { } func (o *PingOK) Error() string { - return fmt.Sprintf("[GET /api/ping][%d] pingOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/ping][%d] pingOK %s", 200, payload) } func (o *PingOK) String() string { - return fmt.Sprintf("[GET /api/ping][%d] pingOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/ping][%d] pingOK %s", 200, payload) } func (o *PingOK) GetPayload() *PingOKBody { diff --git a/client/operations/prune_workspace_responses.go b/client/operations/prune_workspace_responses.go index 8993fa0..2fc581c 100644 --- a/client/operations/prune_workspace_responses.go +++ b/client/operations/prune_workspace_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *PruneWorkspaceOK) Code() int { } func (o *PruneWorkspaceOK) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceOK %s", 200, payload) } func (o *PruneWorkspaceOK) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceOK %s", 200, payload) } func (o *PruneWorkspaceOK) GetPayload() *PruneWorkspaceOKBody { @@ -171,11 +174,13 @@ func (o *PruneWorkspaceBadRequest) Code() int { } func (o *PruneWorkspaceBadRequest) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceBadRequest %s", 400, payload) } func (o *PruneWorkspaceBadRequest) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceBadRequest %s", 400, payload) } func (o *PruneWorkspaceBadRequest) GetPayload() *PruneWorkspaceBadRequestBody { @@ -239,11 +244,13 @@ func (o *PruneWorkspaceForbidden) Code() int { } func (o *PruneWorkspaceForbidden) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceForbidden %s", 403, payload) } func (o *PruneWorkspaceForbidden) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceForbidden %s", 403, payload) } func (o *PruneWorkspaceForbidden) GetPayload() *PruneWorkspaceForbiddenBody { @@ -307,11 +314,13 @@ func (o *PruneWorkspaceNotFound) Code() int { } func (o *PruneWorkspaceNotFound) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceNotFound %s", 404, payload) } func (o *PruneWorkspaceNotFound) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceNotFound %s", 404, payload) } func (o *PruneWorkspaceNotFound) GetPayload() *PruneWorkspaceNotFoundBody { @@ -375,11 +384,13 @@ func (o *PruneWorkspaceInternalServerError) Code() int { } func (o *PruneWorkspaceInternalServerError) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceInternalServerError %s", 500, payload) } func (o *PruneWorkspaceInternalServerError) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/prune][%d] pruneWorkspaceInternalServerError %s", 500, payload) } func (o *PruneWorkspaceInternalServerError) GetPayload() *PruneWorkspaceInternalServerErrorBody { diff --git a/client/operations/request_token_responses.go b/client/operations/request_token_responses.go index ee5c19f..054029a 100644 --- a/client/operations/request_token_responses.go +++ b/client/operations/request_token_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -98,11 +99,13 @@ func (o *RequestTokenOK) Code() int { } func (o *RequestTokenOK) Error() string { - return fmt.Sprintf("[PUT /api/token][%d] requestTokenOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/token][%d] requestTokenOK %s", 200, payload) } func (o *RequestTokenOK) String() string { - return fmt.Sprintf("[PUT /api/token][%d] requestTokenOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/token][%d] requestTokenOK %s", 200, payload) } func (o *RequestTokenOK) GetPayload() *RequestTokenOKBody { @@ -166,11 +169,13 @@ func (o *RequestTokenUnauthorized) Code() int { } func (o *RequestTokenUnauthorized) Error() string { - return fmt.Sprintf("[PUT /api/token][%d] requestTokenUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/token][%d] requestTokenUnauthorized %s", 401, payload) } func (o *RequestTokenUnauthorized) String() string { - return fmt.Sprintf("[PUT /api/token][%d] requestTokenUnauthorized %+v", 401, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/token][%d] requestTokenUnauthorized %s", 401, payload) } func (o *RequestTokenUnauthorized) GetPayload() *RequestTokenUnauthorizedBody { @@ -234,11 +239,13 @@ func (o *RequestTokenForbidden) Code() int { } func (o *RequestTokenForbidden) Error() string { - return fmt.Sprintf("[PUT /api/token][%d] requestTokenForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/token][%d] requestTokenForbidden %s", 403, payload) } func (o *RequestTokenForbidden) String() string { - return fmt.Sprintf("[PUT /api/token][%d] requestTokenForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/token][%d] requestTokenForbidden %s", 403, payload) } func (o *RequestTokenForbidden) GetPayload() *RequestTokenForbiddenBody { @@ -302,11 +309,13 @@ func (o *RequestTokenInternalServerError) Code() int { } func (o *RequestTokenInternalServerError) Error() string { - return fmt.Sprintf("[PUT /api/token][%d] requestTokenInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/token][%d] requestTokenInternalServerError %s", 500, payload) } func (o *RequestTokenInternalServerError) String() string { - return fmt.Sprintf("[PUT /api/token][%d] requestTokenInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/token][%d] requestTokenInternalServerError %s", 500, payload) } func (o *RequestTokenInternalServerError) GetPayload() *RequestTokenInternalServerErrorBody { diff --git a/client/operations/set_workflow_status_responses.go b/client/operations/set_workflow_status_responses.go index 2628d0c..c916cf8 100644 --- a/client/operations/set_workflow_status_responses.go +++ b/client/operations/set_workflow_status_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *SetWorkflowStatusOK) Code() int { } func (o *SetWorkflowStatusOK) Error() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusOK %s", 200, payload) } func (o *SetWorkflowStatusOK) String() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusOK %s", 200, payload) } func (o *SetWorkflowStatusOK) GetPayload() *SetWorkflowStatusOKBody { @@ -183,11 +186,13 @@ func (o *SetWorkflowStatusBadRequest) Code() int { } func (o *SetWorkflowStatusBadRequest) Error() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusBadRequest %s", 400, payload) } func (o *SetWorkflowStatusBadRequest) String() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusBadRequest %s", 400, payload) } func (o *SetWorkflowStatusBadRequest) GetPayload() *SetWorkflowStatusBadRequestBody { @@ -251,11 +256,13 @@ func (o *SetWorkflowStatusForbidden) Code() int { } func (o *SetWorkflowStatusForbidden) Error() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusForbidden %s", 403, payload) } func (o *SetWorkflowStatusForbidden) String() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusForbidden %s", 403, payload) } func (o *SetWorkflowStatusForbidden) GetPayload() *SetWorkflowStatusForbiddenBody { @@ -319,11 +326,13 @@ func (o *SetWorkflowStatusNotFound) Code() int { } func (o *SetWorkflowStatusNotFound) Error() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusNotFound %s", 404, payload) } func (o *SetWorkflowStatusNotFound) String() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusNotFound %s", 404, payload) } func (o *SetWorkflowStatusNotFound) GetPayload() *SetWorkflowStatusNotFoundBody { @@ -387,11 +396,13 @@ func (o *SetWorkflowStatusConflict) Code() int { } func (o *SetWorkflowStatusConflict) Error() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusConflict %s", 409, payload) } func (o *SetWorkflowStatusConflict) String() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusConflict %s", 409, payload) } func (o *SetWorkflowStatusConflict) GetPayload() *SetWorkflowStatusConflictBody { @@ -455,11 +466,13 @@ func (o *SetWorkflowStatusInternalServerError) Code() int { } func (o *SetWorkflowStatusInternalServerError) Error() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusInternalServerError %s", 500, payload) } func (o *SetWorkflowStatusInternalServerError) String() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusInternalServerError %s", 500, payload) } func (o *SetWorkflowStatusInternalServerError) GetPayload() *SetWorkflowStatusInternalServerErrorBody { @@ -523,11 +536,13 @@ func (o *SetWorkflowStatusNotImplemented) Code() int { } func (o *SetWorkflowStatusNotImplemented) Error() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusNotImplemented %+v", 501, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusNotImplemented %s", 501, payload) } func (o *SetWorkflowStatusNotImplemented) String() string { - return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusNotImplemented %+v", 501, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /api/workflows/{workflow_id_or_name}/status][%d] setWorkflowStatusNotImplemented %s", 501, payload) } func (o *SetWorkflowStatusNotImplemented) GetPayload() *SetWorkflowStatusNotImplementedBody { diff --git a/client/operations/share_workflow_parameters.go b/client/operations/share_workflow_parameters.go new file mode 100644 index 0000000..e6b9853 --- /dev/null +++ b/client/operations/share_workflow_parameters.go @@ -0,0 +1,205 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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" +) + +// NewShareWorkflowParams creates a new ShareWorkflowParams 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 NewShareWorkflowParams() *ShareWorkflowParams { + return &ShareWorkflowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewShareWorkflowParamsWithTimeout creates a new ShareWorkflowParams object +// with the ability to set a timeout on a request. +func NewShareWorkflowParamsWithTimeout(timeout time.Duration) *ShareWorkflowParams { + return &ShareWorkflowParams{ + timeout: timeout, + } +} + +// NewShareWorkflowParamsWithContext creates a new ShareWorkflowParams object +// with the ability to set a context for a request. +func NewShareWorkflowParamsWithContext(ctx context.Context) *ShareWorkflowParams { + return &ShareWorkflowParams{ + Context: ctx, + } +} + +// NewShareWorkflowParamsWithHTTPClient creates a new ShareWorkflowParams object +// with the ability to set a custom HTTPClient for a request. +func NewShareWorkflowParamsWithHTTPClient(client *http.Client) *ShareWorkflowParams { + return &ShareWorkflowParams{ + HTTPClient: client, + } +} + +/* +ShareWorkflowParams contains all the parameters to send to the API endpoint + + for the share workflow operation. + + Typically these are written to a http.Request. +*/ +type ShareWorkflowParams struct { + + /* AccessToken. + + The API access_token of workflow owner. + */ + AccessToken *string + + /* ShareDetails. + + JSON object with details of the share. + */ + ShareDetails ShareWorkflowBody + + /* WorkflowIDOrName. + + Required. Workflow UUID or name. + */ + WorkflowIDOrName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the share workflow params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ShareWorkflowParams) WithDefaults() *ShareWorkflowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the share workflow params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ShareWorkflowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the share workflow params +func (o *ShareWorkflowParams) WithTimeout(timeout time.Duration) *ShareWorkflowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the share workflow params +func (o *ShareWorkflowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the share workflow params +func (o *ShareWorkflowParams) WithContext(ctx context.Context) *ShareWorkflowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the share workflow params +func (o *ShareWorkflowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the share workflow params +func (o *ShareWorkflowParams) WithHTTPClient(client *http.Client) *ShareWorkflowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the share workflow params +func (o *ShareWorkflowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccessToken adds the accessToken to the share workflow params +func (o *ShareWorkflowParams) WithAccessToken(accessToken *string) *ShareWorkflowParams { + o.SetAccessToken(accessToken) + return o +} + +// SetAccessToken adds the accessToken to the share workflow params +func (o *ShareWorkflowParams) SetAccessToken(accessToken *string) { + o.AccessToken = accessToken +} + +// WithShareDetails adds the shareDetails to the share workflow params +func (o *ShareWorkflowParams) WithShareDetails(shareDetails ShareWorkflowBody) *ShareWorkflowParams { + o.SetShareDetails(shareDetails) + return o +} + +// SetShareDetails adds the shareDetails to the share workflow params +func (o *ShareWorkflowParams) SetShareDetails(shareDetails ShareWorkflowBody) { + o.ShareDetails = shareDetails +} + +// WithWorkflowIDOrName adds the workflowIDOrName to the share workflow params +func (o *ShareWorkflowParams) WithWorkflowIDOrName(workflowIDOrName string) *ShareWorkflowParams { + o.SetWorkflowIDOrName(workflowIDOrName) + return o +} + +// SetWorkflowIDOrName adds the workflowIdOrName to the share workflow params +func (o *ShareWorkflowParams) SetWorkflowIDOrName(workflowIDOrName string) { + o.WorkflowIDOrName = workflowIDOrName +} + +// WriteToRequest writes these params to a swagger request +func (o *ShareWorkflowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccessToken != nil { + + // query param access_token + var qrAccessToken string + + if o.AccessToken != nil { + qrAccessToken = *o.AccessToken + } + qAccessToken := qrAccessToken + if qAccessToken != "" { + + if err := r.SetQueryParam("access_token", qAccessToken); err != nil { + return err + } + } + } + if err := r.SetBodyParam(o.ShareDetails); err != nil { + return err + } + + // path param workflow_id_or_name + if err := r.SetPathParam("workflow_id_or_name", o.WorkflowIDOrName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/client/operations/share_workflow_responses.go b/client/operations/share_workflow_responses.go new file mode 100644 index 0000000..06049bf --- /dev/null +++ b/client/operations/share_workflow_responses.go @@ -0,0 +1,899 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ShareWorkflowReader is a Reader for the ShareWorkflow structure. +type ShareWorkflowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ShareWorkflowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewShareWorkflowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewShareWorkflowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewShareWorkflowUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewShareWorkflowForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewShareWorkflowNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewShareWorkflowConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewShareWorkflowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /api/workflows/{workflow_id_or_name}/share] share_workflow", response, response.Code()) + } +} + +// NewShareWorkflowOK creates a ShareWorkflowOK with default headers values +func NewShareWorkflowOK() *ShareWorkflowOK { + return &ShareWorkflowOK{} +} + +/* +ShareWorkflowOK describes a response with status code 200, with default header values. + +Request succeeded. The workflow has been shared with the user. +*/ +type ShareWorkflowOK struct { + Payload *ShareWorkflowOKBody +} + +// IsSuccess returns true when this share workflow o k response has a 2xx status code +func (o *ShareWorkflowOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this share workflow o k response has a 3xx status code +func (o *ShareWorkflowOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this share workflow o k response has a 4xx status code +func (o *ShareWorkflowOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this share workflow o k response has a 5xx status code +func (o *ShareWorkflowOK) IsServerError() bool { + return false +} + +// IsCode returns true when this share workflow o k response a status code equal to that given +func (o *ShareWorkflowOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the share workflow o k response +func (o *ShareWorkflowOK) Code() int { + return 200 +} + +func (o *ShareWorkflowOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowOK %s", 200, payload) +} + +func (o *ShareWorkflowOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowOK %s", 200, payload) +} + +func (o *ShareWorkflowOK) GetPayload() *ShareWorkflowOKBody { + return o.Payload +} + +func (o *ShareWorkflowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ShareWorkflowOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewShareWorkflowBadRequest creates a ShareWorkflowBadRequest with default headers values +func NewShareWorkflowBadRequest() *ShareWorkflowBadRequest { + return &ShareWorkflowBadRequest{} +} + +/* +ShareWorkflowBadRequest describes a response with status code 400, with default header values. + +Request failed. The incoming data seems malformed. +*/ +type ShareWorkflowBadRequest struct { + Payload *ShareWorkflowBadRequestBody +} + +// IsSuccess returns true when this share workflow bad request response has a 2xx status code +func (o *ShareWorkflowBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this share workflow bad request response has a 3xx status code +func (o *ShareWorkflowBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this share workflow bad request response has a 4xx status code +func (o *ShareWorkflowBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this share workflow bad request response has a 5xx status code +func (o *ShareWorkflowBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this share workflow bad request response a status code equal to that given +func (o *ShareWorkflowBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the share workflow bad request response +func (o *ShareWorkflowBadRequest) Code() int { + return 400 +} + +func (o *ShareWorkflowBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowBadRequest %s", 400, payload) +} + +func (o *ShareWorkflowBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowBadRequest %s", 400, payload) +} + +func (o *ShareWorkflowBadRequest) GetPayload() *ShareWorkflowBadRequestBody { + return o.Payload +} + +func (o *ShareWorkflowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ShareWorkflowBadRequestBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewShareWorkflowUnauthorized creates a ShareWorkflowUnauthorized with default headers values +func NewShareWorkflowUnauthorized() *ShareWorkflowUnauthorized { + return &ShareWorkflowUnauthorized{} +} + +/* +ShareWorkflowUnauthorized describes a response with status code 401, with default header values. + +Request failed. User not signed in. +*/ +type ShareWorkflowUnauthorized struct { + Payload *ShareWorkflowUnauthorizedBody +} + +// IsSuccess returns true when this share workflow unauthorized response has a 2xx status code +func (o *ShareWorkflowUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this share workflow unauthorized response has a 3xx status code +func (o *ShareWorkflowUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this share workflow unauthorized response has a 4xx status code +func (o *ShareWorkflowUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this share workflow unauthorized response has a 5xx status code +func (o *ShareWorkflowUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this share workflow unauthorized response a status code equal to that given +func (o *ShareWorkflowUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the share workflow unauthorized response +func (o *ShareWorkflowUnauthorized) Code() int { + return 401 +} + +func (o *ShareWorkflowUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowUnauthorized %s", 401, payload) +} + +func (o *ShareWorkflowUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowUnauthorized %s", 401, payload) +} + +func (o *ShareWorkflowUnauthorized) GetPayload() *ShareWorkflowUnauthorizedBody { + return o.Payload +} + +func (o *ShareWorkflowUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ShareWorkflowUnauthorizedBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewShareWorkflowForbidden creates a ShareWorkflowForbidden with default headers values +func NewShareWorkflowForbidden() *ShareWorkflowForbidden { + return &ShareWorkflowForbidden{} +} + +/* +ShareWorkflowForbidden describes a response with status code 403, with default header values. + +Request failed. Credentials are invalid or revoked. +*/ +type ShareWorkflowForbidden struct { + Payload *ShareWorkflowForbiddenBody +} + +// IsSuccess returns true when this share workflow forbidden response has a 2xx status code +func (o *ShareWorkflowForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this share workflow forbidden response has a 3xx status code +func (o *ShareWorkflowForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this share workflow forbidden response has a 4xx status code +func (o *ShareWorkflowForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this share workflow forbidden response has a 5xx status code +func (o *ShareWorkflowForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this share workflow forbidden response a status code equal to that given +func (o *ShareWorkflowForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the share workflow forbidden response +func (o *ShareWorkflowForbidden) Code() int { + return 403 +} + +func (o *ShareWorkflowForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowForbidden %s", 403, payload) +} + +func (o *ShareWorkflowForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowForbidden %s", 403, payload) +} + +func (o *ShareWorkflowForbidden) GetPayload() *ShareWorkflowForbiddenBody { + return o.Payload +} + +func (o *ShareWorkflowForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ShareWorkflowForbiddenBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewShareWorkflowNotFound creates a ShareWorkflowNotFound with default headers values +func NewShareWorkflowNotFound() *ShareWorkflowNotFound { + return &ShareWorkflowNotFound{} +} + +/* +ShareWorkflowNotFound describes a response with status code 404, with default header values. + +Request failed. Workflow does not exist or user does not exist. +*/ +type ShareWorkflowNotFound struct { + Payload *ShareWorkflowNotFoundBody +} + +// IsSuccess returns true when this share workflow not found response has a 2xx status code +func (o *ShareWorkflowNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this share workflow not found response has a 3xx status code +func (o *ShareWorkflowNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this share workflow not found response has a 4xx status code +func (o *ShareWorkflowNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this share workflow not found response has a 5xx status code +func (o *ShareWorkflowNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this share workflow not found response a status code equal to that given +func (o *ShareWorkflowNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the share workflow not found response +func (o *ShareWorkflowNotFound) Code() int { + return 404 +} + +func (o *ShareWorkflowNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowNotFound %s", 404, payload) +} + +func (o *ShareWorkflowNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowNotFound %s", 404, payload) +} + +func (o *ShareWorkflowNotFound) GetPayload() *ShareWorkflowNotFoundBody { + return o.Payload +} + +func (o *ShareWorkflowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ShareWorkflowNotFoundBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewShareWorkflowConflict creates a ShareWorkflowConflict with default headers values +func NewShareWorkflowConflict() *ShareWorkflowConflict { + return &ShareWorkflowConflict{} +} + +/* +ShareWorkflowConflict describes a response with status code 409, with default header values. + +Request failed. The workflow is already shared with the user. +*/ +type ShareWorkflowConflict struct { + Payload *ShareWorkflowConflictBody +} + +// IsSuccess returns true when this share workflow conflict response has a 2xx status code +func (o *ShareWorkflowConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this share workflow conflict response has a 3xx status code +func (o *ShareWorkflowConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this share workflow conflict response has a 4xx status code +func (o *ShareWorkflowConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this share workflow conflict response has a 5xx status code +func (o *ShareWorkflowConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this share workflow conflict response a status code equal to that given +func (o *ShareWorkflowConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the share workflow conflict response +func (o *ShareWorkflowConflict) Code() int { + return 409 +} + +func (o *ShareWorkflowConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowConflict %s", 409, payload) +} + +func (o *ShareWorkflowConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowConflict %s", 409, payload) +} + +func (o *ShareWorkflowConflict) GetPayload() *ShareWorkflowConflictBody { + return o.Payload +} + +func (o *ShareWorkflowConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ShareWorkflowConflictBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewShareWorkflowInternalServerError creates a ShareWorkflowInternalServerError with default headers values +func NewShareWorkflowInternalServerError() *ShareWorkflowInternalServerError { + return &ShareWorkflowInternalServerError{} +} + +/* +ShareWorkflowInternalServerError describes a response with status code 500, with default header values. + +Request failed. Internal controller error. +*/ +type ShareWorkflowInternalServerError struct { + Payload *ShareWorkflowInternalServerErrorBody +} + +// IsSuccess returns true when this share workflow internal server error response has a 2xx status code +func (o *ShareWorkflowInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this share workflow internal server error response has a 3xx status code +func (o *ShareWorkflowInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this share workflow internal server error response has a 4xx status code +func (o *ShareWorkflowInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this share workflow internal server error response has a 5xx status code +func (o *ShareWorkflowInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this share workflow internal server error response a status code equal to that given +func (o *ShareWorkflowInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the share workflow internal server error response +func (o *ShareWorkflowInternalServerError) Code() int { + return 500 +} + +func (o *ShareWorkflowInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowInternalServerError %s", 500, payload) +} + +func (o *ShareWorkflowInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/share][%d] shareWorkflowInternalServerError %s", 500, payload) +} + +func (o *ShareWorkflowInternalServerError) GetPayload() *ShareWorkflowInternalServerErrorBody { + return o.Payload +} + +func (o *ShareWorkflowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ShareWorkflowInternalServerErrorBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +ShareWorkflowBadRequestBody share workflow bad request body +swagger:model ShareWorkflowBadRequestBody +*/ +type ShareWorkflowBadRequestBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this share workflow bad request body +func (o *ShareWorkflowBadRequestBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this share workflow bad request body based on context it is used +func (o *ShareWorkflowBadRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ShareWorkflowBadRequestBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ShareWorkflowBadRequestBody) UnmarshalBinary(b []byte) error { + var res ShareWorkflowBadRequestBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ShareWorkflowBody share workflow body +swagger:model ShareWorkflowBody +*/ +type ShareWorkflowBody struct { + + // Optional. Message to include when sharing the workflow. + Message string `json:"message,omitempty"` + + // User to share the workflow with. + // Required: true + UserEmailToShareWith *string `json:"user_email_to_share_with"` + + // Optional. Date when access to the workflow will expire (format YYYY-MM-DD). + ValidUntil string `json:"valid_until,omitempty"` +} + +// Validate validates this share workflow body +func (o *ShareWorkflowBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateUserEmailToShareWith(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ShareWorkflowBody) validateUserEmailToShareWith(formats strfmt.Registry) error { + + if err := validate.Required("share_details"+"."+"user_email_to_share_with", "body", o.UserEmailToShareWith); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this share workflow body based on context it is used +func (o *ShareWorkflowBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ShareWorkflowBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ShareWorkflowBody) UnmarshalBinary(b []byte) error { + var res ShareWorkflowBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ShareWorkflowConflictBody share workflow conflict body +swagger:model ShareWorkflowConflictBody +*/ +type ShareWorkflowConflictBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this share workflow conflict body +func (o *ShareWorkflowConflictBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this share workflow conflict body based on context it is used +func (o *ShareWorkflowConflictBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ShareWorkflowConflictBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ShareWorkflowConflictBody) UnmarshalBinary(b []byte) error { + var res ShareWorkflowConflictBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ShareWorkflowForbiddenBody share workflow forbidden body +swagger:model ShareWorkflowForbiddenBody +*/ +type ShareWorkflowForbiddenBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this share workflow forbidden body +func (o *ShareWorkflowForbiddenBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this share workflow forbidden body based on context it is used +func (o *ShareWorkflowForbiddenBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ShareWorkflowForbiddenBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ShareWorkflowForbiddenBody) UnmarshalBinary(b []byte) error { + var res ShareWorkflowForbiddenBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ShareWorkflowInternalServerErrorBody share workflow internal server error body +swagger:model ShareWorkflowInternalServerErrorBody +*/ +type ShareWorkflowInternalServerErrorBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this share workflow internal server error body +func (o *ShareWorkflowInternalServerErrorBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this share workflow internal server error body based on context it is used +func (o *ShareWorkflowInternalServerErrorBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ShareWorkflowInternalServerErrorBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ShareWorkflowInternalServerErrorBody) UnmarshalBinary(b []byte) error { + var res ShareWorkflowInternalServerErrorBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ShareWorkflowNotFoundBody share workflow not found body +swagger:model ShareWorkflowNotFoundBody +*/ +type ShareWorkflowNotFoundBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this share workflow not found body +func (o *ShareWorkflowNotFoundBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this share workflow not found body based on context it is used +func (o *ShareWorkflowNotFoundBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ShareWorkflowNotFoundBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ShareWorkflowNotFoundBody) UnmarshalBinary(b []byte) error { + var res ShareWorkflowNotFoundBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ShareWorkflowOKBody share workflow o k body +swagger:model ShareWorkflowOKBody +*/ +type ShareWorkflowOKBody struct { + + // message + Message string `json:"message,omitempty"` + + // workflow id + WorkflowID string `json:"workflow_id,omitempty"` + + // workflow name + WorkflowName string `json:"workflow_name,omitempty"` +} + +// Validate validates this share workflow o k body +func (o *ShareWorkflowOKBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this share workflow o k body based on context it is used +func (o *ShareWorkflowOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ShareWorkflowOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ShareWorkflowOKBody) UnmarshalBinary(b []byte) error { + var res ShareWorkflowOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ShareWorkflowUnauthorizedBody share workflow unauthorized body +swagger:model ShareWorkflowUnauthorizedBody +*/ +type ShareWorkflowUnauthorizedBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this share workflow unauthorized body +func (o *ShareWorkflowUnauthorizedBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this share workflow unauthorized body based on context it is used +func (o *ShareWorkflowUnauthorizedBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ShareWorkflowUnauthorizedBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ShareWorkflowUnauthorizedBody) UnmarshalBinary(b []byte) error { + var res ShareWorkflowUnauthorizedBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/client/operations/start_workflow_responses.go b/client/operations/start_workflow_responses.go index d2a1e0d..987c816 100644 --- a/client/operations/start_workflow_responses.go +++ b/client/operations/start_workflow_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -115,11 +116,13 @@ func (o *StartWorkflowOK) Code() int { } func (o *StartWorkflowOK) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowOK %s", 200, payload) } func (o *StartWorkflowOK) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowOK %s", 200, payload) } func (o *StartWorkflowOK) GetPayload() *StartWorkflowOKBody { @@ -183,11 +186,13 @@ func (o *StartWorkflowBadRequest) Code() int { } func (o *StartWorkflowBadRequest) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowBadRequest %s", 400, payload) } func (o *StartWorkflowBadRequest) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowBadRequest %s", 400, payload) } func (o *StartWorkflowBadRequest) GetPayload() *StartWorkflowBadRequestBody { @@ -251,11 +256,13 @@ func (o *StartWorkflowForbidden) Code() int { } func (o *StartWorkflowForbidden) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowForbidden %s", 403, payload) } func (o *StartWorkflowForbidden) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowForbidden %s", 403, payload) } func (o *StartWorkflowForbidden) GetPayload() *StartWorkflowForbiddenBody { @@ -319,11 +326,13 @@ func (o *StartWorkflowNotFound) Code() int { } func (o *StartWorkflowNotFound) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowNotFound %s", 404, payload) } func (o *StartWorkflowNotFound) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowNotFound %s", 404, payload) } func (o *StartWorkflowNotFound) GetPayload() *StartWorkflowNotFoundBody { @@ -387,11 +396,13 @@ func (o *StartWorkflowConflict) Code() int { } func (o *StartWorkflowConflict) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowConflict %s", 409, payload) } func (o *StartWorkflowConflict) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowConflict %+v", 409, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowConflict %s", 409, payload) } func (o *StartWorkflowConflict) GetPayload() *StartWorkflowConflictBody { @@ -455,11 +466,13 @@ func (o *StartWorkflowInternalServerError) Code() int { } func (o *StartWorkflowInternalServerError) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowInternalServerError %s", 500, payload) } func (o *StartWorkflowInternalServerError) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowInternalServerError %s", 500, payload) } func (o *StartWorkflowInternalServerError) GetPayload() *StartWorkflowInternalServerErrorBody { @@ -523,11 +536,13 @@ func (o *StartWorkflowNotImplemented) Code() int { } func (o *StartWorkflowNotImplemented) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowNotImplemented %+v", 501, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowNotImplemented %s", 501, payload) } func (o *StartWorkflowNotImplemented) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowNotImplemented %+v", 501, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/start][%d] startWorkflowNotImplemented %s", 501, payload) } func (o *StartWorkflowNotImplemented) GetPayload() *StartWorkflowNotImplementedBody { diff --git a/client/operations/status_responses.go b/client/operations/status_responses.go index c426181..6bc24d9 100644 --- a/client/operations/status_responses.go +++ b/client/operations/status_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -86,11 +87,13 @@ func (o *StatusOK) Code() int { } func (o *StatusOK) Error() string { - return fmt.Sprintf("[GET /api/status][%d] statusOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/status][%d] statusOK %s", 200, payload) } func (o *StatusOK) String() string { - return fmt.Sprintf("[GET /api/status][%d] statusOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/status][%d] statusOK %s", 200, payload) } func (o *StatusOK) GetPayload() *StatusOKBody { @@ -154,11 +157,13 @@ func (o *StatusInternalServerError) Code() int { } func (o *StatusInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/status][%d] statusInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/status][%d] statusInternalServerError %s", 500, payload) } func (o *StatusInternalServerError) String() string { - return fmt.Sprintf("[GET /api/status][%d] statusInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /api/status][%d] statusInternalServerError %s", 500, payload) } func (o *StatusInternalServerError) GetPayload() *StatusInternalServerErrorBody { diff --git a/client/operations/unshare_workflow_parameters.go b/client/operations/unshare_workflow_parameters.go new file mode 100644 index 0000000..a860c04 --- /dev/null +++ b/client/operations/unshare_workflow_parameters.go @@ -0,0 +1,212 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// 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" +) + +// NewUnshareWorkflowParams creates a new UnshareWorkflowParams 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 NewUnshareWorkflowParams() *UnshareWorkflowParams { + return &UnshareWorkflowParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUnshareWorkflowParamsWithTimeout creates a new UnshareWorkflowParams object +// with the ability to set a timeout on a request. +func NewUnshareWorkflowParamsWithTimeout(timeout time.Duration) *UnshareWorkflowParams { + return &UnshareWorkflowParams{ + timeout: timeout, + } +} + +// NewUnshareWorkflowParamsWithContext creates a new UnshareWorkflowParams object +// with the ability to set a context for a request. +func NewUnshareWorkflowParamsWithContext(ctx context.Context) *UnshareWorkflowParams { + return &UnshareWorkflowParams{ + Context: ctx, + } +} + +// NewUnshareWorkflowParamsWithHTTPClient creates a new UnshareWorkflowParams object +// with the ability to set a custom HTTPClient for a request. +func NewUnshareWorkflowParamsWithHTTPClient(client *http.Client) *UnshareWorkflowParams { + return &UnshareWorkflowParams{ + HTTPClient: client, + } +} + +/* +UnshareWorkflowParams contains all the parameters to send to the API endpoint + + for the unshare workflow operation. + + Typically these are written to a http.Request. +*/ +type UnshareWorkflowParams struct { + + /* AccessToken. + + The API access_token of workflow owner. + */ + AccessToken *string + + /* UserEmailToUnshareWith. + + Required. User to unshare the workflow with. + */ + UserEmailToUnshareWith string + + /* WorkflowIDOrName. + + Required. Workflow UUID or name. + */ + WorkflowIDOrName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the unshare workflow params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UnshareWorkflowParams) WithDefaults() *UnshareWorkflowParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the unshare workflow params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UnshareWorkflowParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the unshare workflow params +func (o *UnshareWorkflowParams) WithTimeout(timeout time.Duration) *UnshareWorkflowParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the unshare workflow params +func (o *UnshareWorkflowParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the unshare workflow params +func (o *UnshareWorkflowParams) WithContext(ctx context.Context) *UnshareWorkflowParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the unshare workflow params +func (o *UnshareWorkflowParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the unshare workflow params +func (o *UnshareWorkflowParams) WithHTTPClient(client *http.Client) *UnshareWorkflowParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the unshare workflow params +func (o *UnshareWorkflowParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccessToken adds the accessToken to the unshare workflow params +func (o *UnshareWorkflowParams) WithAccessToken(accessToken *string) *UnshareWorkflowParams { + o.SetAccessToken(accessToken) + return o +} + +// SetAccessToken adds the accessToken to the unshare workflow params +func (o *UnshareWorkflowParams) SetAccessToken(accessToken *string) { + o.AccessToken = accessToken +} + +// WithUserEmailToUnshareWith adds the userEmailToUnshareWith to the unshare workflow params +func (o *UnshareWorkflowParams) WithUserEmailToUnshareWith(userEmailToUnshareWith string) *UnshareWorkflowParams { + o.SetUserEmailToUnshareWith(userEmailToUnshareWith) + return o +} + +// SetUserEmailToUnshareWith adds the userEmailToUnshareWith to the unshare workflow params +func (o *UnshareWorkflowParams) SetUserEmailToUnshareWith(userEmailToUnshareWith string) { + o.UserEmailToUnshareWith = userEmailToUnshareWith +} + +// WithWorkflowIDOrName adds the workflowIDOrName to the unshare workflow params +func (o *UnshareWorkflowParams) WithWorkflowIDOrName(workflowIDOrName string) *UnshareWorkflowParams { + o.SetWorkflowIDOrName(workflowIDOrName) + return o +} + +// SetWorkflowIDOrName adds the workflowIdOrName to the unshare workflow params +func (o *UnshareWorkflowParams) SetWorkflowIDOrName(workflowIDOrName string) { + o.WorkflowIDOrName = workflowIDOrName +} + +// WriteToRequest writes these params to a swagger request +func (o *UnshareWorkflowParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccessToken != nil { + + // query param access_token + var qrAccessToken string + + if o.AccessToken != nil { + qrAccessToken = *o.AccessToken + } + qAccessToken := qrAccessToken + if qAccessToken != "" { + + if err := r.SetQueryParam("access_token", qAccessToken); err != nil { + return err + } + } + } + + // query param user_email_to_unshare_with + qrUserEmailToUnshareWith := o.UserEmailToUnshareWith + qUserEmailToUnshareWith := qrUserEmailToUnshareWith + if qUserEmailToUnshareWith != "" { + + if err := r.SetQueryParam("user_email_to_unshare_with", qUserEmailToUnshareWith); err != nil { + return err + } + } + + // path param workflow_id_or_name + if err := r.SetPathParam("workflow_id_or_name", o.WorkflowIDOrName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/client/operations/unshare_workflow_responses.go b/client/operations/unshare_workflow_responses.go new file mode 100644 index 0000000..abb0168 --- /dev/null +++ b/client/operations/unshare_workflow_responses.go @@ -0,0 +1,720 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// UnshareWorkflowReader is a Reader for the UnshareWorkflow structure. +type UnshareWorkflowReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UnshareWorkflowReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUnshareWorkflowOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewUnshareWorkflowBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewUnshareWorkflowForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewUnshareWorkflowNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewUnshareWorkflowConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUnshareWorkflowInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /api/workflows/{workflow_id_or_name}/unshare] unshare_workflow", response, response.Code()) + } +} + +// NewUnshareWorkflowOK creates a UnshareWorkflowOK with default headers values +func NewUnshareWorkflowOK() *UnshareWorkflowOK { + return &UnshareWorkflowOK{} +} + +/* +UnshareWorkflowOK describes a response with status code 200, with default header values. + +Request succeeded. The workflow has been unshared with the user. +*/ +type UnshareWorkflowOK struct { + Payload *UnshareWorkflowOKBody +} + +// IsSuccess returns true when this unshare workflow o k response has a 2xx status code +func (o *UnshareWorkflowOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this unshare workflow o k response has a 3xx status code +func (o *UnshareWorkflowOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this unshare workflow o k response has a 4xx status code +func (o *UnshareWorkflowOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this unshare workflow o k response has a 5xx status code +func (o *UnshareWorkflowOK) IsServerError() bool { + return false +} + +// IsCode returns true when this unshare workflow o k response a status code equal to that given +func (o *UnshareWorkflowOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the unshare workflow o k response +func (o *UnshareWorkflowOK) Code() int { + return 200 +} + +func (o *UnshareWorkflowOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/unshare][%d] unshareWorkflowOK %s", 200, payload) +} + +func (o *UnshareWorkflowOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/unshare][%d] unshareWorkflowOK %s", 200, payload) +} + +func (o *UnshareWorkflowOK) GetPayload() *UnshareWorkflowOKBody { + return o.Payload +} + +func (o *UnshareWorkflowOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(UnshareWorkflowOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUnshareWorkflowBadRequest creates a UnshareWorkflowBadRequest with default headers values +func NewUnshareWorkflowBadRequest() *UnshareWorkflowBadRequest { + return &UnshareWorkflowBadRequest{} +} + +/* +UnshareWorkflowBadRequest describes a response with status code 400, with default header values. + +Request failed. The incoming data specification seems malformed. +*/ +type UnshareWorkflowBadRequest struct { + Payload *UnshareWorkflowBadRequestBody +} + +// IsSuccess returns true when this unshare workflow bad request response has a 2xx status code +func (o *UnshareWorkflowBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this unshare workflow bad request response has a 3xx status code +func (o *UnshareWorkflowBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this unshare workflow bad request response has a 4xx status code +func (o *UnshareWorkflowBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this unshare workflow bad request response has a 5xx status code +func (o *UnshareWorkflowBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this unshare workflow bad request response a status code equal to that given +func (o *UnshareWorkflowBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the unshare workflow bad request response +func (o *UnshareWorkflowBadRequest) Code() int { + return 400 +} + +func (o *UnshareWorkflowBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/unshare][%d] unshareWorkflowBadRequest %s", 400, payload) +} + +func (o *UnshareWorkflowBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/unshare][%d] unshareWorkflowBadRequest %s", 400, payload) +} + +func (o *UnshareWorkflowBadRequest) GetPayload() *UnshareWorkflowBadRequestBody { + return o.Payload +} + +func (o *UnshareWorkflowBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(UnshareWorkflowBadRequestBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUnshareWorkflowForbidden creates a UnshareWorkflowForbidden with default headers values +func NewUnshareWorkflowForbidden() *UnshareWorkflowForbidden { + return &UnshareWorkflowForbidden{} +} + +/* +UnshareWorkflowForbidden describes a response with status code 403, with default header values. + +Request failed. User is not allowed to unshare the workflow. +*/ +type UnshareWorkflowForbidden struct { + Payload *UnshareWorkflowForbiddenBody +} + +// IsSuccess returns true when this unshare workflow forbidden response has a 2xx status code +func (o *UnshareWorkflowForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this unshare workflow forbidden response has a 3xx status code +func (o *UnshareWorkflowForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this unshare workflow forbidden response has a 4xx status code +func (o *UnshareWorkflowForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this unshare workflow forbidden response has a 5xx status code +func (o *UnshareWorkflowForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this unshare workflow forbidden response a status code equal to that given +func (o *UnshareWorkflowForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the unshare workflow forbidden response +func (o *UnshareWorkflowForbidden) Code() int { + return 403 +} + +func (o *UnshareWorkflowForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/unshare][%d] unshareWorkflowForbidden %s", 403, payload) +} + +func (o *UnshareWorkflowForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/unshare][%d] unshareWorkflowForbidden %s", 403, payload) +} + +func (o *UnshareWorkflowForbidden) GetPayload() *UnshareWorkflowForbiddenBody { + return o.Payload +} + +func (o *UnshareWorkflowForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(UnshareWorkflowForbiddenBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUnshareWorkflowNotFound creates a UnshareWorkflowNotFound with default headers values +func NewUnshareWorkflowNotFound() *UnshareWorkflowNotFound { + return &UnshareWorkflowNotFound{} +} + +/* +UnshareWorkflowNotFound describes a response with status code 404, with default header values. + +Request failed. Workflow does not exist or user does not exist. +*/ +type UnshareWorkflowNotFound struct { + Payload *UnshareWorkflowNotFoundBody +} + +// IsSuccess returns true when this unshare workflow not found response has a 2xx status code +func (o *UnshareWorkflowNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this unshare workflow not found response has a 3xx status code +func (o *UnshareWorkflowNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this unshare workflow not found response has a 4xx status code +func (o *UnshareWorkflowNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this unshare workflow not found response has a 5xx status code +func (o *UnshareWorkflowNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this unshare workflow not found response a status code equal to that given +func (o *UnshareWorkflowNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the unshare workflow not found response +func (o *UnshareWorkflowNotFound) Code() int { + return 404 +} + +func (o *UnshareWorkflowNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/unshare][%d] unshareWorkflowNotFound %s", 404, payload) +} + +func (o *UnshareWorkflowNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/unshare][%d] unshareWorkflowNotFound %s", 404, payload) +} + +func (o *UnshareWorkflowNotFound) GetPayload() *UnshareWorkflowNotFoundBody { + return o.Payload +} + +func (o *UnshareWorkflowNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(UnshareWorkflowNotFoundBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUnshareWorkflowConflict creates a UnshareWorkflowConflict with default headers values +func NewUnshareWorkflowConflict() *UnshareWorkflowConflict { + return &UnshareWorkflowConflict{} +} + +/* +UnshareWorkflowConflict describes a response with status code 409, with default header values. + +Request failed. The workflow is not shared with the user. +*/ +type UnshareWorkflowConflict struct { + Payload *UnshareWorkflowConflictBody +} + +// IsSuccess returns true when this unshare workflow conflict response has a 2xx status code +func (o *UnshareWorkflowConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this unshare workflow conflict response has a 3xx status code +func (o *UnshareWorkflowConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this unshare workflow conflict response has a 4xx status code +func (o *UnshareWorkflowConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this unshare workflow conflict response has a 5xx status code +func (o *UnshareWorkflowConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this unshare workflow conflict response a status code equal to that given +func (o *UnshareWorkflowConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the unshare workflow conflict response +func (o *UnshareWorkflowConflict) Code() int { + return 409 +} + +func (o *UnshareWorkflowConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/unshare][%d] unshareWorkflowConflict %s", 409, payload) +} + +func (o *UnshareWorkflowConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/unshare][%d] unshareWorkflowConflict %s", 409, payload) +} + +func (o *UnshareWorkflowConflict) GetPayload() *UnshareWorkflowConflictBody { + return o.Payload +} + +func (o *UnshareWorkflowConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(UnshareWorkflowConflictBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUnshareWorkflowInternalServerError creates a UnshareWorkflowInternalServerError with default headers values +func NewUnshareWorkflowInternalServerError() *UnshareWorkflowInternalServerError { + return &UnshareWorkflowInternalServerError{} +} + +/* +UnshareWorkflowInternalServerError describes a response with status code 500, with default header values. + +Request failed. Internal controller error. +*/ +type UnshareWorkflowInternalServerError struct { + Payload *UnshareWorkflowInternalServerErrorBody +} + +// IsSuccess returns true when this unshare workflow internal server error response has a 2xx status code +func (o *UnshareWorkflowInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this unshare workflow internal server error response has a 3xx status code +func (o *UnshareWorkflowInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this unshare workflow internal server error response has a 4xx status code +func (o *UnshareWorkflowInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this unshare workflow internal server error response has a 5xx status code +func (o *UnshareWorkflowInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this unshare workflow internal server error response a status code equal to that given +func (o *UnshareWorkflowInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the unshare workflow internal server error response +func (o *UnshareWorkflowInternalServerError) Code() int { + return 500 +} + +func (o *UnshareWorkflowInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/unshare][%d] unshareWorkflowInternalServerError %s", 500, payload) +} + +func (o *UnshareWorkflowInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/unshare][%d] unshareWorkflowInternalServerError %s", 500, payload) +} + +func (o *UnshareWorkflowInternalServerError) GetPayload() *UnshareWorkflowInternalServerErrorBody { + return o.Payload +} + +func (o *UnshareWorkflowInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(UnshareWorkflowInternalServerErrorBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +UnshareWorkflowBadRequestBody unshare workflow bad request body +swagger:model UnshareWorkflowBadRequestBody +*/ +type UnshareWorkflowBadRequestBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this unshare workflow bad request body +func (o *UnshareWorkflowBadRequestBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this unshare workflow bad request body based on context it is used +func (o *UnshareWorkflowBadRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *UnshareWorkflowBadRequestBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *UnshareWorkflowBadRequestBody) UnmarshalBinary(b []byte) error { + var res UnshareWorkflowBadRequestBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +UnshareWorkflowConflictBody unshare workflow conflict body +swagger:model UnshareWorkflowConflictBody +*/ +type UnshareWorkflowConflictBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this unshare workflow conflict body +func (o *UnshareWorkflowConflictBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this unshare workflow conflict body based on context it is used +func (o *UnshareWorkflowConflictBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *UnshareWorkflowConflictBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *UnshareWorkflowConflictBody) UnmarshalBinary(b []byte) error { + var res UnshareWorkflowConflictBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +UnshareWorkflowForbiddenBody unshare workflow forbidden body +swagger:model UnshareWorkflowForbiddenBody +*/ +type UnshareWorkflowForbiddenBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this unshare workflow forbidden body +func (o *UnshareWorkflowForbiddenBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this unshare workflow forbidden body based on context it is used +func (o *UnshareWorkflowForbiddenBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *UnshareWorkflowForbiddenBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *UnshareWorkflowForbiddenBody) UnmarshalBinary(b []byte) error { + var res UnshareWorkflowForbiddenBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +UnshareWorkflowInternalServerErrorBody unshare workflow internal server error body +swagger:model UnshareWorkflowInternalServerErrorBody +*/ +type UnshareWorkflowInternalServerErrorBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this unshare workflow internal server error body +func (o *UnshareWorkflowInternalServerErrorBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this unshare workflow internal server error body based on context it is used +func (o *UnshareWorkflowInternalServerErrorBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *UnshareWorkflowInternalServerErrorBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *UnshareWorkflowInternalServerErrorBody) UnmarshalBinary(b []byte) error { + var res UnshareWorkflowInternalServerErrorBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +UnshareWorkflowNotFoundBody unshare workflow not found body +swagger:model UnshareWorkflowNotFoundBody +*/ +type UnshareWorkflowNotFoundBody struct { + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this unshare workflow not found body +func (o *UnshareWorkflowNotFoundBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this unshare workflow not found body based on context it is used +func (o *UnshareWorkflowNotFoundBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *UnshareWorkflowNotFoundBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *UnshareWorkflowNotFoundBody) UnmarshalBinary(b []byte) error { + var res UnshareWorkflowNotFoundBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +UnshareWorkflowOKBody unshare workflow o k body +swagger:model UnshareWorkflowOKBody +*/ +type UnshareWorkflowOKBody struct { + + // message + Message string `json:"message,omitempty"` + + // workflow id + WorkflowID string `json:"workflow_id,omitempty"` + + // workflow name + WorkflowName string `json:"workflow_name,omitempty"` +} + +// Validate validates this unshare workflow o k body +func (o *UnshareWorkflowOKBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this unshare workflow o k body based on context it is used +func (o *UnshareWorkflowOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *UnshareWorkflowOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *UnshareWorkflowOKBody) UnmarshalBinary(b []byte) error { + var res UnshareWorkflowOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/client/operations/upload_file_responses.go b/client/operations/upload_file_responses.go index 4131a13..7bf1568 100644 --- a/client/operations/upload_file_responses.go +++ b/client/operations/upload_file_responses.go @@ -7,6 +7,7 @@ package operations import ( "context" + "encoding/json" "fmt" "io" @@ -103,11 +104,13 @@ func (o *UploadFileOK) Code() int { } func (o *UploadFileOK) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileOK %s", 200, payload) } func (o *UploadFileOK) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileOK %s", 200, payload) } func (o *UploadFileOK) GetPayload() *UploadFileOKBody { @@ -171,11 +174,13 @@ func (o *UploadFileBadRequest) Code() int { } func (o *UploadFileBadRequest) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileBadRequest %s", 400, payload) } func (o *UploadFileBadRequest) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileBadRequest %+v", 400, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileBadRequest %s", 400, payload) } func (o *UploadFileBadRequest) GetPayload() *UploadFileBadRequestBody { @@ -239,11 +244,13 @@ func (o *UploadFileForbidden) Code() int { } func (o *UploadFileForbidden) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileForbidden %s", 403, payload) } func (o *UploadFileForbidden) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileForbidden %+v", 403, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileForbidden %s", 403, payload) } func (o *UploadFileForbidden) GetPayload() *UploadFileForbiddenBody { @@ -307,11 +314,13 @@ func (o *UploadFileNotFound) Code() int { } func (o *UploadFileNotFound) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileNotFound %s", 404, payload) } func (o *UploadFileNotFound) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileNotFound %+v", 404, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileNotFound %s", 404, payload) } func (o *UploadFileNotFound) GetPayload() *UploadFileNotFoundBody { @@ -375,11 +384,13 @@ func (o *UploadFileInternalServerError) Code() int { } func (o *UploadFileInternalServerError) Error() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileInternalServerError %s", 500, payload) } func (o *UploadFileInternalServerError) String() string { - return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileInternalServerError %+v", 500, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /api/workflows/{workflow_id_or_name}/workspace][%d] uploadFileInternalServerError %s", 500, payload) } func (o *UploadFileInternalServerError) GetPayload() *UploadFileInternalServerErrorBody {