eval-studio-client 1.0.0a1__py3-none-any.whl → 1.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. eval_studio_client/api/__init__.py +43 -0
  2. eval_studio_client/api/api/__init__.py +5 -0
  3. eval_studio_client/api/api/human_calibration_service_api.py +304 -0
  4. eval_studio_client/api/api/perturbator_service_api.py +268 -1
  5. eval_studio_client/api/api/prompt_library_service_api.py +669 -0
  6. eval_studio_client/api/api/test_service_api.py +568 -0
  7. eval_studio_client/api/api/workflow_edge_service_api.py +296 -0
  8. eval_studio_client/api/api/workflow_node_service_api.py +1634 -0
  9. eval_studio_client/api/api/workflow_service_api.py +1609 -0
  10. eval_studio_client/api/docs/HumanCalibrationServiceApi.md +77 -0
  11. eval_studio_client/api/docs/PerturbationServiceCreatePerturbationRequest.md +1 -0
  12. eval_studio_client/api/docs/PerturbatorServiceApi.md +33 -3
  13. eval_studio_client/api/docs/PromptGenerationServiceAutoGeneratePromptsRequest.md +2 -1
  14. eval_studio_client/api/docs/PromptLibraryServiceApi.md +155 -0
  15. eval_studio_client/api/docs/ProtobufNullValue.md +12 -0
  16. eval_studio_client/api/docs/RequiredTheTestCaseToUpdate.md +1 -0
  17. eval_studio_client/api/docs/RequiredTheUpdatedWorkflow.md +44 -0
  18. eval_studio_client/api/docs/RequiredTheUpdatedWorkflowNode.md +44 -0
  19. eval_studio_client/api/docs/TestServiceApi.md +140 -0
  20. eval_studio_client/api/docs/TestServiceGenerateTestCasesRequest.md +1 -0
  21. eval_studio_client/api/docs/TestServiceImportTestCasesFromLibraryRequest.md +32 -0
  22. eval_studio_client/api/docs/TestServiceListTestCaseLibraryItemsRequest.md +35 -0
  23. eval_studio_client/api/docs/TestServicePerturbTestRequest.md +1 -0
  24. eval_studio_client/api/docs/V1BatchDeleteWorkflowsRequest.md +29 -0
  25. eval_studio_client/api/docs/V1BatchDeleteWorkflowsResponse.md +29 -0
  26. eval_studio_client/api/docs/V1BatchGetWorkflowEdgesResponse.md +29 -0
  27. eval_studio_client/api/docs/V1BatchGetWorkflowNodesResponse.md +29 -0
  28. eval_studio_client/api/docs/V1CreateEvaluationRequest.md +1 -0
  29. eval_studio_client/api/docs/V1CreateWorkflowResponse.md +29 -0
  30. eval_studio_client/api/docs/V1DeleteWorkflowNodeResponse.md +29 -0
  31. eval_studio_client/api/docs/V1DeleteWorkflowResponse.md +29 -0
  32. eval_studio_client/api/docs/V1EstimateThresholdRequest.md +33 -0
  33. eval_studio_client/api/docs/V1GetWorkflowNodePrerequisitesResponse.md +30 -0
  34. eval_studio_client/api/docs/V1GetWorkflowNodeResponse.md +29 -0
  35. eval_studio_client/api/docs/V1GetWorkflowResponse.md +29 -0
  36. eval_studio_client/api/docs/V1ImportEvaluationRequest.md +1 -0
  37. eval_studio_client/api/docs/V1ImportTestCasesFromLibraryResponse.md +29 -0
  38. eval_studio_client/api/docs/V1ImportTestCasesRequest.md +33 -0
  39. eval_studio_client/api/docs/V1LabeledTestCase.md +31 -0
  40. eval_studio_client/api/docs/V1ListPromptLibraryItemsResponse.md +29 -0
  41. eval_studio_client/api/docs/V1ListTestCaseLibraryItemsResponse.md +29 -0
  42. eval_studio_client/api/docs/V1ListWorkflowsResponse.md +29 -0
  43. eval_studio_client/api/docs/V1ProcessWorkflowNodeResponse.md +29 -0
  44. eval_studio_client/api/docs/V1PromptLibraryItem.md +42 -0
  45. eval_studio_client/api/docs/V1TestCase.md +1 -0
  46. eval_studio_client/api/docs/V1TestSuiteEvaluates.md +11 -0
  47. eval_studio_client/api/docs/V1UpdateWorkflowNodeResponse.md +29 -0
  48. eval_studio_client/api/docs/V1UpdateWorkflowResponse.md +29 -0
  49. eval_studio_client/api/docs/V1Workflow.md +46 -0
  50. eval_studio_client/api/docs/V1WorkflowEdge.md +40 -0
  51. eval_studio_client/api/docs/V1WorkflowEdgeType.md +12 -0
  52. eval_studio_client/api/docs/V1WorkflowNode.md +46 -0
  53. eval_studio_client/api/docs/V1WorkflowNodeArtifact.md +40 -0
  54. eval_studio_client/api/docs/V1WorkflowNodeArtifacts.md +29 -0
  55. eval_studio_client/api/docs/V1WorkflowNodeAttributes.md +30 -0
  56. eval_studio_client/api/docs/V1WorkflowNodeStatus.md +12 -0
  57. eval_studio_client/api/docs/V1WorkflowNodeType.md +12 -0
  58. eval_studio_client/api/docs/V1WorkflowNodeView.md +12 -0
  59. eval_studio_client/api/docs/V1WorkflowType.md +12 -0
  60. eval_studio_client/api/docs/WorkflowEdgeServiceApi.md +76 -0
  61. eval_studio_client/api/docs/WorkflowNodeServiceApi.md +423 -0
  62. eval_studio_client/api/docs/WorkflowServiceApi.md +417 -0
  63. eval_studio_client/api/models/__init__.py +38 -0
  64. eval_studio_client/api/models/perturbation_service_create_perturbation_request.py +8 -2
  65. eval_studio_client/api/models/prompt_generation_service_auto_generate_prompts_request.py +5 -3
  66. eval_studio_client/api/models/protobuf_null_value.py +36 -0
  67. eval_studio_client/api/models/required_the_test_case_to_update.py +6 -2
  68. eval_studio_client/api/models/required_the_updated_workflow.py +152 -0
  69. eval_studio_client/api/models/required_the_updated_workflow_node.py +152 -0
  70. eval_studio_client/api/models/test_service_generate_test_cases_request.py +4 -2
  71. eval_studio_client/api/models/test_service_import_test_cases_from_library_request.py +93 -0
  72. eval_studio_client/api/models/test_service_list_test_case_library_items_request.py +99 -0
  73. eval_studio_client/api/models/test_service_perturb_test_request.py +4 -2
  74. eval_studio_client/api/models/v1_batch_delete_workflows_request.py +87 -0
  75. eval_studio_client/api/models/v1_batch_delete_workflows_response.py +95 -0
  76. eval_studio_client/api/models/v1_batch_get_workflow_edges_response.py +95 -0
  77. eval_studio_client/api/models/v1_batch_get_workflow_nodes_response.py +95 -0
  78. eval_studio_client/api/models/v1_create_evaluation_request.py +7 -2
  79. eval_studio_client/api/models/v1_create_workflow_response.py +91 -0
  80. eval_studio_client/api/models/v1_delete_workflow_node_response.py +91 -0
  81. eval_studio_client/api/models/v1_delete_workflow_response.py +91 -0
  82. eval_studio_client/api/models/v1_estimate_threshold_request.py +103 -0
  83. eval_studio_client/api/models/v1_get_workflow_node_prerequisites_response.py +89 -0
  84. eval_studio_client/api/models/v1_get_workflow_node_response.py +91 -0
  85. eval_studio_client/api/models/v1_get_workflow_response.py +91 -0
  86. eval_studio_client/api/models/v1_import_evaluation_request.py +7 -2
  87. eval_studio_client/api/models/v1_import_test_cases_from_library_response.py +91 -0
  88. eval_studio_client/api/models/v1_import_test_cases_request.py +95 -0
  89. eval_studio_client/api/models/v1_labeled_test_case.py +91 -0
  90. eval_studio_client/api/models/v1_list_prompt_library_items_response.py +95 -0
  91. eval_studio_client/api/models/v1_list_test_case_library_items_response.py +95 -0
  92. eval_studio_client/api/models/v1_list_workflows_response.py +95 -0
  93. eval_studio_client/api/models/v1_process_workflow_node_response.py +91 -0
  94. eval_studio_client/api/models/v1_prompt_library_item.py +129 -0
  95. eval_studio_client/api/models/v1_test_case.py +6 -2
  96. eval_studio_client/api/models/v1_test_suite_evaluates.py +39 -0
  97. eval_studio_client/api/models/v1_update_workflow_node_response.py +91 -0
  98. eval_studio_client/api/models/v1_update_workflow_response.py +91 -0
  99. eval_studio_client/api/models/v1_workflow.py +156 -0
  100. eval_studio_client/api/models/v1_workflow_edge.py +123 -0
  101. eval_studio_client/api/models/v1_workflow_edge_type.py +37 -0
  102. eval_studio_client/api/models/v1_workflow_node.py +156 -0
  103. eval_studio_client/api/models/v1_workflow_node_artifact.py +122 -0
  104. eval_studio_client/api/models/v1_workflow_node_artifacts.py +97 -0
  105. eval_studio_client/api/models/v1_workflow_node_attributes.py +87 -0
  106. eval_studio_client/api/models/v1_workflow_node_status.py +40 -0
  107. eval_studio_client/api/models/v1_workflow_node_type.py +41 -0
  108. eval_studio_client/api/models/v1_workflow_node_view.py +38 -0
  109. eval_studio_client/api/models/v1_workflow_type.py +37 -0
  110. eval_studio_client/api/test/test_human_calibration_service_api.py +38 -0
  111. eval_studio_client/api/test/test_perturbation_service_create_perturbation_request.py +20 -2
  112. eval_studio_client/api/test/test_prompt_generation_service_auto_generate_prompts_request.py +4 -1
  113. eval_studio_client/api/test/test_prompt_library_service_api.py +43 -0
  114. eval_studio_client/api/test/test_protobuf_null_value.py +33 -0
  115. eval_studio_client/api/test/test_required_the_test_case_to_update.py +4 -1
  116. eval_studio_client/api/test/test_required_the_updated_workflow.py +88 -0
  117. eval_studio_client/api/test/test_required_the_updated_workflow_node.py +80 -0
  118. eval_studio_client/api/test/test_test_service_api.py +12 -0
  119. eval_studio_client/api/test/test_test_service_generate_test_cases_request.py +4 -1
  120. eval_studio_client/api/test/test_test_service_import_test_cases_from_library_request.py +56 -0
  121. eval_studio_client/api/test/test_test_service_list_test_case_library_items_request.py +63 -0
  122. eval_studio_client/api/test/test_test_service_perturb_test_request.py +4 -1
  123. eval_studio_client/api/test/test_v1_batch_delete_test_cases_response.py +4 -1
  124. eval_studio_client/api/test/test_v1_batch_delete_workflows_request.py +53 -0
  125. eval_studio_client/api/test/test_v1_batch_delete_workflows_response.py +92 -0
  126. eval_studio_client/api/test/test_v1_batch_get_workflow_edges_response.py +64 -0
  127. eval_studio_client/api/test/test_v1_batch_get_workflow_nodes_response.py +84 -0
  128. eval_studio_client/api/test/test_v1_create_evaluation_request.py +20 -2
  129. eval_studio_client/api/test/test_v1_create_test_case_response.py +4 -1
  130. eval_studio_client/api/test/test_v1_create_workflow_response.py +90 -0
  131. eval_studio_client/api/test/test_v1_delete_test_case_response.py +4 -1
  132. eval_studio_client/api/test/test_v1_delete_workflow_node_response.py +82 -0
  133. eval_studio_client/api/test/test_v1_delete_workflow_response.py +90 -0
  134. eval_studio_client/api/test/test_v1_estimate_threshold_request.py +60 -0
  135. eval_studio_client/api/test/test_v1_evaluation_test.py +4 -1
  136. eval_studio_client/api/test/test_v1_find_all_test_cases_by_id_response.py +4 -1
  137. eval_studio_client/api/test/test_v1_get_test_case_response.py +4 -1
  138. eval_studio_client/api/test/test_v1_get_workflow_node_prerequisites_response.py +56 -0
  139. eval_studio_client/api/test/test_v1_get_workflow_node_response.py +82 -0
  140. eval_studio_client/api/test/test_v1_get_workflow_response.py +90 -0
  141. eval_studio_client/api/test/test_v1_import_evaluation_request.py +16 -1
  142. eval_studio_client/api/test/test_v1_import_test_cases_from_library_response.py +71 -0
  143. eval_studio_client/api/test/test_v1_import_test_cases_request.py +57 -0
  144. eval_studio_client/api/test/test_v1_labeled_test_case.py +53 -0
  145. eval_studio_client/api/test/test_v1_list_prompt_library_items_response.py +71 -0
  146. eval_studio_client/api/test/test_v1_list_test_case_library_items_response.py +71 -0
  147. eval_studio_client/api/test/test_v1_list_test_cases_response.py +4 -1
  148. eval_studio_client/api/test/test_v1_list_workflows_response.py +92 -0
  149. eval_studio_client/api/test/test_v1_process_workflow_node_response.py +71 -0
  150. eval_studio_client/api/test/test_v1_prompt_library_item.py +68 -0
  151. eval_studio_client/api/test/test_v1_test_case.py +4 -1
  152. eval_studio_client/api/test/test_v1_test_suite_evaluates.py +33 -0
  153. eval_studio_client/api/test/test_v1_update_test_case_response.py +4 -1
  154. eval_studio_client/api/test/test_v1_update_workflow_node_response.py +82 -0
  155. eval_studio_client/api/test/test_v1_update_workflow_response.py +90 -0
  156. eval_studio_client/api/test/test_v1_workflow.py +89 -0
  157. eval_studio_client/api/test/test_v1_workflow_edge.py +61 -0
  158. eval_studio_client/api/test/test_v1_workflow_edge_type.py +33 -0
  159. eval_studio_client/api/test/test_v1_workflow_node.py +81 -0
  160. eval_studio_client/api/test/test_v1_workflow_node_artifact.py +61 -0
  161. eval_studio_client/api/test/test_v1_workflow_node_artifacts.py +64 -0
  162. eval_studio_client/api/test/test_v1_workflow_node_attributes.py +51 -0
  163. eval_studio_client/api/test/test_v1_workflow_node_status.py +33 -0
  164. eval_studio_client/api/test/test_v1_workflow_node_type.py +33 -0
  165. eval_studio_client/api/test/test_v1_workflow_node_view.py +33 -0
  166. eval_studio_client/api/test/test_v1_workflow_type.py +33 -0
  167. eval_studio_client/api/test/test_workflow_edge_service_api.py +38 -0
  168. eval_studio_client/api/test/test_workflow_node_service_api.py +73 -0
  169. eval_studio_client/api/test/test_workflow_service_api.py +73 -0
  170. eval_studio_client/client.py +7 -0
  171. eval_studio_client/dashboards.py +66 -18
  172. eval_studio_client/gen/openapiv2/eval_studio.swagger.json +2665 -794
  173. eval_studio_client/leaderboards.py +125 -0
  174. eval_studio_client/models.py +3 -42
  175. eval_studio_client/test_labs.py +49 -21
  176. eval_studio_client/tests.py +221 -51
  177. eval_studio_client/utils.py +26 -0
  178. {eval_studio_client-1.0.0a1.dist-info → eval_studio_client-1.0.1.dist-info}/METADATA +1 -2
  179. {eval_studio_client-1.0.0a1.dist-info → eval_studio_client-1.0.1.dist-info}/RECORD +180 -50
  180. {eval_studio_client-1.0.0a1.dist-info → eval_studio_client-1.0.1.dist-info}/WHEEL +1 -1
@@ -0,0 +1,1609 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ai/h2o/eval_studio/v1/collection.proto
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: version not set
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, field_validator
20
+ from typing_extensions import Annotated
21
+ from eval_studio_client.api.models.required_the_updated_workflow import RequiredTheUpdatedWorkflow
22
+ from eval_studio_client.api.models.v1_batch_delete_workflows_request import V1BatchDeleteWorkflowsRequest
23
+ from eval_studio_client.api.models.v1_batch_delete_workflows_response import V1BatchDeleteWorkflowsResponse
24
+ from eval_studio_client.api.models.v1_create_workflow_response import V1CreateWorkflowResponse
25
+ from eval_studio_client.api.models.v1_delete_workflow_response import V1DeleteWorkflowResponse
26
+ from eval_studio_client.api.models.v1_get_workflow_response import V1GetWorkflowResponse
27
+ from eval_studio_client.api.models.v1_list_workflows_response import V1ListWorkflowsResponse
28
+ from eval_studio_client.api.models.v1_update_workflow_response import V1UpdateWorkflowResponse
29
+ from eval_studio_client.api.models.v1_workflow import V1Workflow
30
+
31
+ from eval_studio_client.api.api_client import ApiClient, RequestSerialized
32
+ from eval_studio_client.api.api_response import ApiResponse
33
+ from eval_studio_client.api.rest import RESTResponseType
34
+
35
+
36
+ class WorkflowServiceApi:
37
+ """NOTE: This class is auto generated by OpenAPI Generator
38
+ Ref: https://openapi-generator.tech
39
+
40
+ Do not edit the class manually.
41
+ """
42
+
43
+ def __init__(self, api_client=None) -> None:
44
+ if api_client is None:
45
+ api_client = ApiClient.get_default()
46
+ self.api_client = api_client
47
+
48
+
49
+ @validate_call
50
+ def workflow_service_batch_delete_workflows(
51
+ self,
52
+ body: V1BatchDeleteWorkflowsRequest,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> V1BatchDeleteWorkflowsResponse:
66
+ """BatchDeleteWorkflows deletes Workflows by names. If any of the Workflows do not exist an error is returned.
67
+
68
+
69
+ :param body: (required)
70
+ :type body: V1BatchDeleteWorkflowsRequest
71
+ :param _request_timeout: timeout setting for this request. If one
72
+ number provided, it will be total request
73
+ timeout. It can also be a pair (tuple) of
74
+ (connection, read) timeouts.
75
+ :type _request_timeout: int, tuple(int, int), optional
76
+ :param _request_auth: set to override the auth_settings for an a single
77
+ request; this effectively ignores the
78
+ authentication in the spec for a single request.
79
+ :type _request_auth: dict, optional
80
+ :param _content_type: force content-type for the request.
81
+ :type _content_type: str, Optional
82
+ :param _headers: set to override the headers for a single
83
+ request; this effectively ignores the headers
84
+ in the spec for a single request.
85
+ :type _headers: dict, optional
86
+ :param _host_index: set to override the host_index for a single
87
+ request; this effectively ignores the host_index
88
+ in the spec for a single request.
89
+ :type _host_index: int, optional
90
+ :return: Returns the result object.
91
+ """ # noqa: E501
92
+
93
+ _param = self._workflow_service_batch_delete_workflows_serialize(
94
+ body=body,
95
+ _request_auth=_request_auth,
96
+ _content_type=_content_type,
97
+ _headers=_headers,
98
+ _host_index=_host_index
99
+ )
100
+
101
+ _response_types_map: Dict[str, Optional[str]] = {
102
+ '200': "V1BatchDeleteWorkflowsResponse",
103
+ }
104
+ response_data = self.api_client.call_api(
105
+ *_param,
106
+ _request_timeout=_request_timeout
107
+ )
108
+ response_data.read()
109
+ return self.api_client.response_deserialize(
110
+ response_data=response_data,
111
+ response_types_map=_response_types_map,
112
+ ).data
113
+
114
+
115
+ @validate_call
116
+ def workflow_service_batch_delete_workflows_with_http_info(
117
+ self,
118
+ body: V1BatchDeleteWorkflowsRequest,
119
+ _request_timeout: Union[
120
+ None,
121
+ Annotated[StrictFloat, Field(gt=0)],
122
+ Tuple[
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Annotated[StrictFloat, Field(gt=0)]
125
+ ]
126
+ ] = None,
127
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
128
+ _content_type: Optional[StrictStr] = None,
129
+ _headers: Optional[Dict[StrictStr, Any]] = None,
130
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
131
+ ) -> ApiResponse[V1BatchDeleteWorkflowsResponse]:
132
+ """BatchDeleteWorkflows deletes Workflows by names. If any of the Workflows do not exist an error is returned.
133
+
134
+
135
+ :param body: (required)
136
+ :type body: V1BatchDeleteWorkflowsRequest
137
+ :param _request_timeout: timeout setting for this request. If one
138
+ number provided, it will be total request
139
+ timeout. It can also be a pair (tuple) of
140
+ (connection, read) timeouts.
141
+ :type _request_timeout: int, tuple(int, int), optional
142
+ :param _request_auth: set to override the auth_settings for an a single
143
+ request; this effectively ignores the
144
+ authentication in the spec for a single request.
145
+ :type _request_auth: dict, optional
146
+ :param _content_type: force content-type for the request.
147
+ :type _content_type: str, Optional
148
+ :param _headers: set to override the headers for a single
149
+ request; this effectively ignores the headers
150
+ in the spec for a single request.
151
+ :type _headers: dict, optional
152
+ :param _host_index: set to override the host_index for a single
153
+ request; this effectively ignores the host_index
154
+ in the spec for a single request.
155
+ :type _host_index: int, optional
156
+ :return: Returns the result object.
157
+ """ # noqa: E501
158
+
159
+ _param = self._workflow_service_batch_delete_workflows_serialize(
160
+ body=body,
161
+ _request_auth=_request_auth,
162
+ _content_type=_content_type,
163
+ _headers=_headers,
164
+ _host_index=_host_index
165
+ )
166
+
167
+ _response_types_map: Dict[str, Optional[str]] = {
168
+ '200': "V1BatchDeleteWorkflowsResponse",
169
+ }
170
+ response_data = self.api_client.call_api(
171
+ *_param,
172
+ _request_timeout=_request_timeout
173
+ )
174
+ response_data.read()
175
+ return self.api_client.response_deserialize(
176
+ response_data=response_data,
177
+ response_types_map=_response_types_map,
178
+ )
179
+
180
+
181
+ @validate_call
182
+ def workflow_service_batch_delete_workflows_without_preload_content(
183
+ self,
184
+ body: V1BatchDeleteWorkflowsRequest,
185
+ _request_timeout: Union[
186
+ None,
187
+ Annotated[StrictFloat, Field(gt=0)],
188
+ Tuple[
189
+ Annotated[StrictFloat, Field(gt=0)],
190
+ Annotated[StrictFloat, Field(gt=0)]
191
+ ]
192
+ ] = None,
193
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
194
+ _content_type: Optional[StrictStr] = None,
195
+ _headers: Optional[Dict[StrictStr, Any]] = None,
196
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
197
+ ) -> RESTResponseType:
198
+ """BatchDeleteWorkflows deletes Workflows by names. If any of the Workflows do not exist an error is returned.
199
+
200
+
201
+ :param body: (required)
202
+ :type body: V1BatchDeleteWorkflowsRequest
203
+ :param _request_timeout: timeout setting for this request. If one
204
+ number provided, it will be total request
205
+ timeout. It can also be a pair (tuple) of
206
+ (connection, read) timeouts.
207
+ :type _request_timeout: int, tuple(int, int), optional
208
+ :param _request_auth: set to override the auth_settings for an a single
209
+ request; this effectively ignores the
210
+ authentication in the spec for a single request.
211
+ :type _request_auth: dict, optional
212
+ :param _content_type: force content-type for the request.
213
+ :type _content_type: str, Optional
214
+ :param _headers: set to override the headers for a single
215
+ request; this effectively ignores the headers
216
+ in the spec for a single request.
217
+ :type _headers: dict, optional
218
+ :param _host_index: set to override the host_index for a single
219
+ request; this effectively ignores the host_index
220
+ in the spec for a single request.
221
+ :type _host_index: int, optional
222
+ :return: Returns the result object.
223
+ """ # noqa: E501
224
+
225
+ _param = self._workflow_service_batch_delete_workflows_serialize(
226
+ body=body,
227
+ _request_auth=_request_auth,
228
+ _content_type=_content_type,
229
+ _headers=_headers,
230
+ _host_index=_host_index
231
+ )
232
+
233
+ _response_types_map: Dict[str, Optional[str]] = {
234
+ '200': "V1BatchDeleteWorkflowsResponse",
235
+ }
236
+ response_data = self.api_client.call_api(
237
+ *_param,
238
+ _request_timeout=_request_timeout
239
+ )
240
+ return response_data.response
241
+
242
+
243
+ def _workflow_service_batch_delete_workflows_serialize(
244
+ self,
245
+ body,
246
+ _request_auth,
247
+ _content_type,
248
+ _headers,
249
+ _host_index,
250
+ ) -> RequestSerialized:
251
+
252
+ _host = None
253
+
254
+ _collection_formats: Dict[str, str] = {
255
+ }
256
+
257
+ _path_params: Dict[str, str] = {}
258
+ _query_params: List[Tuple[str, str]] = []
259
+ _header_params: Dict[str, Optional[str]] = _headers or {}
260
+ _form_params: List[Tuple[str, str]] = []
261
+ _files: Dict[str, Union[str, bytes]] = {}
262
+ _body_params: Optional[bytes] = None
263
+
264
+ # process the path parameters
265
+ # process the query parameters
266
+ # process the header parameters
267
+ # process the form parameters
268
+ # process the body parameter
269
+ if body is not None:
270
+ _body_params = body
271
+
272
+
273
+ # set the HTTP header `Accept`
274
+ _header_params['Accept'] = self.api_client.select_header_accept(
275
+ [
276
+ 'application/json'
277
+ ]
278
+ )
279
+
280
+ # set the HTTP header `Content-Type`
281
+ if _content_type:
282
+ _header_params['Content-Type'] = _content_type
283
+ else:
284
+ _default_content_type = (
285
+ self.api_client.select_header_content_type(
286
+ [
287
+ 'application/json'
288
+ ]
289
+ )
290
+ )
291
+ if _default_content_type is not None:
292
+ _header_params['Content-Type'] = _default_content_type
293
+
294
+ # authentication setting
295
+ _auth_settings: List[str] = [
296
+ ]
297
+
298
+ return self.api_client.param_serialize(
299
+ method='POST',
300
+ resource_path='/v1/workflows:batchDelete',
301
+ path_params=_path_params,
302
+ query_params=_query_params,
303
+ header_params=_header_params,
304
+ body=_body_params,
305
+ post_params=_form_params,
306
+ files=_files,
307
+ auth_settings=_auth_settings,
308
+ collection_formats=_collection_formats,
309
+ _host=_host,
310
+ _request_auth=_request_auth
311
+ )
312
+
313
+
314
+
315
+
316
+ @validate_call
317
+ def workflow_service_create_workflow(
318
+ self,
319
+ workflow: Annotated[V1Workflow, Field(description="Required. The Workflow to create.")],
320
+ _request_timeout: Union[
321
+ None,
322
+ Annotated[StrictFloat, Field(gt=0)],
323
+ Tuple[
324
+ Annotated[StrictFloat, Field(gt=0)],
325
+ Annotated[StrictFloat, Field(gt=0)]
326
+ ]
327
+ ] = None,
328
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
329
+ _content_type: Optional[StrictStr] = None,
330
+ _headers: Optional[Dict[StrictStr, Any]] = None,
331
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
332
+ ) -> V1CreateWorkflowResponse:
333
+ """CreateWorkflow creates a Workflow.
334
+
335
+
336
+ :param workflow: Required. The Workflow to create. (required)
337
+ :type workflow: V1Workflow
338
+ :param _request_timeout: timeout setting for this request. If one
339
+ number provided, it will be total request
340
+ timeout. It can also be a pair (tuple) of
341
+ (connection, read) timeouts.
342
+ :type _request_timeout: int, tuple(int, int), optional
343
+ :param _request_auth: set to override the auth_settings for an a single
344
+ request; this effectively ignores the
345
+ authentication in the spec for a single request.
346
+ :type _request_auth: dict, optional
347
+ :param _content_type: force content-type for the request.
348
+ :type _content_type: str, Optional
349
+ :param _headers: set to override the headers for a single
350
+ request; this effectively ignores the headers
351
+ in the spec for a single request.
352
+ :type _headers: dict, optional
353
+ :param _host_index: set to override the host_index for a single
354
+ request; this effectively ignores the host_index
355
+ in the spec for a single request.
356
+ :type _host_index: int, optional
357
+ :return: Returns the result object.
358
+ """ # noqa: E501
359
+
360
+ _param = self._workflow_service_create_workflow_serialize(
361
+ workflow=workflow,
362
+ _request_auth=_request_auth,
363
+ _content_type=_content_type,
364
+ _headers=_headers,
365
+ _host_index=_host_index
366
+ )
367
+
368
+ _response_types_map: Dict[str, Optional[str]] = {
369
+ '200': "V1CreateWorkflowResponse",
370
+ }
371
+ response_data = self.api_client.call_api(
372
+ *_param,
373
+ _request_timeout=_request_timeout
374
+ )
375
+ response_data.read()
376
+ return self.api_client.response_deserialize(
377
+ response_data=response_data,
378
+ response_types_map=_response_types_map,
379
+ ).data
380
+
381
+
382
+ @validate_call
383
+ def workflow_service_create_workflow_with_http_info(
384
+ self,
385
+ workflow: Annotated[V1Workflow, Field(description="Required. The Workflow to create.")],
386
+ _request_timeout: Union[
387
+ None,
388
+ Annotated[StrictFloat, Field(gt=0)],
389
+ Tuple[
390
+ Annotated[StrictFloat, Field(gt=0)],
391
+ Annotated[StrictFloat, Field(gt=0)]
392
+ ]
393
+ ] = None,
394
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
395
+ _content_type: Optional[StrictStr] = None,
396
+ _headers: Optional[Dict[StrictStr, Any]] = None,
397
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
398
+ ) -> ApiResponse[V1CreateWorkflowResponse]:
399
+ """CreateWorkflow creates a Workflow.
400
+
401
+
402
+ :param workflow: Required. The Workflow to create. (required)
403
+ :type workflow: V1Workflow
404
+ :param _request_timeout: timeout setting for this request. If one
405
+ number provided, it will be total request
406
+ timeout. It can also be a pair (tuple) of
407
+ (connection, read) timeouts.
408
+ :type _request_timeout: int, tuple(int, int), optional
409
+ :param _request_auth: set to override the auth_settings for an a single
410
+ request; this effectively ignores the
411
+ authentication in the spec for a single request.
412
+ :type _request_auth: dict, optional
413
+ :param _content_type: force content-type for the request.
414
+ :type _content_type: str, Optional
415
+ :param _headers: set to override the headers for a single
416
+ request; this effectively ignores the headers
417
+ in the spec for a single request.
418
+ :type _headers: dict, optional
419
+ :param _host_index: set to override the host_index for a single
420
+ request; this effectively ignores the host_index
421
+ in the spec for a single request.
422
+ :type _host_index: int, optional
423
+ :return: Returns the result object.
424
+ """ # noqa: E501
425
+
426
+ _param = self._workflow_service_create_workflow_serialize(
427
+ workflow=workflow,
428
+ _request_auth=_request_auth,
429
+ _content_type=_content_type,
430
+ _headers=_headers,
431
+ _host_index=_host_index
432
+ )
433
+
434
+ _response_types_map: Dict[str, Optional[str]] = {
435
+ '200': "V1CreateWorkflowResponse",
436
+ }
437
+ response_data = self.api_client.call_api(
438
+ *_param,
439
+ _request_timeout=_request_timeout
440
+ )
441
+ response_data.read()
442
+ return self.api_client.response_deserialize(
443
+ response_data=response_data,
444
+ response_types_map=_response_types_map,
445
+ )
446
+
447
+
448
+ @validate_call
449
+ def workflow_service_create_workflow_without_preload_content(
450
+ self,
451
+ workflow: Annotated[V1Workflow, Field(description="Required. The Workflow to create.")],
452
+ _request_timeout: Union[
453
+ None,
454
+ Annotated[StrictFloat, Field(gt=0)],
455
+ Tuple[
456
+ Annotated[StrictFloat, Field(gt=0)],
457
+ Annotated[StrictFloat, Field(gt=0)]
458
+ ]
459
+ ] = None,
460
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
461
+ _content_type: Optional[StrictStr] = None,
462
+ _headers: Optional[Dict[StrictStr, Any]] = None,
463
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
464
+ ) -> RESTResponseType:
465
+ """CreateWorkflow creates a Workflow.
466
+
467
+
468
+ :param workflow: Required. The Workflow to create. (required)
469
+ :type workflow: V1Workflow
470
+ :param _request_timeout: timeout setting for this request. If one
471
+ number provided, it will be total request
472
+ timeout. It can also be a pair (tuple) of
473
+ (connection, read) timeouts.
474
+ :type _request_timeout: int, tuple(int, int), optional
475
+ :param _request_auth: set to override the auth_settings for an a single
476
+ request; this effectively ignores the
477
+ authentication in the spec for a single request.
478
+ :type _request_auth: dict, optional
479
+ :param _content_type: force content-type for the request.
480
+ :type _content_type: str, Optional
481
+ :param _headers: set to override the headers for a single
482
+ request; this effectively ignores the headers
483
+ in the spec for a single request.
484
+ :type _headers: dict, optional
485
+ :param _host_index: set to override the host_index for a single
486
+ request; this effectively ignores the host_index
487
+ in the spec for a single request.
488
+ :type _host_index: int, optional
489
+ :return: Returns the result object.
490
+ """ # noqa: E501
491
+
492
+ _param = self._workflow_service_create_workflow_serialize(
493
+ workflow=workflow,
494
+ _request_auth=_request_auth,
495
+ _content_type=_content_type,
496
+ _headers=_headers,
497
+ _host_index=_host_index
498
+ )
499
+
500
+ _response_types_map: Dict[str, Optional[str]] = {
501
+ '200': "V1CreateWorkflowResponse",
502
+ }
503
+ response_data = self.api_client.call_api(
504
+ *_param,
505
+ _request_timeout=_request_timeout
506
+ )
507
+ return response_data.response
508
+
509
+
510
+ def _workflow_service_create_workflow_serialize(
511
+ self,
512
+ workflow,
513
+ _request_auth,
514
+ _content_type,
515
+ _headers,
516
+ _host_index,
517
+ ) -> RequestSerialized:
518
+
519
+ _host = None
520
+
521
+ _collection_formats: Dict[str, str] = {
522
+ }
523
+
524
+ _path_params: Dict[str, str] = {}
525
+ _query_params: List[Tuple[str, str]] = []
526
+ _header_params: Dict[str, Optional[str]] = _headers or {}
527
+ _form_params: List[Tuple[str, str]] = []
528
+ _files: Dict[str, Union[str, bytes]] = {}
529
+ _body_params: Optional[bytes] = None
530
+
531
+ # process the path parameters
532
+ # process the query parameters
533
+ # process the header parameters
534
+ # process the form parameters
535
+ # process the body parameter
536
+ if workflow is not None:
537
+ _body_params = workflow
538
+
539
+
540
+ # set the HTTP header `Accept`
541
+ _header_params['Accept'] = self.api_client.select_header_accept(
542
+ [
543
+ 'application/json'
544
+ ]
545
+ )
546
+
547
+ # set the HTTP header `Content-Type`
548
+ if _content_type:
549
+ _header_params['Content-Type'] = _content_type
550
+ else:
551
+ _default_content_type = (
552
+ self.api_client.select_header_content_type(
553
+ [
554
+ 'application/json'
555
+ ]
556
+ )
557
+ )
558
+ if _default_content_type is not None:
559
+ _header_params['Content-Type'] = _default_content_type
560
+
561
+ # authentication setting
562
+ _auth_settings: List[str] = [
563
+ ]
564
+
565
+ return self.api_client.param_serialize(
566
+ method='POST',
567
+ resource_path='/v1/workflows',
568
+ path_params=_path_params,
569
+ query_params=_query_params,
570
+ header_params=_header_params,
571
+ body=_body_params,
572
+ post_params=_form_params,
573
+ files=_files,
574
+ auth_settings=_auth_settings,
575
+ collection_formats=_collection_formats,
576
+ _host=_host,
577
+ _request_auth=_request_auth
578
+ )
579
+
580
+
581
+
582
+
583
+ @validate_call
584
+ def workflow_service_delete_workflow(
585
+ self,
586
+ name_8: Annotated[str, Field(strict=True, description="Required. The name of the Workflow to delete.")],
587
+ _request_timeout: Union[
588
+ None,
589
+ Annotated[StrictFloat, Field(gt=0)],
590
+ Tuple[
591
+ Annotated[StrictFloat, Field(gt=0)],
592
+ Annotated[StrictFloat, Field(gt=0)]
593
+ ]
594
+ ] = None,
595
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
596
+ _content_type: Optional[StrictStr] = None,
597
+ _headers: Optional[Dict[StrictStr, Any]] = None,
598
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
599
+ ) -> V1DeleteWorkflowResponse:
600
+ """DeleteWorkflow deletes a Workflow by name. If the Workflow does not exist an error is returned.
601
+
602
+
603
+ :param name_8: Required. The name of the Workflow to delete. (required)
604
+ :type name_8: str
605
+ :param _request_timeout: timeout setting for this request. If one
606
+ number provided, it will be total request
607
+ timeout. It can also be a pair (tuple) of
608
+ (connection, read) timeouts.
609
+ :type _request_timeout: int, tuple(int, int), optional
610
+ :param _request_auth: set to override the auth_settings for an a single
611
+ request; this effectively ignores the
612
+ authentication in the spec for a single request.
613
+ :type _request_auth: dict, optional
614
+ :param _content_type: force content-type for the request.
615
+ :type _content_type: str, Optional
616
+ :param _headers: set to override the headers for a single
617
+ request; this effectively ignores the headers
618
+ in the spec for a single request.
619
+ :type _headers: dict, optional
620
+ :param _host_index: set to override the host_index for a single
621
+ request; this effectively ignores the host_index
622
+ in the spec for a single request.
623
+ :type _host_index: int, optional
624
+ :return: Returns the result object.
625
+ """ # noqa: E501
626
+
627
+ _param = self._workflow_service_delete_workflow_serialize(
628
+ name_8=name_8,
629
+ _request_auth=_request_auth,
630
+ _content_type=_content_type,
631
+ _headers=_headers,
632
+ _host_index=_host_index
633
+ )
634
+
635
+ _response_types_map: Dict[str, Optional[str]] = {
636
+ '200': "V1DeleteWorkflowResponse",
637
+ }
638
+ response_data = self.api_client.call_api(
639
+ *_param,
640
+ _request_timeout=_request_timeout
641
+ )
642
+ response_data.read()
643
+ return self.api_client.response_deserialize(
644
+ response_data=response_data,
645
+ response_types_map=_response_types_map,
646
+ ).data
647
+
648
+
649
+ @validate_call
650
+ def workflow_service_delete_workflow_with_http_info(
651
+ self,
652
+ name_8: Annotated[str, Field(strict=True, description="Required. The name of the Workflow to delete.")],
653
+ _request_timeout: Union[
654
+ None,
655
+ Annotated[StrictFloat, Field(gt=0)],
656
+ Tuple[
657
+ Annotated[StrictFloat, Field(gt=0)],
658
+ Annotated[StrictFloat, Field(gt=0)]
659
+ ]
660
+ ] = None,
661
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
662
+ _content_type: Optional[StrictStr] = None,
663
+ _headers: Optional[Dict[StrictStr, Any]] = None,
664
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
665
+ ) -> ApiResponse[V1DeleteWorkflowResponse]:
666
+ """DeleteWorkflow deletes a Workflow by name. If the Workflow does not exist an error is returned.
667
+
668
+
669
+ :param name_8: Required. The name of the Workflow to delete. (required)
670
+ :type name_8: str
671
+ :param _request_timeout: timeout setting for this request. If one
672
+ number provided, it will be total request
673
+ timeout. It can also be a pair (tuple) of
674
+ (connection, read) timeouts.
675
+ :type _request_timeout: int, tuple(int, int), optional
676
+ :param _request_auth: set to override the auth_settings for an a single
677
+ request; this effectively ignores the
678
+ authentication in the spec for a single request.
679
+ :type _request_auth: dict, optional
680
+ :param _content_type: force content-type for the request.
681
+ :type _content_type: str, Optional
682
+ :param _headers: set to override the headers for a single
683
+ request; this effectively ignores the headers
684
+ in the spec for a single request.
685
+ :type _headers: dict, optional
686
+ :param _host_index: set to override the host_index for a single
687
+ request; this effectively ignores the host_index
688
+ in the spec for a single request.
689
+ :type _host_index: int, optional
690
+ :return: Returns the result object.
691
+ """ # noqa: E501
692
+
693
+ _param = self._workflow_service_delete_workflow_serialize(
694
+ name_8=name_8,
695
+ _request_auth=_request_auth,
696
+ _content_type=_content_type,
697
+ _headers=_headers,
698
+ _host_index=_host_index
699
+ )
700
+
701
+ _response_types_map: Dict[str, Optional[str]] = {
702
+ '200': "V1DeleteWorkflowResponse",
703
+ }
704
+ response_data = self.api_client.call_api(
705
+ *_param,
706
+ _request_timeout=_request_timeout
707
+ )
708
+ response_data.read()
709
+ return self.api_client.response_deserialize(
710
+ response_data=response_data,
711
+ response_types_map=_response_types_map,
712
+ )
713
+
714
+
715
+ @validate_call
716
+ def workflow_service_delete_workflow_without_preload_content(
717
+ self,
718
+ name_8: Annotated[str, Field(strict=True, description="Required. The name of the Workflow to delete.")],
719
+ _request_timeout: Union[
720
+ None,
721
+ Annotated[StrictFloat, Field(gt=0)],
722
+ Tuple[
723
+ Annotated[StrictFloat, Field(gt=0)],
724
+ Annotated[StrictFloat, Field(gt=0)]
725
+ ]
726
+ ] = None,
727
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
728
+ _content_type: Optional[StrictStr] = None,
729
+ _headers: Optional[Dict[StrictStr, Any]] = None,
730
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
731
+ ) -> RESTResponseType:
732
+ """DeleteWorkflow deletes a Workflow by name. If the Workflow does not exist an error is returned.
733
+
734
+
735
+ :param name_8: Required. The name of the Workflow to delete. (required)
736
+ :type name_8: str
737
+ :param _request_timeout: timeout setting for this request. If one
738
+ number provided, it will be total request
739
+ timeout. It can also be a pair (tuple) of
740
+ (connection, read) timeouts.
741
+ :type _request_timeout: int, tuple(int, int), optional
742
+ :param _request_auth: set to override the auth_settings for an a single
743
+ request; this effectively ignores the
744
+ authentication in the spec for a single request.
745
+ :type _request_auth: dict, optional
746
+ :param _content_type: force content-type for the request.
747
+ :type _content_type: str, Optional
748
+ :param _headers: set to override the headers for a single
749
+ request; this effectively ignores the headers
750
+ in the spec for a single request.
751
+ :type _headers: dict, optional
752
+ :param _host_index: set to override the host_index for a single
753
+ request; this effectively ignores the host_index
754
+ in the spec for a single request.
755
+ :type _host_index: int, optional
756
+ :return: Returns the result object.
757
+ """ # noqa: E501
758
+
759
+ _param = self._workflow_service_delete_workflow_serialize(
760
+ name_8=name_8,
761
+ _request_auth=_request_auth,
762
+ _content_type=_content_type,
763
+ _headers=_headers,
764
+ _host_index=_host_index
765
+ )
766
+
767
+ _response_types_map: Dict[str, Optional[str]] = {
768
+ '200': "V1DeleteWorkflowResponse",
769
+ }
770
+ response_data = self.api_client.call_api(
771
+ *_param,
772
+ _request_timeout=_request_timeout
773
+ )
774
+ return response_data.response
775
+
776
+
777
+ def _workflow_service_delete_workflow_serialize(
778
+ self,
779
+ name_8,
780
+ _request_auth,
781
+ _content_type,
782
+ _headers,
783
+ _host_index,
784
+ ) -> RequestSerialized:
785
+
786
+ _host = None
787
+
788
+ _collection_formats: Dict[str, str] = {
789
+ }
790
+
791
+ _path_params: Dict[str, str] = {}
792
+ _query_params: List[Tuple[str, str]] = []
793
+ _header_params: Dict[str, Optional[str]] = _headers or {}
794
+ _form_params: List[Tuple[str, str]] = []
795
+ _files: Dict[str, Union[str, bytes]] = {}
796
+ _body_params: Optional[bytes] = None
797
+
798
+ # process the path parameters
799
+ if name_8 is not None:
800
+ _path_params['name_8'] = name_8
801
+ # process the query parameters
802
+ # process the header parameters
803
+ # process the form parameters
804
+ # process the body parameter
805
+
806
+
807
+ # set the HTTP header `Accept`
808
+ _header_params['Accept'] = self.api_client.select_header_accept(
809
+ [
810
+ 'application/json'
811
+ ]
812
+ )
813
+
814
+
815
+ # authentication setting
816
+ _auth_settings: List[str] = [
817
+ ]
818
+
819
+ return self.api_client.param_serialize(
820
+ method='DELETE',
821
+ resource_path='/v1/{name_8}',
822
+ path_params=_path_params,
823
+ query_params=_query_params,
824
+ header_params=_header_params,
825
+ body=_body_params,
826
+ post_params=_form_params,
827
+ files=_files,
828
+ auth_settings=_auth_settings,
829
+ collection_formats=_collection_formats,
830
+ _host=_host,
831
+ _request_auth=_request_auth
832
+ )
833
+
834
+
835
+
836
+
837
+ @validate_call
838
+ def workflow_service_get_workflow(
839
+ self,
840
+ name_11: Annotated[str, Field(strict=True, description="Required. The name of the Workflow to retrieve.")],
841
+ _request_timeout: Union[
842
+ None,
843
+ Annotated[StrictFloat, Field(gt=0)],
844
+ Tuple[
845
+ Annotated[StrictFloat, Field(gt=0)],
846
+ Annotated[StrictFloat, Field(gt=0)]
847
+ ]
848
+ ] = None,
849
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
850
+ _content_type: Optional[StrictStr] = None,
851
+ _headers: Optional[Dict[StrictStr, Any]] = None,
852
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
853
+ ) -> V1GetWorkflowResponse:
854
+ """GetWorkflow retrieves a Workflow by name. Deleted Workflow is returned without error, it has a delete_time and deleter fields set.
855
+
856
+
857
+ :param name_11: Required. The name of the Workflow to retrieve. (required)
858
+ :type name_11: str
859
+ :param _request_timeout: timeout setting for this request. If one
860
+ number provided, it will be total request
861
+ timeout. It can also be a pair (tuple) of
862
+ (connection, read) timeouts.
863
+ :type _request_timeout: int, tuple(int, int), optional
864
+ :param _request_auth: set to override the auth_settings for an a single
865
+ request; this effectively ignores the
866
+ authentication in the spec for a single request.
867
+ :type _request_auth: dict, optional
868
+ :param _content_type: force content-type for the request.
869
+ :type _content_type: str, Optional
870
+ :param _headers: set to override the headers for a single
871
+ request; this effectively ignores the headers
872
+ in the spec for a single request.
873
+ :type _headers: dict, optional
874
+ :param _host_index: set to override the host_index for a single
875
+ request; this effectively ignores the host_index
876
+ in the spec for a single request.
877
+ :type _host_index: int, optional
878
+ :return: Returns the result object.
879
+ """ # noqa: E501
880
+
881
+ _param = self._workflow_service_get_workflow_serialize(
882
+ name_11=name_11,
883
+ _request_auth=_request_auth,
884
+ _content_type=_content_type,
885
+ _headers=_headers,
886
+ _host_index=_host_index
887
+ )
888
+
889
+ _response_types_map: Dict[str, Optional[str]] = {
890
+ '200': "V1GetWorkflowResponse",
891
+ }
892
+ response_data = self.api_client.call_api(
893
+ *_param,
894
+ _request_timeout=_request_timeout
895
+ )
896
+ response_data.read()
897
+ return self.api_client.response_deserialize(
898
+ response_data=response_data,
899
+ response_types_map=_response_types_map,
900
+ ).data
901
+
902
+
903
+ @validate_call
904
+ def workflow_service_get_workflow_with_http_info(
905
+ self,
906
+ name_11: Annotated[str, Field(strict=True, description="Required. The name of the Workflow to retrieve.")],
907
+ _request_timeout: Union[
908
+ None,
909
+ Annotated[StrictFloat, Field(gt=0)],
910
+ Tuple[
911
+ Annotated[StrictFloat, Field(gt=0)],
912
+ Annotated[StrictFloat, Field(gt=0)]
913
+ ]
914
+ ] = None,
915
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
916
+ _content_type: Optional[StrictStr] = None,
917
+ _headers: Optional[Dict[StrictStr, Any]] = None,
918
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
919
+ ) -> ApiResponse[V1GetWorkflowResponse]:
920
+ """GetWorkflow retrieves a Workflow by name. Deleted Workflow is returned without error, it has a delete_time and deleter fields set.
921
+
922
+
923
+ :param name_11: Required. The name of the Workflow to retrieve. (required)
924
+ :type name_11: str
925
+ :param _request_timeout: timeout setting for this request. If one
926
+ number provided, it will be total request
927
+ timeout. It can also be a pair (tuple) of
928
+ (connection, read) timeouts.
929
+ :type _request_timeout: int, tuple(int, int), optional
930
+ :param _request_auth: set to override the auth_settings for an a single
931
+ request; this effectively ignores the
932
+ authentication in the spec for a single request.
933
+ :type _request_auth: dict, optional
934
+ :param _content_type: force content-type for the request.
935
+ :type _content_type: str, Optional
936
+ :param _headers: set to override the headers for a single
937
+ request; this effectively ignores the headers
938
+ in the spec for a single request.
939
+ :type _headers: dict, optional
940
+ :param _host_index: set to override the host_index for a single
941
+ request; this effectively ignores the host_index
942
+ in the spec for a single request.
943
+ :type _host_index: int, optional
944
+ :return: Returns the result object.
945
+ """ # noqa: E501
946
+
947
+ _param = self._workflow_service_get_workflow_serialize(
948
+ name_11=name_11,
949
+ _request_auth=_request_auth,
950
+ _content_type=_content_type,
951
+ _headers=_headers,
952
+ _host_index=_host_index
953
+ )
954
+
955
+ _response_types_map: Dict[str, Optional[str]] = {
956
+ '200': "V1GetWorkflowResponse",
957
+ }
958
+ response_data = self.api_client.call_api(
959
+ *_param,
960
+ _request_timeout=_request_timeout
961
+ )
962
+ response_data.read()
963
+ return self.api_client.response_deserialize(
964
+ response_data=response_data,
965
+ response_types_map=_response_types_map,
966
+ )
967
+
968
+
969
+ @validate_call
970
+ def workflow_service_get_workflow_without_preload_content(
971
+ self,
972
+ name_11: Annotated[str, Field(strict=True, description="Required. The name of the Workflow to retrieve.")],
973
+ _request_timeout: Union[
974
+ None,
975
+ Annotated[StrictFloat, Field(gt=0)],
976
+ Tuple[
977
+ Annotated[StrictFloat, Field(gt=0)],
978
+ Annotated[StrictFloat, Field(gt=0)]
979
+ ]
980
+ ] = None,
981
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
982
+ _content_type: Optional[StrictStr] = None,
983
+ _headers: Optional[Dict[StrictStr, Any]] = None,
984
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
985
+ ) -> RESTResponseType:
986
+ """GetWorkflow retrieves a Workflow by name. Deleted Workflow is returned without error, it has a delete_time and deleter fields set.
987
+
988
+
989
+ :param name_11: Required. The name of the Workflow to retrieve. (required)
990
+ :type name_11: str
991
+ :param _request_timeout: timeout setting for this request. If one
992
+ number provided, it will be total request
993
+ timeout. It can also be a pair (tuple) of
994
+ (connection, read) timeouts.
995
+ :type _request_timeout: int, tuple(int, int), optional
996
+ :param _request_auth: set to override the auth_settings for an a single
997
+ request; this effectively ignores the
998
+ authentication in the spec for a single request.
999
+ :type _request_auth: dict, optional
1000
+ :param _content_type: force content-type for the request.
1001
+ :type _content_type: str, Optional
1002
+ :param _headers: set to override the headers for a single
1003
+ request; this effectively ignores the headers
1004
+ in the spec for a single request.
1005
+ :type _headers: dict, optional
1006
+ :param _host_index: set to override the host_index for a single
1007
+ request; this effectively ignores the host_index
1008
+ in the spec for a single request.
1009
+ :type _host_index: int, optional
1010
+ :return: Returns the result object.
1011
+ """ # noqa: E501
1012
+
1013
+ _param = self._workflow_service_get_workflow_serialize(
1014
+ name_11=name_11,
1015
+ _request_auth=_request_auth,
1016
+ _content_type=_content_type,
1017
+ _headers=_headers,
1018
+ _host_index=_host_index
1019
+ )
1020
+
1021
+ _response_types_map: Dict[str, Optional[str]] = {
1022
+ '200': "V1GetWorkflowResponse",
1023
+ }
1024
+ response_data = self.api_client.call_api(
1025
+ *_param,
1026
+ _request_timeout=_request_timeout
1027
+ )
1028
+ return response_data.response
1029
+
1030
+
1031
+ def _workflow_service_get_workflow_serialize(
1032
+ self,
1033
+ name_11,
1034
+ _request_auth,
1035
+ _content_type,
1036
+ _headers,
1037
+ _host_index,
1038
+ ) -> RequestSerialized:
1039
+
1040
+ _host = None
1041
+
1042
+ _collection_formats: Dict[str, str] = {
1043
+ }
1044
+
1045
+ _path_params: Dict[str, str] = {}
1046
+ _query_params: List[Tuple[str, str]] = []
1047
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1048
+ _form_params: List[Tuple[str, str]] = []
1049
+ _files: Dict[str, Union[str, bytes]] = {}
1050
+ _body_params: Optional[bytes] = None
1051
+
1052
+ # process the path parameters
1053
+ if name_11 is not None:
1054
+ _path_params['name_11'] = name_11
1055
+ # process the query parameters
1056
+ # process the header parameters
1057
+ # process the form parameters
1058
+ # process the body parameter
1059
+
1060
+
1061
+ # set the HTTP header `Accept`
1062
+ _header_params['Accept'] = self.api_client.select_header_accept(
1063
+ [
1064
+ 'application/json'
1065
+ ]
1066
+ )
1067
+
1068
+
1069
+ # authentication setting
1070
+ _auth_settings: List[str] = [
1071
+ ]
1072
+
1073
+ return self.api_client.param_serialize(
1074
+ method='GET',
1075
+ resource_path='/v1/{name_11}',
1076
+ path_params=_path_params,
1077
+ query_params=_query_params,
1078
+ header_params=_header_params,
1079
+ body=_body_params,
1080
+ post_params=_form_params,
1081
+ files=_files,
1082
+ auth_settings=_auth_settings,
1083
+ collection_formats=_collection_formats,
1084
+ _host=_host,
1085
+ _request_auth=_request_auth
1086
+ )
1087
+
1088
+
1089
+
1090
+
1091
+ @validate_call
1092
+ def workflow_service_list_workflows(
1093
+ self,
1094
+ _request_timeout: Union[
1095
+ None,
1096
+ Annotated[StrictFloat, Field(gt=0)],
1097
+ Tuple[
1098
+ Annotated[StrictFloat, Field(gt=0)],
1099
+ Annotated[StrictFloat, Field(gt=0)]
1100
+ ]
1101
+ ] = None,
1102
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1103
+ _content_type: Optional[StrictStr] = None,
1104
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1105
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1106
+ ) -> V1ListWorkflowsResponse:
1107
+ """ListWorkflows lists Workflows.
1108
+
1109
+
1110
+ :param _request_timeout: timeout setting for this request. If one
1111
+ number provided, it will be total request
1112
+ timeout. It can also be a pair (tuple) of
1113
+ (connection, read) timeouts.
1114
+ :type _request_timeout: int, tuple(int, int), optional
1115
+ :param _request_auth: set to override the auth_settings for an a single
1116
+ request; this effectively ignores the
1117
+ authentication in the spec for a single request.
1118
+ :type _request_auth: dict, optional
1119
+ :param _content_type: force content-type for the request.
1120
+ :type _content_type: str, Optional
1121
+ :param _headers: set to override the headers for a single
1122
+ request; this effectively ignores the headers
1123
+ in the spec for a single request.
1124
+ :type _headers: dict, optional
1125
+ :param _host_index: set to override the host_index for a single
1126
+ request; this effectively ignores the host_index
1127
+ in the spec for a single request.
1128
+ :type _host_index: int, optional
1129
+ :return: Returns the result object.
1130
+ """ # noqa: E501
1131
+
1132
+ _param = self._workflow_service_list_workflows_serialize(
1133
+ _request_auth=_request_auth,
1134
+ _content_type=_content_type,
1135
+ _headers=_headers,
1136
+ _host_index=_host_index
1137
+ )
1138
+
1139
+ _response_types_map: Dict[str, Optional[str]] = {
1140
+ '200': "V1ListWorkflowsResponse",
1141
+ }
1142
+ response_data = self.api_client.call_api(
1143
+ *_param,
1144
+ _request_timeout=_request_timeout
1145
+ )
1146
+ response_data.read()
1147
+ return self.api_client.response_deserialize(
1148
+ response_data=response_data,
1149
+ response_types_map=_response_types_map,
1150
+ ).data
1151
+
1152
+
1153
+ @validate_call
1154
+ def workflow_service_list_workflows_with_http_info(
1155
+ self,
1156
+ _request_timeout: Union[
1157
+ None,
1158
+ Annotated[StrictFloat, Field(gt=0)],
1159
+ Tuple[
1160
+ Annotated[StrictFloat, Field(gt=0)],
1161
+ Annotated[StrictFloat, Field(gt=0)]
1162
+ ]
1163
+ ] = None,
1164
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1165
+ _content_type: Optional[StrictStr] = None,
1166
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1167
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1168
+ ) -> ApiResponse[V1ListWorkflowsResponse]:
1169
+ """ListWorkflows lists Workflows.
1170
+
1171
+
1172
+ :param _request_timeout: timeout setting for this request. If one
1173
+ number provided, it will be total request
1174
+ timeout. It can also be a pair (tuple) of
1175
+ (connection, read) timeouts.
1176
+ :type _request_timeout: int, tuple(int, int), optional
1177
+ :param _request_auth: set to override the auth_settings for an a single
1178
+ request; this effectively ignores the
1179
+ authentication in the spec for a single request.
1180
+ :type _request_auth: dict, optional
1181
+ :param _content_type: force content-type for the request.
1182
+ :type _content_type: str, Optional
1183
+ :param _headers: set to override the headers for a single
1184
+ request; this effectively ignores the headers
1185
+ in the spec for a single request.
1186
+ :type _headers: dict, optional
1187
+ :param _host_index: set to override the host_index for a single
1188
+ request; this effectively ignores the host_index
1189
+ in the spec for a single request.
1190
+ :type _host_index: int, optional
1191
+ :return: Returns the result object.
1192
+ """ # noqa: E501
1193
+
1194
+ _param = self._workflow_service_list_workflows_serialize(
1195
+ _request_auth=_request_auth,
1196
+ _content_type=_content_type,
1197
+ _headers=_headers,
1198
+ _host_index=_host_index
1199
+ )
1200
+
1201
+ _response_types_map: Dict[str, Optional[str]] = {
1202
+ '200': "V1ListWorkflowsResponse",
1203
+ }
1204
+ response_data = self.api_client.call_api(
1205
+ *_param,
1206
+ _request_timeout=_request_timeout
1207
+ )
1208
+ response_data.read()
1209
+ return self.api_client.response_deserialize(
1210
+ response_data=response_data,
1211
+ response_types_map=_response_types_map,
1212
+ )
1213
+
1214
+
1215
+ @validate_call
1216
+ def workflow_service_list_workflows_without_preload_content(
1217
+ self,
1218
+ _request_timeout: Union[
1219
+ None,
1220
+ Annotated[StrictFloat, Field(gt=0)],
1221
+ Tuple[
1222
+ Annotated[StrictFloat, Field(gt=0)],
1223
+ Annotated[StrictFloat, Field(gt=0)]
1224
+ ]
1225
+ ] = None,
1226
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1227
+ _content_type: Optional[StrictStr] = None,
1228
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1229
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1230
+ ) -> RESTResponseType:
1231
+ """ListWorkflows lists Workflows.
1232
+
1233
+
1234
+ :param _request_timeout: timeout setting for this request. If one
1235
+ number provided, it will be total request
1236
+ timeout. It can also be a pair (tuple) of
1237
+ (connection, read) timeouts.
1238
+ :type _request_timeout: int, tuple(int, int), optional
1239
+ :param _request_auth: set to override the auth_settings for an a single
1240
+ request; this effectively ignores the
1241
+ authentication in the spec for a single request.
1242
+ :type _request_auth: dict, optional
1243
+ :param _content_type: force content-type for the request.
1244
+ :type _content_type: str, Optional
1245
+ :param _headers: set to override the headers for a single
1246
+ request; this effectively ignores the headers
1247
+ in the spec for a single request.
1248
+ :type _headers: dict, optional
1249
+ :param _host_index: set to override the host_index for a single
1250
+ request; this effectively ignores the host_index
1251
+ in the spec for a single request.
1252
+ :type _host_index: int, optional
1253
+ :return: Returns the result object.
1254
+ """ # noqa: E501
1255
+
1256
+ _param = self._workflow_service_list_workflows_serialize(
1257
+ _request_auth=_request_auth,
1258
+ _content_type=_content_type,
1259
+ _headers=_headers,
1260
+ _host_index=_host_index
1261
+ )
1262
+
1263
+ _response_types_map: Dict[str, Optional[str]] = {
1264
+ '200': "V1ListWorkflowsResponse",
1265
+ }
1266
+ response_data = self.api_client.call_api(
1267
+ *_param,
1268
+ _request_timeout=_request_timeout
1269
+ )
1270
+ return response_data.response
1271
+
1272
+
1273
+ def _workflow_service_list_workflows_serialize(
1274
+ self,
1275
+ _request_auth,
1276
+ _content_type,
1277
+ _headers,
1278
+ _host_index,
1279
+ ) -> RequestSerialized:
1280
+
1281
+ _host = None
1282
+
1283
+ _collection_formats: Dict[str, str] = {
1284
+ }
1285
+
1286
+ _path_params: Dict[str, str] = {}
1287
+ _query_params: List[Tuple[str, str]] = []
1288
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1289
+ _form_params: List[Tuple[str, str]] = []
1290
+ _files: Dict[str, Union[str, bytes]] = {}
1291
+ _body_params: Optional[bytes] = None
1292
+
1293
+ # process the path parameters
1294
+ # process the query parameters
1295
+ # process the header parameters
1296
+ # process the form parameters
1297
+ # process the body parameter
1298
+
1299
+
1300
+ # set the HTTP header `Accept`
1301
+ _header_params['Accept'] = self.api_client.select_header_accept(
1302
+ [
1303
+ 'application/json'
1304
+ ]
1305
+ )
1306
+
1307
+
1308
+ # authentication setting
1309
+ _auth_settings: List[str] = [
1310
+ ]
1311
+
1312
+ return self.api_client.param_serialize(
1313
+ method='GET',
1314
+ resource_path='/v1/workflows',
1315
+ path_params=_path_params,
1316
+ query_params=_query_params,
1317
+ header_params=_header_params,
1318
+ body=_body_params,
1319
+ post_params=_form_params,
1320
+ files=_files,
1321
+ auth_settings=_auth_settings,
1322
+ collection_formats=_collection_formats,
1323
+ _host=_host,
1324
+ _request_auth=_request_auth
1325
+ )
1326
+
1327
+
1328
+
1329
+
1330
+ @validate_call
1331
+ def workflow_service_update_workflow(
1332
+ self,
1333
+ workflow_name: Annotated[str, Field(strict=True, description="Output only. Immutable. Resource name of the Workflow in format of `workflows/{workflow_id}`.")],
1334
+ workflow: Annotated[RequiredTheUpdatedWorkflow, Field(description="Required. The updated Workflow.")],
1335
+ _request_timeout: Union[
1336
+ None,
1337
+ Annotated[StrictFloat, Field(gt=0)],
1338
+ Tuple[
1339
+ Annotated[StrictFloat, Field(gt=0)],
1340
+ Annotated[StrictFloat, Field(gt=0)]
1341
+ ]
1342
+ ] = None,
1343
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1344
+ _content_type: Optional[StrictStr] = None,
1345
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1346
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1347
+ ) -> V1UpdateWorkflowResponse:
1348
+ """UpdateWorkflow updates a Workflow. The update_mask is used to specify the fields to be updated.
1349
+
1350
+
1351
+ :param workflow_name: Output only. Immutable. Resource name of the Workflow in format of `workflows/{workflow_id}`. (required)
1352
+ :type workflow_name: str
1353
+ :param workflow: Required. The updated Workflow. (required)
1354
+ :type workflow: RequiredTheUpdatedWorkflow
1355
+ :param _request_timeout: timeout setting for this request. If one
1356
+ number provided, it will be total request
1357
+ timeout. It can also be a pair (tuple) of
1358
+ (connection, read) timeouts.
1359
+ :type _request_timeout: int, tuple(int, int), optional
1360
+ :param _request_auth: set to override the auth_settings for an a single
1361
+ request; this effectively ignores the
1362
+ authentication in the spec for a single request.
1363
+ :type _request_auth: dict, optional
1364
+ :param _content_type: force content-type for the request.
1365
+ :type _content_type: str, Optional
1366
+ :param _headers: set to override the headers for a single
1367
+ request; this effectively ignores the headers
1368
+ in the spec for a single request.
1369
+ :type _headers: dict, optional
1370
+ :param _host_index: set to override the host_index for a single
1371
+ request; this effectively ignores the host_index
1372
+ in the spec for a single request.
1373
+ :type _host_index: int, optional
1374
+ :return: Returns the result object.
1375
+ """ # noqa: E501
1376
+
1377
+ _param = self._workflow_service_update_workflow_serialize(
1378
+ workflow_name=workflow_name,
1379
+ workflow=workflow,
1380
+ _request_auth=_request_auth,
1381
+ _content_type=_content_type,
1382
+ _headers=_headers,
1383
+ _host_index=_host_index
1384
+ )
1385
+
1386
+ _response_types_map: Dict[str, Optional[str]] = {
1387
+ '200': "V1UpdateWorkflowResponse",
1388
+ }
1389
+ response_data = self.api_client.call_api(
1390
+ *_param,
1391
+ _request_timeout=_request_timeout
1392
+ )
1393
+ response_data.read()
1394
+ return self.api_client.response_deserialize(
1395
+ response_data=response_data,
1396
+ response_types_map=_response_types_map,
1397
+ ).data
1398
+
1399
+
1400
+ @validate_call
1401
+ def workflow_service_update_workflow_with_http_info(
1402
+ self,
1403
+ workflow_name: Annotated[str, Field(strict=True, description="Output only. Immutable. Resource name of the Workflow in format of `workflows/{workflow_id}`.")],
1404
+ workflow: Annotated[RequiredTheUpdatedWorkflow, Field(description="Required. The updated Workflow.")],
1405
+ _request_timeout: Union[
1406
+ None,
1407
+ Annotated[StrictFloat, Field(gt=0)],
1408
+ Tuple[
1409
+ Annotated[StrictFloat, Field(gt=0)],
1410
+ Annotated[StrictFloat, Field(gt=0)]
1411
+ ]
1412
+ ] = None,
1413
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1414
+ _content_type: Optional[StrictStr] = None,
1415
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1416
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1417
+ ) -> ApiResponse[V1UpdateWorkflowResponse]:
1418
+ """UpdateWorkflow updates a Workflow. The update_mask is used to specify the fields to be updated.
1419
+
1420
+
1421
+ :param workflow_name: Output only. Immutable. Resource name of the Workflow in format of `workflows/{workflow_id}`. (required)
1422
+ :type workflow_name: str
1423
+ :param workflow: Required. The updated Workflow. (required)
1424
+ :type workflow: RequiredTheUpdatedWorkflow
1425
+ :param _request_timeout: timeout setting for this request. If one
1426
+ number provided, it will be total request
1427
+ timeout. It can also be a pair (tuple) of
1428
+ (connection, read) timeouts.
1429
+ :type _request_timeout: int, tuple(int, int), optional
1430
+ :param _request_auth: set to override the auth_settings for an a single
1431
+ request; this effectively ignores the
1432
+ authentication in the spec for a single request.
1433
+ :type _request_auth: dict, optional
1434
+ :param _content_type: force content-type for the request.
1435
+ :type _content_type: str, Optional
1436
+ :param _headers: set to override the headers for a single
1437
+ request; this effectively ignores the headers
1438
+ in the spec for a single request.
1439
+ :type _headers: dict, optional
1440
+ :param _host_index: set to override the host_index for a single
1441
+ request; this effectively ignores the host_index
1442
+ in the spec for a single request.
1443
+ :type _host_index: int, optional
1444
+ :return: Returns the result object.
1445
+ """ # noqa: E501
1446
+
1447
+ _param = self._workflow_service_update_workflow_serialize(
1448
+ workflow_name=workflow_name,
1449
+ workflow=workflow,
1450
+ _request_auth=_request_auth,
1451
+ _content_type=_content_type,
1452
+ _headers=_headers,
1453
+ _host_index=_host_index
1454
+ )
1455
+
1456
+ _response_types_map: Dict[str, Optional[str]] = {
1457
+ '200': "V1UpdateWorkflowResponse",
1458
+ }
1459
+ response_data = self.api_client.call_api(
1460
+ *_param,
1461
+ _request_timeout=_request_timeout
1462
+ )
1463
+ response_data.read()
1464
+ return self.api_client.response_deserialize(
1465
+ response_data=response_data,
1466
+ response_types_map=_response_types_map,
1467
+ )
1468
+
1469
+
1470
+ @validate_call
1471
+ def workflow_service_update_workflow_without_preload_content(
1472
+ self,
1473
+ workflow_name: Annotated[str, Field(strict=True, description="Output only. Immutable. Resource name of the Workflow in format of `workflows/{workflow_id}`.")],
1474
+ workflow: Annotated[RequiredTheUpdatedWorkflow, Field(description="Required. The updated Workflow.")],
1475
+ _request_timeout: Union[
1476
+ None,
1477
+ Annotated[StrictFloat, Field(gt=0)],
1478
+ Tuple[
1479
+ Annotated[StrictFloat, Field(gt=0)],
1480
+ Annotated[StrictFloat, Field(gt=0)]
1481
+ ]
1482
+ ] = None,
1483
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1484
+ _content_type: Optional[StrictStr] = None,
1485
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1486
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1487
+ ) -> RESTResponseType:
1488
+ """UpdateWorkflow updates a Workflow. The update_mask is used to specify the fields to be updated.
1489
+
1490
+
1491
+ :param workflow_name: Output only. Immutable. Resource name of the Workflow in format of `workflows/{workflow_id}`. (required)
1492
+ :type workflow_name: str
1493
+ :param workflow: Required. The updated Workflow. (required)
1494
+ :type workflow: RequiredTheUpdatedWorkflow
1495
+ :param _request_timeout: timeout setting for this request. If one
1496
+ number provided, it will be total request
1497
+ timeout. It can also be a pair (tuple) of
1498
+ (connection, read) timeouts.
1499
+ :type _request_timeout: int, tuple(int, int), optional
1500
+ :param _request_auth: set to override the auth_settings for an a single
1501
+ request; this effectively ignores the
1502
+ authentication in the spec for a single request.
1503
+ :type _request_auth: dict, optional
1504
+ :param _content_type: force content-type for the request.
1505
+ :type _content_type: str, Optional
1506
+ :param _headers: set to override the headers for a single
1507
+ request; this effectively ignores the headers
1508
+ in the spec for a single request.
1509
+ :type _headers: dict, optional
1510
+ :param _host_index: set to override the host_index for a single
1511
+ request; this effectively ignores the host_index
1512
+ in the spec for a single request.
1513
+ :type _host_index: int, optional
1514
+ :return: Returns the result object.
1515
+ """ # noqa: E501
1516
+
1517
+ _param = self._workflow_service_update_workflow_serialize(
1518
+ workflow_name=workflow_name,
1519
+ workflow=workflow,
1520
+ _request_auth=_request_auth,
1521
+ _content_type=_content_type,
1522
+ _headers=_headers,
1523
+ _host_index=_host_index
1524
+ )
1525
+
1526
+ _response_types_map: Dict[str, Optional[str]] = {
1527
+ '200': "V1UpdateWorkflowResponse",
1528
+ }
1529
+ response_data = self.api_client.call_api(
1530
+ *_param,
1531
+ _request_timeout=_request_timeout
1532
+ )
1533
+ return response_data.response
1534
+
1535
+
1536
+ def _workflow_service_update_workflow_serialize(
1537
+ self,
1538
+ workflow_name,
1539
+ workflow,
1540
+ _request_auth,
1541
+ _content_type,
1542
+ _headers,
1543
+ _host_index,
1544
+ ) -> RequestSerialized:
1545
+
1546
+ _host = None
1547
+
1548
+ _collection_formats: Dict[str, str] = {
1549
+ }
1550
+
1551
+ _path_params: Dict[str, str] = {}
1552
+ _query_params: List[Tuple[str, str]] = []
1553
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1554
+ _form_params: List[Tuple[str, str]] = []
1555
+ _files: Dict[str, Union[str, bytes]] = {}
1556
+ _body_params: Optional[bytes] = None
1557
+
1558
+ # process the path parameters
1559
+ if workflow_name is not None:
1560
+ _path_params['workflow.name'] = workflow_name
1561
+ # process the query parameters
1562
+ # process the header parameters
1563
+ # process the form parameters
1564
+ # process the body parameter
1565
+ if workflow is not None:
1566
+ _body_params = workflow
1567
+
1568
+
1569
+ # set the HTTP header `Accept`
1570
+ _header_params['Accept'] = self.api_client.select_header_accept(
1571
+ [
1572
+ 'application/json'
1573
+ ]
1574
+ )
1575
+
1576
+ # set the HTTP header `Content-Type`
1577
+ if _content_type:
1578
+ _header_params['Content-Type'] = _content_type
1579
+ else:
1580
+ _default_content_type = (
1581
+ self.api_client.select_header_content_type(
1582
+ [
1583
+ 'application/json'
1584
+ ]
1585
+ )
1586
+ )
1587
+ if _default_content_type is not None:
1588
+ _header_params['Content-Type'] = _default_content_type
1589
+
1590
+ # authentication setting
1591
+ _auth_settings: List[str] = [
1592
+ ]
1593
+
1594
+ return self.api_client.param_serialize(
1595
+ method='PATCH',
1596
+ resource_path='/v1/{workflow.name}',
1597
+ path_params=_path_params,
1598
+ query_params=_query_params,
1599
+ header_params=_header_params,
1600
+ body=_body_params,
1601
+ post_params=_form_params,
1602
+ files=_files,
1603
+ auth_settings=_auth_settings,
1604
+ collection_formats=_collection_formats,
1605
+ _host=_host,
1606
+ _request_auth=_request_auth
1607
+ )
1608
+
1609
+