acceldata-sdk-python 26.7.0__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 (303) hide show
  1. acceldata/__init__.py +7 -0
  2. acceldata/client/__init__.py +0 -0
  3. acceldata/client/adoc_client.py +666 -0
  4. acceldata/client/http_client.py +346 -0
  5. acceldata/client/transient_retry.py +142 -0
  6. acceldata/constants/__init__.py +1 -0
  7. acceldata/constants/constants.py +13 -0
  8. acceldata/exceptions/__init__.py +52 -0
  9. acceldata/exceptions/api_errors.py +85 -0
  10. acceldata/exceptions/exceptions.py +174 -0
  11. acceldata/exceptions/sdk_exceptions.py +98 -0
  12. acceldata/mappers/__init__.py +21 -0
  13. acceldata/mappers/catalog_executions.py +107 -0
  14. acceldata/models/__init__.py +0 -0
  15. acceldata/models/api/catalog/above_configs.py +99 -0
  16. acceldata/models/api/catalog/above_configs_success.py +138 -0
  17. acceldata/models/api/catalog/absolute_configs.py +197 -0
  18. acceldata/models/api/catalog/absolute_configs_fallback.py +101 -0
  19. acceldata/models/api/catalog/absolute_threshold_config.py +105 -0
  20. acceldata/models/api/catalog/analysis_job_context.py +102 -0
  21. acceldata/models/api/catalog/analytics_pipeline.py +385 -0
  22. acceldata/models/api/catalog/analytics_pipeline_endpoint.py +136 -0
  23. acceldata/models/api/catalog/anomaly_config.py +95 -0
  24. acceldata/models/api/catalog/anomaly_details.py +119 -0
  25. acceldata/models/api/catalog/anomaly_threshold_config.py +105 -0
  26. acceldata/models/api/catalog/artifact.py +92 -0
  27. acceldata/models/api/catalog/assembly.py +171 -0
  28. acceldata/models/api/catalog/asset.py +162 -0
  29. acceldata/models/api/catalog/asset_catalog_listing.py +159 -0
  30. acceldata/models/api/catalog/asset_catalog_listing_response.py +102 -0
  31. acceldata/models/api/catalog/asset_label_request.py +96 -0
  32. acceldata/models/api/catalog/asset_progress.py +96 -0
  33. acceldata/models/api/catalog/asset_progress_details.py +117 -0
  34. acceldata/models/api/catalog/asset_tag.py +124 -0
  35. acceldata/models/api/catalog/asset_tag_info.py +140 -0
  36. acceldata/models/api/catalog/asset_tag_request.py +95 -0
  37. acceldata/models/api/catalog/asset_tag_response.py +96 -0
  38. acceldata/models/api/catalog/asset_tags_response.py +102 -0
  39. acceldata/models/api/catalog/asset_type.py +96 -0
  40. acceldata/models/api/catalog/auto_anomaly_feature_analysis.py +160 -0
  41. acceldata/models/api/catalog/auto_anomaly_item_execution.py +133 -0
  42. acceldata/models/api/catalog/auto_anomaly_meta_data.py +162 -0
  43. acceldata/models/api/catalog/auto_anomaly_rule_execution.py +102 -0
  44. acceldata/models/api/catalog/auto_anomaly_summary.py +124 -0
  45. acceldata/models/api/catalog/backing_asset.py +126 -0
  46. acceldata/models/api/catalog/below_configs.py +99 -0
  47. acceldata/models/api/catalog/big_decimal.py +100 -0
  48. acceldata/models/api/catalog/big_integer.py +98 -0
  49. acceldata/models/api/catalog/bounds_date_time_marker_config.py +110 -0
  50. acceldata/models/api/catalog/bounds_file_event_marker_config.py +108 -0
  51. acceldata/models/api/catalog/bounds_id_marker_config.py +96 -0
  52. acceldata/models/api/catalog/catalog_asset_meta_data.py +128 -0
  53. acceldata/models/api/catalog/changes_by_config.py +105 -0
  54. acceldata/models/api/catalog/column_mapping.py +139 -0
  55. acceldata/models/api/catalog/column_metadata.py +90 -0
  56. acceldata/models/api/catalog/column_metric_with_anomaly_details.py +119 -0
  57. acceldata/models/api/catalog/column_variable.py +111 -0
  58. acceldata/models/api/catalog/composite_policy_execution.py +102 -0
  59. acceldata/models/api/catalog/composite_policy_item_execution.py +104 -0
  60. acceldata/models/api/catalog/connection.py +118 -0
  61. acceldata/models/api/catalog/connection_test_result.py +106 -0
  62. acceldata/models/api/catalog/connection_type.py +90 -0
  63. acceldata/models/api/catalog/connection_types_response.py +96 -0
  64. acceldata/models/api/catalog/crawler.py +88 -0
  65. acceldata/models/api/catalog/crawler_action_response.py +90 -0
  66. acceldata/models/api/catalog/crawler_execution.py +147 -0
  67. acceldata/models/api/catalog/crawler_execution_response.py +102 -0
  68. acceldata/models/api/catalog/crawler_status_response.py +90 -0
  69. acceldata/models/api/catalog/create_profile.py +194 -0
  70. acceldata/models/api/catalog/custom_sql_config.py +121 -0
  71. acceldata/models/api/catalog/data_bricks_spark_resource_config.py +104 -0
  72. acceldata/models/api/catalog/data_cadence_rule.py +236 -0
  73. acceldata/models/api/catalog/data_cadence_rule_details.py +125 -0
  74. acceldata/models/api/catalog/data_cadence_rule_execution.py +102 -0
  75. acceldata/models/api/catalog/data_cadence_rule_item.py +104 -0
  76. acceldata/models/api/catalog/data_cadence_rule_item_execution.py +158 -0
  77. acceldata/models/api/catalog/data_cadence_rule_response.py +98 -0
  78. acceldata/models/api/catalog/data_drift_execution.py +102 -0
  79. acceldata/models/api/catalog/data_drift_item_execution.py +121 -0
  80. acceldata/models/api/catalog/data_quality_engine.py +90 -0
  81. acceldata/models/api/catalog/data_quality_execution.py +106 -0
  82. acceldata/models/api/catalog/data_quality_rule.py +323 -0
  83. acceldata/models/api/catalog/data_quality_rule_details.py +186 -0
  84. acceldata/models/api/catalog/data_quality_rule_response.py +120 -0
  85. acceldata/models/api/catalog/data_quality_rules_response.py +102 -0
  86. acceldata/models/api/catalog/databricks_compute_config.py +113 -0
  87. acceldata/models/api/catalog/dataplane_engine.py +105 -0
  88. acceldata/models/api/catalog/dataplane_health_metrics.py +101 -0
  89. acceldata/models/api/catalog/dataplane_job.py +216 -0
  90. acceldata/models/api/catalog/dataplane_job_status.py +113 -0
  91. acceldata/models/api/catalog/dataplane_request.py +96 -0
  92. acceldata/models/api/catalog/dataproc_compute_config.py +106 -0
  93. acceldata/models/api/catalog/dataproc_spark_resource_config.py +104 -0
  94. acceldata/models/api/catalog/date_based_partition_marker_config.py +116 -0
  95. acceldata/models/api/catalog/date_partitioning_marker_config.py +113 -0
  96. acceldata/models/api/catalog/date_time_marker_config.py +109 -0
  97. acceldata/models/api/catalog/day_month_year_based_partition_marker_config.py +124 -0
  98. acceldata/models/api/catalog/decreased_by_config.py +105 -0
  99. acceldata/models/api/catalog/delete_artifact_response.py +88 -0
  100. acceldata/models/api/catalog/dq_rule_execution.py +248 -0
  101. acceldata/models/api/catalog/drift.py +121 -0
  102. acceldata/models/api/catalog/enable_rule_request.py +88 -0
  103. acceldata/models/api/catalog/engine.py +90 -0
  104. acceldata/models/api/catalog/execution_cancellation_response.py +92 -0
  105. acceldata/models/api/catalog/execution_response.py +144 -0
  106. acceldata/models/api/catalog/execution_result.py +126 -0
  107. acceldata/models/api/catalog/executions_response.py +102 -0
  108. acceldata/models/api/catalog/failed_asset_detail.py +90 -0
  109. acceldata/models/api/catalog/failed_summary.py +98 -0
  110. acceldata/models/api/catalog/file.py +94 -0
  111. acceldata/models/api/catalog/file_marker_config.py +99 -0
  112. acceldata/models/api/catalog/generic_config_fallback.py +101 -0
  113. acceldata/models/api/catalog/generic_execution.py +221 -0
  114. acceldata/models/api/catalog/generic_rule_execution.py +137 -0
  115. acceldata/models/api/catalog/global_storage_config_dto.py +172 -0
  116. acceldata/models/api/catalog/hosted_dp_deployment_response.py +98 -0
  117. acceldata/models/api/catalog/id_marker_config.py +94 -0
  118. acceldata/models/api/catalog/increased_by_config.py +105 -0
  119. acceldata/models/api/catalog/item.py +160 -0
  120. acceldata/models/api/catalog/item_execution.py +192 -0
  121. acceldata/models/api/catalog/item_segment.py +131 -0
  122. acceldata/models/api/catalog/job_schedule.py +118 -0
  123. acceldata/models/api/catalog/job_spec.py +96 -0
  124. acceldata/models/api/catalog/kubernetes_metrics.py +91 -0
  125. acceldata/models/api/catalog/label.py +97 -0
  126. acceldata/models/api/catalog/livy_compute_config.py +103 -0
  127. acceldata/models/api/catalog/livy_spark_resource_config.py +106 -0
  128. acceldata/models/api/catalog/look_back_config.py +90 -0
  129. acceldata/models/api/catalog/manual_tag_request.py +92 -0
  130. acceldata/models/api/catalog/mapping.py +97 -0
  131. acceldata/models/api/catalog/marker.py +88 -0
  132. acceldata/models/api/catalog/marker_config.py +349 -0
  133. acceldata/models/api/catalog/marker_config_fallback.py +101 -0
  134. acceldata/models/api/catalog/meta.py +92 -0
  135. acceldata/models/api/catalog/meta_data.py +92 -0
  136. acceldata/models/api/catalog/meta_data_item.py +94 -0
  137. acceldata/models/api/catalog/mini_profile_request.py +112 -0
  138. acceldata/models/api/catalog/notification_payload.py +114 -0
  139. acceldata/models/api/catalog/offset_based_marker_config.py +97 -0
  140. acceldata/models/api/catalog/operational_config.py +92 -0
  141. acceldata/models/api/catalog/pattern_configuration.py +90 -0
  142. acceldata/models/api/catalog/pipe_line_request.py +92 -0
  143. acceldata/models/api/catalog/pipeline_compute_config.py +110 -0
  144. acceldata/models/api/catalog/policy_execution_marker_config.py +94 -0
  145. acceldata/models/api/catalog/policy_execution_request.py +229 -0
  146. acceldata/models/api/catalog/policy_group.py +114 -0
  147. acceldata/models/api/catalog/policy_transform_udf.py +113 -0
  148. acceldata/models/api/catalog/process_metrics.py +91 -0
  149. acceldata/models/api/catalog/profile_anomaly_details_response.py +109 -0
  150. acceldata/models/api/catalog/profile_anomaly_item_execution.py +127 -0
  151. acceldata/models/api/catalog/profile_anomaly_rule_execution.py +102 -0
  152. acceldata/models/api/catalog/profile_anomaly_rule_item.py +109 -0
  153. acceldata/models/api/catalog/profile_cancellation_response.py +92 -0
  154. acceldata/models/api/catalog/profile_request.py +211 -0
  155. acceldata/models/api/catalog/profile_request_response.py +92 -0
  156. acceldata/models/api/catalog/property_template.py +178 -0
  157. acceldata/models/api/catalog/property_templates.py +123 -0
  158. acceldata/models/api/catalog/pub_sub_lookback_marker_config.py +96 -0
  159. acceldata/models/api/catalog/pub_sub_timestamp_marker_config.py +108 -0
  160. acceldata/models/api/catalog/quality_rule.py +381 -0
  161. acceldata/models/api/catalog/quality_rule_execution_metrics.py +114 -0
  162. acceldata/models/api/catalog/quality_rule_with_latest_execution.py +115 -0
  163. acceldata/models/api/catalog/range_configs.py +109 -0
  164. acceldata/models/api/catalog/reconciliation_item.py +102 -0
  165. acceldata/models/api/catalog/reconciliation_item_execution.py +157 -0
  166. acceldata/models/api/catalog/reconciliation_rule.py +339 -0
  167. acceldata/models/api/catalog/reconciliation_rule_details.py +225 -0
  168. acceldata/models/api/catalog/reconciliation_rule_execution.py +102 -0
  169. acceldata/models/api/catalog/reconciliation_rule_response.py +98 -0
  170. acceldata/models/api/catalog/reconciliation_rules_response.py +102 -0
  171. acceldata/models/api/catalog/relative_config.py +197 -0
  172. acceldata/models/api/catalog/relative_config_fallback.py +101 -0
  173. acceldata/models/api/catalog/relative_threshold_config.py +111 -0
  174. acceldata/models/api/catalog/root_cause_analysis.py +108 -0
  175. acceldata/models/api/catalog/rule_execution.py +327 -0
  176. acceldata/models/api/catalog/rule_execution_result.py +90 -0
  177. acceldata/models/api/catalog/rule_item_result.py +125 -0
  178. acceldata/models/api/catalog/rule_meta_data.py +94 -0
  179. acceldata/models/api/catalog/rule_spark_sql_dynamic_filter_variable_mapping.py +100 -0
  180. acceldata/models/api/catalog/rule_tag.py +101 -0
  181. acceldata/models/api/catalog/rule_threshold_configuration.py +236 -0
  182. acceldata/models/api/catalog/rule_threshold_configuration_fallback.py +101 -0
  183. acceldata/models/api/catalog/rules_with_latest_execution_response.py +102 -0
  184. acceldata/models/api/catalog/sample_data_api_response.py +122 -0
  185. acceldata/models/api/catalog/schema_drift_item_execution.py +131 -0
  186. acceldata/models/api/catalog/schema_drift_rule_execution.py +102 -0
  187. acceldata/models/api/catalog/secret_manager_configuration.py +90 -0
  188. acceldata/models/api/catalog/secret_manager_configuration_with_option.py +98 -0
  189. acceldata/models/api/catalog/security_config.py +90 -0
  190. acceldata/models/api/catalog/segment_metric_json.py +142 -0
  191. acceldata/models/api/catalog/segments_analysis.py +145 -0
  192. acceldata/models/api/catalog/short_segment.py +97 -0
  193. acceldata/models/api/catalog/simple_quality_rule_response.py +92 -0
  194. acceldata/models/api/catalog/snapshot_data.py +117 -0
  195. acceldata/models/api/catalog/source_model.py +90 -0
  196. acceldata/models/api/catalog/source_type.py +100 -0
  197. acceldata/models/api/catalog/source_types_response.py +102 -0
  198. acceldata/models/api/catalog/spark_job_status.py +113 -0
  199. acceldata/models/api/catalog/spark_resource_config.py +114 -0
  200. acceldata/models/api/catalog/standard_response_assembly.py +92 -0
  201. acceldata/models/api/catalog/standard_response_crawler_action_response.py +92 -0
  202. acceldata/models/api/catalog/standard_response_crawler_status_response.py +92 -0
  203. acceldata/models/api/catalog/standard_response_delete_artifact_response.py +92 -0
  204. acceldata/models/api/catalog/standard_response_list.py +96 -0
  205. acceldata/models/api/catalog/standard_response_map.py +88 -0
  206. acceldata/models/api/catalog/standard_response_meta_data.py +92 -0
  207. acceldata/models/api/catalog/standard_response_mini_profile_request.py +92 -0
  208. acceldata/models/api/catalog/standard_response_profile_request.py +92 -0
  209. acceldata/models/api/catalog/start_profiling_request.py +92 -0
  210. acceldata/models/api/catalog/tag_domain.py +116 -0
  211. acceldata/models/api/catalog/threshold_breach_details.py +101 -0
  212. acceldata/models/api/catalog/time_based_config.py +92 -0
  213. acceldata/models/api/catalog/time_based_threshold_config.py +105 -0
  214. acceldata/models/api/catalog/timestamp_based_marker_config.py +115 -0
  215. acceldata/models/api/catalog/udf_variable.py +97 -0
  216. acceldata/models/api/catalog/yunikorn_compute_config.py +133 -0
  217. acceldata/models/api/catalog/yunikorn_spark_resource_config.py +154 -0
  218. acceldata/models/api/pipeline/big_decimal.py +100 -0
  219. acceldata/models/api/pipeline/big_integer.py +98 -0
  220. acceldata/models/api/pipeline/child_span_response.py +96 -0
  221. acceldata/models/api/pipeline/create_span_event.py +109 -0
  222. acceldata/models/api/pipeline/edge.py +108 -0
  223. acceldata/models/api/pipeline/event_alert_object.py +95 -0
  224. acceldata/models/api/pipeline/generic_config_fallback.py +101 -0
  225. acceldata/models/api/pipeline/identifier.py +146 -0
  226. acceldata/models/api/pipeline/job_request.py +130 -0
  227. acceldata/models/api/pipeline/meta.py +107 -0
  228. acceldata/models/api/pipeline/meta_data.py +92 -0
  229. acceldata/models/api/pipeline/metric.py +103 -0
  230. acceldata/models/api/pipeline/node.py +201 -0
  231. acceldata/models/api/pipeline/node_response.py +92 -0
  232. acceldata/models/api/pipeline/notification_payload.py +114 -0
  233. acceldata/models/api/pipeline/pipeline.py +152 -0
  234. acceldata/models/api/pipeline/pipeline_baseline_metric.py +92 -0
  235. acceldata/models/api/pipeline/pipeline_details.py +118 -0
  236. acceldata/models/api/pipeline/pipeline_details_response.py +102 -0
  237. acceldata/models/api/pipeline/pipeline_input_request.py +92 -0
  238. acceldata/models/api/pipeline/pipeline_listing_info.py +118 -0
  239. acceldata/models/api/pipeline/pipeline_response.py +92 -0
  240. acceldata/models/api/pipeline/pipeline_run.py +136 -0
  241. acceldata/models/api/pipeline/pipeline_run_request.py +92 -0
  242. acceldata/models/api/pipeline/pipeline_runs_response.py +102 -0
  243. acceldata/models/api/pipeline/pipeline_summary.py +98 -0
  244. acceldata/models/api/pipeline/pipelines_listing_response.py +102 -0
  245. acceldata/models/api/pipeline/policy_summary.py +102 -0
  246. acceldata/models/api/pipeline/span.py +115 -0
  247. acceldata/models/api/pipeline/span_event.py +114 -0
  248. acceldata/models/api/pipeline/span_event_request.py +92 -0
  249. acceldata/models/api/pipeline/span_event_response.py +92 -0
  250. acceldata/models/api/pipeline/span_request.py +94 -0
  251. acceldata/models/api/pipeline/spans_response.py +96 -0
  252. acceldata/models/api/pipeline/tag.py +97 -0
  253. acceldata/models/sdk/__init__.py +0 -0
  254. acceldata/models/sdk/catalog/__init__.py +105 -0
  255. acceldata/models/sdk/catalog/asset_resource.py +112 -0
  256. acceldata/models/sdk/catalog/asset_source_type.py +59 -0
  257. acceldata/models/sdk/catalog/custom_asset_metadata.py +11 -0
  258. acceldata/models/sdk/catalog/datasource_resource.py +88 -0
  259. acceldata/models/sdk/catalog/executor.py +524 -0
  260. acceldata/models/sdk/catalog/policy_execution_request.py +114 -0
  261. acceldata/models/sdk/catalog/policy_execution_type.py +16 -0
  262. acceldata/models/sdk/catalog/policy_filter.py +94 -0
  263. acceldata/models/sdk/catalog/policy_rule_resources.py +388 -0
  264. acceldata/models/sdk/catalog/profile_request_resource.py +77 -0
  265. acceldata/models/sdk/catalog/profiling.py +82 -0
  266. acceldata/models/sdk/catalog/profiling_configuration_error.py +5 -0
  267. acceldata/models/sdk/pipeline/__init__.py +62 -0
  268. acceldata/models/sdk/pipeline/create_job_input.py +108 -0
  269. acceldata/models/sdk/pipeline/create_pipeline_input_request.py +72 -0
  270. acceldata/models/sdk/pipeline/events/__init__.py +5 -0
  271. acceldata/models/sdk/pipeline/events/generic_event.py +31 -0
  272. acceldata/models/sdk/pipeline/events/log_event.py +34 -0
  273. acceldata/models/sdk/pipeline/events/span_event.py +8 -0
  274. acceldata/models/sdk/pipeline/pipeline_resource.py +171 -0
  275. acceldata/models/sdk/pipeline/pipeline_run_input.py +84 -0
  276. acceldata/models/sdk/pipeline/pipeline_run_resource.py +208 -0
  277. acceldata/models/sdk/pipeline/pipeline_source_type.py +20 -0
  278. acceldata/models/sdk/pipeline/span_resource.py +327 -0
  279. acceldata/openapi_deserialization_patches.py +161 -0
  280. acceldata/openapi_repr_patches.py +62 -0
  281. acceldata/services/__init__.py +0 -0
  282. acceldata/services/api_timestamp.py +31 -0
  283. acceldata/services/asset_service.py +651 -0
  284. acceldata/services/datasource_service.py +120 -0
  285. acceldata/services/generic_service.py +132 -0
  286. acceldata/services/marker_config.py +232 -0
  287. acceldata/services/pipeline_big_decimal_api.py +102 -0
  288. acceldata/services/pipeline_response_parse.py +209 -0
  289. acceldata/services/pipeline_service.py +494 -0
  290. acceldata/services/rule_service.py +620 -0
  291. acceldata/urls/__init__.py +1 -0
  292. acceldata/urls/catalog_urls.py +137 -0
  293. acceldata/urls/pipeline_urls.py +55 -0
  294. acceldata/utils/__init__.py +6 -0
  295. acceldata/utils/datetime_utils.py +16 -0
  296. acceldata/utils/operation_ack.py +22 -0
  297. acceldata/utils/span_helpers.py +95 -0
  298. acceldata/utils/time_range_utils.py +90 -0
  299. acceldata_sdk_python-26.7.0.dist-info/METADATA +26 -0
  300. acceldata_sdk_python-26.7.0.dist-info/RECORD +303 -0
  301. acceldata_sdk_python-26.7.0.dist-info/WHEEL +5 -0
  302. acceldata_sdk_python-26.7.0.dist-info/licenses/LICENSE +22 -0
  303. acceldata_sdk_python-26.7.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,323 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Catalog Control Plane API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from acceldata.models.api.catalog.backing_asset import BackingAsset
24
+ from acceldata.models.api.catalog.custom_sql_config import CustomSqlConfig
25
+ from acceldata.models.api.catalog.job_schedule import JobSchedule
26
+ from acceldata.models.api.catalog.label import Label
27
+ from acceldata.models.api.catalog.notification_payload import NotificationPayload
28
+ from acceldata.models.api.catalog.policy_group import PolicyGroup
29
+ from acceldata.models.api.catalog.rule_spark_sql_dynamic_filter_variable_mapping import RuleSparkSQLDynamicFilterVariableMapping
30
+ from acceldata.models.api.catalog.rule_tag import RuleTag
31
+ from acceldata.models.api.catalog.rule_threshold_configuration import RuleThresholdConfiguration
32
+ from acceldata.models.api.catalog.short_segment import ShortSegment
33
+ from acceldata.models.api.catalog.spark_resource_config import SparkResourceConfig
34
+ from typing import Optional, Set
35
+ from typing_extensions import Self
36
+ from pydantic_core import to_jsonable_python
37
+
38
+ class DataQualityRule(BaseModel):
39
+ """
40
+ DataQualityRule
41
+ """ # noqa: E501
42
+ additional_persisted_columns: List[StrictStr] = Field(alias="additionalPersistedColumns")
43
+ archival_reason: Optional[StrictStr] = Field(default=None, alias="archivalReason")
44
+ archived: StrictBool
45
+ auto_created: Optional[StrictBool] = Field(default=None, alias="autoCreated")
46
+ auto_retry_enabled: Optional[StrictBool] = Field(default=None, alias="autoRetryEnabled")
47
+ backing_asset: BackingAsset = Field(alias="backingAsset")
48
+ continue_execution_on_failure: StrictBool = Field(alias="continueExecutionOnFailure")
49
+ created_at: datetime = Field(alias="createdAt")
50
+ created_by: Optional[StrictStr] = Field(default=None, alias="createdBy")
51
+ custom_sql_config: Optional[CustomSqlConfig] = Field(default=None, alias="customSqlConfig")
52
+ description: Optional[StrictStr] = None
53
+ enabled: StrictBool
54
+ engine_type: Optional[StrictStr] = Field(default=None, description="Allowed values at generation time: SPARK, JDBC_SQL, POD.", alias="engineType")
55
+ execution_sequence: StrictInt = Field(alias="executionSequence")
56
+ execution_timeout_in_minutes: Optional[StrictInt] = Field(default=None, alias="executionTimeoutInMinutes")
57
+ filter: Optional[StrictStr] = None
58
+ id: Optional[StrictInt] = None
59
+ include_in_quality_score: StrictBool = Field(alias="includeInQualityScore")
60
+ is_composite_rule: StrictBool = Field(alias="isCompositeRule")
61
+ is_protected_resource: StrictBool = Field(alias="isProtectedResource")
62
+ job_schedule: Optional[JobSchedule] = Field(default=None, alias="jobSchedule")
63
+ labels: Optional[List[Label]] = None
64
+ last_updated_by: Optional[StrictStr] = Field(default=None, alias="lastUpdatedBy")
65
+ name: StrictStr
66
+ notification_channels: Optional[NotificationPayload] = Field(default=None, alias="notificationChannels")
67
+ parent_id: Optional[StrictInt] = Field(default=None, alias="parentId")
68
+ policy_groups: Optional[List[PolicyGroup]] = Field(default=None, alias="policyGroups")
69
+ policy_score_strategy: StrictStr = Field(description="Allowed values at generation time: CUSTOM, WEIGHTAGE, RULES.", alias="policyScoreStrategy")
70
+ resource_strategy_type: Optional[StrictStr] = Field(default=None, description="Allowed values at generation time: INVENTORY, CUSTOM.", alias="resourceStrategyType")
71
+ rule_set_id: Optional[StrictInt] = Field(default=None, alias="ruleSetId")
72
+ schedule: Optional[StrictStr] = None
73
+ scheduled: StrictBool
74
+ segments: Optional[List[ShortSegment]] = None
75
+ selected_resource_inventory: Optional[StrictStr] = Field(default=None, alias="selectedResourceInventory")
76
+ spark_filter_selected_columns: Optional[List[StrictStr]] = Field(default=None, alias="sparkFilterSelectedColumns")
77
+ spark_resource_config: Optional[SparkResourceConfig] = Field(default=None, alias="sparkResourceConfig")
78
+ spark_sql_dynamic_filter_variable_mapping: Optional[RuleSparkSQLDynamicFilterVariableMapping] = Field(default=None, alias="sparkSQLDynamicFilterVariableMapping")
79
+ spark_sql_filter_type: StrictStr = Field(description="Allowed values at generation time: STATIC, DYNAMIC.", alias="sparkSQLFilterType")
80
+ sub_type: Optional[StrictStr] = Field(default=None, description="Allowed values at generation time: ASSET, SQL.", alias="subType")
81
+ tags: Optional[List[RuleTag]] = None
82
+ tenant_id: Optional[StrictStr] = Field(default=None, alias="tenantId")
83
+ threshold_level: RuleThresholdConfiguration = Field(alias="thresholdLevel")
84
+ time_zone: StrictStr = Field(alias="timeZone")
85
+ total_execution_timeout_in_minutes: Optional[StrictInt] = Field(default=None, alias="totalExecutionTimeoutInMinutes")
86
+ treat_zero_rows_as_success: StrictBool = Field(alias="treatZeroRowsAsSuccess")
87
+ type: StrictStr = Field(description="Allowed values at generation time: DATA_QUALITY, RECONCILIATION, EQUALITY, DATA_DRIFT, SCHEMA_DRIFT, DATA_CADENCE, PROFILE_ANOMALY, AUTO_ANOMALY.")
88
+ updated_at: datetime = Field(alias="updatedAt")
89
+ version: StrictInt
90
+ __properties: ClassVar[List[str]] = ["additionalPersistedColumns", "archivalReason", "archived", "autoCreated", "autoRetryEnabled", "backingAsset", "continueExecutionOnFailure", "createdAt", "createdBy", "customSqlConfig", "description", "enabled", "engineType", "executionSequence", "executionTimeoutInMinutes", "filter", "id", "includeInQualityScore", "isCompositeRule", "isProtectedResource", "jobSchedule", "labels", "lastUpdatedBy", "name", "notificationChannels", "parentId", "policyGroups", "policyScoreStrategy", "resourceStrategyType", "ruleSetId", "schedule", "scheduled", "segments", "selectedResourceInventory", "sparkFilterSelectedColumns", "sparkResourceConfig", "sparkSQLDynamicFilterVariableMapping", "sparkSQLFilterType", "subType", "tags", "tenantId", "thresholdLevel", "timeZone", "totalExecutionTimeoutInMinutes", "treatZeroRowsAsSuccess", "type", "updatedAt", "version"]
91
+
92
+ model_config = ConfigDict(
93
+ validate_by_name=True,
94
+ validate_by_alias=True,
95
+ validate_assignment=True,
96
+ protected_namespaces=(),
97
+ )
98
+
99
+
100
+ def to_str(self) -> str:
101
+ """Returns the string representation of the model using alias"""
102
+ return pprint.pformat(self.model_dump(by_alias=True))
103
+
104
+ def to_json(self) -> str:
105
+ """Returns the JSON representation of the model using alias"""
106
+ return json.dumps(to_jsonable_python(self.to_dict()))
107
+
108
+ @classmethod
109
+ def from_json(cls, json_str: str) -> Optional[Self]:
110
+ """Create an instance of DataQualityRule from a JSON string"""
111
+ return cls.from_dict(json.loads(json_str))
112
+
113
+ def to_dict(self) -> Dict[str, Any]:
114
+ """Return the dictionary representation of the model using alias.
115
+
116
+ This has the following differences from calling pydantic's
117
+ `self.model_dump(by_alias=True)`:
118
+
119
+ * `None` is only added to the output dict for nullable fields that
120
+ were set at model initialization. Other fields with value `None`
121
+ are ignored.
122
+ """
123
+ excluded_fields: Set[str] = set([
124
+ ])
125
+
126
+ _dict = self.model_dump(
127
+ by_alias=True,
128
+ exclude=excluded_fields,
129
+ exclude_none=True,
130
+ )
131
+ # override the default output from pydantic by calling `to_dict()` of backing_asset
132
+ if self.backing_asset:
133
+ _dict['backingAsset'] = self.backing_asset.to_dict()
134
+ # override the default output from pydantic by calling `to_dict()` of custom_sql_config
135
+ if self.custom_sql_config:
136
+ _dict['customSqlConfig'] = self.custom_sql_config.to_dict()
137
+ # override the default output from pydantic by calling `to_dict()` of job_schedule
138
+ if self.job_schedule:
139
+ _dict['jobSchedule'] = self.job_schedule.to_dict()
140
+ # override the default output from pydantic by calling `to_dict()` of each item in labels (list)
141
+ _items = []
142
+ if self.labels:
143
+ for _item_labels in self.labels:
144
+ if _item_labels:
145
+ _items.append(_item_labels.to_dict())
146
+ _dict['labels'] = _items
147
+ # override the default output from pydantic by calling `to_dict()` of notification_channels
148
+ if self.notification_channels:
149
+ _dict['notificationChannels'] = self.notification_channels.to_dict()
150
+ # override the default output from pydantic by calling `to_dict()` of each item in policy_groups (list)
151
+ _items = []
152
+ if self.policy_groups:
153
+ for _item_policy_groups in self.policy_groups:
154
+ if _item_policy_groups:
155
+ _items.append(_item_policy_groups.to_dict())
156
+ _dict['policyGroups'] = _items
157
+ # override the default output from pydantic by calling `to_dict()` of each item in segments (list)
158
+ _items = []
159
+ if self.segments:
160
+ for _item_segments in self.segments:
161
+ if _item_segments:
162
+ _items.append(_item_segments.to_dict())
163
+ _dict['segments'] = _items
164
+ # override the default output from pydantic by calling `to_dict()` of spark_resource_config
165
+ if self.spark_resource_config:
166
+ _dict['sparkResourceConfig'] = self.spark_resource_config.to_dict()
167
+ # override the default output from pydantic by calling `to_dict()` of spark_sql_dynamic_filter_variable_mapping
168
+ if self.spark_sql_dynamic_filter_variable_mapping:
169
+ _dict['sparkSQLDynamicFilterVariableMapping'] = self.spark_sql_dynamic_filter_variable_mapping.to_dict()
170
+ # override the default output from pydantic by calling `to_dict()` of each item in tags (list)
171
+ _items = []
172
+ if self.tags:
173
+ for _item_tags in self.tags:
174
+ if _item_tags:
175
+ _items.append(_item_tags.to_dict())
176
+ _dict['tags'] = _items
177
+ # override the default output from pydantic by calling `to_dict()` of threshold_level
178
+ if self.threshold_level:
179
+ _dict['thresholdLevel'] = self.threshold_level.to_dict()
180
+ # set to None if archival_reason (nullable) is None
181
+ # and model_fields_set contains the field
182
+ if self.archival_reason is None and "archival_reason" in self.model_fields_set:
183
+ _dict['archivalReason'] = None
184
+
185
+ # set to None if created_by (nullable) is None
186
+ # and model_fields_set contains the field
187
+ if self.created_by is None and "created_by" in self.model_fields_set:
188
+ _dict['createdBy'] = None
189
+
190
+ # set to None if description (nullable) is None
191
+ # and model_fields_set contains the field
192
+ if self.description is None and "description" in self.model_fields_set:
193
+ _dict['description'] = None
194
+
195
+ # set to None if engine_type (nullable) is None
196
+ # and model_fields_set contains the field
197
+ if self.engine_type is None and "engine_type" in self.model_fields_set:
198
+ _dict['engineType'] = None
199
+
200
+ # set to None if filter (nullable) is None
201
+ # and model_fields_set contains the field
202
+ if self.filter is None and "filter" in self.model_fields_set:
203
+ _dict['filter'] = None
204
+
205
+ # set to None if labels (nullable) is None
206
+ # and model_fields_set contains the field
207
+ if self.labels is None and "labels" in self.model_fields_set:
208
+ _dict['labels'] = None
209
+
210
+ # set to None if last_updated_by (nullable) is None
211
+ # and model_fields_set contains the field
212
+ if self.last_updated_by is None and "last_updated_by" in self.model_fields_set:
213
+ _dict['lastUpdatedBy'] = None
214
+
215
+ # set to None if policy_groups (nullable) is None
216
+ # and model_fields_set contains the field
217
+ if self.policy_groups is None and "policy_groups" in self.model_fields_set:
218
+ _dict['policyGroups'] = None
219
+
220
+ # set to None if resource_strategy_type (nullable) is None
221
+ # and model_fields_set contains the field
222
+ if self.resource_strategy_type is None and "resource_strategy_type" in self.model_fields_set:
223
+ _dict['resourceStrategyType'] = None
224
+
225
+ # set to None if schedule (nullable) is None
226
+ # and model_fields_set contains the field
227
+ if self.schedule is None and "schedule" in self.model_fields_set:
228
+ _dict['schedule'] = None
229
+
230
+ # set to None if segments (nullable) is None
231
+ # and model_fields_set contains the field
232
+ if self.segments is None and "segments" in self.model_fields_set:
233
+ _dict['segments'] = None
234
+
235
+ # set to None if selected_resource_inventory (nullable) is None
236
+ # and model_fields_set contains the field
237
+ if self.selected_resource_inventory is None and "selected_resource_inventory" in self.model_fields_set:
238
+ _dict['selectedResourceInventory'] = None
239
+
240
+ # set to None if spark_filter_selected_columns (nullable) is None
241
+ # and model_fields_set contains the field
242
+ if self.spark_filter_selected_columns is None and "spark_filter_selected_columns" in self.model_fields_set:
243
+ _dict['sparkFilterSelectedColumns'] = None
244
+
245
+ # set to None if sub_type (nullable) is None
246
+ # and model_fields_set contains the field
247
+ if self.sub_type is None and "sub_type" in self.model_fields_set:
248
+ _dict['subType'] = None
249
+
250
+ # set to None if tags (nullable) is None
251
+ # and model_fields_set contains the field
252
+ if self.tags is None and "tags" in self.model_fields_set:
253
+ _dict['tags'] = None
254
+
255
+ # set to None if tenant_id (nullable) is None
256
+ # and model_fields_set contains the field
257
+ if self.tenant_id is None and "tenant_id" in self.model_fields_set:
258
+ _dict['tenantId'] = None
259
+
260
+ return _dict
261
+
262
+ @classmethod
263
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
264
+ """Create an instance of DataQualityRule from a dict"""
265
+ if obj is None:
266
+ return None
267
+
268
+ if not isinstance(obj, dict):
269
+ return cls.model_validate(obj)
270
+
271
+ _obj = cls.model_validate({
272
+ "additionalPersistedColumns": obj.get("additionalPersistedColumns"),
273
+ "archivalReason": obj.get("archivalReason"),
274
+ "archived": obj.get("archived"),
275
+ "autoCreated": obj.get("autoCreated"),
276
+ "autoRetryEnabled": obj.get("autoRetryEnabled"),
277
+ "backingAsset": BackingAsset.from_dict(obj["backingAsset"]) if obj.get("backingAsset") is not None else None,
278
+ "continueExecutionOnFailure": obj.get("continueExecutionOnFailure"),
279
+ "createdAt": obj.get("createdAt"),
280
+ "createdBy": obj.get("createdBy"),
281
+ "customSqlConfig": CustomSqlConfig.from_dict(obj["customSqlConfig"]) if obj.get("customSqlConfig") is not None else None,
282
+ "description": obj.get("description"),
283
+ "enabled": obj.get("enabled"),
284
+ "engineType": obj.get("engineType"),
285
+ "executionSequence": obj.get("executionSequence"),
286
+ "executionTimeoutInMinutes": obj.get("executionTimeoutInMinutes"),
287
+ "filter": obj.get("filter"),
288
+ "id": obj.get("id"),
289
+ "includeInQualityScore": obj.get("includeInQualityScore"),
290
+ "isCompositeRule": obj.get("isCompositeRule"),
291
+ "isProtectedResource": obj.get("isProtectedResource"),
292
+ "jobSchedule": JobSchedule.from_dict(obj["jobSchedule"]) if obj.get("jobSchedule") is not None else None,
293
+ "labels": [Label.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
294
+ "lastUpdatedBy": obj.get("lastUpdatedBy"),
295
+ "name": obj.get("name"),
296
+ "notificationChannels": NotificationPayload.from_dict(obj["notificationChannels"]) if obj.get("notificationChannels") is not None else None,
297
+ "parentId": obj.get("parentId"),
298
+ "policyGroups": [PolicyGroup.from_dict(_item) for _item in obj["policyGroups"]] if obj.get("policyGroups") is not None else None,
299
+ "policyScoreStrategy": obj.get("policyScoreStrategy"),
300
+ "resourceStrategyType": obj.get("resourceStrategyType"),
301
+ "ruleSetId": obj.get("ruleSetId"),
302
+ "schedule": obj.get("schedule"),
303
+ "scheduled": obj.get("scheduled"),
304
+ "segments": [ShortSegment.from_dict(_item) for _item in obj["segments"]] if obj.get("segments") is not None else None,
305
+ "selectedResourceInventory": obj.get("selectedResourceInventory"),
306
+ "sparkFilterSelectedColumns": obj.get("sparkFilterSelectedColumns"),
307
+ "sparkResourceConfig": SparkResourceConfig.from_dict(obj["sparkResourceConfig"]) if obj.get("sparkResourceConfig") is not None else None,
308
+ "sparkSQLDynamicFilterVariableMapping": RuleSparkSQLDynamicFilterVariableMapping.from_dict(obj["sparkSQLDynamicFilterVariableMapping"]) if obj.get("sparkSQLDynamicFilterVariableMapping") is not None else None,
309
+ "sparkSQLFilterType": obj.get("sparkSQLFilterType"),
310
+ "subType": obj.get("subType"),
311
+ "tags": [RuleTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None,
312
+ "tenantId": obj.get("tenantId"),
313
+ "thresholdLevel": RuleThresholdConfiguration.from_dict(obj["thresholdLevel"]) if obj.get("thresholdLevel") is not None else None,
314
+ "timeZone": obj.get("timeZone"),
315
+ "totalExecutionTimeoutInMinutes": obj.get("totalExecutionTimeoutInMinutes"),
316
+ "treatZeroRowsAsSuccess": obj.get("treatZeroRowsAsSuccess"),
317
+ "type": obj.get("type"),
318
+ "updatedAt": obj.get("updatedAt"),
319
+ "version": obj.get("version")
320
+ })
321
+ return _obj
322
+
323
+
@@ -0,0 +1,186 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Catalog Control Plane API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from acceldata.models.api.catalog.custom_sql_config import CustomSqlConfig
23
+ from acceldata.models.api.catalog.item import Item
24
+ from acceldata.models.api.catalog.job_schedule import JobSchedule
25
+ from acceldata.models.api.catalog.policy_transform_udf import PolicyTransformUDF
26
+ from acceldata.models.api.catalog.short_segment import ShortSegment
27
+ from typing import Optional, Set
28
+ from typing_extensions import Self
29
+ from pydantic_core import to_jsonable_python
30
+
31
+ class DataQualityRuleDetails(BaseModel):
32
+ """
33
+ DataQualityRuleDetails
34
+ """ # noqa: E501
35
+ backing_asset_id: StrictInt = Field(alias="backingAssetId")
36
+ continue_execution_on_failure: StrictBool = Field(alias="continueExecutionOnFailure")
37
+ custom_sql_config: Optional[CustomSqlConfig] = Field(default=None, alias="customSqlConfig")
38
+ engine_type: Optional[StrictStr] = Field(default=None, description="Allowed values at generation time: SPARK, JDBC_SQL, POD.", alias="engineType")
39
+ execution_sequence: StrictInt = Field(alias="executionSequence")
40
+ filter: Optional[StrictStr] = None
41
+ id: Optional[StrictInt] = None
42
+ is_composite_rule: StrictBool = Field(alias="isCompositeRule")
43
+ is_segmented: StrictBool = Field(alias="isSegmented")
44
+ items: List[Item]
45
+ job_schedule: Optional[JobSchedule] = Field(default=None, alias="jobSchedule")
46
+ parent_id: Optional[StrictInt] = Field(default=None, alias="parentId")
47
+ policy_score_strategy: StrictStr = Field(description="Allowed values at generation time: CUSTOM, WEIGHTAGE, RULES.", alias="policyScoreStrategy")
48
+ rule_id: StrictInt = Field(alias="ruleId")
49
+ segments: Optional[List[ShortSegment]] = None
50
+ sub_type: Optional[StrictStr] = Field(default=None, description="Allowed values at generation time: ASSET, SQL.", alias="subType")
51
+ tenant_id: Optional[StrictStr] = Field(default=None, alias="tenantId")
52
+ transform_udfs: Optional[List[PolicyTransformUDF]] = Field(default=None, alias="transformUDFs")
53
+ treat_zero_rows_as_success: StrictBool = Field(alias="treatZeroRowsAsSuccess")
54
+ __properties: ClassVar[List[str]] = ["backingAssetId", "continueExecutionOnFailure", "customSqlConfig", "engineType", "executionSequence", "filter", "id", "isCompositeRule", "isSegmented", "items", "jobSchedule", "parentId", "policyScoreStrategy", "ruleId", "segments", "subType", "tenantId", "transformUDFs", "treatZeroRowsAsSuccess"]
55
+
56
+ model_config = ConfigDict(
57
+ validate_by_name=True,
58
+ validate_by_alias=True,
59
+ validate_assignment=True,
60
+ protected_namespaces=(),
61
+ )
62
+
63
+
64
+ def to_str(self) -> str:
65
+ """Returns the string representation of the model using alias"""
66
+ return pprint.pformat(self.model_dump(by_alias=True))
67
+
68
+ def to_json(self) -> str:
69
+ """Returns the JSON representation of the model using alias"""
70
+ return json.dumps(to_jsonable_python(self.to_dict()))
71
+
72
+ @classmethod
73
+ def from_json(cls, json_str: str) -> Optional[Self]:
74
+ """Create an instance of DataQualityRuleDetails from a JSON string"""
75
+ return cls.from_dict(json.loads(json_str))
76
+
77
+ def to_dict(self) -> Dict[str, Any]:
78
+ """Return the dictionary representation of the model using alias.
79
+
80
+ This has the following differences from calling pydantic's
81
+ `self.model_dump(by_alias=True)`:
82
+
83
+ * `None` is only added to the output dict for nullable fields that
84
+ were set at model initialization. Other fields with value `None`
85
+ are ignored.
86
+ """
87
+ excluded_fields: Set[str] = set([
88
+ ])
89
+
90
+ _dict = self.model_dump(
91
+ by_alias=True,
92
+ exclude=excluded_fields,
93
+ exclude_none=True,
94
+ )
95
+ # override the default output from pydantic by calling `to_dict()` of custom_sql_config
96
+ if self.custom_sql_config:
97
+ _dict['customSqlConfig'] = self.custom_sql_config.to_dict()
98
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
99
+ _items = []
100
+ if self.items:
101
+ for _item_items in self.items:
102
+ if _item_items:
103
+ _items.append(_item_items.to_dict())
104
+ _dict['items'] = _items
105
+ # override the default output from pydantic by calling `to_dict()` of job_schedule
106
+ if self.job_schedule:
107
+ _dict['jobSchedule'] = self.job_schedule.to_dict()
108
+ # override the default output from pydantic by calling `to_dict()` of each item in segments (list)
109
+ _items = []
110
+ if self.segments:
111
+ for _item_segments in self.segments:
112
+ if _item_segments:
113
+ _items.append(_item_segments.to_dict())
114
+ _dict['segments'] = _items
115
+ # override the default output from pydantic by calling `to_dict()` of each item in transform_udfs (list)
116
+ _items = []
117
+ if self.transform_udfs:
118
+ for _item_transform_udfs in self.transform_udfs:
119
+ if _item_transform_udfs:
120
+ _items.append(_item_transform_udfs.to_dict())
121
+ _dict['transformUDFs'] = _items
122
+ # set to None if engine_type (nullable) is None
123
+ # and model_fields_set contains the field
124
+ if self.engine_type is None and "engine_type" in self.model_fields_set:
125
+ _dict['engineType'] = None
126
+
127
+ # set to None if filter (nullable) is None
128
+ # and model_fields_set contains the field
129
+ if self.filter is None and "filter" in self.model_fields_set:
130
+ _dict['filter'] = None
131
+
132
+ # set to None if segments (nullable) is None
133
+ # and model_fields_set contains the field
134
+ if self.segments is None and "segments" in self.model_fields_set:
135
+ _dict['segments'] = None
136
+
137
+ # set to None if sub_type (nullable) is None
138
+ # and model_fields_set contains the field
139
+ if self.sub_type is None and "sub_type" in self.model_fields_set:
140
+ _dict['subType'] = None
141
+
142
+ # set to None if tenant_id (nullable) is None
143
+ # and model_fields_set contains the field
144
+ if self.tenant_id is None and "tenant_id" in self.model_fields_set:
145
+ _dict['tenantId'] = None
146
+
147
+ # set to None if transform_udfs (nullable) is None
148
+ # and model_fields_set contains the field
149
+ if self.transform_udfs is None and "transform_udfs" in self.model_fields_set:
150
+ _dict['transformUDFs'] = None
151
+
152
+ return _dict
153
+
154
+ @classmethod
155
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
156
+ """Create an instance of DataQualityRuleDetails from a dict"""
157
+ if obj is None:
158
+ return None
159
+
160
+ if not isinstance(obj, dict):
161
+ return cls.model_validate(obj)
162
+
163
+ _obj = cls.model_validate({
164
+ "backingAssetId": obj.get("backingAssetId"),
165
+ "continueExecutionOnFailure": obj.get("continueExecutionOnFailure"),
166
+ "customSqlConfig": CustomSqlConfig.from_dict(obj["customSqlConfig"]) if obj.get("customSqlConfig") is not None else None,
167
+ "engineType": obj.get("engineType"),
168
+ "executionSequence": obj.get("executionSequence"),
169
+ "filter": obj.get("filter"),
170
+ "id": obj.get("id"),
171
+ "isCompositeRule": obj.get("isCompositeRule"),
172
+ "isSegmented": obj.get("isSegmented"),
173
+ "items": [Item.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
174
+ "jobSchedule": JobSchedule.from_dict(obj["jobSchedule"]) if obj.get("jobSchedule") is not None else None,
175
+ "parentId": obj.get("parentId"),
176
+ "policyScoreStrategy": obj.get("policyScoreStrategy"),
177
+ "ruleId": obj.get("ruleId"),
178
+ "segments": [ShortSegment.from_dict(_item) for _item in obj["segments"]] if obj.get("segments") is not None else None,
179
+ "subType": obj.get("subType"),
180
+ "tenantId": obj.get("tenantId"),
181
+ "transformUDFs": [PolicyTransformUDF.from_dict(_item) for _item in obj["transformUDFs"]] if obj.get("transformUDFs") is not None else None,
182
+ "treatZeroRowsAsSuccess": obj.get("treatZeroRowsAsSuccess")
183
+ })
184
+ return _obj
185
+
186
+
@@ -0,0 +1,120 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Catalog Control Plane API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from acceldata.models.api.catalog.data_quality_rule import DataQualityRule
23
+ from acceldata.models.api.catalog.data_quality_rule_details import DataQualityRuleDetails
24
+ from acceldata.models.api.catalog.dataplane_engine import DataplaneEngine
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+ from pydantic_core import to_jsonable_python
28
+
29
+ class DataQualityRuleResponse(BaseModel):
30
+ """
31
+ DataQualityRuleResponse
32
+ """ # noqa: E501
33
+ child_rules: Optional[List[DataQualityRuleResponse]] = Field(default=None, alias="childRules")
34
+ details: Optional[DataQualityRuleDetails] = None
35
+ engine: Optional[DataplaneEngine] = None
36
+ rule: DataQualityRule
37
+ __properties: ClassVar[List[str]] = ["childRules", "details", "engine", "rule"]
38
+
39
+ model_config = ConfigDict(
40
+ validate_by_name=True,
41
+ validate_by_alias=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
45
+
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.model_dump(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ return json.dumps(to_jsonable_python(self.to_dict()))
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of DataQualityRuleResponse from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of each item in child_rules (list)
79
+ _items = []
80
+ if self.child_rules:
81
+ for _item_child_rules in self.child_rules:
82
+ if _item_child_rules:
83
+ _items.append(_item_child_rules.to_dict())
84
+ _dict['childRules'] = _items
85
+ # override the default output from pydantic by calling `to_dict()` of details
86
+ if self.details:
87
+ _dict['details'] = self.details.to_dict()
88
+ # override the default output from pydantic by calling `to_dict()` of engine
89
+ if self.engine:
90
+ _dict['engine'] = self.engine.to_dict()
91
+ # override the default output from pydantic by calling `to_dict()` of rule
92
+ if self.rule:
93
+ _dict['rule'] = self.rule.to_dict()
94
+ # set to None if child_rules (nullable) is None
95
+ # and model_fields_set contains the field
96
+ if self.child_rules is None and "child_rules" in self.model_fields_set:
97
+ _dict['childRules'] = None
98
+
99
+ return _dict
100
+
101
+ @classmethod
102
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
103
+ """Create an instance of DataQualityRuleResponse from a dict"""
104
+ if obj is None:
105
+ return None
106
+
107
+ if not isinstance(obj, dict):
108
+ return cls.model_validate(obj)
109
+
110
+ _obj = cls.model_validate({
111
+ "childRules": [DataQualityRuleResponse.from_dict(_item) for _item in obj["childRules"]] if obj.get("childRules") is not None else None,
112
+ "details": DataQualityRuleDetails.from_dict(obj["details"]) if obj.get("details") is not None else None,
113
+ "engine": DataplaneEngine.from_dict(obj["engine"]) if obj.get("engine") is not None else None,
114
+ "rule": DataQualityRule.from_dict(obj["rule"]) if obj.get("rule") is not None else None
115
+ })
116
+ return _obj
117
+
118
+ # TODO: Rewrite to not use raise_errors
119
+ DataQualityRuleResponse.model_rebuild(raise_errors=False)
120
+