From cb9168f3358026194b77e46e3b8777a1eff36311 Mon Sep 17 00:00:00 2001 From: Max Dubrinsky Date: Mon, 8 Jul 2024 11:59:19 -0400 Subject: [PATCH] Add more docstrings to workflows.proto GitOrigin-RevId: fdc1ec4f7a055caa8ea007263f238b12f5f58b20 --- .../rest_v1/api/workflows_api.py | 386 +++++++++++++----- .../rest_v1/models/create_workflow_request.py | 23 +- .../models/create_workflow_run_request.py | 14 +- .../rest_v1/models/get_workflows_response.py | 6 +- .../models/search_workflow_runs_response.py | 10 +- .../models/search_workflow_tasks_response.py | 10 +- .../models/search_workflows_response.py | 9 +- .../validate_workflow_action_response.py | 10 +- src/gretel_client/rest_v1/models/workflow.py | 44 +- .../rest_v1/models/workflow_run.py | 75 +++- .../rest_v1/models/workflow_task.py | 55 ++- 11 files changed, 480 insertions(+), 162 deletions(-) diff --git a/src/gretel_client/rest_v1/api/workflows_api.py b/src/gretel_client/rest_v1/api/workflows_api.py index f3b789e..083eb36 100755 --- a/src/gretel_client/rest_v1/api/workflows_api.py +++ b/src/gretel_client/rest_v1/api/workflows_api.py @@ -70,17 +70,22 @@ def __init__(self, api_client=None): @validate_arguments def cancel_workflow_run( - self, workflow_run_id: StrictStr, **kwargs + self, + workflow_run_id: Annotated[ + StrictStr, Field(..., description="The ID of the workflow run to cancel.") + ], + **kwargs, ) -> WorkflowRun: # noqa: E501 """cancel_workflow_run # noqa: E501 + Cancel a workflow run. This endpoint is used to cancel a workflow run. This will stop the workflow run and transition it to a `cancelled` state. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_workflow_run(workflow_run_id, async_req=True) >>> result = thread.get() - :param workflow_run_id: (required) + :param workflow_run_id: The ID of the workflow run to cancel. (required) :type workflow_run_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -104,17 +109,22 @@ def cancel_workflow_run( @validate_arguments def cancel_workflow_run_with_http_info( - self, workflow_run_id: StrictStr, **kwargs + self, + workflow_run_id: Annotated[ + StrictStr, Field(..., description="The ID of the workflow run to cancel.") + ], + **kwargs, ) -> ApiResponse: # noqa: E501 """cancel_workflow_run # noqa: E501 + Cancel a workflow run. This endpoint is used to cancel a workflow run. This will stop the workflow run and transition it to a `cancelled` state. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_workflow_run_with_http_info(workflow_run_id, async_req=True) >>> result = thread.get() - :param workflow_run_id: (required) + :param workflow_run_id: The ID of the workflow run to cancel. (required) :type workflow_run_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -219,7 +229,7 @@ def create_workflow( ) -> Workflow: # noqa: E501 """create_workflow # noqa: E501 - Create a new workflow in the provided project. Providing a config is optional, but workflow runs created from this workflow will require a config be provided. # noqa: E501 + Create a new workflow in the provided project. Providing a config is optional, but workflow runs created from this workflow will require a config be provided. Config can be provided as an object or as a YAML string. String configs will preserve comments and formatting where object configs cannot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -254,7 +264,7 @@ def create_workflow_with_http_info( ) -> ApiResponse: # noqa: E501 """create_workflow # noqa: E501 - Create a new workflow in the provided project. Providing a config is optional, but workflow runs created from this workflow will require a config be provided. # noqa: E501 + Create a new workflow in the provided project. Providing a config is optional, but workflow runs created from this workflow will require a config be provided. Config can be provided as an object or as a YAML string. String configs will preserve comments and formatting where object configs cannot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -375,7 +385,7 @@ def create_workflow_run( ) -> WorkflowRun: # noqa: E501 """create_workflow_run # noqa: E501 - Workflow Runs # noqa: E501 + Create a new workflow run for a given workflow. Providing a config is optional, but the workflow run will require a config be provided. Config can be provided as an object or as a YAML string. String configs will preserve comments and formatting where object configs cannot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -410,7 +420,7 @@ def create_workflow_run_with_http_info( ) -> ApiResponse: # noqa: E501 """create_workflow_run # noqa: E501 - Workflow Runs # noqa: E501 + Create a new workflow run for a given workflow. Providing a config is optional, but the workflow run will require a config be provided. Config can be provided as an object or as a YAML string. String configs will preserve comments and formatting where object configs cannot. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -526,16 +536,23 @@ def create_workflow_run_with_http_info( ) @validate_arguments - def delete_workflow(self, workflow_id: StrictStr, **kwargs) -> None: # noqa: E501 + def delete_workflow( + self, + workflow_id: Annotated[ + StrictStr, Field(..., description="The ID of the workflow to delete.") + ], + **kwargs, + ) -> None: # noqa: E501 """delete_workflow # noqa: E501 + Delete a workflow by ID. This will also delete all associated workflow runs and tasks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_workflow(workflow_id, async_req=True) >>> result = thread.get() - :param workflow_id: (required) + :param workflow_id: The ID of the workflow to delete. (required) :type workflow_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -557,17 +574,22 @@ def delete_workflow(self, workflow_id: StrictStr, **kwargs) -> None: # noqa: E5 @validate_arguments def delete_workflow_with_http_info( - self, workflow_id: StrictStr, **kwargs + self, + workflow_id: Annotated[ + StrictStr, Field(..., description="The ID of the workflow to delete.") + ], + **kwargs, ) -> ApiResponse: # noqa: E501 """delete_workflow # noqa: E501 + Delete a workflow by ID. This will also delete all associated workflow runs and tasks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_workflow_with_http_info(workflow_id, async_req=True) >>> result = thread.get() - :param workflow_id: (required) + :param workflow_id: The ID of the workflow to delete. (required) :type workflow_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -667,21 +689,29 @@ def delete_workflow_with_http_info( @validate_arguments def get_workflow( self, - workflow_id: StrictStr, - expand: Optional[conlist(StrictStr)] = None, + workflow_id: Annotated[ + StrictStr, Field(..., description="The ID of the workflow to retrieve.") + ], + expand: Annotated[ + Optional[conlist(StrictStr)], + Field( + description="The fields to expand in the response. Supported values are: `project`, `created_by`, `updated_by`, `latest_run`" + ), + ] = None, **kwargs, ) -> Workflow: # noqa: E501 """get_workflow # noqa: E501 + Get a single workflow by ID. This endpoint supports expansion. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_workflow(workflow_id, expand, async_req=True) >>> result = thread.get() - :param workflow_id: (required) + :param workflow_id: The ID of the workflow to retrieve. (required) :type workflow_id: str - :param expand: + :param expand: The fields to expand in the response. Supported values are: `project`, `created_by`, `updated_by`, `latest_run` :type expand: List[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -706,21 +736,29 @@ def get_workflow( @validate_arguments def get_workflow_with_http_info( self, - workflow_id: StrictStr, - expand: Optional[conlist(StrictStr)] = None, + workflow_id: Annotated[ + StrictStr, Field(..., description="The ID of the workflow to retrieve.") + ], + expand: Annotated[ + Optional[conlist(StrictStr)], + Field( + description="The fields to expand in the response. Supported values are: `project`, `created_by`, `updated_by`, `latest_run`" + ), + ] = None, **kwargs, ) -> ApiResponse: # noqa: E501 """get_workflow # noqa: E501 + Get a single workflow by ID. This endpoint supports expansion. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_workflow_with_http_info(workflow_id, expand, async_req=True) >>> result = thread.get() - :param workflow_id: (required) + :param workflow_id: The ID of the workflow to retrieve. (required) :type workflow_id: str - :param expand: + :param expand: The fields to expand in the response. Supported values are: `project`, `created_by`, `updated_by`, `latest_run` :type expand: List[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -826,21 +864,29 @@ def get_workflow_with_http_info( @validate_arguments def get_workflow_run( self, - workflow_run_id: StrictStr, - expand: Optional[conlist(StrictStr)] = None, + workflow_run_id: Annotated[ + StrictStr, Field(..., description="The ID of the workflow run to retrieve.") + ], + expand: Annotated[ + Optional[conlist(StrictStr)], + Field( + description="The fields to expand in the response. Supported values are: `project`, `config.system`, `created_by`" + ), + ] = None, **kwargs, ) -> WorkflowRun: # noqa: E501 """get_workflow_run # noqa: E501 + Get a single workflow run by ID. This endpoint supports expansion. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_workflow_run(workflow_run_id, expand, async_req=True) >>> result = thread.get() - :param workflow_run_id: (required) + :param workflow_run_id: The ID of the workflow run to retrieve. (required) :type workflow_run_id: str - :param expand: + :param expand: The fields to expand in the response. Supported values are: `project`, `config.system`, `created_by` :type expand: List[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -865,21 +911,29 @@ def get_workflow_run( @validate_arguments def get_workflow_run_with_http_info( self, - workflow_run_id: StrictStr, - expand: Optional[conlist(StrictStr)] = None, + workflow_run_id: Annotated[ + StrictStr, Field(..., description="The ID of the workflow run to retrieve.") + ], + expand: Annotated[ + Optional[conlist(StrictStr)], + Field( + description="The fields to expand in the response. Supported values are: `project`, `config.system`, `created_by`" + ), + ] = None, **kwargs, ) -> ApiResponse: # noqa: E501 """get_workflow_run # noqa: E501 + Get a single workflow run by ID. This endpoint supports expansion. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_workflow_run_with_http_info(workflow_run_id, expand, async_req=True) >>> result = thread.get() - :param workflow_run_id: (required) + :param workflow_run_id: The ID of the workflow run to retrieve. (required) :type workflow_run_id: str - :param expand: + :param expand: The fields to expand in the response. Supported values are: `project`, `config.system`, `created_by` :type expand: List[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -984,17 +1038,23 @@ def get_workflow_run_with_http_info( @validate_arguments def get_workflow_task( - self, workflow_task_id: StrictStr, **kwargs + self, + workflow_task_id: Annotated[ + StrictStr, + Field(..., description="The ID of the workflow task to retrieve."), + ], + **kwargs, ) -> WorkflowTask: # noqa: E501 """get_workflow_task # noqa: E501 + Get a single workflow task by ID. This endpoint supports expansion. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_workflow_task(workflow_task_id, async_req=True) >>> result = thread.get() - :param workflow_task_id: (required) + :param workflow_task_id: The ID of the workflow task to retrieve. (required) :type workflow_task_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -1018,17 +1078,23 @@ def get_workflow_task( @validate_arguments def get_workflow_task_with_http_info( - self, workflow_task_id: StrictStr, **kwargs + self, + workflow_task_id: Annotated[ + StrictStr, + Field(..., description="The ID of the workflow task to retrieve."), + ], + **kwargs, ) -> ApiResponse: # noqa: E501 """get_workflow_task # noqa: E501 + Get a single workflow task by ID. This endpoint supports expansion. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_workflow_task_with_http_info(workflow_task_id, async_req=True) >>> result = thread.get() - :param workflow_task_id: (required) + :param workflow_task_id: The ID of the workflow task to retrieve. (required) :type workflow_task_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -1263,30 +1329,50 @@ def get_workflows_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 @validate_arguments def search_workflow_runs( self, - query: Optional[StrictStr] = None, - expand: Optional[conlist(StrictStr)] = None, - limit: Optional[StrictInt] = None, - skip: Optional[StrictInt] = None, - sort: Optional[StrictStr] = None, + query: Annotated[ + Optional[StrictStr], + Field(description="The query string for searching workflow runs."), + ] = None, + expand: Annotated[ + Optional[conlist(StrictStr)], + Field( + description="The fields to expand in the search results. Supported values are: `project`, `config.system`, `created_by`" + ), + ] = None, + limit: Annotated[ + Optional[StrictInt], + Field(description="The maximum number of results to return."), + ] = None, + skip: Annotated[ + Optional[StrictInt], + Field( + description="The number of results to skip before applying the limit." + ), + ] = None, + sort: Annotated[ + Optional[StrictStr], + Field(description="The sort order for the search results."), + ] = None, **kwargs, ) -> SearchWorkflowRunsResponse: # noqa: E501 """search_workflow_runs # noqa: E501 + Search for workflow runs. This endpoint supports pagination, querying, and expansion. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_workflow_runs(query, expand, limit, skip, sort, async_req=True) >>> result = thread.get() - :param query: + :param query: The query string for searching workflow runs. :type query: str - :param expand: + :param expand: The fields to expand in the search results. Supported values are: `project`, `config.system`, `created_by` :type expand: List[str] - :param limit: + :param limit: The maximum number of results to return. :type limit: int - :param skip: + :param skip: The number of results to skip before applying the limit. :type skip: int - :param sort: + :param sort: The sort order for the search results. :type sort: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -1311,30 +1397,50 @@ def search_workflow_runs( @validate_arguments def search_workflow_runs_with_http_info( self, - query: Optional[StrictStr] = None, - expand: Optional[conlist(StrictStr)] = None, - limit: Optional[StrictInt] = None, - skip: Optional[StrictInt] = None, - sort: Optional[StrictStr] = None, + query: Annotated[ + Optional[StrictStr], + Field(description="The query string for searching workflow runs."), + ] = None, + expand: Annotated[ + Optional[conlist(StrictStr)], + Field( + description="The fields to expand in the search results. Supported values are: `project`, `config.system`, `created_by`" + ), + ] = None, + limit: Annotated[ + Optional[StrictInt], + Field(description="The maximum number of results to return."), + ] = None, + skip: Annotated[ + Optional[StrictInt], + Field( + description="The number of results to skip before applying the limit." + ), + ] = None, + sort: Annotated[ + Optional[StrictStr], + Field(description="The sort order for the search results."), + ] = None, **kwargs, ) -> ApiResponse: # noqa: E501 """search_workflow_runs # noqa: E501 + Search for workflow runs. This endpoint supports pagination, querying, and expansion. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_workflow_runs_with_http_info(query, expand, limit, skip, sort, async_req=True) >>> result = thread.get() - :param query: + :param query: The query string for searching workflow runs. :type query: str - :param expand: + :param expand: The fields to expand in the search results. Supported values are: `project`, `config.system`, `created_by` :type expand: List[str] - :param limit: + :param limit: The maximum number of results to return. :type limit: int - :param skip: + :param skip: The number of results to skip before applying the limit. :type skip: int - :param sort: + :param sort: The sort order for the search results. :type sort: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -1450,27 +1556,44 @@ def search_workflow_runs_with_http_info( @validate_arguments def search_workflow_tasks( self, - query: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - skip: Optional[StrictInt] = None, - expand: Optional[conlist(StrictStr)] = None, + query: Annotated[ + Optional[StrictStr], + Field(description="The query string for searching workflow tasks."), + ] = None, + limit: Annotated[ + Optional[StrictInt], + Field(description="The maximum number of results to return."), + ] = None, + skip: Annotated[ + Optional[StrictInt], + Field( + description="The number of results to skip before applying the limit." + ), + ] = None, + expand: Annotated[ + Optional[conlist(StrictStr)], + Field( + description="The fields to expand in the search results. Supported values are: `project`, `created_by`" + ), + ] = None, **kwargs, ) -> SearchWorkflowTasksResponse: # noqa: E501 """search_workflow_tasks # noqa: E501 + Search for workflow tasks. This endpoint supports pagination, querying, and expansion. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_workflow_tasks(query, limit, skip, expand, async_req=True) >>> result = thread.get() - :param query: + :param query: The query string for searching workflow tasks. :type query: str - :param limit: + :param limit: The maximum number of results to return. :type limit: int - :param skip: + :param skip: The number of results to skip before applying the limit. :type skip: int - :param expand: + :param expand: The fields to expand in the search results. Supported values are: `project`, `created_by` :type expand: List[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -1495,27 +1618,44 @@ def search_workflow_tasks( @validate_arguments def search_workflow_tasks_with_http_info( self, - query: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - skip: Optional[StrictInt] = None, - expand: Optional[conlist(StrictStr)] = None, + query: Annotated[ + Optional[StrictStr], + Field(description="The query string for searching workflow tasks."), + ] = None, + limit: Annotated[ + Optional[StrictInt], + Field(description="The maximum number of results to return."), + ] = None, + skip: Annotated[ + Optional[StrictInt], + Field( + description="The number of results to skip before applying the limit." + ), + ] = None, + expand: Annotated[ + Optional[conlist(StrictStr)], + Field( + description="The fields to expand in the search results. Supported values are: `project`, `created_by`" + ), + ] = None, **kwargs, ) -> ApiResponse: # noqa: E501 """search_workflow_tasks # noqa: E501 + Search for workflow tasks. This endpoint supports pagination, querying, and expansion. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.search_workflow_tasks_with_http_info(query, limit, skip, expand, async_req=True) >>> result = thread.get() - :param query: + :param query: The query string for searching workflow tasks. :type query: str - :param limit: + :param limit: The maximum number of results to return. :type limit: int - :param skip: + :param skip: The number of results to skip before applying the limit. :type skip: int - :param expand: + :param expand: The fields to expand in the search results. Supported values are: `project`, `created_by` :type expand: List[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -1628,11 +1768,30 @@ def search_workflow_tasks_with_http_info( @validate_arguments def search_workflows( self, - query: Optional[StrictStr] = None, - sort: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - skip: Optional[StrictInt] = None, - expand: Optional[conlist(StrictStr)] = None, + query: Annotated[ + Optional[StrictStr], + Field(description="The query string for searching workflows."), + ] = None, + sort: Annotated[ + Optional[StrictStr], + Field(description="The sort order for the search results."), + ] = None, + limit: Annotated[ + Optional[StrictInt], + Field(description="The maximum number of results to return."), + ] = None, + skip: Annotated[ + Optional[StrictInt], + Field( + description="The number of results to skip before applying the limit." + ), + ] = None, + expand: Annotated[ + Optional[conlist(StrictStr)], + Field( + description="The fields to expand in the search results. Supported values are: `project`, `created_by`, `updated_by`, `latest_run`" + ), + ] = None, **kwargs, ) -> SearchWorkflowsResponse: # noqa: E501 """search_workflows # noqa: E501 @@ -1644,15 +1803,15 @@ def search_workflows( >>> thread = api.search_workflows(query, sort, limit, skip, expand, async_req=True) >>> result = thread.get() - :param query: + :param query: The query string for searching workflows. :type query: str - :param sort: + :param sort: The sort order for the search results. :type sort: str - :param limit: + :param limit: The maximum number of results to return. :type limit: int - :param skip: + :param skip: The number of results to skip before applying the limit. :type skip: int - :param expand: + :param expand: The fields to expand in the search results. Supported values are: `project`, `created_by`, `updated_by`, `latest_run` :type expand: List[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -1677,11 +1836,30 @@ def search_workflows( @validate_arguments def search_workflows_with_http_info( self, - query: Optional[StrictStr] = None, - sort: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - skip: Optional[StrictInt] = None, - expand: Optional[conlist(StrictStr)] = None, + query: Annotated[ + Optional[StrictStr], + Field(description="The query string for searching workflows."), + ] = None, + sort: Annotated[ + Optional[StrictStr], + Field(description="The sort order for the search results."), + ] = None, + limit: Annotated[ + Optional[StrictInt], + Field(description="The maximum number of results to return."), + ] = None, + skip: Annotated[ + Optional[StrictInt], + Field( + description="The number of results to skip before applying the limit." + ), + ] = None, + expand: Annotated[ + Optional[conlist(StrictStr)], + Field( + description="The fields to expand in the search results. Supported values are: `project`, `created_by`, `updated_by`, `latest_run`" + ), + ] = None, **kwargs, ) -> ApiResponse: # noqa: E501 """search_workflows # noqa: E501 @@ -1693,15 +1871,15 @@ def search_workflows_with_http_info( >>> thread = api.search_workflows_with_http_info(query, sort, limit, skip, expand, async_req=True) >>> result = thread.get() - :param query: + :param query: The query string for searching workflows. :type query: str - :param sort: + :param sort: The sort order for the search results. :type sort: str - :param limit: + :param limit: The maximum number of results to return. :type limit: int - :param skip: + :param skip: The number of results to skip before applying the limit. :type skip: int - :param expand: + :param expand: The fields to expand in the search results. Supported values are: `project`, `created_by`, `updated_by`, `latest_run` :type expand: List[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -1816,18 +1994,23 @@ def search_workflows_with_http_info( @validate_arguments def update_workflow_config( - self, workflow_id: StrictStr, body: StrictStr, **kwargs + self, + workflow_id: Annotated[ + StrictStr, Field(..., description="The ID of the workflow to update.") + ], + body: StrictStr, + **kwargs, ) -> Workflow: # noqa: E501 """update_workflow_config # noqa: E501 - Update the config of an existing workflow. Future runs will be created with this config, existing runs will keep the config they were created with. # noqa: E501 + Update the config of an existing workflow. Future runs will be created with this config, existing runs will keep the config they were created with. Config can be provided as JSON or YAML content types. If provided as JSON, the `config_text` will be replaced with the JSON representation of the config, and any existing formatting or comments will be lost. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_workflow_config(workflow_id, body, async_req=True) >>> result = thread.get() - :param workflow_id: (required) + :param workflow_id: The ID of the workflow to update. (required) :type workflow_id: str :param body: (required) :type body: str @@ -1853,18 +2036,23 @@ def update_workflow_config( @validate_arguments def update_workflow_config_with_http_info( - self, workflow_id: StrictStr, body: StrictStr, **kwargs + self, + workflow_id: Annotated[ + StrictStr, Field(..., description="The ID of the workflow to update.") + ], + body: StrictStr, + **kwargs, ) -> ApiResponse: # noqa: E501 """update_workflow_config # noqa: E501 - Update the config of an existing workflow. Future runs will be created with this config, existing runs will keep the config they were created with. # noqa: E501 + Update the config of an existing workflow. Future runs will be created with this config, existing runs will keep the config they were created with. Config can be provided as JSON or YAML content types. If provided as JSON, the `config_text` will be replaced with the JSON representation of the config, and any existing formatting or comments will be lost. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_workflow_config_with_http_info(workflow_id, body, async_req=True) >>> result = thread.get() - :param workflow_id: (required) + :param workflow_id: The ID of the workflow to update. (required) :type workflow_id: str :param body: (required) :type body: str @@ -1983,13 +2171,14 @@ def validate_workflow_action( runner_mode: Annotated[ Optional[StrictStr], Field( - description="If this field is not UNSET, take the runner mode (cloud or hybrid) into account. This primarily affects which connections can be used in an action; those with Gretel-managed credentials encryption can't be used in a Hybrid workflow, and vice versa." + description="The runner mode to validate the action for. If this field is not UNSET, take the runner mode (cloud or hybrid) into account. This primarily affects which connections can be used in an action; those with Gretel-managed credentials encryption can't be used in a Hybrid workflow, and vice versa." ), ] = None, **kwargs, ) -> ValidateWorkflowActionResponse: # noqa: E501 """validate_workflow_action # noqa: E501 + Validate a single workflow action. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1998,7 +2187,7 @@ def validate_workflow_action( :param body: (required) :type body: object - :param runner_mode: If this field is not UNSET, take the runner mode (cloud or hybrid) into account. This primarily affects which connections can be used in an action; those with Gretel-managed credentials encryption can't be used in a Hybrid workflow, and vice versa. + :param runner_mode: The runner mode to validate the action for. If this field is not UNSET, take the runner mode (cloud or hybrid) into account. This primarily affects which connections can be used in an action; those with Gretel-managed credentials encryption can't be used in a Hybrid workflow, and vice versa. :type runner_mode: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -2027,13 +2216,14 @@ def validate_workflow_action_with_http_info( runner_mode: Annotated[ Optional[StrictStr], Field( - description="If this field is not UNSET, take the runner mode (cloud or hybrid) into account. This primarily affects which connections can be used in an action; those with Gretel-managed credentials encryption can't be used in a Hybrid workflow, and vice versa." + description="The runner mode to validate the action for. If this field is not UNSET, take the runner mode (cloud or hybrid) into account. This primarily affects which connections can be used in an action; those with Gretel-managed credentials encryption can't be used in a Hybrid workflow, and vice versa." ), ] = None, **kwargs, ) -> ApiResponse: # noqa: E501 """validate_workflow_action # noqa: E501 + Validate a single workflow action. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -2042,7 +2232,7 @@ def validate_workflow_action_with_http_info( :param body: (required) :type body: object - :param runner_mode: If this field is not UNSET, take the runner mode (cloud or hybrid) into account. This primarily affects which connections can be used in an action; those with Gretel-managed credentials encryption can't be used in a Hybrid workflow, and vice versa. + :param runner_mode: The runner mode to validate the action for. If this field is not UNSET, take the runner mode (cloud or hybrid) into account. This primarily affects which connections can be used in an action; those with Gretel-managed credentials encryption can't be used in a Hybrid workflow, and vice versa. :type runner_mode: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional diff --git a/src/gretel_client/rest_v1/models/create_workflow_request.py b/src/gretel_client/rest_v1/models/create_workflow_request.py index ade2375..9a546d3 100755 --- a/src/gretel_client/rest_v1/models/create_workflow_request.py +++ b/src/gretel_client/rest_v1/models/create_workflow_request.py @@ -28,11 +28,24 @@ class CreateWorkflowRequest(BaseModel): CreateWorkflowRequest """ - name: Optional[StrictStr] = None - project_id: StrictStr = Field(...) - config: Optional[Dict[str, Any]] = None - config_text: Optional[StrictStr] = None - runner_mode: Optional[StrictStr] = None + name: Optional[StrictStr] = Field( + None, + description="The name of the workflow. This field has been deprecated in favor of the `config.name` field.", + ) + project_id: StrictStr = Field( + ..., description="The project ID that this workflow should belong to." + ) + config: Optional[Dict[str, Any]] = Field( + None, + description="The workflow config object. See production documentation for more information on the structure of this field.", + ) + config_text: Optional[StrictStr] = Field( + None, description="The workflow config as a YAML string." + ) + runner_mode: Optional[StrictStr] = Field( + None, + description="The runner mode of the workflow. Can be `cloud` or `hybrid`. Some projects may require workflows to run in a specific mode.", + ) __properties = ["name", "project_id", "config", "config_text", "runner_mode"] @validator("runner_mode") diff --git a/src/gretel_client/rest_v1/models/create_workflow_run_request.py b/src/gretel_client/rest_v1/models/create_workflow_run_request.py index cf1a1fb..2a5ddc7 100755 --- a/src/gretel_client/rest_v1/models/create_workflow_run_request.py +++ b/src/gretel_client/rest_v1/models/create_workflow_run_request.py @@ -28,9 +28,17 @@ class CreateWorkflowRunRequest(BaseModel): CreateWorkflowRunRequest """ - workflow_id: StrictStr = Field(...) - config: Optional[Dict[str, Any]] = None - config_text: Optional[StrictStr] = None + workflow_id: StrictStr = Field( + ..., description="The ID of the workflow to create a run for." + ) + config: Optional[Dict[str, Any]] = Field( + None, + description="An optional config for the workflow run If provided, this will be used in place of the workflow's config.", + ) + config_text: Optional[StrictStr] = Field( + None, + description="An optional config for the workflow run as a YAML string. If provided, this will be used in place of the workflow's config.", + ) __properties = ["workflow_id", "config", "config_text"] class Config: diff --git a/src/gretel_client/rest_v1/models/get_workflows_response.py b/src/gretel_client/rest_v1/models/get_workflows_response.py index 8b295bd..3b89e71 100755 --- a/src/gretel_client/rest_v1/models/get_workflows_response.py +++ b/src/gretel_client/rest_v1/models/get_workflows_response.py @@ -20,7 +20,7 @@ from typing import List, Optional -from pydantic import BaseModel, conlist +from pydantic import BaseModel, conlist, Field from gretel_client.rest_v1.models.workflow import Workflow @@ -30,7 +30,9 @@ class GetWorkflowsResponse(BaseModel): GetWorkflowsResponse """ - workflows: Optional[conlist(Workflow)] = None + workflows: Optional[conlist(Workflow)] = Field( + None, description="The list of workflows." + ) __properties = ["workflows"] class Config: diff --git a/src/gretel_client/rest_v1/models/search_workflow_runs_response.py b/src/gretel_client/rest_v1/models/search_workflow_runs_response.py index 99ffaab..170d36f 100755 --- a/src/gretel_client/rest_v1/models/search_workflow_runs_response.py +++ b/src/gretel_client/rest_v1/models/search_workflow_runs_response.py @@ -30,8 +30,14 @@ class SearchWorkflowRunsResponse(BaseModel): SearchWorkflowRunsResponse """ - runs: Optional[conlist(WorkflowRun)] = None - total: StrictInt = Field(...) + runs: Optional[conlist(WorkflowRun)] = Field( + None, + description="The list of workflow runs that matched the search query in the requested page.", + ) + total: StrictInt = Field( + ..., + description="The total number of workflow runs that matched the search query.", + ) __properties = ["runs", "total"] class Config: diff --git a/src/gretel_client/rest_v1/models/search_workflow_tasks_response.py b/src/gretel_client/rest_v1/models/search_workflow_tasks_response.py index 72dce0b..51bacb2 100755 --- a/src/gretel_client/rest_v1/models/search_workflow_tasks_response.py +++ b/src/gretel_client/rest_v1/models/search_workflow_tasks_response.py @@ -30,8 +30,14 @@ class SearchWorkflowTasksResponse(BaseModel): SearchWorkflowTasksResponse """ - tasks: Optional[conlist(WorkflowTask)] = None - total: StrictInt = Field(...) + tasks: Optional[conlist(WorkflowTask)] = Field( + None, + description="The list of workflow tasks that matched the search query in the requested page.", + ) + total: StrictInt = Field( + ..., + description="The total number of workflow tasks that matched the search query.", + ) __properties = ["tasks", "total"] class Config: diff --git a/src/gretel_client/rest_v1/models/search_workflows_response.py b/src/gretel_client/rest_v1/models/search_workflows_response.py index cc412fa..93aa3e5 100755 --- a/src/gretel_client/rest_v1/models/search_workflows_response.py +++ b/src/gretel_client/rest_v1/models/search_workflows_response.py @@ -30,8 +30,13 @@ class SearchWorkflowsResponse(BaseModel): SearchWorkflowsResponse """ - workflows: Optional[conlist(Workflow)] = None - total: StrictInt = Field(...) + workflows: Optional[conlist(Workflow)] = Field( + None, + description="The list of workflows that matched the search query in the requested page.", + ) + total: StrictInt = Field( + ..., description="The total number of workflows that matched the search query." + ) __properties = ["workflows", "total"] class Config: diff --git a/src/gretel_client/rest_v1/models/validate_workflow_action_response.py b/src/gretel_client/rest_v1/models/validate_workflow_action_response.py index 28c91a2..6a54c73 100755 --- a/src/gretel_client/rest_v1/models/validate_workflow_action_response.py +++ b/src/gretel_client/rest_v1/models/validate_workflow_action_response.py @@ -20,7 +20,7 @@ from typing import Optional -from pydantic import BaseModel, StrictStr, validator +from pydantic import BaseModel, Field, StrictStr, validator class ValidateWorkflowActionResponse(BaseModel): @@ -28,8 +28,12 @@ class ValidateWorkflowActionResponse(BaseModel): ValidateWorkflowActionResponse """ - status: Optional[StrictStr] = None - message: Optional[StrictStr] = None + status: Optional[StrictStr] = Field( + None, description="The validation status of the action." + ) + message: Optional[StrictStr] = Field( + None, description="The error message if the action is invalid." + ) __properties = ["status", "message"] @validator("status") diff --git a/src/gretel_client/rest_v1/models/workflow.py b/src/gretel_client/rest_v1/models/workflow.py index 02c2205..80e29a5 100755 --- a/src/gretel_client/rest_v1/models/workflow.py +++ b/src/gretel_client/rest_v1/models/workflow.py @@ -33,20 +33,38 @@ class Workflow(BaseModel): Workflow """ - id: StrictStr = Field(...) - name: StrictStr = Field(...) - project_id: StrictStr = Field(...) + id: StrictStr = Field(..., description="The unique ID of the workflow.") + name: StrictStr = Field(..., description="The name of the workflow.") + project_id: StrictStr = Field( + ..., description="The project ID that this workflow belongs to." + ) project: Optional[Project] = None - config: Optional[Dict[str, Any]] = None - config_text: Optional[StrictStr] = None - runner_mode: Optional[StrictStr] = None - next_scheduled_run: Optional[datetime] = None - created_by: StrictStr = Field(...) + config: Optional[Dict[str, Any]] = Field( + None, description="The config of the workflow." + ) + config_text: Optional[StrictStr] = Field( + None, description="The config of the workflow as a YAML string." + ) + runner_mode: Optional[StrictStr] = Field( + None, description="The runner mode of the workflow. Can be `cloud` or `hybrid`." + ) + created_by: StrictStr = Field( + ..., description="The user ID that created this workflow." + ) created_by_profile: Optional[UserProfile] = None - updated_by: Optional[StrictStr] = None + updated_by: Optional[StrictStr] = Field( + None, description="The user ID that last updated this workflow." + ) updated_by_profile: Optional[UserProfile] = None - created_at: datetime = Field(...) - updated_at: Optional[datetime] = None + created_at: datetime = Field( + ..., description="A timestamp indicating when this workflow was created." + ) + updated_at: Optional[datetime] = Field( + None, description="A timestamp indicating when this workflow was last updated." + ) + next_scheduled_run: Optional[datetime] = Field( + None, description="A timestamp indicating when the next scheduled run is." + ) latest_run: Optional[WorkflowRun] = None __properties = [ "id", @@ -56,13 +74,13 @@ class Workflow(BaseModel): "config", "config_text", "runner_mode", - "next_scheduled_run", "created_by", "created_by_profile", "updated_by", "updated_by_profile", "created_at", "updated_at", + "next_scheduled_run", "latest_run", ] @@ -141,7 +159,6 @@ def from_dict(cls, obj: dict) -> Workflow: "config": obj.get("config"), "config_text": obj.get("config_text"), "runner_mode": obj.get("runner_mode"), - "next_scheduled_run": obj.get("next_scheduled_run"), "created_by": obj.get("created_by"), "created_by_profile": ( UserProfile.from_dict(obj.get("created_by_profile")) @@ -156,6 +173,7 @@ def from_dict(cls, obj: dict) -> Workflow: ), "created_at": obj.get("created_at"), "updated_at": obj.get("updated_at"), + "next_scheduled_run": obj.get("next_scheduled_run"), "latest_run": ( WorkflowRun.from_dict(obj.get("latest_run")) if obj.get("latest_run") is not None diff --git a/src/gretel_client/rest_v1/models/workflow_run.py b/src/gretel_client/rest_v1/models/workflow_run.py index 68abad8..c19d9c4 100755 --- a/src/gretel_client/rest_v1/models/workflow_run.py +++ b/src/gretel_client/rest_v1/models/workflow_run.py @@ -36,28 +36,67 @@ class WorkflowRun(BaseModel): WorkflowRun """ - id: StrictStr = Field(...) - workflow_id: StrictStr = Field(...) - project_id: StrictStr = Field(...) + id: StrictStr = Field(..., description="The unique ID of the workflow run.") + workflow_id: StrictStr = Field( + ..., description="The ID of the workflow that this run belongs to." + ) + project_id: StrictStr = Field( + ..., + description="The project ID that this workflow run belongs to. This will be the same as the project ID of the workflow.", + ) project: Optional[Project] = None - cluster_guid: Optional[StrictStr] = None - config: Optional[Dict[str, Any]] = None - config_text: Optional[StrictStr] = None - runner_mode: StrictStr = Field(...) - status: StrictStr = Field(...) + cluster_guid: Optional[StrictStr] = Field( + None, description="The GUID of the cluster where the workflow run is executed." + ) + config: Optional[Dict[str, Any]] = Field( + None, description="The config of the workflow run." + ) + config_text: Optional[StrictStr] = Field( + None, description="The config of the workflow run as a YAML string." + ) + runner_mode: StrictStr = Field( + ..., + description="The runner mode of the workflow run. Can be `cloud` or `hybrid`.", + ) + status: StrictStr = Field(..., description="The status of the workflow run.") status_details: Optional[StatusDetails] = None - created_by: StrictStr = Field(...) - created_at: datetime = Field(...) - updated_at: Optional[datetime] = None - pending_at: Optional[datetime] = None - active_at: Optional[datetime] = None - error_at: Optional[datetime] = None - lost_at: Optional[datetime] = None - cancelled_at: Optional[datetime] = None - lease_expires_at: Optional[datetime] = None + created_by: StrictStr = Field( + ..., description="The user ID that created this workflow run." + ) + created_at: datetime = Field( + ..., description="A timestamp indicating when this workflow run was created." + ) + updated_at: Optional[datetime] = Field( + None, + description="A timestamp indicating when this workflow run was last updated.", + ) + pending_at: Optional[datetime] = Field( + None, + description="A timestamp indicating when this workflow run entered the pending state.", + ) + active_at: Optional[datetime] = Field( + None, + description="A timestamp indicating when this workflow run entered the active state.", + ) + error_at: Optional[datetime] = Field( + None, + description="A timestamp indicating when an error occurred in this workflow run.", + ) + lost_at: Optional[datetime] = Field( + None, description="A timestamp indicating when this workflow run was lost." + ) + cancelled_at: Optional[datetime] = Field( + None, description="A timestamp indicating when this workflow run was cancelled." + ) + lease_expires_at: Optional[datetime] = Field( + None, + description="A timestamp indicating when the lease for this workflow run expires.", + ) cancellation_request: Optional[WorkflowRunCancellationRequest] = None created_by_profile: Optional[UserProfile] = None - total_compute_time_sconds: Optional[StrictInt] = None + total_compute_time_sconds: Optional[StrictInt] = Field( + None, description="The total compute time in seconds for this workflow run." + ) __properties = [ "id", "workflow_id", diff --git a/src/gretel_client/rest_v1/models/workflow_task.py b/src/gretel_client/rest_v1/models/workflow_task.py index 229d268..b24d070 100755 --- a/src/gretel_client/rest_v1/models/workflow_task.py +++ b/src/gretel_client/rest_v1/models/workflow_task.py @@ -32,12 +32,18 @@ class WorkflowTask(BaseModel): Next Tag: 24 """ - id: StrictStr = Field(...) - workflow_run_id: StrictStr = Field(...) - project_id: StrictStr = Field(...) + id: StrictStr = Field(..., description="The unique ID of the workflow task.") + workflow_run_id: StrictStr = Field( + ..., description="The ID of the workflow run that this task belongs to." + ) + project_id: StrictStr = Field( + ..., description="The project ID that this workflow task belongs to." + ) project: Optional[Project] = None - log_location: StrictStr = Field(...) - status: StrictStr = Field(...) + log_location: StrictStr = Field( + ..., description="The location of the log for this workflow task." + ) + status: StrictStr = Field(..., description="The status of the workflow task.") action_name: StrictStr = Field( ..., description="The user supplied name of the workflow action that produced this task. The name can be mapped back to the original workflow config.", @@ -58,16 +64,37 @@ class WorkflowTask(BaseModel): None, description="A more detailed stack trace that can be used for root cause analysis. This stack trace generally shouldn't be shown in the UI and will span many lines.", ) - created_by: StrictStr = Field(...) + created_by: StrictStr = Field( + ..., description="The user ID that created this workflow." + ) created_by_profile: Optional[UserProfile] = None - created_at: datetime = Field(...) - updated_at: Optional[datetime] = None - pending_at: Optional[datetime] = None - active_at: Optional[datetime] = None - error_at: Optional[datetime] = None - lost_at: Optional[datetime] = None - completed_at: Optional[datetime] = None - total_compute_time_sconds: Optional[StrictInt] = None + created_at: datetime = Field( + ..., description="A timestamp indicating when this workflow was created." + ) + updated_at: Optional[datetime] = Field( + None, description="A timestamp indicating when this workflow was last updated." + ) + pending_at: Optional[datetime] = Field( + None, + description="A timestamp indicating when this workflow entered the pending state.", + ) + active_at: Optional[datetime] = Field( + None, + description="A timestamp indicating when this workflow entered the active state.", + ) + error_at: Optional[datetime] = Field( + None, + description="A timestamp indicating when an error occurred in this workflow.", + ) + lost_at: Optional[datetime] = Field( + None, description="A timestamp indicating when this workflow was lost." + ) + completed_at: Optional[datetime] = Field( + None, description="A timestamp indicating when this workflow was completed." + ) + total_compute_time_sconds: Optional[StrictInt] = Field( + None, description="The total compute time in seconds for this workflow." + ) __properties = [ "id", "workflow_run_id",