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