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
@@ -29,6 +29,13 @@ class AclItem:
29
29
  if self.principal is not None: body['principal'] = self.principal
30
30
  return body
31
31
 
32
+ def as_shallow_dict(self) -> dict:
33
+ """Serializes the AclItem into a shallow dictionary of its immediate attributes."""
34
+ body = {}
35
+ if self.permission is not None: body['permission'] = self.permission
36
+ if self.principal is not None: body['principal'] = self.principal
37
+ return body
38
+
32
39
  @classmethod
33
40
  def from_dict(cls, d: Dict[str, any]) -> AclItem:
34
41
  """Deserializes the AclItem from a dictionary."""
@@ -57,6 +64,13 @@ class AzureKeyVaultSecretScopeMetadata:
57
64
  if self.resource_id is not None: body['resource_id'] = self.resource_id
58
65
  return body
59
66
 
67
+ def as_shallow_dict(self) -> dict:
68
+ """Serializes the AzureKeyVaultSecretScopeMetadata into a shallow dictionary of its immediate attributes."""
69
+ body = {}
70
+ if self.dns_name is not None: body['dns_name'] = self.dns_name
71
+ if self.resource_id is not None: body['resource_id'] = self.resource_id
72
+ return body
73
+
60
74
  @classmethod
61
75
  def from_dict(cls, d: Dict[str, any]) -> AzureKeyVaultSecretScopeMetadata:
62
76
  """Deserializes the AzureKeyVaultSecretScopeMetadata from a dictionary."""
@@ -91,6 +105,14 @@ class CreateCredentialsRequest:
91
105
  if self.personal_access_token is not None: body['personal_access_token'] = self.personal_access_token
92
106
  return body
93
107
 
108
+ def as_shallow_dict(self) -> dict:
109
+ """Serializes the CreateCredentialsRequest into a shallow dictionary of its immediate attributes."""
110
+ body = {}
111
+ if self.git_provider is not None: body['git_provider'] = self.git_provider
112
+ if self.git_username is not None: body['git_username'] = self.git_username
113
+ if self.personal_access_token is not None: body['personal_access_token'] = self.personal_access_token
114
+ return body
115
+
94
116
  @classmethod
95
117
  def from_dict(cls, d: Dict[str, any]) -> CreateCredentialsRequest:
96
118
  """Deserializes the CreateCredentialsRequest from a dictionary."""
@@ -119,6 +141,14 @@ class CreateCredentialsResponse:
119
141
  if self.git_username is not None: body['git_username'] = self.git_username
120
142
  return body
121
143
 
144
+ def as_shallow_dict(self) -> dict:
145
+ """Serializes the CreateCredentialsResponse into a shallow dictionary of its immediate attributes."""
146
+ body = {}
147
+ if self.credential_id is not None: body['credential_id'] = self.credential_id
148
+ if self.git_provider is not None: body['git_provider'] = self.git_provider
149
+ if self.git_username is not None: body['git_username'] = self.git_username
150
+ return body
151
+
122
152
  @classmethod
123
153
  def from_dict(cls, d: Dict[str, any]) -> CreateCredentialsResponse:
124
154
  """Deserializes the CreateCredentialsResponse from a dictionary."""
@@ -154,6 +184,15 @@ class CreateRepoRequest:
154
184
  if self.url is not None: body['url'] = self.url
155
185
  return body
156
186
 
187
+ def as_shallow_dict(self) -> dict:
188
+ """Serializes the CreateRepoRequest into a shallow dictionary of its immediate attributes."""
189
+ body = {}
190
+ if self.path is not None: body['path'] = self.path
191
+ if self.provider is not None: body['provider'] = self.provider
192
+ if self.sparse_checkout: body['sparse_checkout'] = self.sparse_checkout
193
+ if self.url is not None: body['url'] = self.url
194
+ return body
195
+
157
196
  @classmethod
158
197
  def from_dict(cls, d: Dict[str, any]) -> CreateRepoRequest:
159
198
  """Deserializes the CreateRepoRequest from a dictionary."""
@@ -198,6 +237,18 @@ class CreateRepoResponse:
198
237
  if self.url is not None: body['url'] = self.url
199
238
  return body
200
239
 
240
+ def as_shallow_dict(self) -> dict:
241
+ """Serializes the CreateRepoResponse into a shallow dictionary of its immediate attributes."""
242
+ body = {}
243
+ if self.branch is not None: body['branch'] = self.branch
244
+ if self.head_commit_id is not None: body['head_commit_id'] = self.head_commit_id
245
+ if self.id is not None: body['id'] = self.id
246
+ if self.path is not None: body['path'] = self.path
247
+ if self.provider is not None: body['provider'] = self.provider
248
+ if self.sparse_checkout: body['sparse_checkout'] = self.sparse_checkout
249
+ if self.url is not None: body['url'] = self.url
250
+ return body
251
+
201
252
  @classmethod
202
253
  def from_dict(cls, d: Dict[str, any]) -> CreateRepoResponse:
203
254
  """Deserializes the CreateRepoResponse from a dictionary."""
@@ -234,6 +285,16 @@ class CreateScope:
234
285
  if self.scope_backend_type is not None: body['scope_backend_type'] = self.scope_backend_type.value
235
286
  return body
236
287
 
288
+ def as_shallow_dict(self) -> dict:
289
+ """Serializes the CreateScope into a shallow dictionary of its immediate attributes."""
290
+ body = {}
291
+ if self.backend_azure_keyvault: body['backend_azure_keyvault'] = self.backend_azure_keyvault
292
+ if self.initial_manage_principal is not None:
293
+ body['initial_manage_principal'] = self.initial_manage_principal
294
+ if self.scope is not None: body['scope'] = self.scope
295
+ if self.scope_backend_type is not None: body['scope_backend_type'] = self.scope_backend_type
296
+ return body
297
+
237
298
  @classmethod
238
299
  def from_dict(cls, d: Dict[str, any]) -> CreateScope:
239
300
  """Deserializes the CreateScope from a dictionary."""
@@ -252,6 +313,11 @@ class CreateScopeResponse:
252
313
  body = {}
253
314
  return body
254
315
 
316
+ def as_shallow_dict(self) -> dict:
317
+ """Serializes the CreateScopeResponse into a shallow dictionary of its immediate attributes."""
318
+ body = {}
319
+ return body
320
+
255
321
  @classmethod
256
322
  def from_dict(cls, d: Dict[str, any]) -> CreateScopeResponse:
257
323
  """Deserializes the CreateScopeResponse from a dictionary."""
@@ -278,6 +344,14 @@ class CredentialInfo:
278
344
  if self.git_username is not None: body['git_username'] = self.git_username
279
345
  return body
280
346
 
347
+ def as_shallow_dict(self) -> dict:
348
+ """Serializes the CredentialInfo into a shallow dictionary of its immediate attributes."""
349
+ body = {}
350
+ if self.credential_id is not None: body['credential_id'] = self.credential_id
351
+ if self.git_provider is not None: body['git_provider'] = self.git_provider
352
+ if self.git_username is not None: body['git_username'] = self.git_username
353
+ return body
354
+
281
355
  @classmethod
282
356
  def from_dict(cls, d: Dict[str, any]) -> CredentialInfo:
283
357
  """Deserializes the CredentialInfo from a dictionary."""
@@ -303,6 +377,13 @@ class Delete:
303
377
  if self.recursive is not None: body['recursive'] = self.recursive
304
378
  return body
305
379
 
380
+ def as_shallow_dict(self) -> dict:
381
+ """Serializes the Delete into a shallow dictionary of its immediate attributes."""
382
+ body = {}
383
+ if self.path is not None: body['path'] = self.path
384
+ if self.recursive is not None: body['recursive'] = self.recursive
385
+ return body
386
+
306
387
  @classmethod
307
388
  def from_dict(cls, d: Dict[str, any]) -> Delete:
308
389
  """Deserializes the Delete from a dictionary."""
@@ -324,6 +405,13 @@ class DeleteAcl:
324
405
  if self.scope is not None: body['scope'] = self.scope
325
406
  return body
326
407
 
408
+ def as_shallow_dict(self) -> dict:
409
+ """Serializes the DeleteAcl into a shallow dictionary of its immediate attributes."""
410
+ body = {}
411
+ if self.principal is not None: body['principal'] = self.principal
412
+ if self.scope is not None: body['scope'] = self.scope
413
+ return body
414
+
327
415
  @classmethod
328
416
  def from_dict(cls, d: Dict[str, any]) -> DeleteAcl:
329
417
  """Deserializes the DeleteAcl from a dictionary."""
@@ -338,6 +426,11 @@ class DeleteAclResponse:
338
426
  body = {}
339
427
  return body
340
428
 
429
+ def as_shallow_dict(self) -> dict:
430
+ """Serializes the DeleteAclResponse into a shallow dictionary of its immediate attributes."""
431
+ body = {}
432
+ return body
433
+
341
434
  @classmethod
342
435
  def from_dict(cls, d: Dict[str, any]) -> DeleteAclResponse:
343
436
  """Deserializes the DeleteAclResponse from a dictionary."""
@@ -352,6 +445,11 @@ class DeleteCredentialsResponse:
352
445
  body = {}
353
446
  return body
354
447
 
448
+ def as_shallow_dict(self) -> dict:
449
+ """Serializes the DeleteCredentialsResponse into a shallow dictionary of its immediate attributes."""
450
+ body = {}
451
+ return body
452
+
355
453
  @classmethod
356
454
  def from_dict(cls, d: Dict[str, any]) -> DeleteCredentialsResponse:
357
455
  """Deserializes the DeleteCredentialsResponse from a dictionary."""
@@ -366,6 +464,11 @@ class DeleteRepoResponse:
366
464
  body = {}
367
465
  return body
368
466
 
467
+ def as_shallow_dict(self) -> dict:
468
+ """Serializes the DeleteRepoResponse into a shallow dictionary of its immediate attributes."""
469
+ body = {}
470
+ return body
471
+
369
472
  @classmethod
370
473
  def from_dict(cls, d: Dict[str, any]) -> DeleteRepoResponse:
371
474
  """Deserializes the DeleteRepoResponse from a dictionary."""
@@ -380,6 +483,11 @@ class DeleteResponse:
380
483
  body = {}
381
484
  return body
382
485
 
486
+ def as_shallow_dict(self) -> dict:
487
+ """Serializes the DeleteResponse into a shallow dictionary of its immediate attributes."""
488
+ body = {}
489
+ return body
490
+
383
491
  @classmethod
384
492
  def from_dict(cls, d: Dict[str, any]) -> DeleteResponse:
385
493
  """Deserializes the DeleteResponse from a dictionary."""
@@ -397,6 +505,12 @@ class DeleteScope:
397
505
  if self.scope is not None: body['scope'] = self.scope
398
506
  return body
399
507
 
508
+ def as_shallow_dict(self) -> dict:
509
+ """Serializes the DeleteScope into a shallow dictionary of its immediate attributes."""
510
+ body = {}
511
+ if self.scope is not None: body['scope'] = self.scope
512
+ return body
513
+
400
514
  @classmethod
401
515
  def from_dict(cls, d: Dict[str, any]) -> DeleteScope:
402
516
  """Deserializes the DeleteScope from a dictionary."""
@@ -411,6 +525,11 @@ class DeleteScopeResponse:
411
525
  body = {}
412
526
  return body
413
527
 
528
+ def as_shallow_dict(self) -> dict:
529
+ """Serializes the DeleteScopeResponse into a shallow dictionary of its immediate attributes."""
530
+ body = {}
531
+ return body
532
+
414
533
  @classmethod
415
534
  def from_dict(cls, d: Dict[str, any]) -> DeleteScopeResponse:
416
535
  """Deserializes the DeleteScopeResponse from a dictionary."""
@@ -432,6 +551,13 @@ class DeleteSecret:
432
551
  if self.scope is not None: body['scope'] = self.scope
433
552
  return body
434
553
 
554
+ def as_shallow_dict(self) -> dict:
555
+ """Serializes the DeleteSecret into a shallow dictionary of its immediate attributes."""
556
+ body = {}
557
+ if self.key is not None: body['key'] = self.key
558
+ if self.scope is not None: body['scope'] = self.scope
559
+ return body
560
+
435
561
  @classmethod
436
562
  def from_dict(cls, d: Dict[str, any]) -> DeleteSecret:
437
563
  """Deserializes the DeleteSecret from a dictionary."""
@@ -446,6 +572,11 @@ class DeleteSecretResponse:
446
572
  body = {}
447
573
  return body
448
574
 
575
+ def as_shallow_dict(self) -> dict:
576
+ """Serializes the DeleteSecretResponse into a shallow dictionary of its immediate attributes."""
577
+ body = {}
578
+ return body
579
+
449
580
  @classmethod
450
581
  def from_dict(cls, d: Dict[str, any]) -> DeleteSecretResponse:
451
582
  """Deserializes the DeleteSecretResponse from a dictionary."""
@@ -478,6 +609,13 @@ class ExportResponse:
478
609
  if self.file_type is not None: body['file_type'] = self.file_type
479
610
  return body
480
611
 
612
+ def as_shallow_dict(self) -> dict:
613
+ """Serializes the ExportResponse into a shallow dictionary of its immediate attributes."""
614
+ body = {}
615
+ if self.content is not None: body['content'] = self.content
616
+ if self.file_type is not None: body['file_type'] = self.file_type
617
+ return body
618
+
481
619
  @classmethod
482
620
  def from_dict(cls, d: Dict[str, any]) -> ExportResponse:
483
621
  """Deserializes the ExportResponse from a dictionary."""
@@ -504,6 +642,14 @@ class GetCredentialsResponse:
504
642
  if self.git_username is not None: body['git_username'] = self.git_username
505
643
  return body
506
644
 
645
+ def as_shallow_dict(self) -> dict:
646
+ """Serializes the GetCredentialsResponse into a shallow dictionary of its immediate attributes."""
647
+ body = {}
648
+ if self.credential_id is not None: body['credential_id'] = self.credential_id
649
+ if self.git_provider is not None: body['git_provider'] = self.git_provider
650
+ if self.git_username is not None: body['git_username'] = self.git_username
651
+ return body
652
+
507
653
  @classmethod
508
654
  def from_dict(cls, d: Dict[str, any]) -> GetCredentialsResponse:
509
655
  """Deserializes the GetCredentialsResponse from a dictionary."""
@@ -523,6 +669,12 @@ class GetRepoPermissionLevelsResponse:
523
669
  if self.permission_levels: body['permission_levels'] = [v.as_dict() for v in self.permission_levels]
524
670
  return body
525
671
 
672
+ def as_shallow_dict(self) -> dict:
673
+ """Serializes the GetRepoPermissionLevelsResponse into a shallow dictionary of its immediate attributes."""
674
+ body = {}
675
+ if self.permission_levels: body['permission_levels'] = self.permission_levels
676
+ return body
677
+
526
678
  @classmethod
527
679
  def from_dict(cls, d: Dict[str, any]) -> GetRepoPermissionLevelsResponse:
528
680
  """Deserializes the GetRepoPermissionLevelsResponse from a dictionary."""
@@ -564,6 +716,18 @@ class GetRepoResponse:
564
716
  if self.url is not None: body['url'] = self.url
565
717
  return body
566
718
 
719
+ def as_shallow_dict(self) -> dict:
720
+ """Serializes the GetRepoResponse into a shallow dictionary of its immediate attributes."""
721
+ body = {}
722
+ if self.branch is not None: body['branch'] = self.branch
723
+ if self.head_commit_id is not None: body['head_commit_id'] = self.head_commit_id
724
+ if self.id is not None: body['id'] = self.id
725
+ if self.path is not None: body['path'] = self.path
726
+ if self.provider is not None: body['provider'] = self.provider
727
+ if self.sparse_checkout: body['sparse_checkout'] = self.sparse_checkout
728
+ if self.url is not None: body['url'] = self.url
729
+ return body
730
+
567
731
  @classmethod
568
732
  def from_dict(cls, d: Dict[str, any]) -> GetRepoResponse:
569
733
  """Deserializes the GetRepoResponse from a dictionary."""
@@ -591,6 +755,13 @@ class GetSecretResponse:
591
755
  if self.value is not None: body['value'] = self.value
592
756
  return body
593
757
 
758
+ def as_shallow_dict(self) -> dict:
759
+ """Serializes the GetSecretResponse into a shallow dictionary of its immediate attributes."""
760
+ body = {}
761
+ if self.key is not None: body['key'] = self.key
762
+ if self.value is not None: body['value'] = self.value
763
+ return body
764
+
594
765
  @classmethod
595
766
  def from_dict(cls, d: Dict[str, any]) -> GetSecretResponse:
596
767
  """Deserializes the GetSecretResponse from a dictionary."""
@@ -608,6 +779,12 @@ class GetWorkspaceObjectPermissionLevelsResponse:
608
779
  if self.permission_levels: body['permission_levels'] = [v.as_dict() for v in self.permission_levels]
609
780
  return body
610
781
 
782
+ def as_shallow_dict(self) -> dict:
783
+ """Serializes the GetWorkspaceObjectPermissionLevelsResponse into a shallow dictionary of its immediate attributes."""
784
+ body = {}
785
+ if self.permission_levels: body['permission_levels'] = self.permission_levels
786
+ return body
787
+
611
788
  @classmethod
612
789
  def from_dict(cls, d: Dict[str, any]) -> GetWorkspaceObjectPermissionLevelsResponse:
613
790
  """Deserializes the GetWorkspaceObjectPermissionLevelsResponse from a dictionary."""
@@ -657,6 +834,16 @@ class Import:
657
834
  if self.path is not None: body['path'] = self.path
658
835
  return body
659
836
 
837
+ def as_shallow_dict(self) -> dict:
838
+ """Serializes the Import into a shallow dictionary of its immediate attributes."""
839
+ body = {}
840
+ if self.content is not None: body['content'] = self.content
841
+ if self.format is not None: body['format'] = self.format
842
+ if self.language is not None: body['language'] = self.language
843
+ if self.overwrite is not None: body['overwrite'] = self.overwrite
844
+ if self.path is not None: body['path'] = self.path
845
+ return body
846
+
660
847
  @classmethod
661
848
  def from_dict(cls, d: Dict[str, any]) -> Import:
662
849
  """Deserializes the Import from a dictionary."""
@@ -684,6 +871,7 @@ class ImportFormat(Enum):
684
871
  DBC = 'DBC'
685
872
  HTML = 'HTML'
686
873
  JUPYTER = 'JUPYTER'
874
+ RAW = 'RAW'
687
875
  R_MARKDOWN = 'R_MARKDOWN'
688
876
  SOURCE = 'SOURCE'
689
877
 
@@ -696,6 +884,11 @@ class ImportResponse:
696
884
  body = {}
697
885
  return body
698
886
 
887
+ def as_shallow_dict(self) -> dict:
888
+ """Serializes the ImportResponse into a shallow dictionary of its immediate attributes."""
889
+ body = {}
890
+ return body
891
+
699
892
  @classmethod
700
893
  def from_dict(cls, d: Dict[str, any]) -> ImportResponse:
701
894
  """Deserializes the ImportResponse from a dictionary."""
@@ -722,6 +915,12 @@ class ListAclsResponse:
722
915
  if self.items: body['items'] = [v.as_dict() for v in self.items]
723
916
  return body
724
917
 
918
+ def as_shallow_dict(self) -> dict:
919
+ """Serializes the ListAclsResponse into a shallow dictionary of its immediate attributes."""
920
+ body = {}
921
+ if self.items: body['items'] = self.items
922
+ return body
923
+
725
924
  @classmethod
726
925
  def from_dict(cls, d: Dict[str, any]) -> ListAclsResponse:
727
926
  """Deserializes the ListAclsResponse from a dictionary."""
@@ -739,6 +938,12 @@ class ListCredentialsResponse:
739
938
  if self.credentials: body['credentials'] = [v.as_dict() for v in self.credentials]
740
939
  return body
741
940
 
941
+ def as_shallow_dict(self) -> dict:
942
+ """Serializes the ListCredentialsResponse into a shallow dictionary of its immediate attributes."""
943
+ body = {}
944
+ if self.credentials: body['credentials'] = self.credentials
945
+ return body
946
+
742
947
  @classmethod
743
948
  def from_dict(cls, d: Dict[str, any]) -> ListCredentialsResponse:
744
949
  """Deserializes the ListCredentialsResponse from a dictionary."""
@@ -761,6 +966,13 @@ class ListReposResponse:
761
966
  if self.repos: body['repos'] = [v.as_dict() for v in self.repos]
762
967
  return body
763
968
 
969
+ def as_shallow_dict(self) -> dict:
970
+ """Serializes the ListReposResponse into a shallow dictionary of its immediate attributes."""
971
+ body = {}
972
+ if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
973
+ if self.repos: body['repos'] = self.repos
974
+ return body
975
+
764
976
  @classmethod
765
977
  def from_dict(cls, d: Dict[str, any]) -> ListReposResponse:
766
978
  """Deserializes the ListReposResponse from a dictionary."""
@@ -778,6 +990,12 @@ class ListResponse:
778
990
  if self.objects: body['objects'] = [v.as_dict() for v in self.objects]
779
991
  return body
780
992
 
993
+ def as_shallow_dict(self) -> dict:
994
+ """Serializes the ListResponse into a shallow dictionary of its immediate attributes."""
995
+ body = {}
996
+ if self.objects: body['objects'] = self.objects
997
+ return body
998
+
781
999
  @classmethod
782
1000
  def from_dict(cls, d: Dict[str, any]) -> ListResponse:
783
1001
  """Deserializes the ListResponse from a dictionary."""
@@ -795,6 +1013,12 @@ class ListScopesResponse:
795
1013
  if self.scopes: body['scopes'] = [v.as_dict() for v in self.scopes]
796
1014
  return body
797
1015
 
1016
+ def as_shallow_dict(self) -> dict:
1017
+ """Serializes the ListScopesResponse into a shallow dictionary of its immediate attributes."""
1018
+ body = {}
1019
+ if self.scopes: body['scopes'] = self.scopes
1020
+ return body
1021
+
798
1022
  @classmethod
799
1023
  def from_dict(cls, d: Dict[str, any]) -> ListScopesResponse:
800
1024
  """Deserializes the ListScopesResponse from a dictionary."""
@@ -812,6 +1036,12 @@ class ListSecretsResponse:
812
1036
  if self.secrets: body['secrets'] = [v.as_dict() for v in self.secrets]
813
1037
  return body
814
1038
 
1039
+ def as_shallow_dict(self) -> dict:
1040
+ """Serializes the ListSecretsResponse into a shallow dictionary of its immediate attributes."""
1041
+ body = {}
1042
+ if self.secrets: body['secrets'] = self.secrets
1043
+ return body
1044
+
815
1045
  @classmethod
816
1046
  def from_dict(cls, d: Dict[str, any]) -> ListSecretsResponse:
817
1047
  """Deserializes the ListSecretsResponse from a dictionary."""
@@ -830,6 +1060,12 @@ class Mkdirs:
830
1060
  if self.path is not None: body['path'] = self.path
831
1061
  return body
832
1062
 
1063
+ def as_shallow_dict(self) -> dict:
1064
+ """Serializes the Mkdirs into a shallow dictionary of its immediate attributes."""
1065
+ body = {}
1066
+ if self.path is not None: body['path'] = self.path
1067
+ return body
1068
+
833
1069
  @classmethod
834
1070
  def from_dict(cls, d: Dict[str, any]) -> Mkdirs:
835
1071
  """Deserializes the Mkdirs from a dictionary."""
@@ -844,6 +1080,11 @@ class MkdirsResponse:
844
1080
  body = {}
845
1081
  return body
846
1082
 
1083
+ def as_shallow_dict(self) -> dict:
1084
+ """Serializes the MkdirsResponse into a shallow dictionary of its immediate attributes."""
1085
+ body = {}
1086
+ return body
1087
+
847
1088
  @classmethod
848
1089
  def from_dict(cls, d: Dict[str, any]) -> MkdirsResponse:
849
1090
  """Deserializes the MkdirsResponse from a dictionary."""
@@ -893,6 +1134,19 @@ class ObjectInfo:
893
1134
  if self.size is not None: body['size'] = self.size
894
1135
  return body
895
1136
 
1137
+ def as_shallow_dict(self) -> dict:
1138
+ """Serializes the ObjectInfo into a shallow dictionary of its immediate attributes."""
1139
+ body = {}
1140
+ if self.created_at is not None: body['created_at'] = self.created_at
1141
+ if self.language is not None: body['language'] = self.language
1142
+ if self.modified_at is not None: body['modified_at'] = self.modified_at
1143
+ if self.object_id is not None: body['object_id'] = self.object_id
1144
+ if self.object_type is not None: body['object_type'] = self.object_type
1145
+ if self.path is not None: body['path'] = self.path
1146
+ if self.resource_id is not None: body['resource_id'] = self.resource_id
1147
+ if self.size is not None: body['size'] = self.size
1148
+ return body
1149
+
896
1150
  @classmethod
897
1151
  def from_dict(cls, d: Dict[str, any]) -> ObjectInfo:
898
1152
  """Deserializes the ObjectInfo from a dictionary."""
@@ -940,6 +1194,14 @@ class PutAcl:
940
1194
  if self.scope is not None: body['scope'] = self.scope
941
1195
  return body
942
1196
 
1197
+ def as_shallow_dict(self) -> dict:
1198
+ """Serializes the PutAcl into a shallow dictionary of its immediate attributes."""
1199
+ body = {}
1200
+ if self.permission is not None: body['permission'] = self.permission
1201
+ if self.principal is not None: body['principal'] = self.principal
1202
+ if self.scope is not None: body['scope'] = self.scope
1203
+ return body
1204
+
943
1205
  @classmethod
944
1206
  def from_dict(cls, d: Dict[str, any]) -> PutAcl:
945
1207
  """Deserializes the PutAcl from a dictionary."""
@@ -956,6 +1218,11 @@ class PutAclResponse:
956
1218
  body = {}
957
1219
  return body
958
1220
 
1221
+ def as_shallow_dict(self) -> dict:
1222
+ """Serializes the PutAclResponse into a shallow dictionary of its immediate attributes."""
1223
+ body = {}
1224
+ return body
1225
+
959
1226
  @classmethod
960
1227
  def from_dict(cls, d: Dict[str, any]) -> PutAclResponse:
961
1228
  """Deserializes the PutAclResponse from a dictionary."""
@@ -985,6 +1252,15 @@ class PutSecret:
985
1252
  if self.string_value is not None: body['string_value'] = self.string_value
986
1253
  return body
987
1254
 
1255
+ def as_shallow_dict(self) -> dict:
1256
+ """Serializes the PutSecret into a shallow dictionary of its immediate attributes."""
1257
+ body = {}
1258
+ if self.bytes_value is not None: body['bytes_value'] = self.bytes_value
1259
+ if self.key is not None: body['key'] = self.key
1260
+ if self.scope is not None: body['scope'] = self.scope
1261
+ if self.string_value is not None: body['string_value'] = self.string_value
1262
+ return body
1263
+
988
1264
  @classmethod
989
1265
  def from_dict(cls, d: Dict[str, any]) -> PutSecret:
990
1266
  """Deserializes the PutSecret from a dictionary."""
@@ -1002,6 +1278,11 @@ class PutSecretResponse:
1002
1278
  body = {}
1003
1279
  return body
1004
1280
 
1281
+ def as_shallow_dict(self) -> dict:
1282
+ """Serializes the PutSecretResponse into a shallow dictionary of its immediate attributes."""
1283
+ body = {}
1284
+ return body
1285
+
1005
1286
  @classmethod
1006
1287
  def from_dict(cls, d: Dict[str, any]) -> PutSecretResponse:
1007
1288
  """Deserializes the PutSecretResponse from a dictionary."""
@@ -1032,6 +1313,16 @@ class RepoAccessControlRequest:
1032
1313
  if self.user_name is not None: body['user_name'] = self.user_name
1033
1314
  return body
1034
1315
 
1316
+ def as_shallow_dict(self) -> dict:
1317
+ """Serializes the RepoAccessControlRequest into a shallow dictionary of its immediate attributes."""
1318
+ body = {}
1319
+ if self.group_name is not None: body['group_name'] = self.group_name
1320
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
1321
+ if self.service_principal_name is not None:
1322
+ body['service_principal_name'] = self.service_principal_name
1323
+ if self.user_name is not None: body['user_name'] = self.user_name
1324
+ return body
1325
+
1035
1326
  @classmethod
1036
1327
  def from_dict(cls, d: Dict[str, any]) -> RepoAccessControlRequest:
1037
1328
  """Deserializes the RepoAccessControlRequest from a dictionary."""
@@ -1069,6 +1360,17 @@ class RepoAccessControlResponse:
1069
1360
  if self.user_name is not None: body['user_name'] = self.user_name
1070
1361
  return body
1071
1362
 
1363
+ def as_shallow_dict(self) -> dict:
1364
+ """Serializes the RepoAccessControlResponse into a shallow dictionary of its immediate attributes."""
1365
+ body = {}
1366
+ if self.all_permissions: body['all_permissions'] = self.all_permissions
1367
+ if self.display_name is not None: body['display_name'] = self.display_name
1368
+ if self.group_name is not None: body['group_name'] = self.group_name
1369
+ if self.service_principal_name is not None:
1370
+ body['service_principal_name'] = self.service_principal_name
1371
+ if self.user_name is not None: body['user_name'] = self.user_name
1372
+ return body
1373
+
1072
1374
  @classmethod
1073
1375
  def from_dict(cls, d: Dict[str, any]) -> RepoAccessControlResponse:
1074
1376
  """Deserializes the RepoAccessControlResponse from a dictionary."""
@@ -1116,6 +1418,18 @@ class RepoInfo:
1116
1418
  if self.url is not None: body['url'] = self.url
1117
1419
  return body
1118
1420
 
1421
+ def as_shallow_dict(self) -> dict:
1422
+ """Serializes the RepoInfo into a shallow dictionary of its immediate attributes."""
1423
+ body = {}
1424
+ if self.branch is not None: body['branch'] = self.branch
1425
+ if self.head_commit_id is not None: body['head_commit_id'] = self.head_commit_id
1426
+ if self.id is not None: body['id'] = self.id
1427
+ if self.path is not None: body['path'] = self.path
1428
+ if self.provider is not None: body['provider'] = self.provider
1429
+ if self.sparse_checkout: body['sparse_checkout'] = self.sparse_checkout
1430
+ if self.url is not None: body['url'] = self.url
1431
+ return body
1432
+
1119
1433
  @classmethod
1120
1434
  def from_dict(cls, d: Dict[str, any]) -> RepoInfo:
1121
1435
  """Deserializes the RepoInfo from a dictionary."""
@@ -1145,6 +1459,14 @@ class RepoPermission:
1145
1459
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
1146
1460
  return body
1147
1461
 
1462
+ def as_shallow_dict(self) -> dict:
1463
+ """Serializes the RepoPermission into a shallow dictionary of its immediate attributes."""
1464
+ body = {}
1465
+ if self.inherited is not None: body['inherited'] = self.inherited
1466
+ if self.inherited_from_object: body['inherited_from_object'] = self.inherited_from_object
1467
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
1468
+ return body
1469
+
1148
1470
  @classmethod
1149
1471
  def from_dict(cls, d: Dict[str, any]) -> RepoPermission:
1150
1472
  """Deserializes the RepoPermission from a dictionary."""
@@ -1179,6 +1501,14 @@ class RepoPermissions:
1179
1501
  if self.object_type is not None: body['object_type'] = self.object_type
1180
1502
  return body
1181
1503
 
1504
+ def as_shallow_dict(self) -> dict:
1505
+ """Serializes the RepoPermissions into a shallow dictionary of its immediate attributes."""
1506
+ body = {}
1507
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
1508
+ if self.object_id is not None: body['object_id'] = self.object_id
1509
+ if self.object_type is not None: body['object_type'] = self.object_type
1510
+ return body
1511
+
1182
1512
  @classmethod
1183
1513
  def from_dict(cls, d: Dict[str, any]) -> RepoPermissions:
1184
1514
  """Deserializes the RepoPermissions from a dictionary."""
@@ -1201,6 +1531,13 @@ class RepoPermissionsDescription:
1201
1531
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
1202
1532
  return body
1203
1533
 
1534
+ def as_shallow_dict(self) -> dict:
1535
+ """Serializes the RepoPermissionsDescription into a shallow dictionary of its immediate attributes."""
1536
+ body = {}
1537
+ if self.description is not None: body['description'] = self.description
1538
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
1539
+ return body
1540
+
1204
1541
  @classmethod
1205
1542
  def from_dict(cls, d: Dict[str, any]) -> RepoPermissionsDescription:
1206
1543
  """Deserializes the RepoPermissionsDescription from a dictionary."""
@@ -1223,6 +1560,13 @@ class RepoPermissionsRequest:
1223
1560
  if self.repo_id is not None: body['repo_id'] = self.repo_id
1224
1561
  return body
1225
1562
 
1563
+ def as_shallow_dict(self) -> dict:
1564
+ """Serializes the RepoPermissionsRequest into a shallow dictionary of its immediate attributes."""
1565
+ body = {}
1566
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
1567
+ if self.repo_id is not None: body['repo_id'] = self.repo_id
1568
+ return body
1569
+
1226
1570
  @classmethod
1227
1571
  def from_dict(cls, d: Dict[str, any]) -> RepoPermissionsRequest:
1228
1572
  """Deserializes the RepoPermissionsRequest from a dictionary."""
@@ -1252,6 +1596,14 @@ class SecretMetadata:
1252
1596
  body['last_updated_timestamp'] = self.last_updated_timestamp
1253
1597
  return body
1254
1598
 
1599
+ def as_shallow_dict(self) -> dict:
1600
+ """Serializes the SecretMetadata into a shallow dictionary of its immediate attributes."""
1601
+ body = {}
1602
+ if self.key is not None: body['key'] = self.key
1603
+ if self.last_updated_timestamp is not None:
1604
+ body['last_updated_timestamp'] = self.last_updated_timestamp
1605
+ return body
1606
+
1255
1607
  @classmethod
1256
1608
  def from_dict(cls, d: Dict[str, any]) -> SecretMetadata:
1257
1609
  """Deserializes the SecretMetadata from a dictionary."""
@@ -1277,6 +1629,14 @@ class SecretScope:
1277
1629
  if self.name is not None: body['name'] = self.name
1278
1630
  return body
1279
1631
 
1632
+ def as_shallow_dict(self) -> dict:
1633
+ """Serializes the SecretScope into a shallow dictionary of its immediate attributes."""
1634
+ body = {}
1635
+ if self.backend_type is not None: body['backend_type'] = self.backend_type
1636
+ if self.keyvault_metadata: body['keyvault_metadata'] = self.keyvault_metadata
1637
+ if self.name is not None: body['name'] = self.name
1638
+ return body
1639
+
1280
1640
  @classmethod
1281
1641
  def from_dict(cls, d: Dict[str, any]) -> SecretScope:
1282
1642
  """Deserializes the SecretScope from a dictionary."""
@@ -1300,6 +1660,12 @@ class SparseCheckout:
1300
1660
  if self.patterns: body['patterns'] = [v for v in self.patterns]
1301
1661
  return body
1302
1662
 
1663
+ def as_shallow_dict(self) -> dict:
1664
+ """Serializes the SparseCheckout into a shallow dictionary of its immediate attributes."""
1665
+ body = {}
1666
+ if self.patterns: body['patterns'] = self.patterns
1667
+ return body
1668
+
1303
1669
  @classmethod
1304
1670
  def from_dict(cls, d: Dict[str, any]) -> SparseCheckout:
1305
1671
  """Deserializes the SparseCheckout from a dictionary."""
@@ -1321,6 +1687,12 @@ class SparseCheckoutUpdate:
1321
1687
  if self.patterns: body['patterns'] = [v for v in self.patterns]
1322
1688
  return body
1323
1689
 
1690
+ def as_shallow_dict(self) -> dict:
1691
+ """Serializes the SparseCheckoutUpdate into a shallow dictionary of its immediate attributes."""
1692
+ body = {}
1693
+ if self.patterns: body['patterns'] = self.patterns
1694
+ return body
1695
+
1324
1696
  @classmethod
1325
1697
  def from_dict(cls, d: Dict[str, any]) -> SparseCheckoutUpdate:
1326
1698
  """Deserializes the SparseCheckoutUpdate from a dictionary."""
@@ -1359,6 +1731,15 @@ class UpdateCredentialsRequest:
1359
1731
  if self.personal_access_token is not None: body['personal_access_token'] = self.personal_access_token
1360
1732
  return body
1361
1733
 
1734
+ def as_shallow_dict(self) -> dict:
1735
+ """Serializes the UpdateCredentialsRequest into a shallow dictionary of its immediate attributes."""
1736
+ body = {}
1737
+ if self.credential_id is not None: body['credential_id'] = self.credential_id
1738
+ if self.git_provider is not None: body['git_provider'] = self.git_provider
1739
+ if self.git_username is not None: body['git_username'] = self.git_username
1740
+ if self.personal_access_token is not None: body['personal_access_token'] = self.personal_access_token
1741
+ return body
1742
+
1362
1743
  @classmethod
1363
1744
  def from_dict(cls, d: Dict[str, any]) -> UpdateCredentialsRequest:
1364
1745
  """Deserializes the UpdateCredentialsRequest from a dictionary."""
@@ -1376,6 +1757,11 @@ class UpdateCredentialsResponse:
1376
1757
  body = {}
1377
1758
  return body
1378
1759
 
1760
+ def as_shallow_dict(self) -> dict:
1761
+ """Serializes the UpdateCredentialsResponse into a shallow dictionary of its immediate attributes."""
1762
+ body = {}
1763
+ return body
1764
+
1379
1765
  @classmethod
1380
1766
  def from_dict(cls, d: Dict[str, any]) -> UpdateCredentialsResponse:
1381
1767
  """Deserializes the UpdateCredentialsResponse from a dictionary."""
@@ -1408,6 +1794,15 @@ class UpdateRepoRequest:
1408
1794
  if self.tag is not None: body['tag'] = self.tag
1409
1795
  return body
1410
1796
 
1797
+ def as_shallow_dict(self) -> dict:
1798
+ """Serializes the UpdateRepoRequest into a shallow dictionary of its immediate attributes."""
1799
+ body = {}
1800
+ if self.branch is not None: body['branch'] = self.branch
1801
+ if self.repo_id is not None: body['repo_id'] = self.repo_id
1802
+ if self.sparse_checkout: body['sparse_checkout'] = self.sparse_checkout
1803
+ if self.tag is not None: body['tag'] = self.tag
1804
+ return body
1805
+
1411
1806
  @classmethod
1412
1807
  def from_dict(cls, d: Dict[str, any]) -> UpdateRepoRequest:
1413
1808
  """Deserializes the UpdateRepoRequest from a dictionary."""
@@ -1425,6 +1820,11 @@ class UpdateRepoResponse:
1425
1820
  body = {}
1426
1821
  return body
1427
1822
 
1823
+ def as_shallow_dict(self) -> dict:
1824
+ """Serializes the UpdateRepoResponse into a shallow dictionary of its immediate attributes."""
1825
+ body = {}
1826
+ return body
1827
+
1428
1828
  @classmethod
1429
1829
  def from_dict(cls, d: Dict[str, any]) -> UpdateRepoResponse:
1430
1830
  """Deserializes the UpdateRepoResponse from a dictionary."""
@@ -1455,6 +1855,16 @@ class WorkspaceObjectAccessControlRequest:
1455
1855
  if self.user_name is not None: body['user_name'] = self.user_name
1456
1856
  return body
1457
1857
 
1858
+ def as_shallow_dict(self) -> dict:
1859
+ """Serializes the WorkspaceObjectAccessControlRequest into a shallow dictionary of its immediate attributes."""
1860
+ body = {}
1861
+ if self.group_name is not None: body['group_name'] = self.group_name
1862
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
1863
+ if self.service_principal_name is not None:
1864
+ body['service_principal_name'] = self.service_principal_name
1865
+ if self.user_name is not None: body['user_name'] = self.user_name
1866
+ return body
1867
+
1458
1868
  @classmethod
1459
1869
  def from_dict(cls, d: Dict[str, any]) -> WorkspaceObjectAccessControlRequest:
1460
1870
  """Deserializes the WorkspaceObjectAccessControlRequest from a dictionary."""
@@ -1492,6 +1902,17 @@ class WorkspaceObjectAccessControlResponse:
1492
1902
  if self.user_name is not None: body['user_name'] = self.user_name
1493
1903
  return body
1494
1904
 
1905
+ def as_shallow_dict(self) -> dict:
1906
+ """Serializes the WorkspaceObjectAccessControlResponse into a shallow dictionary of its immediate attributes."""
1907
+ body = {}
1908
+ if self.all_permissions: body['all_permissions'] = self.all_permissions
1909
+ if self.display_name is not None: body['display_name'] = self.display_name
1910
+ if self.group_name is not None: body['group_name'] = self.group_name
1911
+ if self.service_principal_name is not None:
1912
+ body['service_principal_name'] = self.service_principal_name
1913
+ if self.user_name is not None: body['user_name'] = self.user_name
1914
+ return body
1915
+
1495
1916
  @classmethod
1496
1917
  def from_dict(cls, d: Dict[str, any]) -> WorkspaceObjectAccessControlResponse:
1497
1918
  """Deserializes the WorkspaceObjectAccessControlResponse from a dictionary."""
@@ -1519,6 +1940,14 @@ class WorkspaceObjectPermission:
1519
1940
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
1520
1941
  return body
1521
1942
 
1943
+ def as_shallow_dict(self) -> dict:
1944
+ """Serializes the WorkspaceObjectPermission into a shallow dictionary of its immediate attributes."""
1945
+ body = {}
1946
+ if self.inherited is not None: body['inherited'] = self.inherited
1947
+ if self.inherited_from_object: body['inherited_from_object'] = self.inherited_from_object
1948
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
1949
+ return body
1950
+
1522
1951
  @classmethod
1523
1952
  def from_dict(cls, d: Dict[str, any]) -> WorkspaceObjectPermission:
1524
1953
  """Deserializes the WorkspaceObjectPermission from a dictionary."""
@@ -1553,6 +1982,14 @@ class WorkspaceObjectPermissions:
1553
1982
  if self.object_type is not None: body['object_type'] = self.object_type
1554
1983
  return body
1555
1984
 
1985
+ def as_shallow_dict(self) -> dict:
1986
+ """Serializes the WorkspaceObjectPermissions into a shallow dictionary of its immediate attributes."""
1987
+ body = {}
1988
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
1989
+ if self.object_id is not None: body['object_id'] = self.object_id
1990
+ if self.object_type is not None: body['object_type'] = self.object_type
1991
+ return body
1992
+
1556
1993
  @classmethod
1557
1994
  def from_dict(cls, d: Dict[str, any]) -> WorkspaceObjectPermissions:
1558
1995
  """Deserializes the WorkspaceObjectPermissions from a dictionary."""
@@ -1576,6 +2013,13 @@ class WorkspaceObjectPermissionsDescription:
1576
2013
  if self.permission_level is not None: body['permission_level'] = self.permission_level.value
1577
2014
  return body
1578
2015
 
2016
+ def as_shallow_dict(self) -> dict:
2017
+ """Serializes the WorkspaceObjectPermissionsDescription into a shallow dictionary of its immediate attributes."""
2018
+ body = {}
2019
+ if self.description is not None: body['description'] = self.description
2020
+ if self.permission_level is not None: body['permission_level'] = self.permission_level
2021
+ return body
2022
+
1579
2023
  @classmethod
1580
2024
  def from_dict(cls, d: Dict[str, any]) -> WorkspaceObjectPermissionsDescription:
1581
2025
  """Deserializes the WorkspaceObjectPermissionsDescription from a dictionary."""
@@ -1602,6 +2046,14 @@ class WorkspaceObjectPermissionsRequest:
1602
2046
  if self.workspace_object_type is not None: body['workspace_object_type'] = self.workspace_object_type
1603
2047
  return body
1604
2048
 
2049
+ def as_shallow_dict(self) -> dict:
2050
+ """Serializes the WorkspaceObjectPermissionsRequest into a shallow dictionary of its immediate attributes."""
2051
+ body = {}
2052
+ if self.access_control_list: body['access_control_list'] = self.access_control_list
2053
+ if self.workspace_object_id is not None: body['workspace_object_id'] = self.workspace_object_id
2054
+ if self.workspace_object_type is not None: body['workspace_object_type'] = self.workspace_object_type
2055
+ return body
2056
+
1605
2057
  @classmethod
1606
2058
  def from_dict(cls, d: Dict[str, any]) -> WorkspaceObjectPermissionsRequest:
1607
2059
  """Deserializes the WorkspaceObjectPermissionsRequest from a dictionary."""
@@ -1799,7 +2251,7 @@ class ReposAPI:
1799
2251
  Deletes the specified repo.
1800
2252
 
1801
2253
  :param repo_id: int
1802
- ID of the Git folder (repo) object in the workspace.
2254
+ The ID for the corresponding repo to delete.
1803
2255
 
1804
2256
 
1805
2257
  """