polyaxon-sdk 1.18.0rc7__py2.py3-none-any.whl → 2.1.6__py2.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 (276) hide show
  1. polyaxon_sdk/__init__.py +26 -34
  2. polyaxon_sdk/api/__init__.py +2 -18
  3. polyaxon_sdk/api/agents_v1_api.py +2314 -1108
  4. polyaxon_sdk/api/artifacts_stores_v1_api.py +90 -97
  5. polyaxon_sdk/api/auth_v1_api.py +398 -359
  6. polyaxon_sdk/api/connections_v1_api.py +516 -488
  7. polyaxon_sdk/api/dashboards_v1_api.py +516 -488
  8. polyaxon_sdk/api/organizations_v1_api.py +3107 -2327
  9. polyaxon_sdk/api/policies_v1_api.py +1232 -0
  10. polyaxon_sdk/api/presets_v1_api.py +528 -498
  11. polyaxon_sdk/api/project_dashboards_v1_api.py +596 -590
  12. polyaxon_sdk/api/project_searches_v1_api.py +596 -590
  13. polyaxon_sdk/api/projects_v1_api.py +2248 -2167
  14. polyaxon_sdk/api/queues_v1_api.py +701 -670
  15. polyaxon_sdk/api/runs_v1_api.py +5136 -4477
  16. polyaxon_sdk/api/schemas_v1_api.py +64 -70
  17. polyaxon_sdk/api/searches_v1_api.py +516 -488
  18. polyaxon_sdk/api/service_accounts_v1_api.py +956 -920
  19. polyaxon_sdk/api/tags_v1_api.py +587 -552
  20. polyaxon_sdk/api/teams_v1_api.py +953 -916
  21. polyaxon_sdk/api/users_v1_api.py +730 -646
  22. polyaxon_sdk/api/versions_v1_api.py +206 -190
  23. polyaxon_sdk/api_client.py +145 -101
  24. polyaxon_sdk/configuration.py +46 -79
  25. polyaxon_sdk/exceptions.py +6 -23
  26. polyaxon_sdk/models/__init__.py +24 -32
  27. polyaxon_sdk/models/agent_state_response_agent_state.py +71 -364
  28. polyaxon_sdk/models/mx_job_mode.py +12 -105
  29. polyaxon_sdk/models/protobuf_any.py +65 -164
  30. polyaxon_sdk/models/protobuf_null_value.py +11 -104
  31. polyaxon_sdk/models/runtime_error.py +67 -208
  32. polyaxon_sdk/models/search_view.py +18 -111
  33. polyaxon_sdk/models/v1_activity.py +68 -313
  34. polyaxon_sdk/models/v1_agent.py +93 -495
  35. polyaxon_sdk/models/v1_agent_reconcile_body_request.py +75 -0
  36. polyaxon_sdk/models/v1_agent_state_response.py +64 -208
  37. polyaxon_sdk/models/v1_agent_status_body_request.py +61 -182
  38. polyaxon_sdk/models/v1_analytics_spec.py +59 -208
  39. polyaxon_sdk/models/v1_artifact_kind.py +42 -134
  40. polyaxon_sdk/models/v1_artifact_tree.py +57 -182
  41. polyaxon_sdk/models/v1_artifacts_mount.py +55 -156
  42. polyaxon_sdk/models/v1_artifacts_type.py +57 -182
  43. polyaxon_sdk/models/v1_auth.py +54 -131
  44. polyaxon_sdk/models/v1_auth_type.py +55 -156
  45. polyaxon_sdk/models/v1_average_stopping_policy.py +54 -131
  46. polyaxon_sdk/models/v1_bayes.py +79 -364
  47. polyaxon_sdk/models/v1_bucket_connection.py +54 -131
  48. polyaxon_sdk/models/v1_build.py +82 -312
  49. polyaxon_sdk/models/v1_cache.py +59 -208
  50. polyaxon_sdk/models/v1_claim_connection.py +59 -208
  51. polyaxon_sdk/models/v1_clean_pod_policy.py +13 -106
  52. polyaxon_sdk/models/v1_cloning.py +58 -182
  53. polyaxon_sdk/models/v1_cloning_kind.py +13 -106
  54. polyaxon_sdk/models/v1_compatibility.py +72 -208
  55. polyaxon_sdk/models/v1_compiled_operation.py +171 -783
  56. polyaxon_sdk/models/v1_component.py +132 -572
  57. polyaxon_sdk/models/v1_connection_kind.py +53 -146
  58. polyaxon_sdk/models/v1_connection_resource.py +77 -0
  59. polyaxon_sdk/models/v1_connection_response.py +71 -339
  60. polyaxon_sdk/models/v1_connection_schema.py +81 -234
  61. polyaxon_sdk/models/v1_connection_type.py +77 -338
  62. polyaxon_sdk/models/v1_credentials.py +55 -156
  63. polyaxon_sdk/models/v1_cron_schedule.py +64 -261
  64. polyaxon_sdk/models/v1_dag.py +87 -314
  65. polyaxon_sdk/models/v1_dag_ref.py +55 -156
  66. polyaxon_sdk/models/v1_dashboard.py +74 -339
  67. polyaxon_sdk/models/v1_dashboard_spec.py +70 -131
  68. polyaxon_sdk/models/v1_dask_job.py +87 -0
  69. polyaxon_sdk/models/v1_dask_replica.py +95 -0
  70. polyaxon_sdk/models/v1_date_time_schedule.py +56 -157
  71. polyaxon_sdk/models/v1_diff_stopping_policy.py +61 -236
  72. polyaxon_sdk/models/v1_dockerfile_type.py +79 -468
  73. polyaxon_sdk/models/v1_early_stopping.py +81 -234
  74. polyaxon_sdk/models/v1_entities_tags.py +55 -156
  75. polyaxon_sdk/models/v1_entities_transfer.py +55 -156
  76. polyaxon_sdk/models/v1_entity_notification_body.py +69 -286
  77. polyaxon_sdk/models/v1_entity_stage_body_request.py +65 -234
  78. polyaxon_sdk/models/v1_entity_status_body_request.py +65 -234
  79. polyaxon_sdk/models/v1_environment.py +87 -588
  80. polyaxon_sdk/models/v1_event.py +130 -499
  81. polyaxon_sdk/models/v1_event_artifact.py +56 -156
  82. polyaxon_sdk/models/v1_event_audio.py +61 -240
  83. polyaxon_sdk/models/v1_event_chart.py +56 -156
  84. polyaxon_sdk/models/v1_event_chart_kind.py +13 -106
  85. polyaxon_sdk/models/v1_event_confusion_matrix.py +57 -182
  86. polyaxon_sdk/models/v1_event_curve.py +60 -208
  87. polyaxon_sdk/models/v1_event_curve_kind.py +13 -106
  88. polyaxon_sdk/models/v1_event_dataframe.py +55 -156
  89. polyaxon_sdk/models/v1_event_histogram.py +55 -156
  90. polyaxon_sdk/models/v1_event_image.py +59 -212
  91. polyaxon_sdk/models/v1_event_kind.py +42 -135
  92. polyaxon_sdk/models/v1_event_model.py +57 -182
  93. polyaxon_sdk/models/v1_event_span.py +110 -0
  94. polyaxon_sdk/models/v1_event_span_kind.py +39 -0
  95. polyaxon_sdk/models/v1_event_trigger.py +56 -156
  96. polyaxon_sdk/models/v1_event_type.py +56 -156
  97. polyaxon_sdk/models/v1_event_video.py +61 -238
  98. polyaxon_sdk/models/v1_events_response.py +54 -131
  99. polyaxon_sdk/models/v1_failure_early_stopping.py +55 -158
  100. polyaxon_sdk/models/v1_file_type.py +59 -208
  101. polyaxon_sdk/models/v1_gcs_type.py +55 -156
  102. polyaxon_sdk/models/v1_git_connection.py +57 -182
  103. polyaxon_sdk/models/v1_git_type.py +57 -182
  104. polyaxon_sdk/models/v1_grid_search.py +63 -260
  105. polyaxon_sdk/models/v1_hook.py +78 -312
  106. polyaxon_sdk/models/v1_host_connection.py +55 -156
  107. polyaxon_sdk/models/v1_host_path_connection.py +59 -208
  108. polyaxon_sdk/models/v1_hp_choice.py +55 -156
  109. polyaxon_sdk/models/v1_hp_date_range.py +55 -156
  110. polyaxon_sdk/models/v1_hp_date_time_range.py +55 -156
  111. polyaxon_sdk/models/v1_hp_geom_space.py +55 -156
  112. polyaxon_sdk/models/v1_hp_lin_space.py +55 -156
  113. polyaxon_sdk/models/v1_hp_log_normal.py +55 -156
  114. polyaxon_sdk/models/v1_hp_log_space.py +55 -156
  115. polyaxon_sdk/models/v1_hp_log_uniform.py +55 -156
  116. polyaxon_sdk/models/v1_hp_normal.py +55 -156
  117. polyaxon_sdk/models/v1_hp_p_choice.py +55 -156
  118. polyaxon_sdk/models/v1_hp_params.py +150 -523
  119. polyaxon_sdk/models/v1_hp_q_log_normal.py +55 -156
  120. polyaxon_sdk/models/v1_hp_q_log_uniform.py +55 -156
  121. polyaxon_sdk/models/v1_hp_q_normal.py +55 -156
  122. polyaxon_sdk/models/v1_hp_q_uniform.py +55 -156
  123. polyaxon_sdk/models/v1_hp_range.py +55 -156
  124. polyaxon_sdk/models/v1_hp_uniform.py +55 -156
  125. polyaxon_sdk/models/v1_hub_ref.py +55 -156
  126. polyaxon_sdk/models/v1_hyperband.py +85 -390
  127. polyaxon_sdk/models/v1_hyperopt.py +80 -364
  128. polyaxon_sdk/models/v1_hyperopt_algorithms.py +13 -106
  129. polyaxon_sdk/models/v1_init.py +95 -416
  130. polyaxon_sdk/models/v1_installation.py +67 -260
  131. polyaxon_sdk/models/v1_interval_schedule.py +64 -261
  132. polyaxon_sdk/models/v1_io.py +83 -442
  133. polyaxon_sdk/models/v1_iterative.py +69 -286
  134. polyaxon_sdk/models/v1_job.py +77 -288
  135. polyaxon_sdk/models/v1_join.py +71 -260
  136. polyaxon_sdk/models/v1_join_param.py +61 -234
  137. polyaxon_sdk/models/v1_kf_replica.py +77 -286
  138. polyaxon_sdk/models/v1_list_activities_response.py +67 -208
  139. polyaxon_sdk/models/v1_list_agents_response.py +67 -208
  140. polyaxon_sdk/models/v1_list_bookmarks_response.py +59 -208
  141. polyaxon_sdk/models/v1_list_connections_response.py +67 -208
  142. polyaxon_sdk/models/v1_list_dashboards_response.py +67 -208
  143. polyaxon_sdk/models/v1_list_organization_members_response.py +67 -208
  144. polyaxon_sdk/models/v1_list_organizations_response.py +67 -208
  145. polyaxon_sdk/models/v1_list_policies_response.py +85 -0
  146. polyaxon_sdk/models/v1_list_presets_response.py +67 -208
  147. polyaxon_sdk/models/v1_list_project_versions_response.py +67 -208
  148. polyaxon_sdk/models/v1_list_projects_response.py +67 -208
  149. polyaxon_sdk/models/v1_list_queues_response.py +67 -208
  150. polyaxon_sdk/models/v1_list_run_artifacts_response.py +67 -208
  151. polyaxon_sdk/models/v1_list_run_connections_response.py +67 -208
  152. polyaxon_sdk/models/v1_list_run_edges_response.py +67 -208
  153. polyaxon_sdk/models/v1_list_runs_response.py +67 -208
  154. polyaxon_sdk/models/v1_list_searches_response.py +67 -208
  155. polyaxon_sdk/models/v1_list_service_accounts_response.py +67 -208
  156. polyaxon_sdk/models/v1_list_tags_response.py +67 -208
  157. polyaxon_sdk/models/v1_list_team_members_response.py +67 -208
  158. polyaxon_sdk/models/v1_list_teams_response.py +67 -208
  159. polyaxon_sdk/models/v1_list_token_response.py +67 -208
  160. polyaxon_sdk/models/v1_log.py +62 -235
  161. polyaxon_sdk/models/v1_log_handler.py +55 -156
  162. polyaxon_sdk/models/v1_logs.py +68 -209
  163. polyaxon_sdk/models/v1_managed_by.py +36 -0
  164. polyaxon_sdk/models/v1_mapping.py +59 -208
  165. polyaxon_sdk/models/v1_matrix.py +93 -286
  166. polyaxon_sdk/models/v1_matrix_kind.py +17 -110
  167. polyaxon_sdk/models/v1_median_stopping_policy.py +59 -210
  168. polyaxon_sdk/models/v1_metric_early_stopping.py +62 -238
  169. polyaxon_sdk/models/v1_mpi_job.py +75 -312
  170. polyaxon_sdk/models/v1_multi_events_response.py +71 -0
  171. polyaxon_sdk/models/v1_mx_job.py +96 -364
  172. polyaxon_sdk/models/v1_notification.py +56 -156
  173. polyaxon_sdk/models/v1_operation.py +178 -939
  174. polyaxon_sdk/models/v1_operation_body.py +69 -286
  175. polyaxon_sdk/models/v1_optimization.py +12 -105
  176. polyaxon_sdk/models/v1_optimization_metric.py +56 -156
  177. polyaxon_sdk/models/v1_optimization_resource.py +56 -156
  178. polyaxon_sdk/models/v1_organization.py +84 -495
  179. polyaxon_sdk/models/v1_organization_member.py +64 -261
  180. polyaxon_sdk/models/v1_paddle_elastic_polic.py +77 -0
  181. polyaxon_sdk/models/v1_paddle_job.py +97 -0
  182. polyaxon_sdk/models/v1_param.py +63 -260
  183. polyaxon_sdk/models/v1_password_change.py +57 -182
  184. polyaxon_sdk/models/v1_patch_strategy.py +14 -107
  185. polyaxon_sdk/models/v1_path_ref.py +55 -156
  186. polyaxon_sdk/models/v1_pipeline.py +58 -182
  187. polyaxon_sdk/models/v1_pipeline_kind.py +12 -105
  188. polyaxon_sdk/models/v1_plugins.py +89 -442
  189. polyaxon_sdk/models/v1_policy.py +119 -0
  190. polyaxon_sdk/models/v1_polyaxon_init_container.py +59 -208
  191. polyaxon_sdk/models/v1_polyaxon_sidecar_container.py +67 -286
  192. polyaxon_sdk/models/v1_preset.py +70 -339
  193. polyaxon_sdk/models/v1_project.py +90 -495
  194. polyaxon_sdk/models/v1_project_settings.py +81 -338
  195. polyaxon_sdk/models/v1_project_version.py +102 -601
  196. polyaxon_sdk/models/v1_project_version_kind.py +13 -106
  197. polyaxon_sdk/models/v1_pytorch_elastic_policy.py +91 -0
  198. polyaxon_sdk/models/v1_pytorch_job.py +81 -234
  199. polyaxon_sdk/models/v1_queue.py +76 -417
  200. polyaxon_sdk/models/v1_random_search.py +63 -260
  201. polyaxon_sdk/models/v1_ray_job.py +94 -0
  202. polyaxon_sdk/models/v1_ray_replica.py +103 -0
  203. polyaxon_sdk/models/v1_reference.py +75 -208
  204. polyaxon_sdk/models/v1_resource_type.py +12 -105
  205. polyaxon_sdk/models/v1_run.py +158 -1043
  206. polyaxon_sdk/models/v1_run_artifact.py +70 -338
  207. polyaxon_sdk/models/v1_run_artifacts.py +62 -131
  208. polyaxon_sdk/models/v1_run_connection.py +57 -182
  209. polyaxon_sdk/models/v1_run_edge.py +70 -234
  210. polyaxon_sdk/models/v1_run_edge_kind.py +19 -111
  211. polyaxon_sdk/models/v1_run_edge_lineage.py +75 -0
  212. polyaxon_sdk/models/v1_run_edges_graph.py +79 -0
  213. polyaxon_sdk/models/v1_run_kind.py +28 -122
  214. polyaxon_sdk/models/v1_run_pending.py +14 -107
  215. polyaxon_sdk/models/v1_run_reference_catalog.py +59 -182
  216. polyaxon_sdk/models/v1_run_resources.py +61 -234
  217. polyaxon_sdk/models/v1_run_schema.py +120 -419
  218. polyaxon_sdk/models/v1_run_settings.py +94 -338
  219. polyaxon_sdk/models/v1_s3_type.py +55 -156
  220. polyaxon_sdk/models/v1_schedule.py +69 -182
  221. polyaxon_sdk/models/v1_schedule_kind.py +13 -106
  222. polyaxon_sdk/models/v1_scheduling_policy.py +61 -182
  223. polyaxon_sdk/models/v1_schemas.py +192 -731
  224. polyaxon_sdk/models/v1_search.py +77 -365
  225. polyaxon_sdk/models/v1_search_spec.py +87 -468
  226. polyaxon_sdk/models/v1_section_spec.py +75 -286
  227. polyaxon_sdk/models/v1_service.py +85 -396
  228. polyaxon_sdk/models/v1_service_account.py +70 -339
  229. polyaxon_sdk/models/v1_settings_catalog.py +57 -156
  230. polyaxon_sdk/models/v1_stage.py +66 -182
  231. polyaxon_sdk/models/v1_stage_condition.py +67 -261
  232. polyaxon_sdk/models/v1_stages.py +14 -107
  233. polyaxon_sdk/models/v1_status.py +68 -208
  234. polyaxon_sdk/models/v1_status_condition.py +67 -261
  235. polyaxon_sdk/models/v1_statuses.py +30 -123
  236. polyaxon_sdk/models/v1_tag.py +63 -260
  237. polyaxon_sdk/models/v1_team.py +72 -313
  238. polyaxon_sdk/models/v1_team_member.py +64 -261
  239. polyaxon_sdk/models/v1_team_settings.py +79 -182
  240. polyaxon_sdk/models/v1_template.py +57 -182
  241. polyaxon_sdk/models/v1_tensorboard_type.py +61 -234
  242. polyaxon_sdk/models/v1_termination.py +57 -182
  243. polyaxon_sdk/models/v1_tf_job.py +87 -286
  244. polyaxon_sdk/models/v1_token.py +72 -365
  245. polyaxon_sdk/models/v1_trial_start.py +63 -260
  246. polyaxon_sdk/models/v1_trigger_policy.py +16 -109
  247. polyaxon_sdk/models/v1_truncation_stopping_policy.py +63 -264
  248. polyaxon_sdk/models/v1_tuner.py +69 -208
  249. polyaxon_sdk/models/v1_uri_type.py +57 -182
  250. polyaxon_sdk/models/v1_url_ref.py +55 -156
  251. polyaxon_sdk/models/v1_user.py +63 -260
  252. polyaxon_sdk/models/v1_user_access.py +77 -0
  253. polyaxon_sdk/models/v1_user_email.py +54 -131
  254. polyaxon_sdk/models/v1_user_singup.py +61 -234
  255. polyaxon_sdk/models/v1_uuids.py +54 -131
  256. polyaxon_sdk/models/v1_validation.py +109 -0
  257. polyaxon_sdk/models/v1_version.py +55 -156
  258. polyaxon_sdk/models/v1_wasb_type.py +57 -182
  259. polyaxon_sdk/models/v1_xg_boost_job.py +73 -234
  260. polyaxon_sdk/rest.py +23 -41
  261. {polyaxon_sdk-1.18.0rc7.dist-info → polyaxon_sdk-2.1.6.dist-info}/METADATA +6 -4
  262. polyaxon_sdk-2.1.6.dist-info/RECORD +264 -0
  263. {polyaxon_sdk-1.18.0rc7.dist-info → polyaxon_sdk-2.1.6.dist-info}/WHEEL +1 -1
  264. polyaxon_sdk/models/mpi_job_implementation.py +0 -128
  265. polyaxon_sdk/models/spark_deploy_mode.py +0 -129
  266. polyaxon_sdk/models/v1_dask.py +0 -436
  267. polyaxon_sdk/models/v1_flink.py +0 -174
  268. polyaxon_sdk/models/v1_k8s_resource_schema.py +0 -226
  269. polyaxon_sdk/models/v1_k8s_resource_type.py +0 -200
  270. polyaxon_sdk/models/v1_project_user_access.py +0 -200
  271. polyaxon_sdk/models/v1_ray.py +0 -174
  272. polyaxon_sdk/models/v1_spark.py +0 -558
  273. polyaxon_sdk/models/v1_spark_replica.py +0 -252
  274. polyaxon_sdk/models/v1_spark_type.py +0 -130
  275. polyaxon_sdk-1.18.0rc7.dist-info/RECORD +0 -255
  276. {polyaxon_sdk-1.18.0rc7.dist-info → polyaxon_sdk-2.1.6.dist-info}/top_level.txt +0 -0
@@ -1,954 +1,193 @@
1
- #!/usr/bin/python
2
- #
3
- # Copyright 2018-2022 Polyaxon, Inc.
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
1
  # coding: utf-8
18
2
 
19
3
  """
20
4
  Polyaxon SDKs and REST API specification.
21
5
 
22
- Polyaxon SDKs and REST API specification. # noqa: E501
6
+ # noqa: E501
23
7
 
24
- The version of the OpenAPI document: 1.18.0
8
+ The version of the OpenAPI document: 2.1.6
25
9
  Contact: contact@polyaxon.com
26
- Generated by: https://openapi-generator.tech
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
27
13
  """
28
14
 
29
15
 
30
- try:
31
- from inspect import getfullargspec
32
- except ImportError:
33
- from inspect import getargspec as getfullargspec
16
+ from __future__ import annotations
17
+ from inspect import getfullargspec
34
18
  import pprint
35
19
  import re # noqa: F401
36
- import six
37
-
38
- from polyaxon_sdk.configuration import Configuration
39
-
40
-
41
- class V1Operation(object):
42
- """NOTE: This class is auto generated by OpenAPI Generator.
43
- Ref: https://openapi-generator.tech
44
-
45
- Do not edit the class manually.
20
+ import json
21
+
22
+
23
+ from typing import Any, Dict, List, Optional
24
+ from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictStr, conlist
25
+ from polyaxon_sdk.models.v1_build import V1Build
26
+ from polyaxon_sdk.models.v1_cache import V1Cache
27
+ from polyaxon_sdk.models.v1_component import V1Component
28
+ from polyaxon_sdk.models.v1_event_trigger import V1EventTrigger
29
+ from polyaxon_sdk.models.v1_hook import V1Hook
30
+ from polyaxon_sdk.models.v1_join import V1Join
31
+ from polyaxon_sdk.models.v1_param import V1Param
32
+ from polyaxon_sdk.models.v1_patch_strategy import V1PatchStrategy
33
+ from polyaxon_sdk.models.v1_plugins import V1Plugins
34
+ from polyaxon_sdk.models.v1_template import V1Template
35
+ from polyaxon_sdk.models.v1_termination import V1Termination
36
+ from polyaxon_sdk.models.v1_trigger_policy import V1TriggerPolicy
37
+
38
+ class V1Operation(BaseModel):
46
39
  """
47
-
48
- """
49
- Attributes:
50
- openapi_types (dict): The key is attribute name
51
- and the value is attribute type.
52
- attribute_map (dict): The key is attribute name
53
- and the value is json key in definition.
40
+ V1Operation
54
41
  """
55
- openapi_types = {
56
- 'version': 'float',
57
- 'kind': 'str',
58
- 'name': 'str',
59
- 'description': 'str',
60
- 'tags': 'list[str]',
61
- 'presets': 'list[str]',
62
- 'queue': 'str',
63
- 'cache': 'V1Cache',
64
- 'termination': 'V1Termination',
65
- 'plugins': 'V1Plugins',
66
- 'schedule': 'object',
67
- 'events': 'list[V1EventTrigger]',
68
- 'hooks': 'list[V1Hook]',
69
- 'dependencies': 'list[str]',
70
- 'trigger': 'V1TriggerPolicy',
71
- 'conditions': 'str',
72
- 'skip_on_upstream_skip': 'bool',
73
- 'matrix': 'object',
74
- 'joins': 'dict(str, V1Join)',
75
- 'params': 'dict(str, V1Param)',
76
- 'run_patch': 'object',
77
- 'patch_strategy': 'V1PatchStrategy',
78
- 'is_preset': 'bool',
79
- 'is_approved': 'bool',
80
- 'template': 'V1Template',
81
- 'build': 'V1Build',
82
- 'cost': 'float',
83
- 'path_ref': 'str',
84
- 'hub_ref': 'str',
85
- 'dag_ref': 'str',
86
- 'url_ref': 'str',
87
- 'component': 'V1Component'
88
- }
89
-
90
- attribute_map = {
91
- 'version': 'version',
92
- 'kind': 'kind',
93
- 'name': 'name',
94
- 'description': 'description',
95
- 'tags': 'tags',
96
- 'presets': 'presets',
97
- 'queue': 'queue',
98
- 'cache': 'cache',
99
- 'termination': 'termination',
100
- 'plugins': 'plugins',
101
- 'schedule': 'schedule',
102
- 'events': 'events',
103
- 'hooks': 'hooks',
104
- 'dependencies': 'dependencies',
105
- 'trigger': 'trigger',
106
- 'conditions': 'conditions',
107
- 'skip_on_upstream_skip': 'skipOnUpstreamSkip',
108
- 'matrix': 'matrix',
109
- 'joins': 'joins',
110
- 'params': 'params',
111
- 'run_patch': 'runPatch',
112
- 'patch_strategy': 'patchStrategy',
113
- 'is_preset': 'isPreset',
114
- 'is_approved': 'isApproved',
115
- 'template': 'template',
116
- 'build': 'build',
117
- 'cost': 'cost',
118
- 'path_ref': 'pathRef',
119
- 'hub_ref': 'hubRef',
120
- 'dag_ref': 'dagRef',
121
- 'url_ref': 'urlRef',
122
- 'component': 'component'
123
- }
124
-
125
- def __init__(self, version=None, kind=None, name=None, description=None, tags=None, presets=None, queue=None, cache=None, termination=None, plugins=None, schedule=None, events=None, hooks=None, dependencies=None, trigger=None, conditions=None, skip_on_upstream_skip=None, matrix=None, joins=None, params=None, run_patch=None, patch_strategy=None, is_preset=None, is_approved=None, template=None, build=None, cost=None, path_ref=None, hub_ref=None, dag_ref=None, url_ref=None, component=None, local_vars_configuration=None): # noqa: E501
126
- """V1Operation - a model defined in OpenAPI""" # noqa: E501
127
- if local_vars_configuration is None:
128
- local_vars_configuration = Configuration.get_default_copy()
129
- self.local_vars_configuration = local_vars_configuration
130
-
131
- self._version = None
132
- self._kind = None
133
- self._name = None
134
- self._description = None
135
- self._tags = None
136
- self._presets = None
137
- self._queue = None
138
- self._cache = None
139
- self._termination = None
140
- self._plugins = None
141
- self._schedule = None
142
- self._events = None
143
- self._hooks = None
144
- self._dependencies = None
145
- self._trigger = None
146
- self._conditions = None
147
- self._skip_on_upstream_skip = None
148
- self._matrix = None
149
- self._joins = None
150
- self._params = None
151
- self._run_patch = None
152
- self._patch_strategy = None
153
- self._is_preset = None
154
- self._is_approved = None
155
- self._template = None
156
- self._build = None
157
- self._cost = None
158
- self._path_ref = None
159
- self._hub_ref = None
160
- self._dag_ref = None
161
- self._url_ref = None
162
- self._component = None
163
- self.discriminator = None
164
-
165
- if version is not None:
166
- self.version = version
167
- if kind is not None:
168
- self.kind = kind
169
- if name is not None:
170
- self.name = name
171
- if description is not None:
172
- self.description = description
173
- if tags is not None:
174
- self.tags = tags
175
- if presets is not None:
176
- self.presets = presets
177
- if queue is not None:
178
- self.queue = queue
179
- if cache is not None:
180
- self.cache = cache
181
- if termination is not None:
182
- self.termination = termination
183
- if plugins is not None:
184
- self.plugins = plugins
185
- if schedule is not None:
186
- self.schedule = schedule
187
- if events is not None:
188
- self.events = events
189
- if hooks is not None:
190
- self.hooks = hooks
191
- if dependencies is not None:
192
- self.dependencies = dependencies
193
- if trigger is not None:
194
- self.trigger = trigger
195
- if conditions is not None:
196
- self.conditions = conditions
197
- if skip_on_upstream_skip is not None:
198
- self.skip_on_upstream_skip = skip_on_upstream_skip
199
- if matrix is not None:
200
- self.matrix = matrix
201
- if joins is not None:
202
- self.joins = joins
203
- if params is not None:
204
- self.params = params
205
- if run_patch is not None:
206
- self.run_patch = run_patch
207
- if patch_strategy is not None:
208
- self.patch_strategy = patch_strategy
209
- if is_preset is not None:
210
- self.is_preset = is_preset
211
- if is_approved is not None:
212
- self.is_approved = is_approved
213
- if template is not None:
214
- self.template = template
215
- if build is not None:
216
- self.build = build
217
- if cost is not None:
218
- self.cost = cost
219
- if path_ref is not None:
220
- self.path_ref = path_ref
221
- if hub_ref is not None:
222
- self.hub_ref = hub_ref
223
- if dag_ref is not None:
224
- self.dag_ref = dag_ref
225
- if url_ref is not None:
226
- self.url_ref = url_ref
227
- if component is not None:
228
- self.component = component
229
-
230
- @property
231
- def version(self):
232
- """Gets the version of this V1Operation. # noqa: E501
233
-
234
-
235
- :return: The version of this V1Operation. # noqa: E501
236
- :rtype: float
237
- """
238
- return self._version
239
-
240
- @version.setter
241
- def version(self, version):
242
- """Sets the version of this V1Operation.
243
-
244
-
245
- :param version: The version of this V1Operation. # noqa: E501
246
- :type version: float
247
- """
248
-
249
- self._version = version
250
-
251
- @property
252
- def kind(self):
253
- """Gets the kind of this V1Operation. # noqa: E501
254
-
255
-
256
- :return: The kind of this V1Operation. # noqa: E501
257
- :rtype: str
258
- """
259
- return self._kind
260
-
261
- @kind.setter
262
- def kind(self, kind):
263
- """Sets the kind of this V1Operation.
264
-
265
-
266
- :param kind: The kind of this V1Operation. # noqa: E501
267
- :type kind: str
268
- """
269
-
270
- self._kind = kind
271
-
272
- @property
273
- def name(self):
274
- """Gets the name of this V1Operation. # noqa: E501
275
-
276
-
277
- :return: The name of this V1Operation. # noqa: E501
278
- :rtype: str
279
- """
280
- return self._name
281
-
282
- @name.setter
283
- def name(self, name):
284
- """Sets the name of this V1Operation.
285
-
286
-
287
- :param name: The name of this V1Operation. # noqa: E501
288
- :type name: str
289
- """
290
-
291
- self._name = name
292
-
293
- @property
294
- def description(self):
295
- """Gets the description of this V1Operation. # noqa: E501
296
-
297
-
298
- :return: The description of this V1Operation. # noqa: E501
299
- :rtype: str
300
- """
301
- return self._description
302
-
303
- @description.setter
304
- def description(self, description):
305
- """Sets the description of this V1Operation.
306
-
307
-
308
- :param description: The description of this V1Operation. # noqa: E501
309
- :type description: str
310
- """
311
-
312
- self._description = description
313
-
314
- @property
315
- def tags(self):
316
- """Gets the tags of this V1Operation. # noqa: E501
317
-
318
-
319
- :return: The tags of this V1Operation. # noqa: E501
320
- :rtype: list[str]
321
- """
322
- return self._tags
323
-
324
- @tags.setter
325
- def tags(self, tags):
326
- """Sets the tags of this V1Operation.
327
-
328
-
329
- :param tags: The tags of this V1Operation. # noqa: E501
330
- :type tags: list[str]
331
- """
332
-
333
- self._tags = tags
334
-
335
- @property
336
- def presets(self):
337
- """Gets the presets of this V1Operation. # noqa: E501
338
-
339
-
340
- :return: The presets of this V1Operation. # noqa: E501
341
- :rtype: list[str]
342
- """
343
- return self._presets
344
-
345
- @presets.setter
346
- def presets(self, presets):
347
- """Sets the presets of this V1Operation.
348
-
349
-
350
- :param presets: The presets of this V1Operation. # noqa: E501
351
- :type presets: list[str]
352
- """
353
-
354
- self._presets = presets
355
-
356
- @property
357
- def queue(self):
358
- """Gets the queue of this V1Operation. # noqa: E501
359
-
360
-
361
- :return: The queue of this V1Operation. # noqa: E501
362
- :rtype: str
363
- """
364
- return self._queue
365
-
366
- @queue.setter
367
- def queue(self, queue):
368
- """Sets the queue of this V1Operation.
369
-
370
-
371
- :param queue: The queue of this V1Operation. # noqa: E501
372
- :type queue: str
373
- """
374
-
375
- self._queue = queue
376
-
377
- @property
378
- def cache(self):
379
- """Gets the cache of this V1Operation. # noqa: E501
380
-
381
-
382
- :return: The cache of this V1Operation. # noqa: E501
383
- :rtype: V1Cache
384
- """
385
- return self._cache
386
-
387
- @cache.setter
388
- def cache(self, cache):
389
- """Sets the cache of this V1Operation.
390
-
391
-
392
- :param cache: The cache of this V1Operation. # noqa: E501
393
- :type cache: V1Cache
394
- """
395
-
396
- self._cache = cache
397
-
398
- @property
399
- def termination(self):
400
- """Gets the termination of this V1Operation. # noqa: E501
401
-
402
-
403
- :return: The termination of this V1Operation. # noqa: E501
404
- :rtype: V1Termination
405
- """
406
- return self._termination
407
-
408
- @termination.setter
409
- def termination(self, termination):
410
- """Sets the termination of this V1Operation.
411
-
412
-
413
- :param termination: The termination of this V1Operation. # noqa: E501
414
- :type termination: V1Termination
415
- """
416
-
417
- self._termination = termination
418
-
419
- @property
420
- def plugins(self):
421
- """Gets the plugins of this V1Operation. # noqa: E501
422
-
423
-
424
- :return: The plugins of this V1Operation. # noqa: E501
425
- :rtype: V1Plugins
426
- """
427
- return self._plugins
428
-
429
- @plugins.setter
430
- def plugins(self, plugins):
431
- """Sets the plugins of this V1Operation.
432
-
433
-
434
- :param plugins: The plugins of this V1Operation. # noqa: E501
435
- :type plugins: V1Plugins
436
- """
437
-
438
- self._plugins = plugins
439
-
440
- @property
441
- def schedule(self):
442
- """Gets the schedule of this V1Operation. # noqa: E501
443
-
444
-
445
- :return: The schedule of this V1Operation. # noqa: E501
446
- :rtype: object
447
- """
448
- return self._schedule
449
-
450
- @schedule.setter
451
- def schedule(self, schedule):
452
- """Sets the schedule of this V1Operation.
453
-
454
-
455
- :param schedule: The schedule of this V1Operation. # noqa: E501
456
- :type schedule: object
457
- """
458
-
459
- self._schedule = schedule
460
-
461
- @property
462
- def events(self):
463
- """Gets the events of this V1Operation. # noqa: E501
464
-
465
-
466
- :return: The events of this V1Operation. # noqa: E501
467
- :rtype: list[V1EventTrigger]
468
- """
469
- return self._events
470
-
471
- @events.setter
472
- def events(self, events):
473
- """Sets the events of this V1Operation.
474
-
475
-
476
- :param events: The events of this V1Operation. # noqa: E501
477
- :type events: list[V1EventTrigger]
478
- """
479
-
480
- self._events = events
481
-
482
- @property
483
- def hooks(self):
484
- """Gets the hooks of this V1Operation. # noqa: E501
485
-
486
-
487
- :return: The hooks of this V1Operation. # noqa: E501
488
- :rtype: list[V1Hook]
489
- """
490
- return self._hooks
491
-
492
- @hooks.setter
493
- def hooks(self, hooks):
494
- """Sets the hooks of this V1Operation.
495
-
496
-
497
- :param hooks: The hooks of this V1Operation. # noqa: E501
498
- :type hooks: list[V1Hook]
499
- """
500
-
501
- self._hooks = hooks
502
-
503
- @property
504
- def dependencies(self):
505
- """Gets the dependencies of this V1Operation. # noqa: E501
506
-
507
-
508
- :return: The dependencies of this V1Operation. # noqa: E501
509
- :rtype: list[str]
510
- """
511
- return self._dependencies
512
-
513
- @dependencies.setter
514
- def dependencies(self, dependencies):
515
- """Sets the dependencies of this V1Operation.
516
-
517
-
518
- :param dependencies: The dependencies of this V1Operation. # noqa: E501
519
- :type dependencies: list[str]
520
- """
521
-
522
- self._dependencies = dependencies
523
-
524
- @property
525
- def trigger(self):
526
- """Gets the trigger of this V1Operation. # noqa: E501
527
-
528
-
529
- :return: The trigger of this V1Operation. # noqa: E501
530
- :rtype: V1TriggerPolicy
531
- """
532
- return self._trigger
533
-
534
- @trigger.setter
535
- def trigger(self, trigger):
536
- """Sets the trigger of this V1Operation.
537
-
538
-
539
- :param trigger: The trigger of this V1Operation. # noqa: E501
540
- :type trigger: V1TriggerPolicy
541
- """
542
-
543
- self._trigger = trigger
544
-
545
- @property
546
- def conditions(self):
547
- """Gets the conditions of this V1Operation. # noqa: E501
548
-
549
-
550
- :return: The conditions of this V1Operation. # noqa: E501
551
- :rtype: str
552
- """
553
- return self._conditions
554
-
555
- @conditions.setter
556
- def conditions(self, conditions):
557
- """Sets the conditions of this V1Operation.
558
-
559
-
560
- :param conditions: The conditions of this V1Operation. # noqa: E501
561
- :type conditions: str
562
- """
563
-
564
- self._conditions = conditions
565
-
566
- @property
567
- def skip_on_upstream_skip(self):
568
- """Gets the skip_on_upstream_skip of this V1Operation. # noqa: E501
569
-
570
-
571
- :return: The skip_on_upstream_skip of this V1Operation. # noqa: E501
572
- :rtype: bool
573
- """
574
- return self._skip_on_upstream_skip
575
-
576
- @skip_on_upstream_skip.setter
577
- def skip_on_upstream_skip(self, skip_on_upstream_skip):
578
- """Sets the skip_on_upstream_skip of this V1Operation.
579
-
580
-
581
- :param skip_on_upstream_skip: The skip_on_upstream_skip of this V1Operation. # noqa: E501
582
- :type skip_on_upstream_skip: bool
583
- """
584
-
585
- self._skip_on_upstream_skip = skip_on_upstream_skip
586
-
587
- @property
588
- def matrix(self):
589
- """Gets the matrix of this V1Operation. # noqa: E501
590
-
591
-
592
- :return: The matrix of this V1Operation. # noqa: E501
593
- :rtype: object
594
- """
595
- return self._matrix
596
-
597
- @matrix.setter
598
- def matrix(self, matrix):
599
- """Sets the matrix of this V1Operation.
600
-
601
-
602
- :param matrix: The matrix of this V1Operation. # noqa: E501
603
- :type matrix: object
604
- """
605
-
606
- self._matrix = matrix
607
-
608
- @property
609
- def joins(self):
610
- """Gets the joins of this V1Operation. # noqa: E501
611
-
612
-
613
- :return: The joins of this V1Operation. # noqa: E501
614
- :rtype: dict(str, V1Join)
615
- """
616
- return self._joins
617
-
618
- @joins.setter
619
- def joins(self, joins):
620
- """Sets the joins of this V1Operation.
621
-
622
-
623
- :param joins: The joins of this V1Operation. # noqa: E501
624
- :type joins: dict(str, V1Join)
625
- """
626
-
627
- self._joins = joins
628
-
629
- @property
630
- def params(self):
631
- """Gets the params of this V1Operation. # noqa: E501
632
-
633
-
634
- :return: The params of this V1Operation. # noqa: E501
635
- :rtype: dict(str, V1Param)
636
- """
637
- return self._params
638
-
639
- @params.setter
640
- def params(self, params):
641
- """Sets the params of this V1Operation.
642
-
643
-
644
- :param params: The params of this V1Operation. # noqa: E501
645
- :type params: dict(str, V1Param)
646
- """
647
-
648
- self._params = params
649
-
650
- @property
651
- def run_patch(self):
652
- """Gets the run_patch of this V1Operation. # noqa: E501
653
-
654
-
655
- :return: The run_patch of this V1Operation. # noqa: E501
656
- :rtype: object
657
- """
658
- return self._run_patch
659
-
660
- @run_patch.setter
661
- def run_patch(self, run_patch):
662
- """Sets the run_patch of this V1Operation.
663
-
664
-
665
- :param run_patch: The run_patch of this V1Operation. # noqa: E501
666
- :type run_patch: object
667
- """
668
-
669
- self._run_patch = run_patch
670
-
671
- @property
672
- def patch_strategy(self):
673
- """Gets the patch_strategy of this V1Operation. # noqa: E501
674
-
675
-
676
- :return: The patch_strategy of this V1Operation. # noqa: E501
677
- :rtype: V1PatchStrategy
678
- """
679
- return self._patch_strategy
680
-
681
- @patch_strategy.setter
682
- def patch_strategy(self, patch_strategy):
683
- """Sets the patch_strategy of this V1Operation.
684
-
685
-
686
- :param patch_strategy: The patch_strategy of this V1Operation. # noqa: E501
687
- :type patch_strategy: V1PatchStrategy
688
- """
689
-
690
- self._patch_strategy = patch_strategy
691
-
692
- @property
693
- def is_preset(self):
694
- """Gets the is_preset of this V1Operation. # noqa: E501
695
-
696
-
697
- :return: The is_preset of this V1Operation. # noqa: E501
698
- :rtype: bool
699
- """
700
- return self._is_preset
701
-
702
- @is_preset.setter
703
- def is_preset(self, is_preset):
704
- """Sets the is_preset of this V1Operation.
705
-
706
-
707
- :param is_preset: The is_preset of this V1Operation. # noqa: E501
708
- :type is_preset: bool
709
- """
710
-
711
- self._is_preset = is_preset
712
-
713
- @property
714
- def is_approved(self):
715
- """Gets the is_approved of this V1Operation. # noqa: E501
716
-
717
-
718
- :return: The is_approved of this V1Operation. # noqa: E501
719
- :rtype: bool
720
- """
721
- return self._is_approved
722
-
723
- @is_approved.setter
724
- def is_approved(self, is_approved):
725
- """Sets the is_approved of this V1Operation.
726
-
727
-
728
- :param is_approved: The is_approved of this V1Operation. # noqa: E501
729
- :type is_approved: bool
730
- """
731
-
732
- self._is_approved = is_approved
733
-
734
- @property
735
- def template(self):
736
- """Gets the template of this V1Operation. # noqa: E501
737
-
738
-
739
- :return: The template of this V1Operation. # noqa: E501
740
- :rtype: V1Template
741
- """
742
- return self._template
743
-
744
- @template.setter
745
- def template(self, template):
746
- """Sets the template of this V1Operation.
747
-
748
-
749
- :param template: The template of this V1Operation. # noqa: E501
750
- :type template: V1Template
751
- """
752
-
753
- self._template = template
754
-
755
- @property
756
- def build(self):
757
- """Gets the build of this V1Operation. # noqa: E501
758
-
759
-
760
- :return: The build of this V1Operation. # noqa: E501
761
- :rtype: V1Build
762
- """
763
- return self._build
764
-
765
- @build.setter
766
- def build(self, build):
767
- """Sets the build of this V1Operation.
768
-
769
-
770
- :param build: The build of this V1Operation. # noqa: E501
771
- :type build: V1Build
772
- """
773
-
774
- self._build = build
775
-
776
- @property
777
- def cost(self):
778
- """Gets the cost of this V1Operation. # noqa: E501
779
-
780
-
781
- :return: The cost of this V1Operation. # noqa: E501
782
- :rtype: float
783
- """
784
- return self._cost
785
-
786
- @cost.setter
787
- def cost(self, cost):
788
- """Sets the cost of this V1Operation.
789
-
790
-
791
- :param cost: The cost of this V1Operation. # noqa: E501
792
- :type cost: float
793
- """
794
-
795
- self._cost = cost
796
-
797
- @property
798
- def path_ref(self):
799
- """Gets the path_ref of this V1Operation. # noqa: E501
800
-
801
-
802
- :return: The path_ref of this V1Operation. # noqa: E501
803
- :rtype: str
804
- """
805
- return self._path_ref
806
-
807
- @path_ref.setter
808
- def path_ref(self, path_ref):
809
- """Sets the path_ref of this V1Operation.
810
-
811
-
812
- :param path_ref: The path_ref of this V1Operation. # noqa: E501
813
- :type path_ref: str
814
- """
815
-
816
- self._path_ref = path_ref
817
-
818
- @property
819
- def hub_ref(self):
820
- """Gets the hub_ref of this V1Operation. # noqa: E501
821
-
822
-
823
- :return: The hub_ref of this V1Operation. # noqa: E501
824
- :rtype: str
825
- """
826
- return self._hub_ref
827
-
828
- @hub_ref.setter
829
- def hub_ref(self, hub_ref):
830
- """Sets the hub_ref of this V1Operation.
831
-
832
-
833
- :param hub_ref: The hub_ref of this V1Operation. # noqa: E501
834
- :type hub_ref: str
835
- """
836
-
837
- self._hub_ref = hub_ref
838
-
839
- @property
840
- def dag_ref(self):
841
- """Gets the dag_ref of this V1Operation. # noqa: E501
842
-
843
-
844
- :return: The dag_ref of this V1Operation. # noqa: E501
845
- :rtype: str
846
- """
847
- return self._dag_ref
848
-
849
- @dag_ref.setter
850
- def dag_ref(self, dag_ref):
851
- """Sets the dag_ref of this V1Operation.
852
-
853
-
854
- :param dag_ref: The dag_ref of this V1Operation. # noqa: E501
855
- :type dag_ref: str
856
- """
857
-
858
- self._dag_ref = dag_ref
859
-
860
- @property
861
- def url_ref(self):
862
- """Gets the url_ref of this V1Operation. # noqa: E501
863
-
864
-
865
- :return: The url_ref of this V1Operation. # noqa: E501
866
- :rtype: str
867
- """
868
- return self._url_ref
869
-
870
- @url_ref.setter
871
- def url_ref(self, url_ref):
872
- """Sets the url_ref of this V1Operation.
873
-
874
-
875
- :param url_ref: The url_ref of this V1Operation. # noqa: E501
876
- :type url_ref: str
877
- """
878
-
879
- self._url_ref = url_ref
880
-
881
- @property
882
- def component(self):
883
- """Gets the component of this V1Operation. # noqa: E501
884
-
885
-
886
- :return: The component of this V1Operation. # noqa: E501
887
- :rtype: V1Component
888
- """
889
- return self._component
890
-
891
- @component.setter
892
- def component(self, component):
893
- """Sets the component of this V1Operation.
894
-
895
-
896
- :param component: The component of this V1Operation. # noqa: E501
897
- :type component: V1Component
898
- """
899
-
900
- self._component = component
901
-
902
- def to_dict(self, serialize=False):
903
- """Returns the model properties as a dict"""
904
- result = {}
905
-
906
- def convert(x):
907
- if hasattr(x, "to_dict"):
908
- args = getfullargspec(x.to_dict).args
909
- if len(args) == 1:
910
- return x.to_dict()
911
- else:
912
- return x.to_dict(serialize)
913
- else:
914
- return x
915
-
916
- for attr, _ in six.iteritems(self.openapi_types):
917
- value = getattr(self, attr)
918
- attr = self.attribute_map.get(attr, attr) if serialize else attr
919
- if isinstance(value, list):
920
- result[attr] = list(map(
921
- lambda x: convert(x),
922
- value
923
- ))
924
- elif isinstance(value, dict):
925
- result[attr] = dict(map(
926
- lambda item: (item[0], convert(item[1])),
927
- value.items()
928
- ))
929
- else:
930
- result[attr] = convert(value)
931
-
932
- return result
933
-
934
- def to_str(self):
935
- """Returns the string representation of the model"""
936
- return pprint.pformat(self.to_dict())
937
-
938
- def __repr__(self):
939
- """For `print` and `pprint`"""
940
- return self.to_str()
941
-
942
- def __eq__(self, other):
943
- """Returns true if both objects are equal"""
944
- if not isinstance(other, V1Operation):
945
- return False
946
-
947
- return self.to_dict() == other.to_dict()
948
-
949
- def __ne__(self, other):
950
- """Returns true if both objects are not equal"""
951
- if not isinstance(other, V1Operation):
952
- return True
42
+ version: Optional[StrictFloat] = None
43
+ kind: Optional[StrictStr] = None
44
+ name: Optional[StrictStr] = None
45
+ description: Optional[StrictStr] = None
46
+ tags: Optional[conlist(StrictStr)] = None
47
+ presets: Optional[conlist(StrictStr)] = None
48
+ queue: Optional[StrictStr] = None
49
+ cache: Optional[V1Cache] = None
50
+ namespace: Optional[StrictStr] = None
51
+ termination: Optional[V1Termination] = None
52
+ plugins: Optional[V1Plugins] = None
53
+ schedule: Optional[Dict[str, Any]] = None
54
+ events: Optional[conlist(V1EventTrigger)] = None
55
+ hooks: Optional[conlist(V1Hook)] = None
56
+ dependencies: Optional[conlist(StrictStr)] = None
57
+ trigger: Optional[V1TriggerPolicy] = None
58
+ conditions: Optional[StrictStr] = None
59
+ skip_on_upstream_skip: Optional[StrictBool] = Field(None, alias="skipOnUpstreamSkip")
60
+ matrix: Optional[Dict[str, Any]] = None
61
+ joins: Optional[Dict[str, V1Join]] = None
62
+ params: Optional[Dict[str, V1Param]] = None
63
+ run_patch: Optional[Dict[str, Any]] = Field(None, alias="runPatch")
64
+ patch_strategy: Optional[V1PatchStrategy] = Field(None, alias="patchStrategy")
65
+ is_preset: Optional[StrictBool] = Field(None, alias="isPreset")
66
+ is_approved: Optional[StrictBool] = Field(None, alias="isApproved")
67
+ template: Optional[V1Template] = None
68
+ build: Optional[V1Build] = None
69
+ cost: Optional[StrictFloat] = None
70
+ path_ref: Optional[StrictStr] = Field(None, alias="pathRef")
71
+ hub_ref: Optional[StrictStr] = Field(None, alias="hubRef")
72
+ dag_ref: Optional[StrictStr] = Field(None, alias="dagRef")
73
+ url_ref: Optional[StrictStr] = Field(None, alias="urlRef")
74
+ component: Optional[V1Component] = None
75
+ __properties = ["version", "kind", "name", "description", "tags", "presets", "queue", "cache", "namespace", "termination", "plugins", "schedule", "events", "hooks", "dependencies", "trigger", "conditions", "skipOnUpstreamSkip", "matrix", "joins", "params", "runPatch", "patchStrategy", "isPreset", "isApproved", "template", "build", "cost", "pathRef", "hubRef", "dagRef", "urlRef", "component"]
76
+
77
+ class Config:
78
+ allow_population_by_field_name = True
79
+ validate_assignment = True
80
+
81
+ def to_str(self) -> str:
82
+ """Returns the string representation of the model using alias"""
83
+ return pprint.pformat(self.dict(by_alias=True))
84
+
85
+ def to_json(self) -> str:
86
+ """Returns the JSON representation of the model using alias"""
87
+ return json.dumps(self.to_dict())
88
+
89
+ @classmethod
90
+ def from_json(cls, json_str: str) -> V1Operation:
91
+ """Create an instance of V1Operation from a JSON string"""
92
+ return cls.from_dict(json.loads(json_str))
93
+
94
+ def to_dict(self):
95
+ """Returns the dictionary representation of the model using alias"""
96
+ _dict = self.dict(by_alias=True,
97
+ exclude={
98
+ },
99
+ exclude_none=True)
100
+ # override the default output from pydantic by calling `to_dict()` of cache
101
+ if self.cache:
102
+ _dict['cache'] = self.cache.to_dict()
103
+ # override the default output from pydantic by calling `to_dict()` of termination
104
+ if self.termination:
105
+ _dict['termination'] = self.termination.to_dict()
106
+ # override the default output from pydantic by calling `to_dict()` of plugins
107
+ if self.plugins:
108
+ _dict['plugins'] = self.plugins.to_dict()
109
+ # override the default output from pydantic by calling `to_dict()` of each item in events (list)
110
+ _items = []
111
+ if self.events:
112
+ for _item in self.events:
113
+ if _item:
114
+ _items.append(_item.to_dict())
115
+ _dict['events'] = _items
116
+ # override the default output from pydantic by calling `to_dict()` of each item in hooks (list)
117
+ _items = []
118
+ if self.hooks:
119
+ for _item in self.hooks:
120
+ if _item:
121
+ _items.append(_item.to_dict())
122
+ _dict['hooks'] = _items
123
+ # override the default output from pydantic by calling `to_dict()` of each value in joins (dict)
124
+ _field_dict = {}
125
+ if self.joins:
126
+ for _key in self.joins:
127
+ if self.joins[_key]:
128
+ _field_dict[_key] = self.joins[_key].to_dict()
129
+ _dict['joins'] = _field_dict
130
+ # override the default output from pydantic by calling `to_dict()` of each value in params (dict)
131
+ _field_dict = {}
132
+ if self.params:
133
+ for _key in self.params:
134
+ if self.params[_key]:
135
+ _field_dict[_key] = self.params[_key].to_dict()
136
+ _dict['params'] = _field_dict
137
+ # override the default output from pydantic by calling `to_dict()` of template
138
+ if self.template:
139
+ _dict['template'] = self.template.to_dict()
140
+ # override the default output from pydantic by calling `to_dict()` of build
141
+ if self.build:
142
+ _dict['build'] = self.build.to_dict()
143
+ # override the default output from pydantic by calling `to_dict()` of component
144
+ if self.component:
145
+ _dict['component'] = self.component.to_dict()
146
+ return _dict
147
+
148
+ @classmethod
149
+ def from_dict(cls, obj: dict) -> V1Operation:
150
+ """Create an instance of V1Operation from a dict"""
151
+ if obj is None:
152
+ return None
153
+
154
+ if type(obj) is not dict:
155
+ return V1Operation.parse_obj(obj)
156
+
157
+ _obj = V1Operation.parse_obj({
158
+ "version": obj.get("version"),
159
+ "kind": obj.get("kind"),
160
+ "name": obj.get("name"),
161
+ "description": obj.get("description"),
162
+ "tags": obj.get("tags"),
163
+ "presets": obj.get("presets"),
164
+ "queue": obj.get("queue"),
165
+ "cache": V1Cache.from_dict(obj.get("cache")) if obj.get("cache") is not None else None,
166
+ "namespace": obj.get("namespace"),
167
+ "termination": V1Termination.from_dict(obj.get("termination")) if obj.get("termination") is not None else None,
168
+ "plugins": V1Plugins.from_dict(obj.get("plugins")) if obj.get("plugins") is not None else None,
169
+ "schedule": obj.get("schedule"),
170
+ "events": [V1EventTrigger.from_dict(_item) for _item in obj.get("events")] if obj.get("events") is not None else None,
171
+ "hooks": [V1Hook.from_dict(_item) for _item in obj.get("hooks")] if obj.get("hooks") is not None else None,
172
+ "dependencies": obj.get("dependencies"),
173
+ "trigger": obj.get("trigger"),
174
+ "conditions": obj.get("conditions"),
175
+ "skip_on_upstream_skip": obj.get("skipOnUpstreamSkip"),
176
+ "matrix": obj.get("matrix"),
177
+ "joins": dict((_k, V1Join.from_dict(_v)) for _k, _v in obj.get("joins").items()) if obj.get("joins") is not None else None,
178
+ "params": dict((_k, V1Param.from_dict(_v)) for _k, _v in obj.get("params").items()) if obj.get("params") is not None else None,
179
+ "run_patch": obj.get("runPatch"),
180
+ "patch_strategy": obj.get("patchStrategy"),
181
+ "is_preset": obj.get("isPreset"),
182
+ "is_approved": obj.get("isApproved"),
183
+ "template": V1Template.from_dict(obj.get("template")) if obj.get("template") is not None else None,
184
+ "build": V1Build.from_dict(obj.get("build")) if obj.get("build") is not None else None,
185
+ "cost": obj.get("cost"),
186
+ "path_ref": obj.get("pathRef"),
187
+ "hub_ref": obj.get("hubRef"),
188
+ "dag_ref": obj.get("dagRef"),
189
+ "url_ref": obj.get("urlRef"),
190
+ "component": V1Component.from_dict(obj.get("component")) if obj.get("component") is not None else None
191
+ })
192
+ return _obj
953
193
 
954
- return self.to_dict() != other.to_dict()