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,798 +1,186 @@
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 V1CompiledOperation(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.
46
- """
47
-
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_event_trigger import V1EventTrigger
28
+ from polyaxon_sdk.models.v1_hook import V1Hook
29
+ from polyaxon_sdk.models.v1_io import V1IO
30
+ from polyaxon_sdk.models.v1_join import V1Join
31
+ from polyaxon_sdk.models.v1_plugins import V1Plugins
32
+ from polyaxon_sdk.models.v1_termination import V1Termination
33
+ from polyaxon_sdk.models.v1_trigger_policy import V1TriggerPolicy
34
+
35
+ class V1CompiledOperation(BaseModel):
48
36
  """
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.
37
+ V1CompiledOperation
54
38
  """
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
- 'build': 'V1Build',
69
- 'hooks': 'list[V1Hook]',
70
- 'dependencies': 'list[str]',
71
- 'trigger': 'V1TriggerPolicy',
72
- 'conditions': 'str',
73
- 'skip_on_upstream_skip': 'bool',
74
- 'matrix': 'object',
75
- 'joins': 'dict(str, V1Join)',
76
- 'inputs': 'list[V1IO]',
77
- 'outputs': 'list[V1IO]',
78
- 'contexts': 'list[V1IO]',
79
- 'is_approved': 'bool',
80
- 'cost': 'float',
81
- 'run': 'object'
82
- }
83
-
84
- attribute_map = {
85
- 'version': 'version',
86
- 'kind': 'kind',
87
- 'name': 'name',
88
- 'description': 'description',
89
- 'tags': 'tags',
90
- 'presets': 'presets',
91
- 'queue': 'queue',
92
- 'cache': 'cache',
93
- 'termination': 'termination',
94
- 'plugins': 'plugins',
95
- 'schedule': 'schedule',
96
- 'events': 'events',
97
- 'build': 'build',
98
- 'hooks': 'hooks',
99
- 'dependencies': 'dependencies',
100
- 'trigger': 'trigger',
101
- 'conditions': 'conditions',
102
- 'skip_on_upstream_skip': 'skipOnUpstreamSkip',
103
- 'matrix': 'matrix',
104
- 'joins': 'joins',
105
- 'inputs': 'inputs',
106
- 'outputs': 'outputs',
107
- 'contexts': 'contexts',
108
- 'is_approved': 'isApproved',
109
- 'cost': 'cost',
110
- 'run': 'run'
111
- }
112
-
113
- 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, build=None, hooks=None, dependencies=None, trigger=None, conditions=None, skip_on_upstream_skip=None, matrix=None, joins=None, inputs=None, outputs=None, contexts=None, is_approved=None, cost=None, run=None, local_vars_configuration=None): # noqa: E501
114
- """V1CompiledOperation - a model defined in OpenAPI""" # noqa: E501
115
- if local_vars_configuration is None:
116
- local_vars_configuration = Configuration.get_default_copy()
117
- self.local_vars_configuration = local_vars_configuration
118
-
119
- self._version = None
120
- self._kind = None
121
- self._name = None
122
- self._description = None
123
- self._tags = None
124
- self._presets = None
125
- self._queue = None
126
- self._cache = None
127
- self._termination = None
128
- self._plugins = None
129
- self._schedule = None
130
- self._events = None
131
- self._build = None
132
- self._hooks = None
133
- self._dependencies = None
134
- self._trigger = None
135
- self._conditions = None
136
- self._skip_on_upstream_skip = None
137
- self._matrix = None
138
- self._joins = None
139
- self._inputs = None
140
- self._outputs = None
141
- self._contexts = None
142
- self._is_approved = None
143
- self._cost = None
144
- self._run = None
145
- self.discriminator = None
146
-
147
- if version is not None:
148
- self.version = version
149
- if kind is not None:
150
- self.kind = kind
151
- if name is not None:
152
- self.name = name
153
- if description is not None:
154
- self.description = description
155
- if tags is not None:
156
- self.tags = tags
157
- if presets is not None:
158
- self.presets = presets
159
- if queue is not None:
160
- self.queue = queue
161
- if cache is not None:
162
- self.cache = cache
163
- if termination is not None:
164
- self.termination = termination
165
- if plugins is not None:
166
- self.plugins = plugins
167
- if schedule is not None:
168
- self.schedule = schedule
169
- if events is not None:
170
- self.events = events
171
- if build is not None:
172
- self.build = build
173
- if hooks is not None:
174
- self.hooks = hooks
175
- if dependencies is not None:
176
- self.dependencies = dependencies
177
- if trigger is not None:
178
- self.trigger = trigger
179
- if conditions is not None:
180
- self.conditions = conditions
181
- if skip_on_upstream_skip is not None:
182
- self.skip_on_upstream_skip = skip_on_upstream_skip
183
- if matrix is not None:
184
- self.matrix = matrix
185
- if joins is not None:
186
- self.joins = joins
187
- if inputs is not None:
188
- self.inputs = inputs
189
- if outputs is not None:
190
- self.outputs = outputs
191
- if contexts is not None:
192
- self.contexts = contexts
193
- if is_approved is not None:
194
- self.is_approved = is_approved
195
- if cost is not None:
196
- self.cost = cost
197
- if run is not None:
198
- self.run = run
199
-
200
- @property
201
- def version(self):
202
- """Gets the version of this V1CompiledOperation. # noqa: E501
203
-
204
-
205
- :return: The version of this V1CompiledOperation. # noqa: E501
206
- :rtype: float
207
- """
208
- return self._version
209
-
210
- @version.setter
211
- def version(self, version):
212
- """Sets the version of this V1CompiledOperation.
213
-
214
-
215
- :param version: The version of this V1CompiledOperation. # noqa: E501
216
- :type version: float
217
- """
218
-
219
- self._version = version
220
-
221
- @property
222
- def kind(self):
223
- """Gets the kind of this V1CompiledOperation. # noqa: E501
224
-
225
-
226
- :return: The kind of this V1CompiledOperation. # noqa: E501
227
- :rtype: str
228
- """
229
- return self._kind
230
-
231
- @kind.setter
232
- def kind(self, kind):
233
- """Sets the kind of this V1CompiledOperation.
234
-
235
-
236
- :param kind: The kind of this V1CompiledOperation. # noqa: E501
237
- :type kind: str
238
- """
239
-
240
- self._kind = kind
241
-
242
- @property
243
- def name(self):
244
- """Gets the name of this V1CompiledOperation. # noqa: E501
245
-
246
-
247
- :return: The name of this V1CompiledOperation. # noqa: E501
248
- :rtype: str
249
- """
250
- return self._name
251
-
252
- @name.setter
253
- def name(self, name):
254
- """Sets the name of this V1CompiledOperation.
255
-
256
-
257
- :param name: The name of this V1CompiledOperation. # noqa: E501
258
- :type name: str
259
- """
260
-
261
- self._name = name
262
-
263
- @property
264
- def description(self):
265
- """Gets the description of this V1CompiledOperation. # noqa: E501
266
-
267
-
268
- :return: The description of this V1CompiledOperation. # noqa: E501
269
- :rtype: str
270
- """
271
- return self._description
272
-
273
- @description.setter
274
- def description(self, description):
275
- """Sets the description of this V1CompiledOperation.
276
-
277
-
278
- :param description: The description of this V1CompiledOperation. # noqa: E501
279
- :type description: str
280
- """
281
-
282
- self._description = description
283
-
284
- @property
285
- def tags(self):
286
- """Gets the tags of this V1CompiledOperation. # noqa: E501
287
-
288
-
289
- :return: The tags of this V1CompiledOperation. # noqa: E501
290
- :rtype: list[str]
291
- """
292
- return self._tags
293
-
294
- @tags.setter
295
- def tags(self, tags):
296
- """Sets the tags of this V1CompiledOperation.
297
-
298
-
299
- :param tags: The tags of this V1CompiledOperation. # noqa: E501
300
- :type tags: list[str]
301
- """
302
-
303
- self._tags = tags
304
-
305
- @property
306
- def presets(self):
307
- """Gets the presets of this V1CompiledOperation. # noqa: E501
308
-
309
-
310
- :return: The presets of this V1CompiledOperation. # noqa: E501
311
- :rtype: list[str]
312
- """
313
- return self._presets
314
-
315
- @presets.setter
316
- def presets(self, presets):
317
- """Sets the presets of this V1CompiledOperation.
318
-
319
-
320
- :param presets: The presets of this V1CompiledOperation. # noqa: E501
321
- :type presets: list[str]
322
- """
323
-
324
- self._presets = presets
325
-
326
- @property
327
- def queue(self):
328
- """Gets the queue of this V1CompiledOperation. # noqa: E501
329
-
330
-
331
- :return: The queue of this V1CompiledOperation. # noqa: E501
332
- :rtype: str
333
- """
334
- return self._queue
335
-
336
- @queue.setter
337
- def queue(self, queue):
338
- """Sets the queue of this V1CompiledOperation.
339
-
340
-
341
- :param queue: The queue of this V1CompiledOperation. # noqa: E501
342
- :type queue: str
343
- """
344
-
345
- self._queue = queue
346
-
347
- @property
348
- def cache(self):
349
- """Gets the cache of this V1CompiledOperation. # noqa: E501
350
-
351
-
352
- :return: The cache of this V1CompiledOperation. # noqa: E501
353
- :rtype: V1Cache
354
- """
355
- return self._cache
356
-
357
- @cache.setter
358
- def cache(self, cache):
359
- """Sets the cache of this V1CompiledOperation.
360
-
361
-
362
- :param cache: The cache of this V1CompiledOperation. # noqa: E501
363
- :type cache: V1Cache
364
- """
365
-
366
- self._cache = cache
367
-
368
- @property
369
- def termination(self):
370
- """Gets the termination of this V1CompiledOperation. # noqa: E501
371
-
372
-
373
- :return: The termination of this V1CompiledOperation. # noqa: E501
374
- :rtype: V1Termination
375
- """
376
- return self._termination
377
-
378
- @termination.setter
379
- def termination(self, termination):
380
- """Sets the termination of this V1CompiledOperation.
381
-
382
-
383
- :param termination: The termination of this V1CompiledOperation. # noqa: E501
384
- :type termination: V1Termination
385
- """
386
-
387
- self._termination = termination
388
-
389
- @property
390
- def plugins(self):
391
- """Gets the plugins of this V1CompiledOperation. # noqa: E501
392
-
393
-
394
- :return: The plugins of this V1CompiledOperation. # noqa: E501
395
- :rtype: V1Plugins
396
- """
397
- return self._plugins
398
-
399
- @plugins.setter
400
- def plugins(self, plugins):
401
- """Sets the plugins of this V1CompiledOperation.
402
-
403
-
404
- :param plugins: The plugins of this V1CompiledOperation. # noqa: E501
405
- :type plugins: V1Plugins
406
- """
407
-
408
- self._plugins = plugins
409
-
410
- @property
411
- def schedule(self):
412
- """Gets the schedule of this V1CompiledOperation. # noqa: E501
413
-
414
-
415
- :return: The schedule of this V1CompiledOperation. # noqa: E501
416
- :rtype: object
417
- """
418
- return self._schedule
419
-
420
- @schedule.setter
421
- def schedule(self, schedule):
422
- """Sets the schedule of this V1CompiledOperation.
423
-
424
-
425
- :param schedule: The schedule of this V1CompiledOperation. # noqa: E501
426
- :type schedule: object
427
- """
428
-
429
- self._schedule = schedule
430
-
431
- @property
432
- def events(self):
433
- """Gets the events of this V1CompiledOperation. # noqa: E501
434
-
435
-
436
- :return: The events of this V1CompiledOperation. # noqa: E501
437
- :rtype: list[V1EventTrigger]
438
- """
439
- return self._events
440
-
441
- @events.setter
442
- def events(self, events):
443
- """Sets the events of this V1CompiledOperation.
444
-
445
-
446
- :param events: The events of this V1CompiledOperation. # noqa: E501
447
- :type events: list[V1EventTrigger]
448
- """
449
-
450
- self._events = events
451
-
452
- @property
453
- def build(self):
454
- """Gets the build of this V1CompiledOperation. # noqa: E501
455
-
456
-
457
- :return: The build of this V1CompiledOperation. # noqa: E501
458
- :rtype: V1Build
459
- """
460
- return self._build
461
-
462
- @build.setter
463
- def build(self, build):
464
- """Sets the build of this V1CompiledOperation.
465
-
466
-
467
- :param build: The build of this V1CompiledOperation. # noqa: E501
468
- :type build: V1Build
469
- """
470
-
471
- self._build = build
472
-
473
- @property
474
- def hooks(self):
475
- """Gets the hooks of this V1CompiledOperation. # noqa: E501
476
-
477
-
478
- :return: The hooks of this V1CompiledOperation. # noqa: E501
479
- :rtype: list[V1Hook]
480
- """
481
- return self._hooks
482
-
483
- @hooks.setter
484
- def hooks(self, hooks):
485
- """Sets the hooks of this V1CompiledOperation.
486
-
487
-
488
- :param hooks: The hooks of this V1CompiledOperation. # noqa: E501
489
- :type hooks: list[V1Hook]
490
- """
491
-
492
- self._hooks = hooks
493
-
494
- @property
495
- def dependencies(self):
496
- """Gets the dependencies of this V1CompiledOperation. # noqa: E501
497
-
498
-
499
- :return: The dependencies of this V1CompiledOperation. # noqa: E501
500
- :rtype: list[str]
501
- """
502
- return self._dependencies
503
-
504
- @dependencies.setter
505
- def dependencies(self, dependencies):
506
- """Sets the dependencies of this V1CompiledOperation.
507
-
508
-
509
- :param dependencies: The dependencies of this V1CompiledOperation. # noqa: E501
510
- :type dependencies: list[str]
511
- """
512
-
513
- self._dependencies = dependencies
514
-
515
- @property
516
- def trigger(self):
517
- """Gets the trigger of this V1CompiledOperation. # noqa: E501
518
-
519
-
520
- :return: The trigger of this V1CompiledOperation. # noqa: E501
521
- :rtype: V1TriggerPolicy
522
- """
523
- return self._trigger
524
-
525
- @trigger.setter
526
- def trigger(self, trigger):
527
- """Sets the trigger of this V1CompiledOperation.
528
-
529
-
530
- :param trigger: The trigger of this V1CompiledOperation. # noqa: E501
531
- :type trigger: V1TriggerPolicy
532
- """
533
-
534
- self._trigger = trigger
535
-
536
- @property
537
- def conditions(self):
538
- """Gets the conditions of this V1CompiledOperation. # noqa: E501
539
-
540
-
541
- :return: The conditions of this V1CompiledOperation. # noqa: E501
542
- :rtype: str
543
- """
544
- return self._conditions
545
-
546
- @conditions.setter
547
- def conditions(self, conditions):
548
- """Sets the conditions of this V1CompiledOperation.
549
-
550
-
551
- :param conditions: The conditions of this V1CompiledOperation. # noqa: E501
552
- :type conditions: str
553
- """
554
-
555
- self._conditions = conditions
556
-
557
- @property
558
- def skip_on_upstream_skip(self):
559
- """Gets the skip_on_upstream_skip of this V1CompiledOperation. # noqa: E501
560
-
561
-
562
- :return: The skip_on_upstream_skip of this V1CompiledOperation. # noqa: E501
563
- :rtype: bool
564
- """
565
- return self._skip_on_upstream_skip
566
-
567
- @skip_on_upstream_skip.setter
568
- def skip_on_upstream_skip(self, skip_on_upstream_skip):
569
- """Sets the skip_on_upstream_skip of this V1CompiledOperation.
570
-
571
-
572
- :param skip_on_upstream_skip: The skip_on_upstream_skip of this V1CompiledOperation. # noqa: E501
573
- :type skip_on_upstream_skip: bool
574
- """
575
-
576
- self._skip_on_upstream_skip = skip_on_upstream_skip
577
-
578
- @property
579
- def matrix(self):
580
- """Gets the matrix of this V1CompiledOperation. # noqa: E501
581
-
582
-
583
- :return: The matrix of this V1CompiledOperation. # noqa: E501
584
- :rtype: object
585
- """
586
- return self._matrix
587
-
588
- @matrix.setter
589
- def matrix(self, matrix):
590
- """Sets the matrix of this V1CompiledOperation.
591
-
592
-
593
- :param matrix: The matrix of this V1CompiledOperation. # noqa: E501
594
- :type matrix: object
595
- """
596
-
597
- self._matrix = matrix
598
-
599
- @property
600
- def joins(self):
601
- """Gets the joins of this V1CompiledOperation. # noqa: E501
602
-
603
-
604
- :return: The joins of this V1CompiledOperation. # noqa: E501
605
- :rtype: dict(str, V1Join)
606
- """
607
- return self._joins
608
-
609
- @joins.setter
610
- def joins(self, joins):
611
- """Sets the joins of this V1CompiledOperation.
612
-
613
-
614
- :param joins: The joins of this V1CompiledOperation. # noqa: E501
615
- :type joins: dict(str, V1Join)
616
- """
617
-
618
- self._joins = joins
619
-
620
- @property
621
- def inputs(self):
622
- """Gets the inputs of this V1CompiledOperation. # noqa: E501
623
-
624
-
625
- :return: The inputs of this V1CompiledOperation. # noqa: E501
626
- :rtype: list[V1IO]
627
- """
628
- return self._inputs
629
-
630
- @inputs.setter
631
- def inputs(self, inputs):
632
- """Sets the inputs of this V1CompiledOperation.
633
-
634
-
635
- :param inputs: The inputs of this V1CompiledOperation. # noqa: E501
636
- :type inputs: list[V1IO]
637
- """
638
-
639
- self._inputs = inputs
640
-
641
- @property
642
- def outputs(self):
643
- """Gets the outputs of this V1CompiledOperation. # noqa: E501
644
-
645
-
646
- :return: The outputs of this V1CompiledOperation. # noqa: E501
647
- :rtype: list[V1IO]
648
- """
649
- return self._outputs
650
-
651
- @outputs.setter
652
- def outputs(self, outputs):
653
- """Sets the outputs of this V1CompiledOperation.
654
-
655
-
656
- :param outputs: The outputs of this V1CompiledOperation. # noqa: E501
657
- :type outputs: list[V1IO]
658
- """
659
-
660
- self._outputs = outputs
661
-
662
- @property
663
- def contexts(self):
664
- """Gets the contexts of this V1CompiledOperation. # noqa: E501
665
-
666
-
667
- :return: The contexts of this V1CompiledOperation. # noqa: E501
668
- :rtype: list[V1IO]
669
- """
670
- return self._contexts
671
-
672
- @contexts.setter
673
- def contexts(self, contexts):
674
- """Sets the contexts of this V1CompiledOperation.
675
-
676
-
677
- :param contexts: The contexts of this V1CompiledOperation. # noqa: E501
678
- :type contexts: list[V1IO]
679
- """
680
-
681
- self._contexts = contexts
682
-
683
- @property
684
- def is_approved(self):
685
- """Gets the is_approved of this V1CompiledOperation. # noqa: E501
686
-
687
-
688
- :return: The is_approved of this V1CompiledOperation. # noqa: E501
689
- :rtype: bool
690
- """
691
- return self._is_approved
692
-
693
- @is_approved.setter
694
- def is_approved(self, is_approved):
695
- """Sets the is_approved of this V1CompiledOperation.
696
-
697
-
698
- :param is_approved: The is_approved of this V1CompiledOperation. # noqa: E501
699
- :type is_approved: bool
700
- """
701
-
702
- self._is_approved = is_approved
703
-
704
- @property
705
- def cost(self):
706
- """Gets the cost of this V1CompiledOperation. # noqa: E501
707
-
708
-
709
- :return: The cost of this V1CompiledOperation. # noqa: E501
710
- :rtype: float
711
- """
712
- return self._cost
713
-
714
- @cost.setter
715
- def cost(self, cost):
716
- """Sets the cost of this V1CompiledOperation.
717
-
718
-
719
- :param cost: The cost of this V1CompiledOperation. # noqa: E501
720
- :type cost: float
721
- """
722
-
723
- self._cost = cost
724
-
725
- @property
726
- def run(self):
727
- """Gets the run of this V1CompiledOperation. # noqa: E501
728
-
729
-
730
- :return: The run of this V1CompiledOperation. # noqa: E501
731
- :rtype: object
732
- """
733
- return self._run
734
-
735
- @run.setter
736
- def run(self, run):
737
- """Sets the run of this V1CompiledOperation.
738
-
739
-
740
- :param run: The run of this V1CompiledOperation. # noqa: E501
741
- :type run: object
742
- """
743
-
744
- self._run = run
745
-
746
- def to_dict(self, serialize=False):
747
- """Returns the model properties as a dict"""
748
- result = {}
749
-
750
- def convert(x):
751
- if hasattr(x, "to_dict"):
752
- args = getfullargspec(x.to_dict).args
753
- if len(args) == 1:
754
- return x.to_dict()
755
- else:
756
- return x.to_dict(serialize)
757
- else:
758
- return x
759
-
760
- for attr, _ in six.iteritems(self.openapi_types):
761
- value = getattr(self, attr)
762
- attr = self.attribute_map.get(attr, attr) if serialize else attr
763
- if isinstance(value, list):
764
- result[attr] = list(map(
765
- lambda x: convert(x),
766
- value
767
- ))
768
- elif isinstance(value, dict):
769
- result[attr] = dict(map(
770
- lambda item: (item[0], convert(item[1])),
771
- value.items()
772
- ))
773
- else:
774
- result[attr] = convert(value)
775
-
776
- return result
777
-
778
- def to_str(self):
779
- """Returns the string representation of the model"""
780
- return pprint.pformat(self.to_dict())
781
-
782
- def __repr__(self):
783
- """For `print` and `pprint`"""
784
- return self.to_str()
785
-
786
- def __eq__(self, other):
787
- """Returns true if both objects are equal"""
788
- if not isinstance(other, V1CompiledOperation):
789
- return False
790
-
791
- return self.to_dict() == other.to_dict()
792
-
793
- def __ne__(self, other):
794
- """Returns true if both objects are not equal"""
795
- if not isinstance(other, V1CompiledOperation):
796
- return True
39
+ version: Optional[StrictFloat] = None
40
+ kind: Optional[StrictStr] = None
41
+ name: Optional[StrictStr] = None
42
+ description: Optional[StrictStr] = None
43
+ tags: Optional[conlist(StrictStr)] = None
44
+ presets: Optional[conlist(StrictStr)] = None
45
+ queue: Optional[StrictStr] = None
46
+ cache: Optional[V1Cache] = None
47
+ namespace: Optional[StrictStr] = None
48
+ termination: Optional[V1Termination] = None
49
+ plugins: Optional[V1Plugins] = None
50
+ schedule: Optional[Dict[str, Any]] = None
51
+ events: Optional[conlist(V1EventTrigger)] = None
52
+ build: Optional[V1Build] = None
53
+ hooks: Optional[conlist(V1Hook)] = None
54
+ dependencies: Optional[conlist(StrictStr)] = None
55
+ trigger: Optional[V1TriggerPolicy] = None
56
+ conditions: Optional[StrictStr] = None
57
+ skip_on_upstream_skip: Optional[StrictBool] = Field(None, alias="skipOnUpstreamSkip")
58
+ matrix: Optional[Dict[str, Any]] = None
59
+ joins: Optional[Dict[str, V1Join]] = None
60
+ inputs: Optional[conlist(V1IO)] = None
61
+ outputs: Optional[conlist(V1IO)] = None
62
+ contexts: Optional[conlist(V1IO)] = None
63
+ is_approved: Optional[StrictBool] = Field(None, alias="isApproved")
64
+ cost: Optional[StrictFloat] = None
65
+ run: Optional[Dict[str, Any]] = None
66
+ __properties = ["version", "kind", "name", "description", "tags", "presets", "queue", "cache", "namespace", "termination", "plugins", "schedule", "events", "build", "hooks", "dependencies", "trigger", "conditions", "skipOnUpstreamSkip", "matrix", "joins", "inputs", "outputs", "contexts", "isApproved", "cost", "run"]
67
+
68
+ class Config:
69
+ allow_population_by_field_name = True
70
+ validate_assignment = True
71
+
72
+ def to_str(self) -> str:
73
+ """Returns the string representation of the model using alias"""
74
+ return pprint.pformat(self.dict(by_alias=True))
75
+
76
+ def to_json(self) -> str:
77
+ """Returns the JSON representation of the model using alias"""
78
+ return json.dumps(self.to_dict())
79
+
80
+ @classmethod
81
+ def from_json(cls, json_str: str) -> V1CompiledOperation:
82
+ """Create an instance of V1CompiledOperation from a JSON string"""
83
+ return cls.from_dict(json.loads(json_str))
84
+
85
+ def to_dict(self):
86
+ """Returns the dictionary representation of the model using alias"""
87
+ _dict = self.dict(by_alias=True,
88
+ exclude={
89
+ },
90
+ exclude_none=True)
91
+ # override the default output from pydantic by calling `to_dict()` of cache
92
+ if self.cache:
93
+ _dict['cache'] = self.cache.to_dict()
94
+ # override the default output from pydantic by calling `to_dict()` of termination
95
+ if self.termination:
96
+ _dict['termination'] = self.termination.to_dict()
97
+ # override the default output from pydantic by calling `to_dict()` of plugins
98
+ if self.plugins:
99
+ _dict['plugins'] = self.plugins.to_dict()
100
+ # override the default output from pydantic by calling `to_dict()` of each item in events (list)
101
+ _items = []
102
+ if self.events:
103
+ for _item in self.events:
104
+ if _item:
105
+ _items.append(_item.to_dict())
106
+ _dict['events'] = _items
107
+ # override the default output from pydantic by calling `to_dict()` of build
108
+ if self.build:
109
+ _dict['build'] = self.build.to_dict()
110
+ # override the default output from pydantic by calling `to_dict()` of each item in hooks (list)
111
+ _items = []
112
+ if self.hooks:
113
+ for _item in self.hooks:
114
+ if _item:
115
+ _items.append(_item.to_dict())
116
+ _dict['hooks'] = _items
117
+ # override the default output from pydantic by calling `to_dict()` of each value in joins (dict)
118
+ _field_dict = {}
119
+ if self.joins:
120
+ for _key in self.joins:
121
+ if self.joins[_key]:
122
+ _field_dict[_key] = self.joins[_key].to_dict()
123
+ _dict['joins'] = _field_dict
124
+ # override the default output from pydantic by calling `to_dict()` of each item in inputs (list)
125
+ _items = []
126
+ if self.inputs:
127
+ for _item in self.inputs:
128
+ if _item:
129
+ _items.append(_item.to_dict())
130
+ _dict['inputs'] = _items
131
+ # override the default output from pydantic by calling `to_dict()` of each item in outputs (list)
132
+ _items = []
133
+ if self.outputs:
134
+ for _item in self.outputs:
135
+ if _item:
136
+ _items.append(_item.to_dict())
137
+ _dict['outputs'] = _items
138
+ # override the default output from pydantic by calling `to_dict()` of each item in contexts (list)
139
+ _items = []
140
+ if self.contexts:
141
+ for _item in self.contexts:
142
+ if _item:
143
+ _items.append(_item.to_dict())
144
+ _dict['contexts'] = _items
145
+ return _dict
146
+
147
+ @classmethod
148
+ def from_dict(cls, obj: dict) -> V1CompiledOperation:
149
+ """Create an instance of V1CompiledOperation from a dict"""
150
+ if obj is None:
151
+ return None
152
+
153
+ if type(obj) is not dict:
154
+ return V1CompiledOperation.parse_obj(obj)
155
+
156
+ _obj = V1CompiledOperation.parse_obj({
157
+ "version": obj.get("version"),
158
+ "kind": obj.get("kind"),
159
+ "name": obj.get("name"),
160
+ "description": obj.get("description"),
161
+ "tags": obj.get("tags"),
162
+ "presets": obj.get("presets"),
163
+ "queue": obj.get("queue"),
164
+ "cache": V1Cache.from_dict(obj.get("cache")) if obj.get("cache") is not None else None,
165
+ "namespace": obj.get("namespace"),
166
+ "termination": V1Termination.from_dict(obj.get("termination")) if obj.get("termination") is not None else None,
167
+ "plugins": V1Plugins.from_dict(obj.get("plugins")) if obj.get("plugins") is not None else None,
168
+ "schedule": obj.get("schedule"),
169
+ "events": [V1EventTrigger.from_dict(_item) for _item in obj.get("events")] if obj.get("events") is not None else None,
170
+ "build": V1Build.from_dict(obj.get("build")) if obj.get("build") 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
+ "inputs": [V1IO.from_dict(_item) for _item in obj.get("inputs")] if obj.get("inputs") is not None else None,
179
+ "outputs": [V1IO.from_dict(_item) for _item in obj.get("outputs")] if obj.get("outputs") is not None else None,
180
+ "contexts": [V1IO.from_dict(_item) for _item in obj.get("contexts")] if obj.get("contexts") is not None else None,
181
+ "is_approved": obj.get("isApproved"),
182
+ "cost": obj.get("cost"),
183
+ "run": obj.get("run")
184
+ })
185
+ return _obj
797
186
 
798
- return self.to_dict() != other.to_dict()