databricks-sdk 0.37.0__py3-none-any.whl → 0.39.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 (33) hide show
  1. databricks/sdk/__init__.py +24 -2
  2. databricks/sdk/_base_client.py +61 -14
  3. databricks/sdk/config.py +10 -9
  4. databricks/sdk/credentials_provider.py +6 -5
  5. databricks/sdk/mixins/jobs.py +49 -0
  6. databricks/sdk/mixins/open_ai_client.py +2 -2
  7. databricks/sdk/service/apps.py +185 -4
  8. databricks/sdk/service/billing.py +248 -1
  9. databricks/sdk/service/catalog.py +1943 -46
  10. databricks/sdk/service/cleanrooms.py +1281 -0
  11. databricks/sdk/service/compute.py +1486 -8
  12. databricks/sdk/service/dashboards.py +336 -11
  13. databricks/sdk/service/files.py +162 -2
  14. databricks/sdk/service/iam.py +353 -2
  15. databricks/sdk/service/jobs.py +1281 -16
  16. databricks/sdk/service/marketplace.py +688 -0
  17. databricks/sdk/service/ml.py +1038 -2
  18. databricks/sdk/service/oauth2.py +176 -0
  19. databricks/sdk/service/pipelines.py +602 -15
  20. databricks/sdk/service/provisioning.py +402 -0
  21. databricks/sdk/service/serving.py +615 -0
  22. databricks/sdk/service/settings.py +1190 -3
  23. databricks/sdk/service/sharing.py +328 -2
  24. databricks/sdk/service/sql.py +1186 -2
  25. databricks/sdk/service/vectorsearch.py +290 -0
  26. databricks/sdk/service/workspace.py +453 -1
  27. databricks/sdk/version.py +1 -1
  28. {databricks_sdk-0.37.0.dist-info → databricks_sdk-0.39.0.dist-info}/METADATA +26 -26
  29. {databricks_sdk-0.37.0.dist-info → databricks_sdk-0.39.0.dist-info}/RECORD +33 -31
  30. {databricks_sdk-0.37.0.dist-info → databricks_sdk-0.39.0.dist-info}/WHEEL +1 -1
  31. {databricks_sdk-0.37.0.dist-info → databricks_sdk-0.39.0.dist-info}/LICENSE +0 -0
  32. {databricks_sdk-0.37.0.dist-info → databricks_sdk-0.39.0.dist-info}/NOTICE +0 -0
  33. {databricks_sdk-0.37.0.dist-info → databricks_sdk-0.39.0.dist-info}/top_level.txt +0 -0
@@ -38,6 +38,16 @@ class AccessControlRequest:
38
38
  if self.user_name is not None: body['user_name'] = self.user_name
39
39
  return body
40
40
 
41
+ def as_shallow_dict(self) -> dict:
42
+ """Serializes the AccessControlRequest into a shallow dictionary of its immediate attributes."""
43
+ body = {}
44
+ if self.group_name is not None: body['group_name'] = self.group_name
45
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
46
+ if self.service_principal_name is not None:
47
+ body['service_principal_name'] = self.service_principal_name
48
+ if self.user_name is not None: body['user_name'] = self.user_name
49
+ return body
50
+
41
51
  @classmethod
42
52
  def from_dict(cls, d: Dict[str, any]) -> AccessControlRequest:
43
53
  """Deserializes the AccessControlRequest from a dictionary."""
@@ -75,6 +85,17 @@ class AccessControlResponse:
75
85
  if self.user_name is not None: body['user_name'] = self.user_name
76
86
  return body
77
87
 
88
+ def as_shallow_dict(self) -> dict:
89
+ """Serializes the AccessControlResponse into a shallow dictionary of its immediate attributes."""
90
+ body = {}
91
+ if self.all_permissions: body['all_permissions'] = self.all_permissions
92
+ if self.display_name is not None: body['display_name'] = self.display_name
93
+ if self.group_name is not None: body['group_name'] = self.group_name
94
+ if self.service_principal_name is not None:
95
+ body['service_principal_name'] = self.service_principal_name
96
+ if self.user_name is not None: body['user_name'] = self.user_name
97
+ return body
98
+
78
99
  @classmethod
79
100
  def from_dict(cls, d: Dict[str, any]) -> AccessControlResponse:
80
101
  """Deserializes the AccessControlResponse from a dictionary."""
@@ -107,6 +128,16 @@ class ComplexValue:
107
128
  if self.value is not None: body['value'] = self.value
108
129
  return body
109
130
 
131
+ def as_shallow_dict(self) -> dict:
132
+ """Serializes the ComplexValue into a shallow dictionary of its immediate attributes."""
133
+ body = {}
134
+ if self.display is not None: body['display'] = self.display
135
+ if self.primary is not None: body['primary'] = self.primary
136
+ if self.ref is not None: body['$ref'] = self.ref
137
+ if self.type is not None: body['type'] = self.type
138
+ if self.value is not None: body['value'] = self.value
139
+ return body
140
+
110
141
  @classmethod
111
142
  def from_dict(cls, d: Dict[str, any]) -> ComplexValue:
112
143
  """Deserializes the ComplexValue from a dictionary."""
@@ -125,6 +156,11 @@ class DeleteResponse:
125
156
  body = {}
126
157
  return body
127
158
 
159
+ def as_shallow_dict(self) -> dict:
160
+ """Serializes the DeleteResponse into a shallow dictionary of its immediate attributes."""
161
+ body = {}
162
+ return body
163
+
128
164
  @classmethod
129
165
  def from_dict(cls, d: Dict[str, any]) -> DeleteResponse:
130
166
  """Deserializes the DeleteResponse from a dictionary."""
@@ -139,6 +175,11 @@ class DeleteWorkspacePermissionAssignmentResponse:
139
175
  body = {}
140
176
  return body
141
177
 
178
+ def as_shallow_dict(self) -> dict:
179
+ """Serializes the DeleteWorkspacePermissionAssignmentResponse into a shallow dictionary of its immediate attributes."""
180
+ body = {}
181
+ return body
182
+
142
183
  @classmethod
143
184
  def from_dict(cls, d: Dict[str, any]) -> DeleteWorkspacePermissionAssignmentResponse:
144
185
  """Deserializes the DeleteWorkspacePermissionAssignmentResponse from a dictionary."""
@@ -155,6 +196,12 @@ class GetAssignableRolesForResourceResponse:
155
196
  if self.roles: body['roles'] = [v.as_dict() for v in self.roles]
156
197
  return body
157
198
 
199
+ def as_shallow_dict(self) -> dict:
200
+ """Serializes the GetAssignableRolesForResourceResponse into a shallow dictionary of its immediate attributes."""
201
+ body = {}
202
+ if self.roles: body['roles'] = self.roles
203
+ return body
204
+
158
205
  @classmethod
159
206
  def from_dict(cls, d: Dict[str, any]) -> GetAssignableRolesForResourceResponse:
160
207
  """Deserializes the GetAssignableRolesForResourceResponse from a dictionary."""
@@ -172,6 +219,12 @@ class GetPasswordPermissionLevelsResponse:
172
219
  if self.permission_levels: body['permission_levels'] = [v.as_dict() for v in self.permission_levels]
173
220
  return body
174
221
 
222
+ def as_shallow_dict(self) -> dict:
223
+ """Serializes the GetPasswordPermissionLevelsResponse into a shallow dictionary of its immediate attributes."""
224
+ body = {}
225
+ if self.permission_levels: body['permission_levels'] = self.permission_levels
226
+ return body
227
+
175
228
  @classmethod
176
229
  def from_dict(cls, d: Dict[str, any]) -> GetPasswordPermissionLevelsResponse:
177
230
  """Deserializes the GetPasswordPermissionLevelsResponse from a dictionary."""
@@ -189,6 +242,12 @@ class GetPermissionLevelsResponse:
189
242
  if self.permission_levels: body['permission_levels'] = [v.as_dict() for v in self.permission_levels]
190
243
  return body
191
244
 
245
+ def as_shallow_dict(self) -> dict:
246
+ """Serializes the GetPermissionLevelsResponse into a shallow dictionary of its immediate attributes."""
247
+ body = {}
248
+ if self.permission_levels: body['permission_levels'] = self.permission_levels
249
+ return body
250
+
192
251
  @classmethod
193
252
  def from_dict(cls, d: Dict[str, any]) -> GetPermissionLevelsResponse:
194
253
  """Deserializes the GetPermissionLevelsResponse from a dictionary."""
@@ -216,6 +275,13 @@ class GrantRule:
216
275
  if self.role is not None: body['role'] = self.role
217
276
  return body
218
277
 
278
+ def as_shallow_dict(self) -> dict:
279
+ """Serializes the GrantRule into a shallow dictionary of its immediate attributes."""
280
+ body = {}
281
+ if self.principals: body['principals'] = self.principals
282
+ if self.role is not None: body['role'] = self.role
283
+ return body
284
+
219
285
  @classmethod
220
286
  def from_dict(cls, d: Dict[str, any]) -> GrantRule:
221
287
  """Deserializes the GrantRule from a dictionary."""
@@ -265,6 +331,20 @@ class Group:
265
331
  if self.schemas: body['schemas'] = [v.value for v in self.schemas]
266
332
  return body
267
333
 
334
+ def as_shallow_dict(self) -> dict:
335
+ """Serializes the Group into a shallow dictionary of its immediate attributes."""
336
+ body = {}
337
+ if self.display_name is not None: body['displayName'] = self.display_name
338
+ if self.entitlements: body['entitlements'] = self.entitlements
339
+ if self.external_id is not None: body['externalId'] = self.external_id
340
+ if self.groups: body['groups'] = self.groups
341
+ if self.id is not None: body['id'] = self.id
342
+ if self.members: body['members'] = self.members
343
+ if self.meta: body['meta'] = self.meta
344
+ if self.roles: body['roles'] = self.roles
345
+ if self.schemas: body['schemas'] = self.schemas
346
+ return body
347
+
268
348
  @classmethod
269
349
  def from_dict(cls, d: Dict[str, any]) -> Group:
270
350
  """Deserializes the Group from a dictionary."""
@@ -311,6 +391,16 @@ class ListGroupsResponse:
311
391
  if self.total_results is not None: body['totalResults'] = self.total_results
312
392
  return body
313
393
 
394
+ def as_shallow_dict(self) -> dict:
395
+ """Serializes the ListGroupsResponse into a shallow dictionary of its immediate attributes."""
396
+ body = {}
397
+ if self.items_per_page is not None: body['itemsPerPage'] = self.items_per_page
398
+ if self.resources: body['Resources'] = self.resources
399
+ if self.schemas: body['schemas'] = self.schemas
400
+ if self.start_index is not None: body['startIndex'] = self.start_index
401
+ if self.total_results is not None: body['totalResults'] = self.total_results
402
+ return body
403
+
314
404
  @classmethod
315
405
  def from_dict(cls, d: Dict[str, any]) -> ListGroupsResponse:
316
406
  """Deserializes the ListGroupsResponse from a dictionary."""
@@ -353,6 +443,16 @@ class ListServicePrincipalResponse:
353
443
  if self.total_results is not None: body['totalResults'] = self.total_results
354
444
  return body
355
445
 
446
+ def as_shallow_dict(self) -> dict:
447
+ """Serializes the ListServicePrincipalResponse into a shallow dictionary of its immediate attributes."""
448
+ body = {}
449
+ if self.items_per_page is not None: body['itemsPerPage'] = self.items_per_page
450
+ if self.resources: body['Resources'] = self.resources
451
+ if self.schemas: body['schemas'] = self.schemas
452
+ if self.start_index is not None: body['startIndex'] = self.start_index
453
+ if self.total_results is not None: body['totalResults'] = self.total_results
454
+ return body
455
+
356
456
  @classmethod
357
457
  def from_dict(cls, d: Dict[str, any]) -> ListServicePrincipalResponse:
358
458
  """Deserializes the ListServicePrincipalResponse from a dictionary."""
@@ -396,6 +496,16 @@ class ListUsersResponse:
396
496
  if self.total_results is not None: body['totalResults'] = self.total_results
397
497
  return body
398
498
 
499
+ def as_shallow_dict(self) -> dict:
500
+ """Serializes the ListUsersResponse into a shallow dictionary of its immediate attributes."""
501
+ body = {}
502
+ if self.items_per_page is not None: body['itemsPerPage'] = self.items_per_page
503
+ if self.resources: body['Resources'] = self.resources
504
+ if self.schemas: body['schemas'] = self.schemas
505
+ if self.start_index is not None: body['startIndex'] = self.start_index
506
+ if self.total_results is not None: body['totalResults'] = self.total_results
507
+ return body
508
+
399
509
  @classmethod
400
510
  def from_dict(cls, d: Dict[str, any]) -> ListUsersResponse:
401
511
  """Deserializes the ListUsersResponse from a dictionary."""
@@ -430,6 +540,16 @@ class MigratePermissionsRequest:
430
540
  if self.workspace_id is not None: body['workspace_id'] = self.workspace_id
431
541
  return body
432
542
 
543
+ def as_shallow_dict(self) -> dict:
544
+ """Serializes the MigratePermissionsRequest into a shallow dictionary of its immediate attributes."""
545
+ body = {}
546
+ if self.from_workspace_group_name is not None:
547
+ body['from_workspace_group_name'] = self.from_workspace_group_name
548
+ if self.size is not None: body['size'] = self.size
549
+ if self.to_account_group_name is not None: body['to_account_group_name'] = self.to_account_group_name
550
+ if self.workspace_id is not None: body['workspace_id'] = self.workspace_id
551
+ return body
552
+
433
553
  @classmethod
434
554
  def from_dict(cls, d: Dict[str, any]) -> MigratePermissionsRequest:
435
555
  """Deserializes the MigratePermissionsRequest from a dictionary."""
@@ -450,6 +570,12 @@ class MigratePermissionsResponse:
450
570
  if self.permissions_migrated is not None: body['permissions_migrated'] = self.permissions_migrated
451
571
  return body
452
572
 
573
+ def as_shallow_dict(self) -> dict:
574
+ """Serializes the MigratePermissionsResponse into a shallow dictionary of its immediate attributes."""
575
+ body = {}
576
+ if self.permissions_migrated is not None: body['permissions_migrated'] = self.permissions_migrated
577
+ return body
578
+
453
579
  @classmethod
454
580
  def from_dict(cls, d: Dict[str, any]) -> MigratePermissionsResponse:
455
581
  """Deserializes the MigratePermissionsResponse from a dictionary."""
@@ -471,6 +597,13 @@ class Name:
471
597
  if self.given_name is not None: body['givenName'] = self.given_name
472
598
  return body
473
599
 
600
+ def as_shallow_dict(self) -> dict:
601
+ """Serializes the Name into a shallow dictionary of its immediate attributes."""
602
+ body = {}
603
+ if self.family_name is not None: body['familyName'] = self.family_name
604
+ if self.given_name is not None: body['givenName'] = self.given_name
605
+ return body
606
+
474
607
  @classmethod
475
608
  def from_dict(cls, d: Dict[str, any]) -> Name:
476
609
  """Deserializes the Name from a dictionary."""
@@ -494,6 +627,14 @@ class ObjectPermissions:
494
627
  if self.object_type is not None: body['object_type'] = self.object_type
495
628
  return body
496
629
 
630
+ def as_shallow_dict(self) -> dict:
631
+ """Serializes the ObjectPermissions into a shallow dictionary of its immediate attributes."""
632
+ body = {}
633
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
634
+ if self.object_id is not None: body['object_id'] = self.object_id
635
+ if self.object_type is not None: body['object_type'] = self.object_type
636
+ return body
637
+
497
638
  @classmethod
498
639
  def from_dict(cls, d: Dict[str, any]) -> ObjectPermissions:
499
640
  """Deserializes the ObjectPermissions from a dictionary."""
@@ -520,6 +661,14 @@ class PartialUpdate:
520
661
  if self.schemas: body['schemas'] = [v.value for v in self.schemas]
521
662
  return body
522
663
 
664
+ def as_shallow_dict(self) -> dict:
665
+ """Serializes the PartialUpdate into a shallow dictionary of its immediate attributes."""
666
+ body = {}
667
+ if self.id is not None: body['id'] = self.id
668
+ if self.operations: body['Operations'] = self.operations
669
+ if self.schemas: body['schemas'] = self.schemas
670
+ return body
671
+
523
672
  @classmethod
524
673
  def from_dict(cls, d: Dict[str, any]) -> PartialUpdate:
525
674
  """Deserializes the PartialUpdate from a dictionary."""
@@ -552,6 +701,16 @@ class PasswordAccessControlRequest:
552
701
  if self.user_name is not None: body['user_name'] = self.user_name
553
702
  return body
554
703
 
704
+ def as_shallow_dict(self) -> dict:
705
+ """Serializes the PasswordAccessControlRequest into a shallow dictionary of its immediate attributes."""
706
+ body = {}
707
+ if self.group_name is not None: body['group_name'] = self.group_name
708
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
709
+ if self.service_principal_name is not None:
710
+ body['service_principal_name'] = self.service_principal_name
711
+ if self.user_name is not None: body['user_name'] = self.user_name
712
+ return body
713
+
555
714
  @classmethod
556
715
  def from_dict(cls, d: Dict[str, any]) -> PasswordAccessControlRequest:
557
716
  """Deserializes the PasswordAccessControlRequest from a dictionary."""
@@ -589,6 +748,17 @@ class PasswordAccessControlResponse:
589
748
  if self.user_name is not None: body['user_name'] = self.user_name
590
749
  return body
591
750
 
751
+ def as_shallow_dict(self) -> dict:
752
+ """Serializes the PasswordAccessControlResponse into a shallow dictionary of its immediate attributes."""
753
+ body = {}
754
+ if self.all_permissions: body['all_permissions'] = self.all_permissions
755
+ if self.display_name is not None: body['display_name'] = self.display_name
756
+ if self.group_name is not None: body['group_name'] = self.group_name
757
+ if self.service_principal_name is not None:
758
+ body['service_principal_name'] = self.service_principal_name
759
+ if self.user_name is not None: body['user_name'] = self.user_name
760
+ return body
761
+
592
762
  @classmethod
593
763
  def from_dict(cls, d: Dict[str, any]) -> PasswordAccessControlResponse:
594
764
  """Deserializes the PasswordAccessControlResponse from a dictionary."""
@@ -616,6 +786,14 @@ class PasswordPermission:
616
786
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
617
787
  return body
618
788
 
789
+ def as_shallow_dict(self) -> dict:
790
+ """Serializes the PasswordPermission into a shallow dictionary of its immediate attributes."""
791
+ body = {}
792
+ if self.inherited is not None: body['inherited'] = self.inherited
793
+ if self.inherited_from_object: body['inherited_from_object'] = self.inherited_from_object
794
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
795
+ return body
796
+
619
797
  @classmethod
620
798
  def from_dict(cls, d: Dict[str, any]) -> PasswordPermission:
621
799
  """Deserializes the PasswordPermission from a dictionary."""
@@ -647,6 +825,14 @@ class PasswordPermissions:
647
825
  if self.object_type is not None: body['object_type'] = self.object_type
648
826
  return body
649
827
 
828
+ def as_shallow_dict(self) -> dict:
829
+ """Serializes the PasswordPermissions into a shallow dictionary of its immediate attributes."""
830
+ body = {}
831
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
832
+ if self.object_id is not None: body['object_id'] = self.object_id
833
+ if self.object_type is not None: body['object_type'] = self.object_type
834
+ return body
835
+
650
836
  @classmethod
651
837
  def from_dict(cls, d: Dict[str, any]) -> PasswordPermissions:
652
838
  """Deserializes the PasswordPermissions from a dictionary."""
@@ -670,6 +856,13 @@ class PasswordPermissionsDescription:
670
856
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
671
857
  return body
672
858
 
859
+ def as_shallow_dict(self) -> dict:
860
+ """Serializes the PasswordPermissionsDescription into a shallow dictionary of its immediate attributes."""
861
+ body = {}
862
+ if self.description is not None: body['description'] = self.description
863
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
864
+ return body
865
+
673
866
  @classmethod
674
867
  def from_dict(cls, d: Dict[str, any]) -> PasswordPermissionsDescription:
675
868
  """Deserializes the PasswordPermissionsDescription from a dictionary."""
@@ -688,6 +881,12 @@ class PasswordPermissionsRequest:
688
881
  body['access_control_list'] = [v.as_dict() for v in self.access_control_list]
689
882
  return body
690
883
 
884
+ def as_shallow_dict(self) -> dict:
885
+ """Serializes the PasswordPermissionsRequest into a shallow dictionary of its immediate attributes."""
886
+ body = {}
887
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
888
+ return body
889
+
691
890
  @classmethod
692
891
  def from_dict(cls, d: Dict[str, any]) -> PasswordPermissionsRequest:
693
892
  """Deserializes the PasswordPermissionsRequest from a dictionary."""
@@ -713,6 +912,14 @@ class Patch:
713
912
  if self.value: body['value'] = self.value
714
913
  return body
715
914
 
915
+ def as_shallow_dict(self) -> dict:
916
+ """Serializes the Patch into a shallow dictionary of its immediate attributes."""
917
+ body = {}
918
+ if self.op is not None: body['op'] = self.op
919
+ if self.path is not None: body['path'] = self.path
920
+ if self.value: body['value'] = self.value
921
+ return body
922
+
716
923
  @classmethod
717
924
  def from_dict(cls, d: Dict[str, any]) -> Patch:
718
925
  """Deserializes the Patch from a dictionary."""
@@ -735,6 +942,11 @@ class PatchResponse:
735
942
  body = {}
736
943
  return body
737
944
 
945
+ def as_shallow_dict(self) -> dict:
946
+ """Serializes the PatchResponse into a shallow dictionary of its immediate attributes."""
947
+ body = {}
948
+ return body
949
+
738
950
  @classmethod
739
951
  def from_dict(cls, d: Dict[str, any]) -> PatchResponse:
740
952
  """Deserializes the PatchResponse from a dictionary."""
@@ -763,6 +975,14 @@ class Permission:
763
975
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
764
976
  return body
765
977
 
978
+ def as_shallow_dict(self) -> dict:
979
+ """Serializes the Permission into a shallow dictionary of its immediate attributes."""
980
+ body = {}
981
+ if self.inherited is not None: body['inherited'] = self.inherited
982
+ if self.inherited_from_object: body['inherited_from_object'] = self.inherited_from_object
983
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
984
+ return body
985
+
766
986
  @classmethod
767
987
  def from_dict(cls, d: Dict[str, any]) -> Permission:
768
988
  """Deserializes the Permission from a dictionary."""
@@ -793,6 +1013,14 @@ class PermissionAssignment:
793
1013
  if self.principal: body['principal'] = self.principal.as_dict()
794
1014
  return body
795
1015
 
1016
+ def as_shallow_dict(self) -> dict:
1017
+ """Serializes the PermissionAssignment into a shallow dictionary of its immediate attributes."""
1018
+ body = {}
1019
+ if self.error is not None: body['error'] = self.error
1020
+ if self.permissions: body['permissions'] = self.permissions
1021
+ if self.principal: body['principal'] = self.principal
1022
+ return body
1023
+
796
1024
  @classmethod
797
1025
  def from_dict(cls, d: Dict[str, any]) -> PermissionAssignment:
798
1026
  """Deserializes the PermissionAssignment from a dictionary."""
@@ -813,6 +1041,12 @@ class PermissionAssignments:
813
1041
  body['permission_assignments'] = [v.as_dict() for v in self.permission_assignments]
814
1042
  return body
815
1043
 
1044
+ def as_shallow_dict(self) -> dict:
1045
+ """Serializes the PermissionAssignments into a shallow dictionary of its immediate attributes."""
1046
+ body = {}
1047
+ if self.permission_assignments: body['permission_assignments'] = self.permission_assignments
1048
+ return body
1049
+
816
1050
  @classmethod
817
1051
  def from_dict(cls, d: Dict[str, any]) -> PermissionAssignments:
818
1052
  """Deserializes the PermissionAssignments from a dictionary."""
@@ -855,6 +1089,13 @@ class PermissionOutput:
855
1089
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
856
1090
  return body
857
1091
 
1092
+ def as_shallow_dict(self) -> dict:
1093
+ """Serializes the PermissionOutput into a shallow dictionary of its immediate attributes."""
1094
+ body = {}
1095
+ if self.description is not None: body['description'] = self.description
1096
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
1097
+ return body
1098
+
858
1099
  @classmethod
859
1100
  def from_dict(cls, d: Dict[str, any]) -> PermissionOutput:
860
1101
  """Deserializes the PermissionOutput from a dictionary."""
@@ -876,6 +1117,13 @@ class PermissionsDescription:
876
1117
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
877
1118
  return body
878
1119
 
1120
+ def as_shallow_dict(self) -> dict:
1121
+ """Serializes the PermissionsDescription into a shallow dictionary of its immediate attributes."""
1122
+ body = {}
1123
+ if self.description is not None: body['description'] = self.description
1124
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
1125
+ return body
1126
+
879
1127
  @classmethod
880
1128
  def from_dict(cls, d: Dict[str, any]) -> PermissionsDescription:
881
1129
  """Deserializes the PermissionsDescription from a dictionary."""
@@ -904,6 +1152,14 @@ class PermissionsRequest:
904
1152
  if self.request_object_type is not None: body['request_object_type'] = self.request_object_type
905
1153
  return body
906
1154
 
1155
+ def as_shallow_dict(self) -> dict:
1156
+ """Serializes the PermissionsRequest into a shallow dictionary of its immediate attributes."""
1157
+ body = {}
1158
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
1159
+ if self.request_object_id is not None: body['request_object_id'] = self.request_object_id
1160
+ if self.request_object_type is not None: body['request_object_type'] = self.request_object_type
1161
+ return body
1162
+
907
1163
  @classmethod
908
1164
  def from_dict(cls, d: Dict[str, any]) -> PermissionsRequest:
909
1165
  """Deserializes the PermissionsRequest from a dictionary."""
@@ -942,6 +1198,17 @@ class PrincipalOutput:
942
1198
  if self.user_name is not None: body['user_name'] = self.user_name
943
1199
  return body
944
1200
 
1201
+ def as_shallow_dict(self) -> dict:
1202
+ """Serializes the PrincipalOutput into a shallow dictionary of its immediate attributes."""
1203
+ body = {}
1204
+ if self.display_name is not None: body['display_name'] = self.display_name
1205
+ if self.group_name is not None: body['group_name'] = self.group_name
1206
+ if self.principal_id is not None: body['principal_id'] = self.principal_id
1207
+ if self.service_principal_name is not None:
1208
+ body['service_principal_name'] = self.service_principal_name
1209
+ if self.user_name is not None: body['user_name'] = self.user_name
1210
+ return body
1211
+
945
1212
  @classmethod
946
1213
  def from_dict(cls, d: Dict[str, any]) -> PrincipalOutput:
947
1214
  """Deserializes the PrincipalOutput from a dictionary."""
@@ -964,6 +1231,12 @@ class ResourceMeta:
964
1231
  if self.resource_type is not None: body['resourceType'] = self.resource_type
965
1232
  return body
966
1233
 
1234
+ def as_shallow_dict(self) -> dict:
1235
+ """Serializes the ResourceMeta into a shallow dictionary of its immediate attributes."""
1236
+ body = {}
1237
+ if self.resource_type is not None: body['resourceType'] = self.resource_type
1238
+ return body
1239
+
967
1240
  @classmethod
968
1241
  def from_dict(cls, d: Dict[str, any]) -> ResourceMeta:
969
1242
  """Deserializes the ResourceMeta from a dictionary."""
@@ -981,6 +1254,12 @@ class Role:
981
1254
  if self.name is not None: body['name'] = self.name
982
1255
  return body
983
1256
 
1257
+ def as_shallow_dict(self) -> dict:
1258
+ """Serializes the Role into a shallow dictionary of its immediate attributes."""
1259
+ body = {}
1260
+ if self.name is not None: body['name'] = self.name
1261
+ return body
1262
+
984
1263
  @classmethod
985
1264
  def from_dict(cls, d: Dict[str, any]) -> Role:
986
1265
  """Deserializes the Role from a dictionary."""
@@ -1005,6 +1284,14 @@ class RuleSetResponse:
1005
1284
  if self.name is not None: body['name'] = self.name
1006
1285
  return body
1007
1286
 
1287
+ def as_shallow_dict(self) -> dict:
1288
+ """Serializes the RuleSetResponse into a shallow dictionary of its immediate attributes."""
1289
+ body = {}
1290
+ if self.etag is not None: body['etag'] = self.etag
1291
+ if self.grant_rules: body['grant_rules'] = self.grant_rules
1292
+ if self.name is not None: body['name'] = self.name
1293
+ return body
1294
+
1008
1295
  @classmethod
1009
1296
  def from_dict(cls, d: Dict[str, any]) -> RuleSetResponse:
1010
1297
  """Deserializes the RuleSetResponse from a dictionary."""
@@ -1032,6 +1319,14 @@ class RuleSetUpdateRequest:
1032
1319
  if self.name is not None: body['name'] = self.name
1033
1320
  return body
1034
1321
 
1322
+ def as_shallow_dict(self) -> dict:
1323
+ """Serializes the RuleSetUpdateRequest into a shallow dictionary of its immediate attributes."""
1324
+ body = {}
1325
+ if self.etag is not None: body['etag'] = self.etag
1326
+ if self.grant_rules: body['grant_rules'] = self.grant_rules
1327
+ if self.name is not None: body['name'] = self.name
1328
+ return body
1329
+
1035
1330
  @classmethod
1036
1331
  def from_dict(cls, d: Dict[str, any]) -> RuleSetUpdateRequest:
1037
1332
  """Deserializes the RuleSetUpdateRequest from a dictionary."""
@@ -1084,6 +1379,20 @@ class ServicePrincipal:
1084
1379
  if self.schemas: body['schemas'] = [v.value for v in self.schemas]
1085
1380
  return body
1086
1381
 
1382
+ def as_shallow_dict(self) -> dict:
1383
+ """Serializes the ServicePrincipal into a shallow dictionary of its immediate attributes."""
1384
+ body = {}
1385
+ if self.active is not None: body['active'] = self.active
1386
+ if self.application_id is not None: body['applicationId'] = self.application_id
1387
+ if self.display_name is not None: body['displayName'] = self.display_name
1388
+ if self.entitlements: body['entitlements'] = self.entitlements
1389
+ if self.external_id is not None: body['externalId'] = self.external_id
1390
+ if self.groups: body['groups'] = self.groups
1391
+ if self.id is not None: body['id'] = self.id
1392
+ if self.roles: body['roles'] = self.roles
1393
+ if self.schemas: body['schemas'] = self.schemas
1394
+ return body
1395
+
1087
1396
  @classmethod
1088
1397
  def from_dict(cls, d: Dict[str, any]) -> ServicePrincipal:
1089
1398
  """Deserializes the ServicePrincipal from a dictionary."""
@@ -1111,6 +1420,11 @@ class UpdateResponse:
1111
1420
  body = {}
1112
1421
  return body
1113
1422
 
1423
+ def as_shallow_dict(self) -> dict:
1424
+ """Serializes the UpdateResponse into a shallow dictionary of its immediate attributes."""
1425
+ body = {}
1426
+ return body
1427
+
1114
1428
  @classmethod
1115
1429
  def from_dict(cls, d: Dict[str, any]) -> UpdateResponse:
1116
1430
  """Deserializes the UpdateResponse from a dictionary."""
@@ -1131,6 +1445,13 @@ class UpdateRuleSetRequest:
1131
1445
  if self.rule_set: body['rule_set'] = self.rule_set.as_dict()
1132
1446
  return body
1133
1447
 
1448
+ def as_shallow_dict(self) -> dict:
1449
+ """Serializes the UpdateRuleSetRequest into a shallow dictionary of its immediate attributes."""
1450
+ body = {}
1451
+ if self.name is not None: body['name'] = self.name
1452
+ if self.rule_set: body['rule_set'] = self.rule_set
1453
+ return body
1454
+
1134
1455
  @classmethod
1135
1456
  def from_dict(cls, d: Dict[str, any]) -> UpdateRuleSetRequest:
1136
1457
  """Deserializes the UpdateRuleSetRequest from a dictionary."""
@@ -1150,7 +1471,7 @@ class UpdateWorkspaceAssignments:
1150
1471
  """The ID of the user, service principal, or group."""
1151
1472
 
1152
1473
  workspace_id: Optional[int] = None
1153
- """The workspace ID for the account."""
1474
+ """The workspace ID."""
1154
1475
 
1155
1476
  def as_dict(self) -> dict:
1156
1477
  """Serializes the UpdateWorkspaceAssignments into a dictionary suitable for use as a JSON request body."""
@@ -1160,6 +1481,14 @@ class UpdateWorkspaceAssignments:
1160
1481
  if self.workspace_id is not None: body['workspace_id'] = self.workspace_id
1161
1482
  return body
1162
1483
 
1484
+ def as_shallow_dict(self) -> dict:
1485
+ """Serializes the UpdateWorkspaceAssignments into a shallow dictionary of its immediate attributes."""
1486
+ body = {}
1487
+ if self.permissions: body['permissions'] = self.permissions
1488
+ if self.principal_id is not None: body['principal_id'] = self.principal_id
1489
+ if self.workspace_id is not None: body['workspace_id'] = self.workspace_id
1490
+ return body
1491
+
1163
1492
  @classmethod
1164
1493
  def from_dict(cls, d: Dict[str, any]) -> UpdateWorkspaceAssignments:
1165
1494
  """Deserializes the UpdateWorkspaceAssignments from a dictionary."""
@@ -1225,6 +1554,22 @@ class User:
1225
1554
  if self.user_name is not None: body['userName'] = self.user_name
1226
1555
  return body
1227
1556
 
1557
+ def as_shallow_dict(self) -> dict:
1558
+ """Serializes the User into a shallow dictionary of its immediate attributes."""
1559
+ body = {}
1560
+ if self.active is not None: body['active'] = self.active
1561
+ if self.display_name is not None: body['displayName'] = self.display_name
1562
+ if self.emails: body['emails'] = self.emails
1563
+ if self.entitlements: body['entitlements'] = self.entitlements
1564
+ if self.external_id is not None: body['externalId'] = self.external_id
1565
+ if self.groups: body['groups'] = self.groups
1566
+ if self.id is not None: body['id'] = self.id
1567
+ if self.name: body['name'] = self.name
1568
+ if self.roles: body['roles'] = self.roles
1569
+ if self.schemas: body['schemas'] = self.schemas
1570
+ if self.user_name is not None: body['userName'] = self.user_name
1571
+ return body
1572
+
1228
1573
  @classmethod
1229
1574
  def from_dict(cls, d: Dict[str, any]) -> User:
1230
1575
  """Deserializes the User from a dictionary."""
@@ -1265,6 +1610,12 @@ class WorkspacePermissions:
1265
1610
  if self.permissions: body['permissions'] = [v.as_dict() for v in self.permissions]
1266
1611
  return body
1267
1612
 
1613
+ def as_shallow_dict(self) -> dict:
1614
+ """Serializes the WorkspacePermissions into a shallow dictionary of its immediate attributes."""
1615
+ body = {}
1616
+ if self.permissions: body['permissions'] = self.permissions
1617
+ return body
1618
+
1268
1619
  @classmethod
1269
1620
  def from_dict(cls, d: Dict[str, any]) -> WorkspacePermissions:
1270
1621
  """Deserializes the WorkspacePermissions from a dictionary."""
@@ -3385,7 +3736,7 @@ class WorkspaceAssignmentAPI:
3385
3736
  specified principal.
3386
3737
 
3387
3738
  :param workspace_id: int
3388
- The workspace ID for the account.
3739
+ The workspace ID.
3389
3740
  :param principal_id: int
3390
3741
  The ID of the user, service principal, or group.
3391
3742
  :param permissions: List[:class:`WorkspacePermission`] (optional)