databricks-sdk 0.38.0__py3-none-any.whl → 0.40.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.

Potentially problematic release.


This version of databricks-sdk might be problematic. Click here for more details.

Files changed (29) hide show
  1. databricks/sdk/__init__.py +36 -1
  2. databricks/sdk/mixins/open_ai_client.py +2 -2
  3. databricks/sdk/service/apps.py +175 -0
  4. databricks/sdk/service/billing.py +247 -0
  5. databricks/sdk/service/catalog.py +1795 -62
  6. databricks/sdk/service/cleanrooms.py +1281 -0
  7. databricks/sdk/service/compute.py +1843 -67
  8. databricks/sdk/service/dashboards.py +342 -3
  9. databricks/sdk/service/files.py +162 -2
  10. databricks/sdk/service/iam.py +351 -0
  11. databricks/sdk/service/jobs.py +1355 -24
  12. databricks/sdk/service/marketplace.py +688 -0
  13. databricks/sdk/service/ml.py +1038 -2
  14. databricks/sdk/service/oauth2.py +636 -0
  15. databricks/sdk/service/pipelines.py +524 -4
  16. databricks/sdk/service/provisioning.py +387 -0
  17. databricks/sdk/service/serving.py +615 -0
  18. databricks/sdk/service/settings.py +1186 -1
  19. databricks/sdk/service/sharing.py +326 -2
  20. databricks/sdk/service/sql.py +1186 -2
  21. databricks/sdk/service/vectorsearch.py +290 -0
  22. databricks/sdk/service/workspace.py +451 -0
  23. databricks/sdk/version.py +1 -1
  24. {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/METADATA +26 -26
  25. {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/RECORD +29 -28
  26. {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/WHEEL +1 -1
  27. {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/LICENSE +0 -0
  28. {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/NOTICE +0 -0
  29. {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/top_level.txt +0 -0
@@ -36,6 +36,14 @@ class AccessControl:
36
36
  if self.user_name is not None: body['user_name'] = self.user_name
37
37
  return body
38
38
 
39
+ def as_shallow_dict(self) -> dict:
40
+ """Serializes the AccessControl into a shallow dictionary of its immediate attributes."""
41
+ body = {}
42
+ if self.group_name is not None: body['group_name'] = self.group_name
43
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
44
+ if self.user_name is not None: body['user_name'] = self.user_name
45
+ return body
46
+
39
47
  @classmethod
40
48
  def from_dict(cls, d: Dict[str, any]) -> AccessControl:
41
49
  """Deserializes the AccessControl from a dictionary."""
@@ -118,6 +126,26 @@ class Alert:
118
126
  if self.update_time is not None: body['update_time'] = self.update_time
119
127
  return body
120
128
 
129
+ def as_shallow_dict(self) -> dict:
130
+ """Serializes the Alert into a shallow dictionary of its immediate attributes."""
131
+ body = {}
132
+ if self.condition: body['condition'] = self.condition
133
+ if self.create_time is not None: body['create_time'] = self.create_time
134
+ if self.custom_body is not None: body['custom_body'] = self.custom_body
135
+ if self.custom_subject is not None: body['custom_subject'] = self.custom_subject
136
+ if self.display_name is not None: body['display_name'] = self.display_name
137
+ if self.id is not None: body['id'] = self.id
138
+ if self.lifecycle_state is not None: body['lifecycle_state'] = self.lifecycle_state
139
+ if self.notify_on_ok is not None: body['notify_on_ok'] = self.notify_on_ok
140
+ if self.owner_user_name is not None: body['owner_user_name'] = self.owner_user_name
141
+ if self.parent_path is not None: body['parent_path'] = self.parent_path
142
+ if self.query_id is not None: body['query_id'] = self.query_id
143
+ if self.seconds_to_retrigger is not None: body['seconds_to_retrigger'] = self.seconds_to_retrigger
144
+ if self.state is not None: body['state'] = self.state
145
+ if self.trigger_time is not None: body['trigger_time'] = self.trigger_time
146
+ if self.update_time is not None: body['update_time'] = self.update_time
147
+ return body
148
+
121
149
  @classmethod
122
150
  def from_dict(cls, d: Dict[str, any]) -> Alert:
123
151
  """Deserializes the Alert from a dictionary."""
@@ -161,6 +189,15 @@ class AlertCondition:
161
189
  if self.threshold: body['threshold'] = self.threshold.as_dict()
162
190
  return body
163
191
 
192
+ def as_shallow_dict(self) -> dict:
193
+ """Serializes the AlertCondition into a shallow dictionary of its immediate attributes."""
194
+ body = {}
195
+ if self.empty_result_state is not None: body['empty_result_state'] = self.empty_result_state
196
+ if self.op is not None: body['op'] = self.op
197
+ if self.operand: body['operand'] = self.operand
198
+ if self.threshold: body['threshold'] = self.threshold
199
+ return body
200
+
164
201
  @classmethod
165
202
  def from_dict(cls, d: Dict[str, any]) -> AlertCondition:
166
203
  """Deserializes the AlertCondition from a dictionary."""
@@ -180,6 +217,12 @@ class AlertConditionOperand:
180
217
  if self.column: body['column'] = self.column.as_dict()
181
218
  return body
182
219
 
220
+ def as_shallow_dict(self) -> dict:
221
+ """Serializes the AlertConditionOperand into a shallow dictionary of its immediate attributes."""
222
+ body = {}
223
+ if self.column: body['column'] = self.column
224
+ return body
225
+
183
226
  @classmethod
184
227
  def from_dict(cls, d: Dict[str, any]) -> AlertConditionOperand:
185
228
  """Deserializes the AlertConditionOperand from a dictionary."""
@@ -196,6 +239,12 @@ class AlertConditionThreshold:
196
239
  if self.value: body['value'] = self.value.as_dict()
197
240
  return body
198
241
 
242
+ def as_shallow_dict(self) -> dict:
243
+ """Serializes the AlertConditionThreshold into a shallow dictionary of its immediate attributes."""
244
+ body = {}
245
+ if self.value: body['value'] = self.value
246
+ return body
247
+
199
248
  @classmethod
200
249
  def from_dict(cls, d: Dict[str, any]) -> AlertConditionThreshold:
201
250
  """Deserializes the AlertConditionThreshold from a dictionary."""
@@ -212,6 +261,12 @@ class AlertOperandColumn:
212
261
  if self.name is not None: body['name'] = self.name
213
262
  return body
214
263
 
264
+ def as_shallow_dict(self) -> dict:
265
+ """Serializes the AlertOperandColumn into a shallow dictionary of its immediate attributes."""
266
+ body = {}
267
+ if self.name is not None: body['name'] = self.name
268
+ return body
269
+
215
270
  @classmethod
216
271
  def from_dict(cls, d: Dict[str, any]) -> AlertOperandColumn:
217
272
  """Deserializes the AlertOperandColumn from a dictionary."""
@@ -234,6 +289,14 @@ class AlertOperandValue:
234
289
  if self.string_value is not None: body['string_value'] = self.string_value
235
290
  return body
236
291
 
292
+ def as_shallow_dict(self) -> dict:
293
+ """Serializes the AlertOperandValue into a shallow dictionary of its immediate attributes."""
294
+ body = {}
295
+ if self.bool_value is not None: body['bool_value'] = self.bool_value
296
+ if self.double_value is not None: body['double_value'] = self.double_value
297
+ if self.string_value is not None: body['string_value'] = self.string_value
298
+ return body
299
+
237
300
  @classmethod
238
301
  def from_dict(cls, d: Dict[str, any]) -> AlertOperandValue:
239
302
  """Deserializes the AlertOperandValue from a dictionary."""
@@ -297,6 +360,18 @@ class AlertOptions:
297
360
  if self.value: body['value'] = self.value
298
361
  return body
299
362
 
363
+ def as_shallow_dict(self) -> dict:
364
+ """Serializes the AlertOptions into a shallow dictionary of its immediate attributes."""
365
+ body = {}
366
+ if self.column is not None: body['column'] = self.column
367
+ if self.custom_body is not None: body['custom_body'] = self.custom_body
368
+ if self.custom_subject is not None: body['custom_subject'] = self.custom_subject
369
+ if self.empty_result_state is not None: body['empty_result_state'] = self.empty_result_state
370
+ if self.muted is not None: body['muted'] = self.muted
371
+ if self.op is not None: body['op'] = self.op
372
+ if self.value: body['value'] = self.value
373
+ return body
374
+
300
375
  @classmethod
301
376
  def from_dict(cls, d: Dict[str, any]) -> AlertOptions:
302
377
  """Deserializes the AlertOptions from a dictionary."""
@@ -382,6 +457,24 @@ class AlertQuery:
382
457
  if self.user_id is not None: body['user_id'] = self.user_id
383
458
  return body
384
459
 
460
+ def as_shallow_dict(self) -> dict:
461
+ """Serializes the AlertQuery into a shallow dictionary of its immediate attributes."""
462
+ body = {}
463
+ if self.created_at is not None: body['created_at'] = self.created_at
464
+ if self.data_source_id is not None: body['data_source_id'] = self.data_source_id
465
+ if self.description is not None: body['description'] = self.description
466
+ if self.id is not None: body['id'] = self.id
467
+ if self.is_archived is not None: body['is_archived'] = self.is_archived
468
+ if self.is_draft is not None: body['is_draft'] = self.is_draft
469
+ if self.is_safe is not None: body['is_safe'] = self.is_safe
470
+ if self.name is not None: body['name'] = self.name
471
+ if self.options: body['options'] = self.options
472
+ if self.query is not None: body['query'] = self.query
473
+ if self.tags: body['tags'] = self.tags
474
+ if self.updated_at is not None: body['updated_at'] = self.updated_at
475
+ if self.user_id is not None: body['user_id'] = self.user_id
476
+ return body
477
+
385
478
  @classmethod
386
479
  def from_dict(cls, d: Dict[str, any]) -> AlertQuery:
387
480
  """Deserializes the AlertQuery from a dictionary."""
@@ -434,6 +527,15 @@ class BaseChunkInfo:
434
527
  if self.row_offset is not None: body['row_offset'] = self.row_offset
435
528
  return body
436
529
 
530
+ def as_shallow_dict(self) -> dict:
531
+ """Serializes the BaseChunkInfo into a shallow dictionary of its immediate attributes."""
532
+ body = {}
533
+ if self.byte_count is not None: body['byte_count'] = self.byte_count
534
+ if self.chunk_index is not None: body['chunk_index'] = self.chunk_index
535
+ if self.row_count is not None: body['row_count'] = self.row_count
536
+ if self.row_offset is not None: body['row_offset'] = self.row_offset
537
+ return body
538
+
437
539
  @classmethod
438
540
  def from_dict(cls, d: Dict[str, any]) -> BaseChunkInfo:
439
541
  """Deserializes the BaseChunkInfo from a dictionary."""
@@ -451,6 +553,11 @@ class CancelExecutionResponse:
451
553
  body = {}
452
554
  return body
453
555
 
556
+ def as_shallow_dict(self) -> dict:
557
+ """Serializes the CancelExecutionResponse into a shallow dictionary of its immediate attributes."""
558
+ body = {}
559
+ return body
560
+
454
561
  @classmethod
455
562
  def from_dict(cls, d: Dict[str, any]) -> CancelExecutionResponse:
456
563
  """Deserializes the CancelExecutionResponse from a dictionary."""
@@ -473,6 +580,13 @@ class Channel:
473
580
  if self.name is not None: body['name'] = self.name.value
474
581
  return body
475
582
 
583
+ def as_shallow_dict(self) -> dict:
584
+ """Serializes the Channel into a shallow dictionary of its immediate attributes."""
585
+ body = {}
586
+ if self.dbsql_version is not None: body['dbsql_version'] = self.dbsql_version
587
+ if self.name is not None: body['name'] = self.name
588
+ return body
589
+
476
590
  @classmethod
477
591
  def from_dict(cls, d: Dict[str, any]) -> Channel:
478
592
  """Deserializes the Channel from a dictionary."""
@@ -496,6 +610,13 @@ class ChannelInfo:
496
610
  if self.name is not None: body['name'] = self.name.value
497
611
  return body
498
612
 
613
+ def as_shallow_dict(self) -> dict:
614
+ """Serializes the ChannelInfo into a shallow dictionary of its immediate attributes."""
615
+ body = {}
616
+ if self.dbsql_version is not None: body['dbsql_version'] = self.dbsql_version
617
+ if self.name is not None: body['name'] = self.name
618
+ return body
619
+
499
620
  @classmethod
500
621
  def from_dict(cls, d: Dict[str, any]) -> ChannelInfo:
501
622
  """Deserializes the ChannelInfo from a dictionary."""
@@ -547,6 +668,18 @@ class ColumnInfo:
547
668
  if self.type_text is not None: body['type_text'] = self.type_text
548
669
  return body
549
670
 
671
+ def as_shallow_dict(self) -> dict:
672
+ """Serializes the ColumnInfo into a shallow dictionary of its immediate attributes."""
673
+ body = {}
674
+ if self.name is not None: body['name'] = self.name
675
+ if self.position is not None: body['position'] = self.position
676
+ if self.type_interval_type is not None: body['type_interval_type'] = self.type_interval_type
677
+ if self.type_name is not None: body['type_name'] = self.type_name
678
+ if self.type_precision is not None: body['type_precision'] = self.type_precision
679
+ if self.type_scale is not None: body['type_scale'] = self.type_scale
680
+ if self.type_text is not None: body['type_text'] = self.type_text
681
+ return body
682
+
550
683
  @classmethod
551
684
  def from_dict(cls, d: Dict[str, any]) -> ColumnInfo:
552
685
  """Deserializes the ColumnInfo from a dictionary."""
@@ -612,6 +745,16 @@ class CreateAlert:
612
745
  if self.rearm is not None: body['rearm'] = self.rearm
613
746
  return body
614
747
 
748
+ def as_shallow_dict(self) -> dict:
749
+ """Serializes the CreateAlert into a shallow dictionary of its immediate attributes."""
750
+ body = {}
751
+ if self.name is not None: body['name'] = self.name
752
+ if self.options: body['options'] = self.options
753
+ if self.parent is not None: body['parent'] = self.parent
754
+ if self.query_id is not None: body['query_id'] = self.query_id
755
+ if self.rearm is not None: body['rearm'] = self.rearm
756
+ return body
757
+
615
758
  @classmethod
616
759
  def from_dict(cls, d: Dict[str, any]) -> CreateAlert:
617
760
  """Deserializes the CreateAlert from a dictionary."""
@@ -632,6 +775,12 @@ class CreateAlertRequest:
632
775
  if self.alert: body['alert'] = self.alert.as_dict()
633
776
  return body
634
777
 
778
+ def as_shallow_dict(self) -> dict:
779
+ """Serializes the CreateAlertRequest into a shallow dictionary of its immediate attributes."""
780
+ body = {}
781
+ if self.alert: body['alert'] = self.alert
782
+ return body
783
+
635
784
  @classmethod
636
785
  def from_dict(cls, d: Dict[str, any]) -> CreateAlertRequest:
637
786
  """Deserializes the CreateAlertRequest from a dictionary."""
@@ -683,6 +832,19 @@ class CreateAlertRequestAlert:
683
832
  if self.seconds_to_retrigger is not None: body['seconds_to_retrigger'] = self.seconds_to_retrigger
684
833
  return body
685
834
 
835
+ def as_shallow_dict(self) -> dict:
836
+ """Serializes the CreateAlertRequestAlert into a shallow dictionary of its immediate attributes."""
837
+ body = {}
838
+ if self.condition: body['condition'] = self.condition
839
+ if self.custom_body is not None: body['custom_body'] = self.custom_body
840
+ if self.custom_subject is not None: body['custom_subject'] = self.custom_subject
841
+ if self.display_name is not None: body['display_name'] = self.display_name
842
+ if self.notify_on_ok is not None: body['notify_on_ok'] = self.notify_on_ok
843
+ if self.parent_path is not None: body['parent_path'] = self.parent_path
844
+ if self.query_id is not None: body['query_id'] = self.query_id
845
+ if self.seconds_to_retrigger is not None: body['seconds_to_retrigger'] = self.seconds_to_retrigger
846
+ return body
847
+
686
848
  @classmethod
687
849
  def from_dict(cls, d: Dict[str, any]) -> CreateAlertRequestAlert:
688
850
  """Deserializes the CreateAlertRequestAlert from a dictionary."""
@@ -706,6 +868,12 @@ class CreateQueryRequest:
706
868
  if self.query: body['query'] = self.query.as_dict()
707
869
  return body
708
870
 
871
+ def as_shallow_dict(self) -> dict:
872
+ """Serializes the CreateQueryRequest into a shallow dictionary of its immediate attributes."""
873
+ body = {}
874
+ if self.query: body['query'] = self.query
875
+ return body
876
+
709
877
  @classmethod
710
878
  def from_dict(cls, d: Dict[str, any]) -> CreateQueryRequest:
711
879
  """Deserializes the CreateQueryRequest from a dictionary."""
@@ -762,6 +930,22 @@ class CreateQueryRequestQuery:
762
930
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
763
931
  return body
764
932
 
933
+ def as_shallow_dict(self) -> dict:
934
+ """Serializes the CreateQueryRequestQuery into a shallow dictionary of its immediate attributes."""
935
+ body = {}
936
+ if self.apply_auto_limit is not None: body['apply_auto_limit'] = self.apply_auto_limit
937
+ if self.catalog is not None: body['catalog'] = self.catalog
938
+ if self.description is not None: body['description'] = self.description
939
+ if self.display_name is not None: body['display_name'] = self.display_name
940
+ if self.parameters: body['parameters'] = self.parameters
941
+ if self.parent_path is not None: body['parent_path'] = self.parent_path
942
+ if self.query_text is not None: body['query_text'] = self.query_text
943
+ if self.run_as_mode is not None: body['run_as_mode'] = self.run_as_mode
944
+ if self.schema is not None: body['schema'] = self.schema
945
+ if self.tags: body['tags'] = self.tags
946
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
947
+ return body
948
+
765
949
  @classmethod
766
950
  def from_dict(cls, d: Dict[str, any]) -> CreateQueryRequestQuery:
767
951
  """Deserializes the CreateQueryRequestQuery from a dictionary."""
@@ -788,6 +972,12 @@ class CreateVisualizationRequest:
788
972
  if self.visualization: body['visualization'] = self.visualization.as_dict()
789
973
  return body
790
974
 
975
+ def as_shallow_dict(self) -> dict:
976
+ """Serializes the CreateVisualizationRequest into a shallow dictionary of its immediate attributes."""
977
+ body = {}
978
+ if self.visualization: body['visualization'] = self.visualization
979
+ return body
980
+
791
981
  @classmethod
792
982
  def from_dict(cls, d: Dict[str, any]) -> CreateVisualizationRequest:
793
983
  """Deserializes the CreateVisualizationRequest from a dictionary."""
@@ -823,6 +1013,16 @@ class CreateVisualizationRequestVisualization:
823
1013
  if self.type is not None: body['type'] = self.type
824
1014
  return body
825
1015
 
1016
+ def as_shallow_dict(self) -> dict:
1017
+ """Serializes the CreateVisualizationRequestVisualization into a shallow dictionary of its immediate attributes."""
1018
+ body = {}
1019
+ if self.display_name is not None: body['display_name'] = self.display_name
1020
+ if self.query_id is not None: body['query_id'] = self.query_id
1021
+ if self.serialized_options is not None: body['serialized_options'] = self.serialized_options
1022
+ if self.serialized_query_plan is not None: body['serialized_query_plan'] = self.serialized_query_plan
1023
+ if self.type is not None: body['type'] = self.type
1024
+ return body
1025
+
826
1026
  @classmethod
827
1027
  def from_dict(cls, d: Dict[str, any]) -> CreateVisualizationRequestVisualization:
828
1028
  """Deserializes the CreateVisualizationRequestVisualization from a dictionary."""
@@ -924,6 +1124,25 @@ class CreateWarehouseRequest:
924
1124
  if self.warehouse_type is not None: body['warehouse_type'] = self.warehouse_type.value
925
1125
  return body
926
1126
 
1127
+ def as_shallow_dict(self) -> dict:
1128
+ """Serializes the CreateWarehouseRequest into a shallow dictionary of its immediate attributes."""
1129
+ body = {}
1130
+ if self.auto_stop_mins is not None: body['auto_stop_mins'] = self.auto_stop_mins
1131
+ if self.channel: body['channel'] = self.channel
1132
+ if self.cluster_size is not None: body['cluster_size'] = self.cluster_size
1133
+ if self.creator_name is not None: body['creator_name'] = self.creator_name
1134
+ if self.enable_photon is not None: body['enable_photon'] = self.enable_photon
1135
+ if self.enable_serverless_compute is not None:
1136
+ body['enable_serverless_compute'] = self.enable_serverless_compute
1137
+ if self.instance_profile_arn is not None: body['instance_profile_arn'] = self.instance_profile_arn
1138
+ if self.max_num_clusters is not None: body['max_num_clusters'] = self.max_num_clusters
1139
+ if self.min_num_clusters is not None: body['min_num_clusters'] = self.min_num_clusters
1140
+ if self.name is not None: body['name'] = self.name
1141
+ if self.spot_instance_policy is not None: body['spot_instance_policy'] = self.spot_instance_policy
1142
+ if self.tags: body['tags'] = self.tags
1143
+ if self.warehouse_type is not None: body['warehouse_type'] = self.warehouse_type
1144
+ return body
1145
+
927
1146
  @classmethod
928
1147
  def from_dict(cls, d: Dict[str, any]) -> CreateWarehouseRequest:
929
1148
  """Deserializes the CreateWarehouseRequest from a dictionary."""
@@ -962,6 +1181,12 @@ class CreateWarehouseResponse:
962
1181
  if self.id is not None: body['id'] = self.id
963
1182
  return body
964
1183
 
1184
+ def as_shallow_dict(self) -> dict:
1185
+ """Serializes the CreateWarehouseResponse into a shallow dictionary of its immediate attributes."""
1186
+ body = {}
1187
+ if self.id is not None: body['id'] = self.id
1188
+ return body
1189
+
965
1190
  @classmethod
966
1191
  def from_dict(cls, d: Dict[str, any]) -> CreateWarehouseResponse:
967
1192
  """Deserializes the CreateWarehouseResponse from a dictionary."""
@@ -999,6 +1224,17 @@ class CreateWidget:
999
1224
  if self.width is not None: body['width'] = self.width
1000
1225
  return body
1001
1226
 
1227
+ def as_shallow_dict(self) -> dict:
1228
+ """Serializes the CreateWidget into a shallow dictionary of its immediate attributes."""
1229
+ body = {}
1230
+ if self.dashboard_id is not None: body['dashboard_id'] = self.dashboard_id
1231
+ if self.id is not None: body['id'] = self.id
1232
+ if self.options: body['options'] = self.options
1233
+ if self.text is not None: body['text'] = self.text
1234
+ if self.visualization_id is not None: body['visualization_id'] = self.visualization_id
1235
+ if self.width is not None: body['width'] = self.width
1236
+ return body
1237
+
1002
1238
  @classmethod
1003
1239
  def from_dict(cls, d: Dict[str, any]) -> CreateWidget:
1004
1240
  """Deserializes the CreateWidget from a dictionary."""
@@ -1090,6 +1326,29 @@ class Dashboard:
1090
1326
  if self.widgets: body['widgets'] = [v.as_dict() for v in self.widgets]
1091
1327
  return body
1092
1328
 
1329
+ def as_shallow_dict(self) -> dict:
1330
+ """Serializes the Dashboard into a shallow dictionary of its immediate attributes."""
1331
+ body = {}
1332
+ if self.can_edit is not None: body['can_edit'] = self.can_edit
1333
+ if self.created_at is not None: body['created_at'] = self.created_at
1334
+ if self.dashboard_filters_enabled is not None:
1335
+ body['dashboard_filters_enabled'] = self.dashboard_filters_enabled
1336
+ if self.id is not None: body['id'] = self.id
1337
+ if self.is_archived is not None: body['is_archived'] = self.is_archived
1338
+ if self.is_draft is not None: body['is_draft'] = self.is_draft
1339
+ if self.is_favorite is not None: body['is_favorite'] = self.is_favorite
1340
+ if self.name is not None: body['name'] = self.name
1341
+ if self.options: body['options'] = self.options
1342
+ if self.parent is not None: body['parent'] = self.parent
1343
+ if self.permission_tier is not None: body['permission_tier'] = self.permission_tier
1344
+ if self.slug is not None: body['slug'] = self.slug
1345
+ if self.tags: body['tags'] = self.tags
1346
+ if self.updated_at is not None: body['updated_at'] = self.updated_at
1347
+ if self.user: body['user'] = self.user
1348
+ if self.user_id is not None: body['user_id'] = self.user_id
1349
+ if self.widgets: body['widgets'] = self.widgets
1350
+ return body
1351
+
1093
1352
  @classmethod
1094
1353
  def from_dict(cls, d: Dict[str, any]) -> Dashboard:
1095
1354
  """Deserializes the Dashboard from a dictionary."""
@@ -1134,6 +1393,15 @@ class DashboardEditContent:
1134
1393
  if self.tags: body['tags'] = [v for v in self.tags]
1135
1394
  return body
1136
1395
 
1396
+ def as_shallow_dict(self) -> dict:
1397
+ """Serializes the DashboardEditContent into a shallow dictionary of its immediate attributes."""
1398
+ body = {}
1399
+ if self.dashboard_id is not None: body['dashboard_id'] = self.dashboard_id
1400
+ if self.name is not None: body['name'] = self.name
1401
+ if self.run_as_role is not None: body['run_as_role'] = self.run_as_role
1402
+ if self.tags: body['tags'] = self.tags
1403
+ return body
1404
+
1137
1405
  @classmethod
1138
1406
  def from_dict(cls, d: Dict[str, any]) -> DashboardEditContent:
1139
1407
  """Deserializes the DashboardEditContent from a dictionary."""
@@ -1155,6 +1423,12 @@ class DashboardOptions:
1155
1423
  if self.moved_to_trash_at is not None: body['moved_to_trash_at'] = self.moved_to_trash_at
1156
1424
  return body
1157
1425
 
1426
+ def as_shallow_dict(self) -> dict:
1427
+ """Serializes the DashboardOptions into a shallow dictionary of its immediate attributes."""
1428
+ body = {}
1429
+ if self.moved_to_trash_at is not None: body['moved_to_trash_at'] = self.moved_to_trash_at
1430
+ return body
1431
+
1158
1432
  @classmethod
1159
1433
  def from_dict(cls, d: Dict[str, any]) -> DashboardOptions:
1160
1434
  """Deserializes the DashboardOptions from a dictionary."""
@@ -1193,6 +1467,18 @@ class DashboardPostContent:
1193
1467
  if self.tags: body['tags'] = [v for v in self.tags]
1194
1468
  return body
1195
1469
 
1470
+ def as_shallow_dict(self) -> dict:
1471
+ """Serializes the DashboardPostContent into a shallow dictionary of its immediate attributes."""
1472
+ body = {}
1473
+ if self.dashboard_filters_enabled is not None:
1474
+ body['dashboard_filters_enabled'] = self.dashboard_filters_enabled
1475
+ if self.is_favorite is not None: body['is_favorite'] = self.is_favorite
1476
+ if self.name is not None: body['name'] = self.name
1477
+ if self.parent is not None: body['parent'] = self.parent
1478
+ if self.run_as_role is not None: body['run_as_role'] = self.run_as_role
1479
+ if self.tags: body['tags'] = self.tags
1480
+ return body
1481
+
1196
1482
  @classmethod
1197
1483
  def from_dict(cls, d: Dict[str, any]) -> DashboardPostContent:
1198
1484
  """Deserializes the DashboardPostContent from a dictionary."""
@@ -1253,6 +1539,20 @@ class DataSource:
1253
1539
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
1254
1540
  return body
1255
1541
 
1542
+ def as_shallow_dict(self) -> dict:
1543
+ """Serializes the DataSource into a shallow dictionary of its immediate attributes."""
1544
+ body = {}
1545
+ if self.id is not None: body['id'] = self.id
1546
+ if self.name is not None: body['name'] = self.name
1547
+ if self.pause_reason is not None: body['pause_reason'] = self.pause_reason
1548
+ if self.paused is not None: body['paused'] = self.paused
1549
+ if self.supports_auto_limit is not None: body['supports_auto_limit'] = self.supports_auto_limit
1550
+ if self.syntax is not None: body['syntax'] = self.syntax
1551
+ if self.type is not None: body['type'] = self.type
1552
+ if self.view_only is not None: body['view_only'] = self.view_only
1553
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
1554
+ return body
1555
+
1256
1556
  @classmethod
1257
1557
  def from_dict(cls, d: Dict[str, any]) -> DataSource:
1258
1558
  """Deserializes the DataSource from a dictionary."""
@@ -1287,6 +1587,13 @@ class DateRange:
1287
1587
  if self.start is not None: body['start'] = self.start
1288
1588
  return body
1289
1589
 
1590
+ def as_shallow_dict(self) -> dict:
1591
+ """Serializes the DateRange into a shallow dictionary of its immediate attributes."""
1592
+ body = {}
1593
+ if self.end is not None: body['end'] = self.end
1594
+ if self.start is not None: body['start'] = self.start
1595
+ return body
1596
+
1290
1597
  @classmethod
1291
1598
  def from_dict(cls, d: Dict[str, any]) -> DateRange:
1292
1599
  """Deserializes the DateRange from a dictionary."""
@@ -1317,6 +1624,16 @@ class DateRangeValue:
1317
1624
  if self.start_day_of_week is not None: body['start_day_of_week'] = self.start_day_of_week
1318
1625
  return body
1319
1626
 
1627
+ def as_shallow_dict(self) -> dict:
1628
+ """Serializes the DateRangeValue into a shallow dictionary of its immediate attributes."""
1629
+ body = {}
1630
+ if self.date_range_value: body['date_range_value'] = self.date_range_value
1631
+ if self.dynamic_date_range_value is not None:
1632
+ body['dynamic_date_range_value'] = self.dynamic_date_range_value
1633
+ if self.precision is not None: body['precision'] = self.precision
1634
+ if self.start_day_of_week is not None: body['start_day_of_week'] = self.start_day_of_week
1635
+ return body
1636
+
1320
1637
  @classmethod
1321
1638
  def from_dict(cls, d: Dict[str, any]) -> DateRangeValue:
1322
1639
  """Deserializes the DateRangeValue from a dictionary."""
@@ -1368,6 +1685,14 @@ class DateValue:
1368
1685
  if self.precision is not None: body['precision'] = self.precision.value
1369
1686
  return body
1370
1687
 
1688
+ def as_shallow_dict(self) -> dict:
1689
+ """Serializes the DateValue into a shallow dictionary of its immediate attributes."""
1690
+ body = {}
1691
+ if self.date_value is not None: body['date_value'] = self.date_value
1692
+ if self.dynamic_date_value is not None: body['dynamic_date_value'] = self.dynamic_date_value
1693
+ if self.precision is not None: body['precision'] = self.precision
1694
+ return body
1695
+
1371
1696
  @classmethod
1372
1697
  def from_dict(cls, d: Dict[str, any]) -> DateValue:
1373
1698
  """Deserializes the DateValue from a dictionary."""
@@ -1390,6 +1715,11 @@ class DeleteResponse:
1390
1715
  body = {}
1391
1716
  return body
1392
1717
 
1718
+ def as_shallow_dict(self) -> dict:
1719
+ """Serializes the DeleteResponse into a shallow dictionary of its immediate attributes."""
1720
+ body = {}
1721
+ return body
1722
+
1393
1723
  @classmethod
1394
1724
  def from_dict(cls, d: Dict[str, any]) -> DeleteResponse:
1395
1725
  """Deserializes the DeleteResponse from a dictionary."""
@@ -1404,6 +1734,11 @@ class DeleteWarehouseResponse:
1404
1734
  body = {}
1405
1735
  return body
1406
1736
 
1737
+ def as_shallow_dict(self) -> dict:
1738
+ """Serializes the DeleteWarehouseResponse into a shallow dictionary of its immediate attributes."""
1739
+ body = {}
1740
+ return body
1741
+
1407
1742
  @classmethod
1408
1743
  def from_dict(cls, d: Dict[str, any]) -> DeleteWarehouseResponse:
1409
1744
  """Deserializes the DeleteWarehouseResponse from a dictionary."""
@@ -1443,6 +1778,16 @@ class EditAlert:
1443
1778
  if self.rearm is not None: body['rearm'] = self.rearm
1444
1779
  return body
1445
1780
 
1781
+ def as_shallow_dict(self) -> dict:
1782
+ """Serializes the EditAlert into a shallow dictionary of its immediate attributes."""
1783
+ body = {}
1784
+ if self.alert_id is not None: body['alert_id'] = self.alert_id
1785
+ if self.name is not None: body['name'] = self.name
1786
+ if self.options: body['options'] = self.options
1787
+ if self.query_id is not None: body['query_id'] = self.query_id
1788
+ if self.rearm is not None: body['rearm'] = self.rearm
1789
+ return body
1790
+
1446
1791
  @classmethod
1447
1792
  def from_dict(cls, d: Dict[str, any]) -> EditAlert:
1448
1793
  """Deserializes the EditAlert from a dictionary."""
@@ -1547,6 +1892,26 @@ class EditWarehouseRequest:
1547
1892
  if self.warehouse_type is not None: body['warehouse_type'] = self.warehouse_type.value
1548
1893
  return body
1549
1894
 
1895
+ def as_shallow_dict(self) -> dict:
1896
+ """Serializes the EditWarehouseRequest into a shallow dictionary of its immediate attributes."""
1897
+ body = {}
1898
+ if self.auto_stop_mins is not None: body['auto_stop_mins'] = self.auto_stop_mins
1899
+ if self.channel: body['channel'] = self.channel
1900
+ if self.cluster_size is not None: body['cluster_size'] = self.cluster_size
1901
+ if self.creator_name is not None: body['creator_name'] = self.creator_name
1902
+ if self.enable_photon is not None: body['enable_photon'] = self.enable_photon
1903
+ if self.enable_serverless_compute is not None:
1904
+ body['enable_serverless_compute'] = self.enable_serverless_compute
1905
+ if self.id is not None: body['id'] = self.id
1906
+ if self.instance_profile_arn is not None: body['instance_profile_arn'] = self.instance_profile_arn
1907
+ if self.max_num_clusters is not None: body['max_num_clusters'] = self.max_num_clusters
1908
+ if self.min_num_clusters is not None: body['min_num_clusters'] = self.min_num_clusters
1909
+ if self.name is not None: body['name'] = self.name
1910
+ if self.spot_instance_policy is not None: body['spot_instance_policy'] = self.spot_instance_policy
1911
+ if self.tags: body['tags'] = self.tags
1912
+ if self.warehouse_type is not None: body['warehouse_type'] = self.warehouse_type
1913
+ return body
1914
+
1550
1915
  @classmethod
1551
1916
  def from_dict(cls, d: Dict[str, any]) -> EditWarehouseRequest:
1552
1917
  """Deserializes the EditWarehouseRequest from a dictionary."""
@@ -1583,6 +1948,11 @@ class EditWarehouseResponse:
1583
1948
  body = {}
1584
1949
  return body
1585
1950
 
1951
+ def as_shallow_dict(self) -> dict:
1952
+ """Serializes the EditWarehouseResponse into a shallow dictionary of its immediate attributes."""
1953
+ body = {}
1954
+ return body
1955
+
1586
1956
  @classmethod
1587
1957
  def from_dict(cls, d: Dict[str, any]) -> EditWarehouseResponse:
1588
1958
  """Deserializes the EditWarehouseResponse from a dictionary."""
@@ -1599,6 +1969,11 @@ class Empty:
1599
1969
  body = {}
1600
1970
  return body
1601
1971
 
1972
+ def as_shallow_dict(self) -> dict:
1973
+ """Serializes the Empty into a shallow dictionary of its immediate attributes."""
1974
+ body = {}
1975
+ return body
1976
+
1602
1977
  @classmethod
1603
1978
  def from_dict(cls, d: Dict[str, any]) -> Empty:
1604
1979
  """Deserializes the Empty from a dictionary."""
@@ -1618,6 +1993,13 @@ class EndpointConfPair:
1618
1993
  if self.value is not None: body['value'] = self.value
1619
1994
  return body
1620
1995
 
1996
+ def as_shallow_dict(self) -> dict:
1997
+ """Serializes the EndpointConfPair into a shallow dictionary of its immediate attributes."""
1998
+ body = {}
1999
+ if self.key is not None: body['key'] = self.key
2000
+ if self.value is not None: body['value'] = self.value
2001
+ return body
2002
+
1621
2003
  @classmethod
1622
2004
  def from_dict(cls, d: Dict[str, any]) -> EndpointConfPair:
1623
2005
  """Deserializes the EndpointConfPair from a dictionary."""
@@ -1652,6 +2034,16 @@ class EndpointHealth:
1652
2034
  if self.summary is not None: body['summary'] = self.summary
1653
2035
  return body
1654
2036
 
2037
+ def as_shallow_dict(self) -> dict:
2038
+ """Serializes the EndpointHealth into a shallow dictionary of its immediate attributes."""
2039
+ body = {}
2040
+ if self.details is not None: body['details'] = self.details
2041
+ if self.failure_reason: body['failure_reason'] = self.failure_reason
2042
+ if self.message is not None: body['message'] = self.message
2043
+ if self.status is not None: body['status'] = self.status
2044
+ if self.summary is not None: body['summary'] = self.summary
2045
+ return body
2046
+
1655
2047
  @classmethod
1656
2048
  def from_dict(cls, d: Dict[str, any]) -> EndpointHealth:
1657
2049
  """Deserializes the EndpointHealth from a dictionary."""
@@ -1780,6 +2172,32 @@ class EndpointInfo:
1780
2172
  if self.warehouse_type is not None: body['warehouse_type'] = self.warehouse_type.value
1781
2173
  return body
1782
2174
 
2175
+ def as_shallow_dict(self) -> dict:
2176
+ """Serializes the EndpointInfo into a shallow dictionary of its immediate attributes."""
2177
+ body = {}
2178
+ if self.auto_stop_mins is not None: body['auto_stop_mins'] = self.auto_stop_mins
2179
+ if self.channel: body['channel'] = self.channel
2180
+ if self.cluster_size is not None: body['cluster_size'] = self.cluster_size
2181
+ if self.creator_name is not None: body['creator_name'] = self.creator_name
2182
+ if self.enable_photon is not None: body['enable_photon'] = self.enable_photon
2183
+ if self.enable_serverless_compute is not None:
2184
+ body['enable_serverless_compute'] = self.enable_serverless_compute
2185
+ if self.health: body['health'] = self.health
2186
+ if self.id is not None: body['id'] = self.id
2187
+ if self.instance_profile_arn is not None: body['instance_profile_arn'] = self.instance_profile_arn
2188
+ if self.jdbc_url is not None: body['jdbc_url'] = self.jdbc_url
2189
+ if self.max_num_clusters is not None: body['max_num_clusters'] = self.max_num_clusters
2190
+ if self.min_num_clusters is not None: body['min_num_clusters'] = self.min_num_clusters
2191
+ if self.name is not None: body['name'] = self.name
2192
+ if self.num_active_sessions is not None: body['num_active_sessions'] = self.num_active_sessions
2193
+ if self.num_clusters is not None: body['num_clusters'] = self.num_clusters
2194
+ if self.odbc_params: body['odbc_params'] = self.odbc_params
2195
+ if self.spot_instance_policy is not None: body['spot_instance_policy'] = self.spot_instance_policy
2196
+ if self.state is not None: body['state'] = self.state
2197
+ if self.tags: body['tags'] = self.tags
2198
+ if self.warehouse_type is not None: body['warehouse_type'] = self.warehouse_type
2199
+ return body
2200
+
1783
2201
  @classmethod
1784
2202
  def from_dict(cls, d: Dict[str, any]) -> EndpointInfo:
1785
2203
  """Deserializes the EndpointInfo from a dictionary."""
@@ -1827,6 +2245,13 @@ class EndpointTagPair:
1827
2245
  if self.value is not None: body['value'] = self.value
1828
2246
  return body
1829
2247
 
2248
+ def as_shallow_dict(self) -> dict:
2249
+ """Serializes the EndpointTagPair into a shallow dictionary of its immediate attributes."""
2250
+ body = {}
2251
+ if self.key is not None: body['key'] = self.key
2252
+ if self.value is not None: body['value'] = self.value
2253
+ return body
2254
+
1830
2255
  @classmethod
1831
2256
  def from_dict(cls, d: Dict[str, any]) -> EndpointTagPair:
1832
2257
  """Deserializes the EndpointTagPair from a dictionary."""
@@ -1843,6 +2268,12 @@ class EndpointTags:
1843
2268
  if self.custom_tags: body['custom_tags'] = [v.as_dict() for v in self.custom_tags]
1844
2269
  return body
1845
2270
 
2271
+ def as_shallow_dict(self) -> dict:
2272
+ """Serializes the EndpointTags into a shallow dictionary of its immediate attributes."""
2273
+ body = {}
2274
+ if self.custom_tags: body['custom_tags'] = self.custom_tags
2275
+ return body
2276
+
1846
2277
  @classmethod
1847
2278
  def from_dict(cls, d: Dict[str, any]) -> EndpointTags:
1848
2279
  """Deserializes the EndpointTags from a dictionary."""
@@ -1868,6 +2299,14 @@ class EnumValue:
1868
2299
  if self.values: body['values'] = [v for v in self.values]
1869
2300
  return body
1870
2301
 
2302
+ def as_shallow_dict(self) -> dict:
2303
+ """Serializes the EnumValue into a shallow dictionary of its immediate attributes."""
2304
+ body = {}
2305
+ if self.enum_options is not None: body['enum_options'] = self.enum_options
2306
+ if self.multi_values_options: body['multi_values_options'] = self.multi_values_options
2307
+ if self.values: body['values'] = self.values
2308
+ return body
2309
+
1871
2310
  @classmethod
1872
2311
  def from_dict(cls, d: Dict[str, any]) -> EnumValue:
1873
2312
  """Deserializes the EnumValue from a dictionary."""
@@ -2009,6 +2448,22 @@ class ExecuteStatementRequest:
2009
2448
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
2010
2449
  return body
2011
2450
 
2451
+ def as_shallow_dict(self) -> dict:
2452
+ """Serializes the ExecuteStatementRequest into a shallow dictionary of its immediate attributes."""
2453
+ body = {}
2454
+ if self.byte_limit is not None: body['byte_limit'] = self.byte_limit
2455
+ if self.catalog is not None: body['catalog'] = self.catalog
2456
+ if self.disposition is not None: body['disposition'] = self.disposition
2457
+ if self.format is not None: body['format'] = self.format
2458
+ if self.on_wait_timeout is not None: body['on_wait_timeout'] = self.on_wait_timeout
2459
+ if self.parameters: body['parameters'] = self.parameters
2460
+ if self.row_limit is not None: body['row_limit'] = self.row_limit
2461
+ if self.schema is not None: body['schema'] = self.schema
2462
+ if self.statement is not None: body['statement'] = self.statement
2463
+ if self.wait_timeout is not None: body['wait_timeout'] = self.wait_timeout
2464
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
2465
+ return body
2466
+
2012
2467
  @classmethod
2013
2468
  def from_dict(cls, d: Dict[str, any]) -> ExecuteStatementRequest:
2014
2469
  """Deserializes the ExecuteStatementRequest from a dictionary."""
@@ -2089,6 +2544,21 @@ class ExternalLink:
2089
2544
  if self.row_offset is not None: body['row_offset'] = self.row_offset
2090
2545
  return body
2091
2546
 
2547
+ def as_shallow_dict(self) -> dict:
2548
+ """Serializes the ExternalLink into a shallow dictionary of its immediate attributes."""
2549
+ body = {}
2550
+ if self.byte_count is not None: body['byte_count'] = self.byte_count
2551
+ if self.chunk_index is not None: body['chunk_index'] = self.chunk_index
2552
+ if self.expiration is not None: body['expiration'] = self.expiration
2553
+ if self.external_link is not None: body['external_link'] = self.external_link
2554
+ if self.http_headers: body['http_headers'] = self.http_headers
2555
+ if self.next_chunk_index is not None: body['next_chunk_index'] = self.next_chunk_index
2556
+ if self.next_chunk_internal_link is not None:
2557
+ body['next_chunk_internal_link'] = self.next_chunk_internal_link
2558
+ if self.row_count is not None: body['row_count'] = self.row_count
2559
+ if self.row_offset is not None: body['row_offset'] = self.row_offset
2560
+ return body
2561
+
2092
2562
  @classmethod
2093
2563
  def from_dict(cls, d: Dict[str, any]) -> ExternalLink:
2094
2564
  """Deserializes the ExternalLink from a dictionary."""
@@ -2129,6 +2599,14 @@ class GetResponse:
2129
2599
  if self.object_type is not None: body['object_type'] = self.object_type.value
2130
2600
  return body
2131
2601
 
2602
+ def as_shallow_dict(self) -> dict:
2603
+ """Serializes the GetResponse into a shallow dictionary of its immediate attributes."""
2604
+ body = {}
2605
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
2606
+ if self.object_id is not None: body['object_id'] = self.object_id
2607
+ if self.object_type is not None: body['object_type'] = self.object_type
2608
+ return body
2609
+
2132
2610
  @classmethod
2133
2611
  def from_dict(cls, d: Dict[str, any]) -> GetResponse:
2134
2612
  """Deserializes the GetResponse from a dictionary."""
@@ -2148,6 +2626,12 @@ class GetWarehousePermissionLevelsResponse:
2148
2626
  if self.permission_levels: body['permission_levels'] = [v.as_dict() for v in self.permission_levels]
2149
2627
  return body
2150
2628
 
2629
+ def as_shallow_dict(self) -> dict:
2630
+ """Serializes the GetWarehousePermissionLevelsResponse into a shallow dictionary of its immediate attributes."""
2631
+ body = {}
2632
+ if self.permission_levels: body['permission_levels'] = self.permission_levels
2633
+ return body
2634
+
2151
2635
  @classmethod
2152
2636
  def from_dict(cls, d: Dict[str, any]) -> GetWarehousePermissionLevelsResponse:
2153
2637
  """Deserializes the GetWarehousePermissionLevelsResponse from a dictionary."""
@@ -2272,6 +2756,32 @@ class GetWarehouseResponse:
2272
2756
  if self.warehouse_type is not None: body['warehouse_type'] = self.warehouse_type.value
2273
2757
  return body
2274
2758
 
2759
+ def as_shallow_dict(self) -> dict:
2760
+ """Serializes the GetWarehouseResponse into a shallow dictionary of its immediate attributes."""
2761
+ body = {}
2762
+ if self.auto_stop_mins is not None: body['auto_stop_mins'] = self.auto_stop_mins
2763
+ if self.channel: body['channel'] = self.channel
2764
+ if self.cluster_size is not None: body['cluster_size'] = self.cluster_size
2765
+ if self.creator_name is not None: body['creator_name'] = self.creator_name
2766
+ if self.enable_photon is not None: body['enable_photon'] = self.enable_photon
2767
+ if self.enable_serverless_compute is not None:
2768
+ body['enable_serverless_compute'] = self.enable_serverless_compute
2769
+ if self.health: body['health'] = self.health
2770
+ if self.id is not None: body['id'] = self.id
2771
+ if self.instance_profile_arn is not None: body['instance_profile_arn'] = self.instance_profile_arn
2772
+ if self.jdbc_url is not None: body['jdbc_url'] = self.jdbc_url
2773
+ if self.max_num_clusters is not None: body['max_num_clusters'] = self.max_num_clusters
2774
+ if self.min_num_clusters is not None: body['min_num_clusters'] = self.min_num_clusters
2775
+ if self.name is not None: body['name'] = self.name
2776
+ if self.num_active_sessions is not None: body['num_active_sessions'] = self.num_active_sessions
2777
+ if self.num_clusters is not None: body['num_clusters'] = self.num_clusters
2778
+ if self.odbc_params: body['odbc_params'] = self.odbc_params
2779
+ if self.spot_instance_policy is not None: body['spot_instance_policy'] = self.spot_instance_policy
2780
+ if self.state is not None: body['state'] = self.state
2781
+ if self.tags: body['tags'] = self.tags
2782
+ if self.warehouse_type is not None: body['warehouse_type'] = self.warehouse_type
2783
+ return body
2784
+
2275
2785
  @classmethod
2276
2786
  def from_dict(cls, d: Dict[str, any]) -> GetWarehouseResponse:
2277
2787
  """Deserializes the GetWarehouseResponse from a dictionary."""
@@ -2358,6 +2868,22 @@ class GetWorkspaceWarehouseConfigResponse:
2358
2868
  body['sql_configuration_parameters'] = self.sql_configuration_parameters.as_dict()
2359
2869
  return body
2360
2870
 
2871
+ def as_shallow_dict(self) -> dict:
2872
+ """Serializes the GetWorkspaceWarehouseConfigResponse into a shallow dictionary of its immediate attributes."""
2873
+ body = {}
2874
+ if self.channel: body['channel'] = self.channel
2875
+ if self.config_param: body['config_param'] = self.config_param
2876
+ if self.data_access_config: body['data_access_config'] = self.data_access_config
2877
+ if self.enabled_warehouse_types: body['enabled_warehouse_types'] = self.enabled_warehouse_types
2878
+ if self.global_param: body['global_param'] = self.global_param
2879
+ if self.google_service_account is not None:
2880
+ body['google_service_account'] = self.google_service_account
2881
+ if self.instance_profile_arn is not None: body['instance_profile_arn'] = self.instance_profile_arn
2882
+ if self.security_policy is not None: body['security_policy'] = self.security_policy
2883
+ if self.sql_configuration_parameters:
2884
+ body['sql_configuration_parameters'] = self.sql_configuration_parameters
2885
+ return body
2886
+
2361
2887
  @classmethod
2362
2888
  def from_dict(cls, d: Dict[str, any]) -> GetWorkspaceWarehouseConfigResponse:
2363
2889
  """Deserializes the GetWorkspaceWarehouseConfigResponse from a dictionary."""
@@ -2433,6 +2959,22 @@ class LegacyAlert:
2433
2959
  if self.user: body['user'] = self.user.as_dict()
2434
2960
  return body
2435
2961
 
2962
+ def as_shallow_dict(self) -> dict:
2963
+ """Serializes the LegacyAlert into a shallow dictionary of its immediate attributes."""
2964
+ body = {}
2965
+ if self.created_at is not None: body['created_at'] = self.created_at
2966
+ if self.id is not None: body['id'] = self.id
2967
+ if self.last_triggered_at is not None: body['last_triggered_at'] = self.last_triggered_at
2968
+ if self.name is not None: body['name'] = self.name
2969
+ if self.options: body['options'] = self.options
2970
+ if self.parent is not None: body['parent'] = self.parent
2971
+ if self.query: body['query'] = self.query
2972
+ if self.rearm is not None: body['rearm'] = self.rearm
2973
+ if self.state is not None: body['state'] = self.state
2974
+ if self.updated_at is not None: body['updated_at'] = self.updated_at
2975
+ if self.user: body['user'] = self.user
2976
+ return body
2977
+
2436
2978
  @classmethod
2437
2979
  def from_dict(cls, d: Dict[str, any]) -> LegacyAlert:
2438
2980
  """Deserializes the LegacyAlert from a dictionary."""
@@ -2568,6 +3110,35 @@ class LegacyQuery:
2568
3110
  if self.visualizations: body['visualizations'] = [v.as_dict() for v in self.visualizations]
2569
3111
  return body
2570
3112
 
3113
+ def as_shallow_dict(self) -> dict:
3114
+ """Serializes the LegacyQuery into a shallow dictionary of its immediate attributes."""
3115
+ body = {}
3116
+ if self.can_edit is not None: body['can_edit'] = self.can_edit
3117
+ if self.created_at is not None: body['created_at'] = self.created_at
3118
+ if self.data_source_id is not None: body['data_source_id'] = self.data_source_id
3119
+ if self.description is not None: body['description'] = self.description
3120
+ if self.id is not None: body['id'] = self.id
3121
+ if self.is_archived is not None: body['is_archived'] = self.is_archived
3122
+ if self.is_draft is not None: body['is_draft'] = self.is_draft
3123
+ if self.is_favorite is not None: body['is_favorite'] = self.is_favorite
3124
+ if self.is_safe is not None: body['is_safe'] = self.is_safe
3125
+ if self.last_modified_by: body['last_modified_by'] = self.last_modified_by
3126
+ if self.last_modified_by_id is not None: body['last_modified_by_id'] = self.last_modified_by_id
3127
+ if self.latest_query_data_id is not None: body['latest_query_data_id'] = self.latest_query_data_id
3128
+ if self.name is not None: body['name'] = self.name
3129
+ if self.options: body['options'] = self.options
3130
+ if self.parent is not None: body['parent'] = self.parent
3131
+ if self.permission_tier is not None: body['permission_tier'] = self.permission_tier
3132
+ if self.query is not None: body['query'] = self.query
3133
+ if self.query_hash is not None: body['query_hash'] = self.query_hash
3134
+ if self.run_as_role is not None: body['run_as_role'] = self.run_as_role
3135
+ if self.tags: body['tags'] = self.tags
3136
+ if self.updated_at is not None: body['updated_at'] = self.updated_at
3137
+ if self.user: body['user'] = self.user
3138
+ if self.user_id is not None: body['user_id'] = self.user_id
3139
+ if self.visualizations: body['visualizations'] = self.visualizations
3140
+ return body
3141
+
2571
3142
  @classmethod
2572
3143
  def from_dict(cls, d: Dict[str, any]) -> LegacyQuery:
2573
3144
  """Deserializes the LegacyQuery from a dictionary."""
@@ -2639,6 +3210,19 @@ class LegacyVisualization:
2639
3210
  if self.updated_at is not None: body['updated_at'] = self.updated_at
2640
3211
  return body
2641
3212
 
3213
+ def as_shallow_dict(self) -> dict:
3214
+ """Serializes the LegacyVisualization into a shallow dictionary of its immediate attributes."""
3215
+ body = {}
3216
+ if self.created_at is not None: body['created_at'] = self.created_at
3217
+ if self.description is not None: body['description'] = self.description
3218
+ if self.id is not None: body['id'] = self.id
3219
+ if self.name is not None: body['name'] = self.name
3220
+ if self.options: body['options'] = self.options
3221
+ if self.query: body['query'] = self.query
3222
+ if self.type is not None: body['type'] = self.type
3223
+ if self.updated_at is not None: body['updated_at'] = self.updated_at
3224
+ return body
3225
+
2642
3226
  @classmethod
2643
3227
  def from_dict(cls, d: Dict[str, any]) -> LegacyVisualization:
2644
3228
  """Deserializes the LegacyVisualization from a dictionary."""
@@ -2671,6 +3255,13 @@ class ListAlertsResponse:
2671
3255
  if self.results: body['results'] = [v.as_dict() for v in self.results]
2672
3256
  return body
2673
3257
 
3258
+ def as_shallow_dict(self) -> dict:
3259
+ """Serializes the ListAlertsResponse into a shallow dictionary of its immediate attributes."""
3260
+ body = {}
3261
+ if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
3262
+ if self.results: body['results'] = self.results
3263
+ return body
3264
+
2674
3265
  @classmethod
2675
3266
  def from_dict(cls, d: Dict[str, any]) -> ListAlertsResponse:
2676
3267
  """Deserializes the ListAlertsResponse from a dictionary."""
@@ -2748,6 +3339,25 @@ class ListAlertsResponseAlert:
2748
3339
  if self.update_time is not None: body['update_time'] = self.update_time
2749
3340
  return body
2750
3341
 
3342
+ def as_shallow_dict(self) -> dict:
3343
+ """Serializes the ListAlertsResponseAlert into a shallow dictionary of its immediate attributes."""
3344
+ body = {}
3345
+ if self.condition: body['condition'] = self.condition
3346
+ if self.create_time is not None: body['create_time'] = self.create_time
3347
+ if self.custom_body is not None: body['custom_body'] = self.custom_body
3348
+ if self.custom_subject is not None: body['custom_subject'] = self.custom_subject
3349
+ if self.display_name is not None: body['display_name'] = self.display_name
3350
+ if self.id is not None: body['id'] = self.id
3351
+ if self.lifecycle_state is not None: body['lifecycle_state'] = self.lifecycle_state
3352
+ if self.notify_on_ok is not None: body['notify_on_ok'] = self.notify_on_ok
3353
+ if self.owner_user_name is not None: body['owner_user_name'] = self.owner_user_name
3354
+ if self.query_id is not None: body['query_id'] = self.query_id
3355
+ if self.seconds_to_retrigger is not None: body['seconds_to_retrigger'] = self.seconds_to_retrigger
3356
+ if self.state is not None: body['state'] = self.state
3357
+ if self.trigger_time is not None: body['trigger_time'] = self.trigger_time
3358
+ if self.update_time is not None: body['update_time'] = self.update_time
3359
+ return body
3360
+
2751
3361
  @classmethod
2752
3362
  def from_dict(cls, d: Dict[str, any]) -> ListAlertsResponseAlert:
2753
3363
  """Deserializes the ListAlertsResponseAlert from a dictionary."""
@@ -2791,6 +3401,14 @@ class ListQueriesResponse:
2791
3401
  if self.res: body['res'] = [v.as_dict() for v in self.res]
2792
3402
  return body
2793
3403
 
3404
+ def as_shallow_dict(self) -> dict:
3405
+ """Serializes the ListQueriesResponse into a shallow dictionary of its immediate attributes."""
3406
+ body = {}
3407
+ if self.has_next_page is not None: body['has_next_page'] = self.has_next_page
3408
+ if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
3409
+ if self.res: body['res'] = self.res
3410
+ return body
3411
+
2794
3412
  @classmethod
2795
3413
  def from_dict(cls, d: Dict[str, any]) -> ListQueriesResponse:
2796
3414
  """Deserializes the ListQueriesResponse from a dictionary."""
@@ -2812,6 +3430,13 @@ class ListQueryObjectsResponse:
2812
3430
  if self.results: body['results'] = [v.as_dict() for v in self.results]
2813
3431
  return body
2814
3432
 
3433
+ def as_shallow_dict(self) -> dict:
3434
+ """Serializes the ListQueryObjectsResponse into a shallow dictionary of its immediate attributes."""
3435
+ body = {}
3436
+ if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
3437
+ if self.results: body['results'] = self.results
3438
+ return body
3439
+
2815
3440
  @classmethod
2816
3441
  def from_dict(cls, d: Dict[str, any]) -> ListQueryObjectsResponse:
2817
3442
  """Deserializes the ListQueryObjectsResponse from a dictionary."""
@@ -2890,6 +3515,28 @@ class ListQueryObjectsResponseQuery:
2890
3515
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
2891
3516
  return body
2892
3517
 
3518
+ def as_shallow_dict(self) -> dict:
3519
+ """Serializes the ListQueryObjectsResponseQuery into a shallow dictionary of its immediate attributes."""
3520
+ body = {}
3521
+ if self.apply_auto_limit is not None: body['apply_auto_limit'] = self.apply_auto_limit
3522
+ if self.catalog is not None: body['catalog'] = self.catalog
3523
+ if self.create_time is not None: body['create_time'] = self.create_time
3524
+ if self.description is not None: body['description'] = self.description
3525
+ if self.display_name is not None: body['display_name'] = self.display_name
3526
+ if self.id is not None: body['id'] = self.id
3527
+ if self.last_modifier_user_name is not None:
3528
+ body['last_modifier_user_name'] = self.last_modifier_user_name
3529
+ if self.lifecycle_state is not None: body['lifecycle_state'] = self.lifecycle_state
3530
+ if self.owner_user_name is not None: body['owner_user_name'] = self.owner_user_name
3531
+ if self.parameters: body['parameters'] = self.parameters
3532
+ if self.query_text is not None: body['query_text'] = self.query_text
3533
+ if self.run_as_mode is not None: body['run_as_mode'] = self.run_as_mode
3534
+ if self.schema is not None: body['schema'] = self.schema
3535
+ if self.tags: body['tags'] = self.tags
3536
+ if self.update_time is not None: body['update_time'] = self.update_time
3537
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
3538
+ return body
3539
+
2893
3540
  @classmethod
2894
3541
  def from_dict(cls, d: Dict[str, any]) -> ListQueryObjectsResponseQuery:
2895
3542
  """Deserializes the ListQueryObjectsResponseQuery from a dictionary."""
@@ -2934,6 +3581,15 @@ class ListResponse:
2934
3581
  if self.results: body['results'] = [v.as_dict() for v in self.results]
2935
3582
  return body
2936
3583
 
3584
+ def as_shallow_dict(self) -> dict:
3585
+ """Serializes the ListResponse into a shallow dictionary of its immediate attributes."""
3586
+ body = {}
3587
+ if self.count is not None: body['count'] = self.count
3588
+ if self.page is not None: body['page'] = self.page
3589
+ if self.page_size is not None: body['page_size'] = self.page_size
3590
+ if self.results: body['results'] = self.results
3591
+ return body
3592
+
2937
3593
  @classmethod
2938
3594
  def from_dict(cls, d: Dict[str, any]) -> ListResponse:
2939
3595
  """Deserializes the ListResponse from a dictionary."""
@@ -2956,6 +3612,13 @@ class ListVisualizationsForQueryResponse:
2956
3612
  if self.results: body['results'] = [v.as_dict() for v in self.results]
2957
3613
  return body
2958
3614
 
3615
+ def as_shallow_dict(self) -> dict:
3616
+ """Serializes the ListVisualizationsForQueryResponse into a shallow dictionary of its immediate attributes."""
3617
+ body = {}
3618
+ if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
3619
+ if self.results: body['results'] = self.results
3620
+ return body
3621
+
2959
3622
  @classmethod
2960
3623
  def from_dict(cls, d: Dict[str, any]) -> ListVisualizationsForQueryResponse:
2961
3624
  """Deserializes the ListVisualizationsForQueryResponse from a dictionary."""
@@ -2974,6 +3637,12 @@ class ListWarehousesResponse:
2974
3637
  if self.warehouses: body['warehouses'] = [v.as_dict() for v in self.warehouses]
2975
3638
  return body
2976
3639
 
3640
+ def as_shallow_dict(self) -> dict:
3641
+ """Serializes the ListWarehousesResponse into a shallow dictionary of its immediate attributes."""
3642
+ body = {}
3643
+ if self.warehouses: body['warehouses'] = self.warehouses
3644
+ return body
3645
+
2977
3646
  @classmethod
2978
3647
  def from_dict(cls, d: Dict[str, any]) -> ListWarehousesResponse:
2979
3648
  """Deserializes the ListWarehousesResponse from a dictionary."""
@@ -2999,6 +3668,14 @@ class MultiValuesOptions:
2999
3668
  if self.suffix is not None: body['suffix'] = self.suffix
3000
3669
  return body
3001
3670
 
3671
+ def as_shallow_dict(self) -> dict:
3672
+ """Serializes the MultiValuesOptions into a shallow dictionary of its immediate attributes."""
3673
+ body = {}
3674
+ if self.prefix is not None: body['prefix'] = self.prefix
3675
+ if self.separator is not None: body['separator'] = self.separator
3676
+ if self.suffix is not None: body['suffix'] = self.suffix
3677
+ return body
3678
+
3002
3679
  @classmethod
3003
3680
  def from_dict(cls, d: Dict[str, any]) -> MultiValuesOptions:
3004
3681
  """Deserializes the MultiValuesOptions from a dictionary."""
@@ -3017,6 +3694,12 @@ class NumericValue:
3017
3694
  if self.value is not None: body['value'] = self.value
3018
3695
  return body
3019
3696
 
3697
+ def as_shallow_dict(self) -> dict:
3698
+ """Serializes the NumericValue into a shallow dictionary of its immediate attributes."""
3699
+ body = {}
3700
+ if self.value is not None: body['value'] = self.value
3701
+ return body
3702
+
3020
3703
  @classmethod
3021
3704
  def from_dict(cls, d: Dict[str, any]) -> NumericValue:
3022
3705
  """Deserializes the NumericValue from a dictionary."""
@@ -3060,6 +3743,15 @@ class OdbcParams:
3060
3743
  if self.protocol is not None: body['protocol'] = self.protocol
3061
3744
  return body
3062
3745
 
3746
+ def as_shallow_dict(self) -> dict:
3747
+ """Serializes the OdbcParams into a shallow dictionary of its immediate attributes."""
3748
+ body = {}
3749
+ if self.hostname is not None: body['hostname'] = self.hostname
3750
+ if self.path is not None: body['path'] = self.path
3751
+ if self.port is not None: body['port'] = self.port
3752
+ if self.protocol is not None: body['protocol'] = self.protocol
3753
+ return body
3754
+
3063
3755
  @classmethod
3064
3756
  def from_dict(cls, d: Dict[str, any]) -> OdbcParams:
3065
3757
  """Deserializes the OdbcParams from a dictionary."""
@@ -3114,6 +3806,18 @@ class Parameter:
3114
3806
  if self.value: body['value'] = self.value
3115
3807
  return body
3116
3808
 
3809
+ def as_shallow_dict(self) -> dict:
3810
+ """Serializes the Parameter into a shallow dictionary of its immediate attributes."""
3811
+ body = {}
3812
+ if self.enum_options is not None: body['enumOptions'] = self.enum_options
3813
+ if self.multi_values_options: body['multiValuesOptions'] = self.multi_values_options
3814
+ if self.name is not None: body['name'] = self.name
3815
+ if self.query_id is not None: body['queryId'] = self.query_id
3816
+ if self.title is not None: body['title'] = self.title
3817
+ if self.type is not None: body['type'] = self.type
3818
+ if self.value: body['value'] = self.value
3819
+ return body
3820
+
3117
3821
  @classmethod
3118
3822
  def from_dict(cls, d: Dict[str, any]) -> Parameter:
3119
3823
  """Deserializes the Parameter from a dictionary."""
@@ -3232,6 +3936,29 @@ class Query:
3232
3936
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
3233
3937
  return body
3234
3938
 
3939
+ def as_shallow_dict(self) -> dict:
3940
+ """Serializes the Query into a shallow dictionary of its immediate attributes."""
3941
+ body = {}
3942
+ if self.apply_auto_limit is not None: body['apply_auto_limit'] = self.apply_auto_limit
3943
+ if self.catalog is not None: body['catalog'] = self.catalog
3944
+ if self.create_time is not None: body['create_time'] = self.create_time
3945
+ if self.description is not None: body['description'] = self.description
3946
+ if self.display_name is not None: body['display_name'] = self.display_name
3947
+ if self.id is not None: body['id'] = self.id
3948
+ if self.last_modifier_user_name is not None:
3949
+ body['last_modifier_user_name'] = self.last_modifier_user_name
3950
+ if self.lifecycle_state is not None: body['lifecycle_state'] = self.lifecycle_state
3951
+ if self.owner_user_name is not None: body['owner_user_name'] = self.owner_user_name
3952
+ if self.parameters: body['parameters'] = self.parameters
3953
+ if self.parent_path is not None: body['parent_path'] = self.parent_path
3954
+ if self.query_text is not None: body['query_text'] = self.query_text
3955
+ if self.run_as_mode is not None: body['run_as_mode'] = self.run_as_mode
3956
+ if self.schema is not None: body['schema'] = self.schema
3957
+ if self.tags: body['tags'] = self.tags
3958
+ if self.update_time is not None: body['update_time'] = self.update_time
3959
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
3960
+ return body
3961
+
3235
3962
  @classmethod
3236
3963
  def from_dict(cls, d: Dict[str, any]) -> Query:
3237
3964
  """Deserializes the Query from a dictionary."""
@@ -3273,6 +4000,14 @@ class QueryBackedValue:
3273
4000
  if self.values: body['values'] = [v for v in self.values]
3274
4001
  return body
3275
4002
 
4003
+ def as_shallow_dict(self) -> dict:
4004
+ """Serializes the QueryBackedValue into a shallow dictionary of its immediate attributes."""
4005
+ body = {}
4006
+ if self.multi_values_options: body['multi_values_options'] = self.multi_values_options
4007
+ if self.query_id is not None: body['query_id'] = self.query_id
4008
+ if self.values: body['values'] = self.values
4009
+ return body
4010
+
3276
4011
  @classmethod
3277
4012
  def from_dict(cls, d: Dict[str, any]) -> QueryBackedValue:
3278
4013
  """Deserializes the QueryBackedValue from a dictionary."""
@@ -3324,6 +4059,19 @@ class QueryEditContent:
3324
4059
  if self.tags: body['tags'] = [v for v in self.tags]
3325
4060
  return body
3326
4061
 
4062
+ def as_shallow_dict(self) -> dict:
4063
+ """Serializes the QueryEditContent into a shallow dictionary of its immediate attributes."""
4064
+ body = {}
4065
+ if self.data_source_id is not None: body['data_source_id'] = self.data_source_id
4066
+ if self.description is not None: body['description'] = self.description
4067
+ if self.name is not None: body['name'] = self.name
4068
+ if self.options: body['options'] = self.options
4069
+ if self.query is not None: body['query'] = self.query
4070
+ if self.query_id is not None: body['query_id'] = self.query_id
4071
+ if self.run_as_role is not None: body['run_as_role'] = self.run_as_role
4072
+ if self.tags: body['tags'] = self.tags
4073
+ return body
4074
+
3327
4075
  @classmethod
3328
4076
  def from_dict(cls, d: Dict[str, any]) -> QueryEditContent:
3329
4077
  """Deserializes the QueryEditContent from a dictionary."""
@@ -3363,6 +4111,16 @@ class QueryFilter:
3363
4111
  if self.warehouse_ids: body['warehouse_ids'] = [v for v in self.warehouse_ids]
3364
4112
  return body
3365
4113
 
4114
+ def as_shallow_dict(self) -> dict:
4115
+ """Serializes the QueryFilter into a shallow dictionary of its immediate attributes."""
4116
+ body = {}
4117
+ if self.query_start_time_range: body['query_start_time_range'] = self.query_start_time_range
4118
+ if self.statement_ids: body['statement_ids'] = self.statement_ids
4119
+ if self.statuses: body['statuses'] = self.statuses
4120
+ if self.user_ids: body['user_ids'] = self.user_ids
4121
+ if self.warehouse_ids: body['warehouse_ids'] = self.warehouse_ids
4122
+ return body
4123
+
3366
4124
  @classmethod
3367
4125
  def from_dict(cls, d: Dict[str, any]) -> QueryFilter:
3368
4126
  """Deserializes the QueryFilter from a dictionary."""
@@ -3472,6 +4230,33 @@ class QueryInfo:
3472
4230
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
3473
4231
  return body
3474
4232
 
4233
+ def as_shallow_dict(self) -> dict:
4234
+ """Serializes the QueryInfo into a shallow dictionary of its immediate attributes."""
4235
+ body = {}
4236
+ if self.channel_used: body['channel_used'] = self.channel_used
4237
+ if self.duration is not None: body['duration'] = self.duration
4238
+ if self.endpoint_id is not None: body['endpoint_id'] = self.endpoint_id
4239
+ if self.error_message is not None: body['error_message'] = self.error_message
4240
+ if self.executed_as_user_id is not None: body['executed_as_user_id'] = self.executed_as_user_id
4241
+ if self.executed_as_user_name is not None: body['executed_as_user_name'] = self.executed_as_user_name
4242
+ if self.execution_end_time_ms is not None: body['execution_end_time_ms'] = self.execution_end_time_ms
4243
+ if self.is_final is not None: body['is_final'] = self.is_final
4244
+ if self.lookup_key is not None: body['lookup_key'] = self.lookup_key
4245
+ if self.metrics: body['metrics'] = self.metrics
4246
+ if self.plans_state is not None: body['plans_state'] = self.plans_state
4247
+ if self.query_end_time_ms is not None: body['query_end_time_ms'] = self.query_end_time_ms
4248
+ if self.query_id is not None: body['query_id'] = self.query_id
4249
+ if self.query_start_time_ms is not None: body['query_start_time_ms'] = self.query_start_time_ms
4250
+ if self.query_text is not None: body['query_text'] = self.query_text
4251
+ if self.rows_produced is not None: body['rows_produced'] = self.rows_produced
4252
+ if self.spark_ui_url is not None: body['spark_ui_url'] = self.spark_ui_url
4253
+ if self.statement_type is not None: body['statement_type'] = self.statement_type
4254
+ if self.status is not None: body['status'] = self.status
4255
+ if self.user_id is not None: body['user_id'] = self.user_id
4256
+ if self.user_name is not None: body['user_name'] = self.user_name
4257
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
4258
+ return body
4259
+
3475
4260
  @classmethod
3476
4261
  def from_dict(cls, d: Dict[str, any]) -> QueryInfo:
3477
4262
  """Deserializes the QueryInfo from a dictionary."""
@@ -3522,6 +4307,15 @@ class QueryList:
3522
4307
  if self.results: body['results'] = [v.as_dict() for v in self.results]
3523
4308
  return body
3524
4309
 
4310
+ def as_shallow_dict(self) -> dict:
4311
+ """Serializes the QueryList into a shallow dictionary of its immediate attributes."""
4312
+ body = {}
4313
+ if self.count is not None: body['count'] = self.count
4314
+ if self.page is not None: body['page'] = self.page
4315
+ if self.page_size is not None: body['page_size'] = self.page_size
4316
+ if self.results: body['results'] = self.results
4317
+ return body
4318
+
3525
4319
  @classmethod
3526
4320
  def from_dict(cls, d: Dict[str, any]) -> QueryList:
3527
4321
  """Deserializes the QueryList from a dictionary."""
@@ -3605,8 +4399,38 @@ class QueryMetrics:
3605
4399
  write_remote_bytes: Optional[int] = None
3606
4400
  """Size pf persistent data written to cloud object storage in your cloud tenant, in bytes."""
3607
4401
 
3608
- def as_dict(self) -> dict:
3609
- """Serializes the QueryMetrics into a dictionary suitable for use as a JSON request body."""
4402
+ def as_dict(self) -> dict:
4403
+ """Serializes the QueryMetrics into a dictionary suitable for use as a JSON request body."""
4404
+ body = {}
4405
+ if self.compilation_time_ms is not None: body['compilation_time_ms'] = self.compilation_time_ms
4406
+ if self.execution_time_ms is not None: body['execution_time_ms'] = self.execution_time_ms
4407
+ if self.network_sent_bytes is not None: body['network_sent_bytes'] = self.network_sent_bytes
4408
+ if self.overloading_queue_start_timestamp is not None:
4409
+ body['overloading_queue_start_timestamp'] = self.overloading_queue_start_timestamp
4410
+ if self.photon_total_time_ms is not None: body['photon_total_time_ms'] = self.photon_total_time_ms
4411
+ if self.provisioning_queue_start_timestamp is not None:
4412
+ body['provisioning_queue_start_timestamp'] = self.provisioning_queue_start_timestamp
4413
+ if self.pruned_bytes is not None: body['pruned_bytes'] = self.pruned_bytes
4414
+ if self.pruned_files_count is not None: body['pruned_files_count'] = self.pruned_files_count
4415
+ if self.query_compilation_start_timestamp is not None:
4416
+ body['query_compilation_start_timestamp'] = self.query_compilation_start_timestamp
4417
+ if self.read_bytes is not None: body['read_bytes'] = self.read_bytes
4418
+ if self.read_cache_bytes is not None: body['read_cache_bytes'] = self.read_cache_bytes
4419
+ if self.read_files_count is not None: body['read_files_count'] = self.read_files_count
4420
+ if self.read_partitions_count is not None: body['read_partitions_count'] = self.read_partitions_count
4421
+ if self.read_remote_bytes is not None: body['read_remote_bytes'] = self.read_remote_bytes
4422
+ if self.result_fetch_time_ms is not None: body['result_fetch_time_ms'] = self.result_fetch_time_ms
4423
+ if self.result_from_cache is not None: body['result_from_cache'] = self.result_from_cache
4424
+ if self.rows_produced_count is not None: body['rows_produced_count'] = self.rows_produced_count
4425
+ if self.rows_read_count is not None: body['rows_read_count'] = self.rows_read_count
4426
+ if self.spill_to_disk_bytes is not None: body['spill_to_disk_bytes'] = self.spill_to_disk_bytes
4427
+ if self.task_total_time_ms is not None: body['task_total_time_ms'] = self.task_total_time_ms
4428
+ if self.total_time_ms is not None: body['total_time_ms'] = self.total_time_ms
4429
+ if self.write_remote_bytes is not None: body['write_remote_bytes'] = self.write_remote_bytes
4430
+ return body
4431
+
4432
+ def as_shallow_dict(self) -> dict:
4433
+ """Serializes the QueryMetrics into a shallow dictionary of its immediate attributes."""
3610
4434
  body = {}
3611
4435
  if self.compilation_time_ms is not None: body['compilation_time_ms'] = self.compilation_time_ms
3612
4436
  if self.execution_time_ms is not None: body['execution_time_ms'] = self.execution_time_ms
@@ -3685,6 +4509,15 @@ class QueryOptions:
3685
4509
  if self.schema is not None: body['schema'] = self.schema
3686
4510
  return body
3687
4511
 
4512
+ def as_shallow_dict(self) -> dict:
4513
+ """Serializes the QueryOptions into a shallow dictionary of its immediate attributes."""
4514
+ body = {}
4515
+ if self.catalog is not None: body['catalog'] = self.catalog
4516
+ if self.moved_to_trash_at is not None: body['moved_to_trash_at'] = self.moved_to_trash_at
4517
+ if self.parameters: body['parameters'] = self.parameters
4518
+ if self.schema is not None: body['schema'] = self.schema
4519
+ return body
4520
+
3688
4521
  @classmethod
3689
4522
  def from_dict(cls, d: Dict[str, any]) -> QueryOptions:
3690
4523
  """Deserializes the QueryOptions from a dictionary."""
@@ -3734,6 +4567,19 @@ class QueryParameter:
3734
4567
  if self.title is not None: body['title'] = self.title
3735
4568
  return body
3736
4569
 
4570
+ def as_shallow_dict(self) -> dict:
4571
+ """Serializes the QueryParameter into a shallow dictionary of its immediate attributes."""
4572
+ body = {}
4573
+ if self.date_range_value: body['date_range_value'] = self.date_range_value
4574
+ if self.date_value: body['date_value'] = self.date_value
4575
+ if self.enum_value: body['enum_value'] = self.enum_value
4576
+ if self.name is not None: body['name'] = self.name
4577
+ if self.numeric_value: body['numeric_value'] = self.numeric_value
4578
+ if self.query_backed_value: body['query_backed_value'] = self.query_backed_value
4579
+ if self.text_value: body['text_value'] = self.text_value
4580
+ if self.title is not None: body['title'] = self.title
4581
+ return body
4582
+
3737
4583
  @classmethod
3738
4584
  def from_dict(cls, d: Dict[str, any]) -> QueryParameter:
3739
4585
  """Deserializes the QueryParameter from a dictionary."""
@@ -3791,6 +4637,19 @@ class QueryPostContent:
3791
4637
  if self.tags: body['tags'] = [v for v in self.tags]
3792
4638
  return body
3793
4639
 
4640
+ def as_shallow_dict(self) -> dict:
4641
+ """Serializes the QueryPostContent into a shallow dictionary of its immediate attributes."""
4642
+ body = {}
4643
+ if self.data_source_id is not None: body['data_source_id'] = self.data_source_id
4644
+ if self.description is not None: body['description'] = self.description
4645
+ if self.name is not None: body['name'] = self.name
4646
+ if self.options: body['options'] = self.options
4647
+ if self.parent is not None: body['parent'] = self.parent
4648
+ if self.query is not None: body['query'] = self.query
4649
+ if self.run_as_role is not None: body['run_as_role'] = self.run_as_role
4650
+ if self.tags: body['tags'] = self.tags
4651
+ return body
4652
+
3794
4653
  @classmethod
3795
4654
  def from_dict(cls, d: Dict[str, any]) -> QueryPostContent:
3796
4655
  """Deserializes the QueryPostContent from a dictionary."""
@@ -3858,6 +4717,13 @@ class RepeatedEndpointConfPairs:
3858
4717
  body['configuration_pairs'] = [v.as_dict() for v in self.configuration_pairs]
3859
4718
  return body
3860
4719
 
4720
+ def as_shallow_dict(self) -> dict:
4721
+ """Serializes the RepeatedEndpointConfPairs into a shallow dictionary of its immediate attributes."""
4722
+ body = {}
4723
+ if self.config_pair: body['config_pair'] = self.config_pair
4724
+ if self.configuration_pairs: body['configuration_pairs'] = self.configuration_pairs
4725
+ return body
4726
+
3861
4727
  @classmethod
3862
4728
  def from_dict(cls, d: Dict[str, any]) -> RepeatedEndpointConfPairs:
3863
4729
  """Deserializes the RepeatedEndpointConfPairs from a dictionary."""
@@ -3873,6 +4739,11 @@ class RestoreResponse:
3873
4739
  body = {}
3874
4740
  return body
3875
4741
 
4742
+ def as_shallow_dict(self) -> dict:
4743
+ """Serializes the RestoreResponse into a shallow dictionary of its immediate attributes."""
4744
+ body = {}
4745
+ return body
4746
+
3876
4747
  @classmethod
3877
4748
  def from_dict(cls, d: Dict[str, any]) -> RestoreResponse:
3878
4749
  """Deserializes the RestoreResponse from a dictionary."""
@@ -3924,6 +4795,20 @@ class ResultData:
3924
4795
  if self.row_offset is not None: body['row_offset'] = self.row_offset
3925
4796
  return body
3926
4797
 
4798
+ def as_shallow_dict(self) -> dict:
4799
+ """Serializes the ResultData into a shallow dictionary of its immediate attributes."""
4800
+ body = {}
4801
+ if self.byte_count is not None: body['byte_count'] = self.byte_count
4802
+ if self.chunk_index is not None: body['chunk_index'] = self.chunk_index
4803
+ if self.data_array: body['data_array'] = self.data_array
4804
+ if self.external_links: body['external_links'] = self.external_links
4805
+ if self.next_chunk_index is not None: body['next_chunk_index'] = self.next_chunk_index
4806
+ if self.next_chunk_internal_link is not None:
4807
+ body['next_chunk_internal_link'] = self.next_chunk_internal_link
4808
+ if self.row_count is not None: body['row_count'] = self.row_count
4809
+ if self.row_offset is not None: body['row_offset'] = self.row_offset
4810
+ return body
4811
+
3927
4812
  @classmethod
3928
4813
  def from_dict(cls, d: Dict[str, any]) -> ResultData:
3929
4814
  """Deserializes the ResultData from a dictionary."""
@@ -3974,6 +4859,18 @@ class ResultManifest:
3974
4859
  if self.truncated is not None: body['truncated'] = self.truncated
3975
4860
  return body
3976
4861
 
4862
+ def as_shallow_dict(self) -> dict:
4863
+ """Serializes the ResultManifest into a shallow dictionary of its immediate attributes."""
4864
+ body = {}
4865
+ if self.chunks: body['chunks'] = self.chunks
4866
+ if self.format is not None: body['format'] = self.format
4867
+ if self.schema: body['schema'] = self.schema
4868
+ if self.total_byte_count is not None: body['total_byte_count'] = self.total_byte_count
4869
+ if self.total_chunk_count is not None: body['total_chunk_count'] = self.total_chunk_count
4870
+ if self.total_row_count is not None: body['total_row_count'] = self.total_row_count
4871
+ if self.truncated is not None: body['truncated'] = self.truncated
4872
+ return body
4873
+
3977
4874
  @classmethod
3978
4875
  def from_dict(cls, d: Dict[str, any]) -> ResultManifest:
3979
4876
  """Deserializes the ResultManifest from a dictionary."""
@@ -4001,6 +4898,13 @@ class ResultSchema:
4001
4898
  if self.columns: body['columns'] = [v.as_dict() for v in self.columns]
4002
4899
  return body
4003
4900
 
4901
+ def as_shallow_dict(self) -> dict:
4902
+ """Serializes the ResultSchema into a shallow dictionary of its immediate attributes."""
4903
+ body = {}
4904
+ if self.column_count is not None: body['column_count'] = self.column_count
4905
+ if self.columns: body['columns'] = self.columns
4906
+ return body
4907
+
4004
4908
  @classmethod
4005
4909
  def from_dict(cls, d: Dict[str, any]) -> ResultSchema:
4006
4910
  """Deserializes the ResultSchema from a dictionary."""
@@ -4035,6 +4939,13 @@ class ServiceError:
4035
4939
  if self.message is not None: body['message'] = self.message
4036
4940
  return body
4037
4941
 
4942
+ def as_shallow_dict(self) -> dict:
4943
+ """Serializes the ServiceError into a shallow dictionary of its immediate attributes."""
4944
+ body = {}
4945
+ if self.error_code is not None: body['error_code'] = self.error_code
4946
+ if self.message is not None: body['message'] = self.message
4947
+ return body
4948
+
4038
4949
  @classmethod
4039
4950
  def from_dict(cls, d: Dict[str, any]) -> ServiceError:
4040
4951
  """Deserializes the ServiceError from a dictionary."""
@@ -4078,6 +4989,14 @@ class SetResponse:
4078
4989
  if self.object_type is not None: body['object_type'] = self.object_type.value
4079
4990
  return body
4080
4991
 
4992
+ def as_shallow_dict(self) -> dict:
4993
+ """Serializes the SetResponse into a shallow dictionary of its immediate attributes."""
4994
+ body = {}
4995
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
4996
+ if self.object_id is not None: body['object_id'] = self.object_id
4997
+ if self.object_type is not None: body['object_type'] = self.object_type
4998
+ return body
4999
+
4081
5000
  @classmethod
4082
5001
  def from_dict(cls, d: Dict[str, any]) -> SetResponse:
4083
5002
  """Deserializes the SetResponse from a dictionary."""
@@ -4138,6 +5057,22 @@ class SetWorkspaceWarehouseConfigRequest:
4138
5057
  body['sql_configuration_parameters'] = self.sql_configuration_parameters.as_dict()
4139
5058
  return body
4140
5059
 
5060
+ def as_shallow_dict(self) -> dict:
5061
+ """Serializes the SetWorkspaceWarehouseConfigRequest into a shallow dictionary of its immediate attributes."""
5062
+ body = {}
5063
+ if self.channel: body['channel'] = self.channel
5064
+ if self.config_param: body['config_param'] = self.config_param
5065
+ if self.data_access_config: body['data_access_config'] = self.data_access_config
5066
+ if self.enabled_warehouse_types: body['enabled_warehouse_types'] = self.enabled_warehouse_types
5067
+ if self.global_param: body['global_param'] = self.global_param
5068
+ if self.google_service_account is not None:
5069
+ body['google_service_account'] = self.google_service_account
5070
+ if self.instance_profile_arn is not None: body['instance_profile_arn'] = self.instance_profile_arn
5071
+ if self.security_policy is not None: body['security_policy'] = self.security_policy
5072
+ if self.sql_configuration_parameters:
5073
+ body['sql_configuration_parameters'] = self.sql_configuration_parameters
5074
+ return body
5075
+
4141
5076
  @classmethod
4142
5077
  def from_dict(cls, d: Dict[str, any]) -> SetWorkspaceWarehouseConfigRequest:
4143
5078
  """Deserializes the SetWorkspaceWarehouseConfigRequest from a dictionary."""
@@ -4170,6 +5105,11 @@ class SetWorkspaceWarehouseConfigResponse:
4170
5105
  body = {}
4171
5106
  return body
4172
5107
 
5108
+ def as_shallow_dict(self) -> dict:
5109
+ """Serializes the SetWorkspaceWarehouseConfigResponse into a shallow dictionary of its immediate attributes."""
5110
+ body = {}
5111
+ return body
5112
+
4173
5113
  @classmethod
4174
5114
  def from_dict(cls, d: Dict[str, any]) -> SetWorkspaceWarehouseConfigResponse:
4175
5115
  """Deserializes the SetWorkspaceWarehouseConfigResponse from a dictionary."""
@@ -4192,6 +5132,11 @@ class StartWarehouseResponse:
4192
5132
  body = {}
4193
5133
  return body
4194
5134
 
5135
+ def as_shallow_dict(self) -> dict:
5136
+ """Serializes the StartWarehouseResponse into a shallow dictionary of its immediate attributes."""
5137
+ body = {}
5138
+ return body
5139
+
4195
5140
  @classmethod
4196
5141
  def from_dict(cls, d: Dict[str, any]) -> StartWarehouseResponse:
4197
5142
  """Deserializes the StartWarehouseResponse from a dictionary."""
@@ -4233,6 +5178,14 @@ class StatementParameterListItem:
4233
5178
  if self.value is not None: body['value'] = self.value
4234
5179
  return body
4235
5180
 
5181
+ def as_shallow_dict(self) -> dict:
5182
+ """Serializes the StatementParameterListItem into a shallow dictionary of its immediate attributes."""
5183
+ body = {}
5184
+ if self.name is not None: body['name'] = self.name
5185
+ if self.type is not None: body['type'] = self.type
5186
+ if self.value is not None: body['value'] = self.value
5187
+ return body
5188
+
4236
5189
  @classmethod
4237
5190
  def from_dict(cls, d: Dict[str, any]) -> StatementParameterListItem:
4238
5191
  """Deserializes the StatementParameterListItem from a dictionary."""
@@ -4262,6 +5215,15 @@ class StatementResponse:
4262
5215
  if self.status: body['status'] = self.status.as_dict()
4263
5216
  return body
4264
5217
 
5218
+ def as_shallow_dict(self) -> dict:
5219
+ """Serializes the StatementResponse into a shallow dictionary of its immediate attributes."""
5220
+ body = {}
5221
+ if self.manifest: body['manifest'] = self.manifest
5222
+ if self.result: body['result'] = self.result
5223
+ if self.statement_id is not None: body['statement_id'] = self.statement_id
5224
+ if self.status: body['status'] = self.status
5225
+ return body
5226
+
4265
5227
  @classmethod
4266
5228
  def from_dict(cls, d: Dict[str, any]) -> StatementResponse:
4267
5229
  """Deserializes the StatementResponse from a dictionary."""
@@ -4306,6 +5268,13 @@ class StatementStatus:
4306
5268
  if self.state is not None: body['state'] = self.state.value
4307
5269
  return body
4308
5270
 
5271
+ def as_shallow_dict(self) -> dict:
5272
+ """Serializes the StatementStatus into a shallow dictionary of its immediate attributes."""
5273
+ body = {}
5274
+ if self.error: body['error'] = self.error
5275
+ if self.state is not None: body['state'] = self.state
5276
+ return body
5277
+
4309
5278
  @classmethod
4310
5279
  def from_dict(cls, d: Dict[str, any]) -> StatementStatus:
4311
5280
  """Deserializes the StatementStatus from a dictionary."""
@@ -4329,6 +5298,11 @@ class StopWarehouseResponse:
4329
5298
  body = {}
4330
5299
  return body
4331
5300
 
5301
+ def as_shallow_dict(self) -> dict:
5302
+ """Serializes the StopWarehouseResponse into a shallow dictionary of its immediate attributes."""
5303
+ body = {}
5304
+ return body
5305
+
4332
5306
  @classmethod
4333
5307
  def from_dict(cls, d: Dict[str, any]) -> StopWarehouseResponse:
4334
5308
  """Deserializes the StopWarehouseResponse from a dictionary."""
@@ -4345,6 +5319,12 @@ class Success:
4345
5319
  if self.message is not None: body['message'] = self.message.value
4346
5320
  return body
4347
5321
 
5322
+ def as_shallow_dict(self) -> dict:
5323
+ """Serializes the Success into a shallow dictionary of its immediate attributes."""
5324
+ body = {}
5325
+ if self.message is not None: body['message'] = self.message
5326
+ return body
5327
+
4348
5328
  @classmethod
4349
5329
  def from_dict(cls, d: Dict[str, any]) -> Success:
4350
5330
  """Deserializes the Success from a dictionary."""
@@ -4375,6 +5355,14 @@ class TerminationReason:
4375
5355
  if self.type is not None: body['type'] = self.type.value
4376
5356
  return body
4377
5357
 
5358
+ def as_shallow_dict(self) -> dict:
5359
+ """Serializes the TerminationReason into a shallow dictionary of its immediate attributes."""
5360
+ body = {}
5361
+ if self.code is not None: body['code'] = self.code
5362
+ if self.parameters: body['parameters'] = self.parameters
5363
+ if self.type is not None: body['type'] = self.type
5364
+ return body
5365
+
4378
5366
  @classmethod
4379
5367
  def from_dict(cls, d: Dict[str, any]) -> TerminationReason:
4380
5368
  """Deserializes the TerminationReason from a dictionary."""
@@ -4486,6 +5474,12 @@ class TextValue:
4486
5474
  if self.value is not None: body['value'] = self.value
4487
5475
  return body
4488
5476
 
5477
+ def as_shallow_dict(self) -> dict:
5478
+ """Serializes the TextValue into a shallow dictionary of its immediate attributes."""
5479
+ body = {}
5480
+ if self.value is not None: body['value'] = self.value
5481
+ return body
5482
+
4489
5483
  @classmethod
4490
5484
  def from_dict(cls, d: Dict[str, any]) -> TextValue:
4491
5485
  """Deserializes the TextValue from a dictionary."""
@@ -4507,6 +5501,13 @@ class TimeRange:
4507
5501
  if self.start_time_ms is not None: body['start_time_ms'] = self.start_time_ms
4508
5502
  return body
4509
5503
 
5504
+ def as_shallow_dict(self) -> dict:
5505
+ """Serializes the TimeRange into a shallow dictionary of its immediate attributes."""
5506
+ body = {}
5507
+ if self.end_time_ms is not None: body['end_time_ms'] = self.end_time_ms
5508
+ if self.start_time_ms is not None: body['start_time_ms'] = self.start_time_ms
5509
+ return body
5510
+
4510
5511
  @classmethod
4511
5512
  def from_dict(cls, d: Dict[str, any]) -> TimeRange:
4512
5513
  """Deserializes the TimeRange from a dictionary."""
@@ -4524,6 +5525,12 @@ class TransferOwnershipObjectId:
4524
5525
  if self.new_owner is not None: body['new_owner'] = self.new_owner
4525
5526
  return body
4526
5527
 
5528
+ def as_shallow_dict(self) -> dict:
5529
+ """Serializes the TransferOwnershipObjectId into a shallow dictionary of its immediate attributes."""
5530
+ body = {}
5531
+ if self.new_owner is not None: body['new_owner'] = self.new_owner
5532
+ return body
5533
+
4527
5534
  @classmethod
4528
5535
  def from_dict(cls, d: Dict[str, any]) -> TransferOwnershipObjectId:
4529
5536
  """Deserializes the TransferOwnershipObjectId from a dictionary."""
@@ -4549,6 +5556,14 @@ class UpdateAlertRequest:
4549
5556
  if self.update_mask is not None: body['update_mask'] = self.update_mask
4550
5557
  return body
4551
5558
 
5559
+ def as_shallow_dict(self) -> dict:
5560
+ """Serializes the UpdateAlertRequest into a shallow dictionary of its immediate attributes."""
5561
+ body = {}
5562
+ if self.alert: body['alert'] = self.alert
5563
+ if self.id is not None: body['id'] = self.id
5564
+ if self.update_mask is not None: body['update_mask'] = self.update_mask
5565
+ return body
5566
+
4552
5567
  @classmethod
4553
5568
  def from_dict(cls, d: Dict[str, any]) -> UpdateAlertRequest:
4554
5569
  """Deserializes the UpdateAlertRequest from a dictionary."""
@@ -4602,6 +5617,19 @@ class UpdateAlertRequestAlert:
4602
5617
  if self.seconds_to_retrigger is not None: body['seconds_to_retrigger'] = self.seconds_to_retrigger
4603
5618
  return body
4604
5619
 
5620
+ def as_shallow_dict(self) -> dict:
5621
+ """Serializes the UpdateAlertRequestAlert into a shallow dictionary of its immediate attributes."""
5622
+ body = {}
5623
+ if self.condition: body['condition'] = self.condition
5624
+ if self.custom_body is not None: body['custom_body'] = self.custom_body
5625
+ if self.custom_subject is not None: body['custom_subject'] = self.custom_subject
5626
+ if self.display_name is not None: body['display_name'] = self.display_name
5627
+ if self.notify_on_ok is not None: body['notify_on_ok'] = self.notify_on_ok
5628
+ if self.owner_user_name is not None: body['owner_user_name'] = self.owner_user_name
5629
+ if self.query_id is not None: body['query_id'] = self.query_id
5630
+ if self.seconds_to_retrigger is not None: body['seconds_to_retrigger'] = self.seconds_to_retrigger
5631
+ return body
5632
+
4605
5633
  @classmethod
4606
5634
  def from_dict(cls, d: Dict[str, any]) -> UpdateAlertRequestAlert:
4607
5635
  """Deserializes the UpdateAlertRequestAlert from a dictionary."""
@@ -4634,6 +5662,14 @@ class UpdateQueryRequest:
4634
5662
  if self.update_mask is not None: body['update_mask'] = self.update_mask
4635
5663
  return body
4636
5664
 
5665
+ def as_shallow_dict(self) -> dict:
5666
+ """Serializes the UpdateQueryRequest into a shallow dictionary of its immediate attributes."""
5667
+ body = {}
5668
+ if self.id is not None: body['id'] = self.id
5669
+ if self.query: body['query'] = self.query
5670
+ if self.update_mask is not None: body['update_mask'] = self.update_mask
5671
+ return body
5672
+
4637
5673
  @classmethod
4638
5674
  def from_dict(cls, d: Dict[str, any]) -> UpdateQueryRequest:
4639
5675
  """Deserializes the UpdateQueryRequest from a dictionary."""
@@ -4692,6 +5728,22 @@ class UpdateQueryRequestQuery:
4692
5728
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
4693
5729
  return body
4694
5730
 
5731
+ def as_shallow_dict(self) -> dict:
5732
+ """Serializes the UpdateQueryRequestQuery into a shallow dictionary of its immediate attributes."""
5733
+ body = {}
5734
+ if self.apply_auto_limit is not None: body['apply_auto_limit'] = self.apply_auto_limit
5735
+ if self.catalog is not None: body['catalog'] = self.catalog
5736
+ if self.description is not None: body['description'] = self.description
5737
+ if self.display_name is not None: body['display_name'] = self.display_name
5738
+ if self.owner_user_name is not None: body['owner_user_name'] = self.owner_user_name
5739
+ if self.parameters: body['parameters'] = self.parameters
5740
+ if self.query_text is not None: body['query_text'] = self.query_text
5741
+ if self.run_as_mode is not None: body['run_as_mode'] = self.run_as_mode
5742
+ if self.schema is not None: body['schema'] = self.schema
5743
+ if self.tags: body['tags'] = self.tags
5744
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
5745
+ return body
5746
+
4695
5747
  @classmethod
4696
5748
  def from_dict(cls, d: Dict[str, any]) -> UpdateQueryRequestQuery:
4697
5749
  """Deserializes the UpdateQueryRequestQuery from a dictionary."""
@@ -4716,6 +5768,11 @@ class UpdateResponse:
4716
5768
  body = {}
4717
5769
  return body
4718
5770
 
5771
+ def as_shallow_dict(self) -> dict:
5772
+ """Serializes the UpdateResponse into a shallow dictionary of its immediate attributes."""
5773
+ body = {}
5774
+ return body
5775
+
4719
5776
  @classmethod
4720
5777
  def from_dict(cls, d: Dict[str, any]) -> UpdateResponse:
4721
5778
  """Deserializes the UpdateResponse from a dictionary."""
@@ -4741,6 +5798,14 @@ class UpdateVisualizationRequest:
4741
5798
  if self.visualization: body['visualization'] = self.visualization.as_dict()
4742
5799
  return body
4743
5800
 
5801
+ def as_shallow_dict(self) -> dict:
5802
+ """Serializes the UpdateVisualizationRequest into a shallow dictionary of its immediate attributes."""
5803
+ body = {}
5804
+ if self.id is not None: body['id'] = self.id
5805
+ if self.update_mask is not None: body['update_mask'] = self.update_mask
5806
+ if self.visualization: body['visualization'] = self.visualization
5807
+ return body
5808
+
4744
5809
  @classmethod
4745
5810
  def from_dict(cls, d: Dict[str, any]) -> UpdateVisualizationRequest:
4746
5811
  """Deserializes the UpdateVisualizationRequest from a dictionary."""
@@ -4774,6 +5839,15 @@ class UpdateVisualizationRequestVisualization:
4774
5839
  if self.type is not None: body['type'] = self.type
4775
5840
  return body
4776
5841
 
5842
+ def as_shallow_dict(self) -> dict:
5843
+ """Serializes the UpdateVisualizationRequestVisualization into a shallow dictionary of its immediate attributes."""
5844
+ body = {}
5845
+ if self.display_name is not None: body['display_name'] = self.display_name
5846
+ if self.serialized_options is not None: body['serialized_options'] = self.serialized_options
5847
+ if self.serialized_query_plan is not None: body['serialized_query_plan'] = self.serialized_query_plan
5848
+ if self.type is not None: body['type'] = self.type
5849
+ return body
5850
+
4777
5851
  @classmethod
4778
5852
  def from_dict(cls, d: Dict[str, any]) -> UpdateVisualizationRequestVisualization:
4779
5853
  """Deserializes the UpdateVisualizationRequestVisualization from a dictionary."""
@@ -4799,6 +5873,14 @@ class User:
4799
5873
  if self.name is not None: body['name'] = self.name
4800
5874
  return body
4801
5875
 
5876
+ def as_shallow_dict(self) -> dict:
5877
+ """Serializes the User into a shallow dictionary of its immediate attributes."""
5878
+ body = {}
5879
+ if self.email is not None: body['email'] = self.email
5880
+ if self.id is not None: body['id'] = self.id
5881
+ if self.name is not None: body['name'] = self.name
5882
+ return body
5883
+
4802
5884
  @classmethod
4803
5885
  def from_dict(cls, d: Dict[str, any]) -> User:
4804
5886
  """Deserializes the User from a dictionary."""
@@ -4846,6 +5928,19 @@ class Visualization:
4846
5928
  if self.update_time is not None: body['update_time'] = self.update_time
4847
5929
  return body
4848
5930
 
5931
+ def as_shallow_dict(self) -> dict:
5932
+ """Serializes the Visualization into a shallow dictionary of its immediate attributes."""
5933
+ body = {}
5934
+ if self.create_time is not None: body['create_time'] = self.create_time
5935
+ if self.display_name is not None: body['display_name'] = self.display_name
5936
+ if self.id is not None: body['id'] = self.id
5937
+ if self.query_id is not None: body['query_id'] = self.query_id
5938
+ if self.serialized_options is not None: body['serialized_options'] = self.serialized_options
5939
+ if self.serialized_query_plan is not None: body['serialized_query_plan'] = self.serialized_query_plan
5940
+ if self.type is not None: body['type'] = self.type
5941
+ if self.update_time is not None: body['update_time'] = self.update_time
5942
+ return body
5943
+
4849
5944
  @classmethod
4850
5945
  def from_dict(cls, d: Dict[str, any]) -> Visualization:
4851
5946
  """Deserializes the Visualization from a dictionary."""
@@ -4883,6 +5978,16 @@ class WarehouseAccessControlRequest:
4883
5978
  if self.user_name is not None: body['user_name'] = self.user_name
4884
5979
  return body
4885
5980
 
5981
+ def as_shallow_dict(self) -> dict:
5982
+ """Serializes the WarehouseAccessControlRequest into a shallow dictionary of its immediate attributes."""
5983
+ body = {}
5984
+ if self.group_name is not None: body['group_name'] = self.group_name
5985
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
5986
+ if self.service_principal_name is not None:
5987
+ body['service_principal_name'] = self.service_principal_name
5988
+ if self.user_name is not None: body['user_name'] = self.user_name
5989
+ return body
5990
+
4886
5991
  @classmethod
4887
5992
  def from_dict(cls, d: Dict[str, any]) -> WarehouseAccessControlRequest:
4888
5993
  """Deserializes the WarehouseAccessControlRequest from a dictionary."""
@@ -4920,6 +6025,17 @@ class WarehouseAccessControlResponse:
4920
6025
  if self.user_name is not None: body['user_name'] = self.user_name
4921
6026
  return body
4922
6027
 
6028
+ def as_shallow_dict(self) -> dict:
6029
+ """Serializes the WarehouseAccessControlResponse into a shallow dictionary of its immediate attributes."""
6030
+ body = {}
6031
+ if self.all_permissions: body['all_permissions'] = self.all_permissions
6032
+ if self.display_name is not None: body['display_name'] = self.display_name
6033
+ if self.group_name is not None: body['group_name'] = self.group_name
6034
+ if self.service_principal_name is not None:
6035
+ body['service_principal_name'] = self.service_principal_name
6036
+ if self.user_name is not None: body['user_name'] = self.user_name
6037
+ return body
6038
+
4923
6039
  @classmethod
4924
6040
  def from_dict(cls, d: Dict[str, any]) -> WarehouseAccessControlResponse:
4925
6041
  """Deserializes the WarehouseAccessControlResponse from a dictionary."""
@@ -4947,6 +6063,14 @@ class WarehousePermission:
4947
6063
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
4948
6064
  return body
4949
6065
 
6066
+ def as_shallow_dict(self) -> dict:
6067
+ """Serializes the WarehousePermission into a shallow dictionary of its immediate attributes."""
6068
+ body = {}
6069
+ if self.inherited is not None: body['inherited'] = self.inherited
6070
+ if self.inherited_from_object: body['inherited_from_object'] = self.inherited_from_object
6071
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
6072
+ return body
6073
+
4950
6074
  @classmethod
4951
6075
  def from_dict(cls, d: Dict[str, any]) -> WarehousePermission:
4952
6076
  """Deserializes the WarehousePermission from a dictionary."""
@@ -4981,6 +6105,14 @@ class WarehousePermissions:
4981
6105
  if self.object_type is not None: body['object_type'] = self.object_type
4982
6106
  return body
4983
6107
 
6108
+ def as_shallow_dict(self) -> dict:
6109
+ """Serializes the WarehousePermissions into a shallow dictionary of its immediate attributes."""
6110
+ body = {}
6111
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
6112
+ if self.object_id is not None: body['object_id'] = self.object_id
6113
+ if self.object_type is not None: body['object_type'] = self.object_type
6114
+ return body
6115
+
4984
6116
  @classmethod
4985
6117
  def from_dict(cls, d: Dict[str, any]) -> WarehousePermissions:
4986
6118
  """Deserializes the WarehousePermissions from a dictionary."""
@@ -5004,6 +6136,13 @@ class WarehousePermissionsDescription:
5004
6136
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
5005
6137
  return body
5006
6138
 
6139
+ def as_shallow_dict(self) -> dict:
6140
+ """Serializes the WarehousePermissionsDescription into a shallow dictionary of its immediate attributes."""
6141
+ body = {}
6142
+ if self.description is not None: body['description'] = self.description
6143
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
6144
+ return body
6145
+
5007
6146
  @classmethod
5008
6147
  def from_dict(cls, d: Dict[str, any]) -> WarehousePermissionsDescription:
5009
6148
  """Deserializes the WarehousePermissionsDescription from a dictionary."""
@@ -5026,6 +6165,13 @@ class WarehousePermissionsRequest:
5026
6165
  if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
5027
6166
  return body
5028
6167
 
6168
+ def as_shallow_dict(self) -> dict:
6169
+ """Serializes the WarehousePermissionsRequest into a shallow dictionary of its immediate attributes."""
6170
+ body = {}
6171
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
6172
+ if self.warehouse_id is not None: body['warehouse_id'] = self.warehouse_id
6173
+ return body
6174
+
5029
6175
  @classmethod
5030
6176
  def from_dict(cls, d: Dict[str, any]) -> WarehousePermissionsRequest:
5031
6177
  """Deserializes the WarehousePermissionsRequest from a dictionary."""
@@ -5050,6 +6196,13 @@ class WarehouseTypePair:
5050
6196
  if self.warehouse_type is not None: body['warehouse_type'] = self.warehouse_type.value
5051
6197
  return body
5052
6198
 
6199
+ def as_shallow_dict(self) -> dict:
6200
+ """Serializes the WarehouseTypePair into a shallow dictionary of its immediate attributes."""
6201
+ body = {}
6202
+ if self.enabled is not None: body['enabled'] = self.enabled
6203
+ if self.warehouse_type is not None: body['warehouse_type'] = self.warehouse_type
6204
+ return body
6205
+
5053
6206
  @classmethod
5054
6207
  def from_dict(cls, d: Dict[str, any]) -> WarehouseTypePair:
5055
6208
  """Deserializes the WarehouseTypePair from a dictionary."""
@@ -5090,6 +6243,15 @@ class Widget:
5090
6243
  if self.width is not None: body['width'] = self.width
5091
6244
  return body
5092
6245
 
6246
+ def as_shallow_dict(self) -> dict:
6247
+ """Serializes the Widget into a shallow dictionary of its immediate attributes."""
6248
+ body = {}
6249
+ if self.id is not None: body['id'] = self.id
6250
+ if self.options: body['options'] = self.options
6251
+ if self.visualization: body['visualization'] = self.visualization
6252
+ if self.width is not None: body['width'] = self.width
6253
+ return body
6254
+
5093
6255
  @classmethod
5094
6256
  def from_dict(cls, d: Dict[str, any]) -> Widget:
5095
6257
  """Deserializes the Widget from a dictionary."""
@@ -5136,6 +6298,18 @@ class WidgetOptions:
5136
6298
  if self.updated_at is not None: body['updated_at'] = self.updated_at
5137
6299
  return body
5138
6300
 
6301
+ def as_shallow_dict(self) -> dict:
6302
+ """Serializes the WidgetOptions into a shallow dictionary of its immediate attributes."""
6303
+ body = {}
6304
+ if self.created_at is not None: body['created_at'] = self.created_at
6305
+ if self.description is not None: body['description'] = self.description
6306
+ if self.is_hidden is not None: body['isHidden'] = self.is_hidden
6307
+ if self.parameter_mappings: body['parameterMappings'] = self.parameter_mappings
6308
+ if self.position: body['position'] = self.position
6309
+ if self.title is not None: body['title'] = self.title
6310
+ if self.updated_at is not None: body['updated_at'] = self.updated_at
6311
+ return body
6312
+
5139
6313
  @classmethod
5140
6314
  def from_dict(cls, d: Dict[str, any]) -> WidgetOptions:
5141
6315
  """Deserializes the WidgetOptions from a dictionary."""
@@ -5178,6 +6352,16 @@ class WidgetPosition:
5178
6352
  if self.size_y is not None: body['sizeY'] = self.size_y
5179
6353
  return body
5180
6354
 
6355
+ def as_shallow_dict(self) -> dict:
6356
+ """Serializes the WidgetPosition into a shallow dictionary of its immediate attributes."""
6357
+ body = {}
6358
+ if self.auto_height is not None: body['autoHeight'] = self.auto_height
6359
+ if self.col is not None: body['col'] = self.col
6360
+ if self.row is not None: body['row'] = self.row
6361
+ if self.size_x is not None: body['sizeX'] = self.size_x
6362
+ if self.size_y is not None: body['sizeY'] = self.size_y
6363
+ return body
6364
+
5181
6365
  @classmethod
5182
6366
  def from_dict(cls, d: Dict[str, any]) -> WidgetPosition:
5183
6367
  """Deserializes the WidgetPosition from a dictionary."""