diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 54cda63dc..ec7c3c49f 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -file:/home/tejas.kochar/openapi/master.json \ No newline at end of file +file:/home/tejas.kochar/openapi/aip-155-python.json \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 8bee41bad..28ea4a477 100755 --- a/.gitattributes +++ b/.gitattributes @@ -33,5 +33,6 @@ databricks/sdk/service/tags.py linguist-generated=true databricks/sdk/service/vectorsearch.py linguist-generated=true databricks/sdk/service/workspace.py linguist-generated=true test_http_call.py linguist-generated=true +test_idempotency.py linguist-generated=true test_json_marshall.py linguist-generated=true test_lro_call.py linguist-generated=true diff --git a/databricks/sdk/service/agentbricks.py b/databricks/sdk/service/agentbricks.py index b2a560e31..b5242a314 100755 --- a/databricks/sdk/service/agentbricks.py +++ b/databricks/sdk/service/agentbricks.py @@ -238,6 +238,7 @@ def create_custom_llm( :returns: :class:`CustomLlm` """ + body = {} if agent_artifact_path is not None: body["agent_artifact_path"] = agent_artifact_path @@ -328,6 +329,7 @@ def update_custom_llm(self, id: str, custom_llm: CustomLlm, update_mask: str) -> :returns: :class:`CustomLlm` """ + body = {} if custom_llm is not None: body["custom_llm"] = custom_llm.as_dict() diff --git a/databricks/sdk/service/apps.py b/databricks/sdk/service/apps.py index bbe13675a..fcb8277a7 100755 --- a/databricks/sdk/service/apps.py +++ b/databricks/sdk/service/apps.py @@ -1867,6 +1867,7 @@ def create(self, app: App, *, no_compute: Optional[bool] = None) -> Wait[App]: Long-running operation waiter for :class:`App`. See :method:wait_get_app_active for more details. """ + body = app.as_dict() query = {} if no_compute is not None: @@ -1903,6 +1904,7 @@ def create_update(self, app_name: str, update_mask: str, *, app: Optional[App] = Long-running operation waiter for :class:`AppUpdate`. See :method:wait_get_update_app_succeeded for more details. """ + body = {} if app is not None: body["app"] = app.as_dict() @@ -1949,6 +1951,7 @@ def deploy(self, app_name: str, app_deployment: AppDeployment) -> Wait[AppDeploy Long-running operation waiter for :class:`AppDeployment`. See :method:wait_get_deployment_app_succeeded for more details. """ + body = app_deployment.as_dict() headers = { "Accept": "application/json", @@ -2124,6 +2127,7 @@ def set_permissions( :returns: :class:`AppPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -2189,6 +2193,7 @@ def update(self, name: str, app: App) -> App: :returns: :class:`App` """ + body = app.as_dict() headers = { "Accept": "application/json", @@ -2209,6 +2214,7 @@ def update_permissions( :returns: :class:`AppPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -2234,6 +2240,7 @@ def create_custom_template(self, template: CustomTemplate) -> CustomTemplate: :returns: :class:`CustomTemplate` """ + body = template.as_dict() headers = { "Accept": "application/json", @@ -2316,6 +2323,7 @@ def update_custom_template(self, name: str, template: CustomTemplate) -> CustomT :returns: :class:`CustomTemplate` """ + body = template.as_dict() headers = { "Accept": "application/json", diff --git a/databricks/sdk/service/billing.py b/databricks/sdk/service/billing.py index 3758028c2..73d951ff1 100755 --- a/databricks/sdk/service/billing.py +++ b/databricks/sdk/service/billing.py @@ -3,6 +3,7 @@ from __future__ import annotations import logging +import uuid from dataclasses import dataclass from enum import Enum from typing import Any, BinaryIO, Dict, Iterator, List, Optional @@ -1565,6 +1566,9 @@ def create(self, *, policy: Optional[BudgetPolicy] = None, request_id: Optional[ :returns: :class:`BudgetPolicy` """ + + if request_id is None or request_id == "": + request_id = str(uuid.uuid4()) body = {} if policy is not None: body["policy"] = policy.as_dict() @@ -1679,6 +1683,7 @@ def update( :returns: :class:`BudgetPolicy` """ + body = policy.as_dict() query = {} if limit_config is not None: @@ -1715,6 +1720,7 @@ def create(self, budget: CreateBudgetConfigurationBudget) -> CreateBudgetConfigu :returns: :class:`CreateBudgetConfigurationResponse` """ + body = {} if budget is not None: body["budget"] = budget.as_dict() @@ -1797,6 +1803,7 @@ def update(self, budget_id: str, budget: UpdateBudgetConfigurationBudget) -> Upd :returns: :class:`UpdateBudgetConfigurationResponse` """ + body = {} if budget is not None: body["budget"] = budget.as_dict() @@ -1895,6 +1902,7 @@ def create( :returns: :class:`WrappedLogDeliveryConfiguration` """ + body = {} if log_delivery_configuration is not None: body["log_delivery_configuration"] = log_delivery_configuration.as_dict() @@ -1989,6 +1997,7 @@ def patch_status(self, log_delivery_configuration_id: str, status: LogDeliveryCo """ + body = {} if status is not None: body["status"] = status.value @@ -2026,6 +2035,7 @@ def create( :returns: :class:`CreateBillingUsageDashboardResponse` """ + body = {} if dashboard_type is not None: body["dashboard_type"] = dashboard_type.value diff --git a/databricks/sdk/service/catalog.py b/databricks/sdk/service/catalog.py index 0cccaee5d..0cd1c06bc 100755 --- a/databricks/sdk/service/catalog.py +++ b/databricks/sdk/service/catalog.py @@ -10601,6 +10601,7 @@ def create( :returns: :class:`AccountsCreateMetastoreAssignmentResponse` """ + body = {} if metastore_assignment is not None: body["metastore_assignment"] = metastore_assignment.as_dict() @@ -10692,6 +10693,7 @@ def update( :returns: :class:`AccountsUpdateMetastoreAssignmentResponse` """ + body = {} if metastore_assignment is not None: body["metastore_assignment"] = metastore_assignment.as_dict() @@ -10723,6 +10725,7 @@ def create(self, *, metastore_info: Optional[CreateAccountsMetastore] = None) -> :returns: :class:`AccountsCreateMetastoreResponse` """ + body = {} if metastore_info is not None: body["metastore_info"] = metastore_info.as_dict() @@ -10805,6 +10808,7 @@ def update( :returns: :class:`AccountsUpdateMetastoreResponse` """ + body = {} if metastore_info is not None: body["metastore_info"] = metastore_info.as_dict() @@ -10848,6 +10852,7 @@ def create( :returns: :class:`AccountsCreateStorageCredentialInfo` """ + body = {} if credential_info is not None: body["credential_info"] = credential_info.as_dict() @@ -10962,6 +10967,7 @@ def update( :returns: :class:`AccountsUpdateStorageCredentialResponse` """ + body = {} if credential_info is not None: body["credential_info"] = credential_info.as_dict() @@ -11031,6 +11037,7 @@ def update( :returns: :class:`ArtifactAllowlistInfo` """ + body = {} if artifact_matchers is not None: body["artifact_matchers"] = [v.as_dict() for v in artifact_matchers] @@ -11098,6 +11105,7 @@ def create( :returns: :class:`CatalogInfo` """ + body = {} if comment is not None: body["comment"] = comment @@ -11264,6 +11272,7 @@ def update( :returns: :class:`CatalogInfo` """ + body = {} if comment is not None: body["comment"] = comment @@ -11331,6 +11340,7 @@ def create( :returns: :class:`ConnectionInfo` """ + body = {} if comment is not None: body["comment"] = comment @@ -11439,6 +11449,7 @@ def update( :returns: :class:`ConnectionInfo` """ + body = {} if new_name is not None: body["new_name"] = new_name @@ -11509,6 +11520,7 @@ def create_credential( :returns: :class:`CredentialInfo` """ + body = {} if aws_iam_role is not None: body["aws_iam_role"] = aws_iam_role.as_dict() @@ -11575,6 +11587,7 @@ def generate_temporary_service_credential( :returns: :class:`TemporaryCredentials` """ + body = {} if azure_options is not None: body["azure_options"] = azure_options.as_dict() @@ -11709,6 +11722,7 @@ def update_credential( :returns: :class:`CredentialInfo` """ + body = {} if aws_iam_role is not None: body["aws_iam_role"] = aws_iam_role.as_dict() @@ -11784,6 +11798,7 @@ def validate_credential( :returns: :class:`ValidateCredentialResponse` """ + body = {} if aws_iam_role is not None: body["aws_iam_role"] = aws_iam_role.as_dict() @@ -11835,6 +11850,7 @@ def create(self, tag_assignment: EntityTagAssignment) -> EntityTagAssignment: :returns: :class:`EntityTagAssignment` """ + body = tag_assignment.as_dict() headers = { "Accept": "application/json", @@ -11978,6 +11994,7 @@ def update( :returns: :class:`EntityTagAssignment` """ + body = tag_assignment.as_dict() query = {} if update_mask is not None: @@ -12018,6 +12035,7 @@ def create_external_lineage_relationship( :returns: :class:`ExternalLineageRelationship` """ + body = external_lineage_relationship.as_dict() headers = { "Accept": "application/json", @@ -12113,6 +12131,7 @@ def update_external_lineage_relationship( :returns: :class:`ExternalLineageRelationship` """ + body = external_lineage_relationship.as_dict() query = {} if update_mask is not None: @@ -12186,6 +12205,7 @@ def create( :returns: :class:`ExternalLocationInfo` """ + body = {} if comment is not None: body["comment"] = comment @@ -12372,6 +12392,7 @@ def update( :returns: :class:`ExternalLocationInfo` """ + body = {} if comment is not None: body["comment"] = comment @@ -12428,6 +12449,7 @@ def create_external_metadata(self, external_metadata: ExternalMetadata) -> Exter :returns: :class:`ExternalMetadata` """ + body = external_metadata.as_dict() headers = { "Accept": "application/json", @@ -12527,6 +12549,7 @@ def update_external_metadata( :returns: :class:`ExternalMetadata` """ + body = external_metadata.as_dict() query = {} if update_mask is not None: @@ -12566,6 +12589,7 @@ def create(self, function_info: CreateFunction) -> FunctionInfo: :returns: :class:`FunctionInfo` """ + body = {} if function_info is not None: body["function_info"] = function_info.as_dict() @@ -12709,6 +12733,7 @@ def update(self, name: str, *, owner: Optional[str] = None) -> FunctionInfo: :returns: :class:`FunctionInfo` """ + body = {} if owner is not None: body["owner"] = owner @@ -12853,6 +12878,7 @@ def update( :returns: :class:`UpdatePermissionsResponse` """ + body = {} if changes is not None: body["changes"] = [v.as_dict() for v in changes] @@ -12898,6 +12924,7 @@ def assign(self, workspace_id: int, metastore_id: str, default_catalog_name: str """ + body = {} if default_catalog_name is not None: body["default_catalog_name"] = default_catalog_name @@ -12925,6 +12952,7 @@ def create(self, name: str, *, region: Optional[str] = None, storage_root: Optio :returns: :class:`MetastoreInfo` """ + body = {} if name is not None: body["name"] = name @@ -13107,6 +13135,7 @@ def update( :returns: :class:`MetastoreInfo` """ + body = {} if delta_sharing_organization_name is not None: body["delta_sharing_organization_name"] = delta_sharing_organization_name @@ -13150,6 +13179,7 @@ def update_assignment( """ + body = {} if default_catalog_name is not None: body["default_catalog_name"] = default_catalog_name @@ -13397,6 +13427,7 @@ def update( :returns: :class:`ModelVersionInfo` """ + body = {} if aliases is not None: body["aliases"] = [v.as_dict() for v in aliases] @@ -13488,6 +13519,7 @@ def create(self, table: OnlineTable) -> Wait[OnlineTable]: Long-running operation waiter for :class:`OnlineTable`. See :method:wait_get_online_table_active for more details. """ + body = table.as_dict() headers = { "Accept": "application/json", @@ -13555,6 +13587,7 @@ def create_policy(self, policy_info: PolicyInfo) -> PolicyInfo: :returns: :class:`PolicyInfo` """ + body = policy_info.as_dict() headers = { "Accept": "application/json", @@ -13696,6 +13729,7 @@ def update_policy( :returns: :class:`PolicyInfo` """ + body = policy_info.as_dict() query = {} if update_mask is not None: @@ -13815,6 +13849,7 @@ def create( :returns: :class:`MonitorInfo` """ + body = {} if assets_dir is not None: body["assets_dir"] = assets_dir @@ -13978,6 +14013,7 @@ def regenerate_dashboard( :returns: :class:`RegenerateDashboardResponse` """ + body = {} if warehouse_id is not None: body["warehouse_id"] = warehouse_id @@ -14082,6 +14118,7 @@ def update( :returns: :class:`MonitorInfo` """ + body = {} if baseline_table_name is not None: body["baseline_table_name"] = baseline_table_name @@ -14205,6 +14242,7 @@ def create( :returns: :class:`RegisteredModelInfo` """ + body = {} if aliases is not None: body["aliases"] = [v.as_dict() for v in aliases] @@ -14399,6 +14437,7 @@ def set_alias(self, full_name: str, alias: str, version_num: int) -> RegisteredM :returns: :class:`RegisteredModelAlias` """ + body = {} if version_num is not None: body["version_num"] = version_num @@ -14473,6 +14512,7 @@ def update( :returns: :class:`RegisteredModelInfo` """ + body = {} if aliases is not None: body["aliases"] = [v.as_dict() for v in aliases] @@ -14613,6 +14653,7 @@ def batch_create_access_requests( :returns: :class:`BatchCreateAccessRequestsResponse` """ + body = {} if requests is not None: body["requests"] = [v.as_dict() for v in requests] @@ -14677,6 +14718,7 @@ def update_access_request_destinations( :returns: :class:`AccessRequestDestinations` """ + body = access_request_destinations.as_dict() query = {} if update_mask is not None: @@ -14724,6 +14766,7 @@ def create( :returns: :class:`SchemaInfo` """ + body = {} if catalog_name is not None: body["catalog_name"] = catalog_name @@ -14876,6 +14919,7 @@ def update( :returns: :class:`SchemaInfo` """ + body = {} if comment is not None: body["comment"] = comment @@ -14952,6 +14996,7 @@ def create( :returns: :class:`StorageCredentialInfo` """ + body = {} if aws_iam_role is not None: body["aws_iam_role"] = aws_iam_role.as_dict() @@ -15125,6 +15170,7 @@ def update( :returns: :class:`StorageCredentialInfo` """ + body = {} if aws_iam_role is not None: body["aws_iam_role"] = aws_iam_role.as_dict() @@ -15202,6 +15248,7 @@ def validate( :returns: :class:`ValidateStorageCredentialResponse` """ + body = {} if aws_iam_role is not None: body["aws_iam_role"] = aws_iam_role.as_dict() @@ -15270,6 +15317,7 @@ def enable(self, metastore_id: str, schema_name: str, *, catalog_name: Optional[ """ + body = {} if catalog_name is not None: body["catalog_name"] = catalog_name @@ -15364,6 +15412,7 @@ def create(self, full_name_arg: str, constraint: TableConstraint) -> TableConstr :returns: :class:`TableConstraint` """ + body = {} if constraint is not None: body["constraint"] = constraint.as_dict() @@ -15471,6 +15520,7 @@ def create( :returns: :class:`TableInfo` """ + body = {} if catalog_name is not None: body["catalog_name"] = catalog_name @@ -15742,6 +15792,7 @@ def update(self, full_name: str, *, owner: Optional[str] = None): """ + body = {} if owner is not None: body["owner"] = owner @@ -15803,6 +15854,7 @@ def generate_temporary_path_credentials( :returns: :class:`GenerateTemporaryPathCredentialResponse` """ + body = {} if dry_run is not None: body["dry_run"] = dry_run @@ -15853,6 +15905,7 @@ def generate_temporary_table_credentials( :returns: :class:`GenerateTemporaryTableCredentialResponse` """ + body = {} if operation is not None: body["operation"] = operation.value @@ -15923,6 +15976,7 @@ def create( :returns: :class:`VolumeInfo` """ + body = {} if catalog_name is not None: body["catalog_name"] = catalog_name @@ -16078,6 +16132,7 @@ def update( :returns: :class:`VolumeInfo` """ + body = {} if comment is not None: body["comment"] = comment @@ -16199,6 +16254,7 @@ def update( :returns: :class:`UpdateCatalogWorkspaceBindingsResponse` """ + body = {} if assign_workspaces is not None: body["assign_workspaces"] = [v for v in assign_workspaces] @@ -16239,6 +16295,7 @@ def update_bindings( :returns: :class:`UpdateWorkspaceBindingsResponse` """ + body = {} if add is not None: body["add"] = [v.as_dict() for v in add] diff --git a/databricks/sdk/service/cleanrooms.py b/databricks/sdk/service/cleanrooms.py index 299d623e3..4469b6633 100755 --- a/databricks/sdk/service/cleanrooms.py +++ b/databricks/sdk/service/cleanrooms.py @@ -1495,6 +1495,7 @@ def create(self, clean_room_name: str, asset: CleanRoomAsset) -> CleanRoomAsset: :returns: :class:`CleanRoomAsset` """ + body = asset.as_dict() headers = { "Accept": "application/json", @@ -1524,6 +1525,7 @@ def create_clean_room_asset_review( :returns: :class:`CreateCleanRoomAssetReviewResponse` """ + body = {} if notebook_review is not None: body["notebook_review"] = notebook_review.as_dict() @@ -1635,6 +1637,7 @@ def update( :returns: :class:`CleanRoomAsset` """ + body = asset.as_dict() headers = { "Accept": "application/json", @@ -1666,6 +1669,7 @@ def create(self, clean_room_name: str, auto_approval_rule: CleanRoomAutoApproval :returns: :class:`CleanRoomAutoApprovalRule` """ + body = {} if auto_approval_rule is not None: body["auto_approval_rule"] = auto_approval_rule.as_dict() @@ -1760,6 +1764,7 @@ def update( :returns: :class:`CleanRoomAutoApprovalRule` """ + body = auto_approval_rule.as_dict() headers = { "Accept": "application/json", @@ -1869,6 +1874,7 @@ def create(self, clean_room: CleanRoom) -> Wait[CleanRoom]: Long-running operation waiter for :class:`CleanRoom`. See :method:wait_get_clean_room_active for more details. """ + body = clean_room.as_dict() headers = { "Accept": "application/json", @@ -1894,6 +1900,7 @@ def create_output_catalog( :returns: :class:`CreateCleanRoomOutputCatalogResponse` """ + body = output_catalog.as_dict() headers = { "Accept": "application/json", @@ -1979,6 +1986,7 @@ def update(self, name: str, *, clean_room: Optional[CleanRoom] = None) -> CleanR :returns: :class:`CleanRoom` """ + body = {} if clean_room is not None: body["clean_room"] = clean_room.as_dict() diff --git a/databricks/sdk/service/compute.py b/databricks/sdk/service/compute.py index c6f9bd35d..f25e31cf1 100755 --- a/databricks/sdk/service/compute.py +++ b/databricks/sdk/service/compute.py @@ -7783,6 +7783,7 @@ def create( :returns: :class:`CreatePolicyResponse` """ + body = {} if definition is not None: body["definition"] = definition @@ -7814,6 +7815,7 @@ def delete(self, policy_id: str): """ + body = {} if policy_id is not None: body["policy_id"] = policy_id @@ -7873,6 +7875,7 @@ def edit( """ + body = {} if definition is not None: body["definition"] = definition @@ -7991,6 +7994,7 @@ def set_permissions( :returns: :class:`ClusterPolicyPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -8016,6 +8020,7 @@ def update_permissions( :returns: :class:`ClusterPolicyPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -8133,6 +8138,7 @@ def change_owner(self, cluster_id: str, owner_username: str): """ + body = {} if cluster_id is not None: body["cluster_id"] = cluster_id @@ -8332,6 +8338,7 @@ def create( Long-running operation waiter for :class:`ClusterDetails`. See :method:wait_get_cluster_running for more details. """ + body = {} if apply_policy_default_values is not None: body["apply_policy_default_values"] = apply_policy_default_values @@ -8497,6 +8504,7 @@ def delete(self, cluster_id: str) -> Wait[ClusterDetails]: Long-running operation waiter for :class:`ClusterDetails`. See :method:wait_get_cluster_terminated for more details. """ + body = {} if cluster_id is not None: body["cluster_id"] = cluster_id @@ -8695,6 +8703,7 @@ def edit( Long-running operation waiter for :class:`ClusterDetails`. See :method:wait_get_cluster_running for more details. """ + body = {} if apply_policy_default_values is not None: body["apply_policy_default_values"] = apply_policy_default_values @@ -8891,6 +8900,7 @@ def events( :returns: Iterator over :class:`ClusterEvent` """ + body = {} if cluster_id is not None: body["cluster_id"] = cluster_id @@ -9064,6 +9074,7 @@ def permanent_delete(self, cluster_id: str): """ + body = {} if cluster_id is not None: body["cluster_id"] = cluster_id @@ -9082,6 +9093,7 @@ def pin(self, cluster_id: str): """ + body = {} if cluster_id is not None: body["cluster_id"] = cluster_id @@ -9117,6 +9129,7 @@ def resize( Long-running operation waiter for :class:`ClusterDetails`. See :method:wait_get_cluster_running for more details. """ + body = {} if autoscale is not None: body["autoscale"] = autoscale.as_dict() @@ -9154,6 +9167,7 @@ def restart(self, cluster_id: str, *, restart_user: Optional[str] = None) -> Wai Long-running operation waiter for :class:`ClusterDetails`. See :method:wait_get_cluster_running for more details. """ + body = {} if cluster_id is not None: body["cluster_id"] = cluster_id @@ -9184,6 +9198,7 @@ def set_permissions( :returns: :class:`ClusterPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -9223,6 +9238,7 @@ def start(self, cluster_id: str) -> Wait[ClusterDetails]: Long-running operation waiter for :class:`ClusterDetails`. See :method:wait_get_cluster_running for more details. """ + body = {} if cluster_id is not None: body["cluster_id"] = cluster_id @@ -9246,6 +9262,7 @@ def unpin(self, cluster_id: str): """ + body = {} if cluster_id is not None: body["cluster_id"] = cluster_id @@ -9290,6 +9307,7 @@ def update( Long-running operation waiter for :class:`ClusterDetails`. See :method:wait_get_cluster_running for more details. """ + body = {} if cluster is not None: body["cluster"] = cluster.as_dict() @@ -9326,6 +9344,7 @@ def update_permissions( :returns: :class:`ClusterPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -9469,6 +9488,7 @@ def cancel( Long-running operation waiter for :class:`CommandStatusResponse`. See :method:wait_command_status_command_execution_cancelled for more details. """ + body = {} if cluster_id is not None: body["clusterId"] = cluster_id @@ -9561,6 +9581,7 @@ def create( Long-running operation waiter for :class:`ContextStatusResponse`. See :method:wait_context_status_command_execution_running for more details. """ + body = {} if cluster_id is not None: body["clusterId"] = cluster_id @@ -9592,6 +9613,7 @@ def destroy(self, cluster_id: str, context_id: str): """ + body = {} if cluster_id is not None: body["clusterId"] = cluster_id @@ -9628,6 +9650,7 @@ def execute( Long-running operation waiter for :class:`CommandStatusResponse`. See :method:wait_command_status_command_execution_finished_or_error for more details. """ + body = {} if cluster_id is not None: body["clusterId"] = cluster_id @@ -9701,6 +9724,7 @@ def create( :returns: :class:`CreateResponse` """ + body = {} if enabled is not None: body["enabled"] = enabled @@ -9793,6 +9817,7 @@ def update( """ + body = {} if enabled is not None: body["enabled"] = enabled @@ -9905,6 +9930,7 @@ def create( :returns: :class:`CreateInstancePoolResponse` """ + body = {} if aws_attributes is not None: body["aws_attributes"] = aws_attributes.as_dict() @@ -9952,6 +9978,7 @@ def delete(self, instance_pool_id: str): """ + body = {} if instance_pool_id is not None: body["instance_pool_id"] = instance_pool_id @@ -10013,6 +10040,7 @@ def edit( """ + body = {} if custom_tags is not None: body["custom_tags"] = custom_tags @@ -10120,6 +10148,7 @@ def set_permissions( :returns: :class:`InstancePoolPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -10143,6 +10172,7 @@ def update_permissions( :returns: :class:`InstancePoolPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -10205,6 +10235,7 @@ def add( """ + body = {} if iam_role_arn is not None: body["iam_role_arn"] = iam_role_arn @@ -10259,6 +10290,7 @@ def edit( """ + body = {} if iam_role_arn is not None: body["iam_role_arn"] = iam_role_arn @@ -10301,6 +10333,7 @@ def remove(self, instance_profile_arn: str): """ + body = {} if instance_profile_arn is not None: body["instance_profile_arn"] = instance_profile_arn @@ -10381,6 +10414,7 @@ def install(self, cluster_id: str, libraries: List[Library]): """ + body = {} if cluster_id is not None: body["cluster_id"] = cluster_id @@ -10404,6 +10438,7 @@ def uninstall(self, cluster_id: str, libraries: List[Library]): """ + body = {} if cluster_id is not None: body["cluster_id"] = cluster_id @@ -10453,6 +10488,7 @@ def enforce_compliance( :returns: :class:`EnforceClusterComplianceResponse` """ + body = {} if cluster_id is not None: body["cluster_id"] = cluster_id diff --git a/databricks/sdk/service/dashboards.py b/databricks/sdk/service/dashboards.py index 69b544f7d..b94b2a089 100755 --- a/databricks/sdk/service/dashboards.py +++ b/databricks/sdk/service/dashboards.py @@ -1756,6 +1756,7 @@ def create_message(self, space_id: str, conversation_id: str, content: str) -> W Long-running operation waiter for :class:`GenieMessage`. See :method:wait_get_message_genie_completed for more details. """ + body = {} if content is not None: body["content"] = content @@ -2116,6 +2117,7 @@ def send_message_feedback(self, space_id: str, conversation_id: str, message_id: """ + body = {} if rating is not None: body["rating"] = rating.value @@ -2143,6 +2145,7 @@ def start_conversation(self, space_id: str, content: str) -> Wait[GenieMessage]: Long-running operation waiter for :class:`GenieMessage`. See :method:wait_get_message_genie_completed for more details. """ + body = {} if content is not None: body["content"] = content @@ -2195,6 +2198,7 @@ def create(self, dashboard: Dashboard) -> Dashboard: :returns: :class:`Dashboard` """ + body = dashboard.as_dict() headers = { "Accept": "application/json", @@ -2214,6 +2218,7 @@ def create_schedule(self, dashboard_id: str, schedule: Schedule) -> Schedule: :returns: :class:`Schedule` """ + body = schedule.as_dict() headers = { "Accept": "application/json", @@ -2235,6 +2240,7 @@ def create_subscription(self, dashboard_id: str, schedule_id: str, subscription: :returns: :class:`Subscription` """ + body = subscription.as_dict() headers = { "Accept": "application/json", @@ -2530,6 +2536,7 @@ def migrate( :returns: :class:`Dashboard` """ + body = {} if display_name is not None: body["display_name"] = display_name @@ -2562,6 +2569,7 @@ def publish( :returns: :class:`PublishedDashboard` """ + body = {} if embed_credentials is not None: body["embed_credentials"] = embed_credentials @@ -2614,6 +2622,7 @@ def update(self, dashboard_id: str, dashboard: Dashboard) -> Dashboard: :returns: :class:`Dashboard` """ + body = dashboard.as_dict() headers = { "Accept": "application/json", @@ -2635,6 +2644,7 @@ def update_schedule(self, dashboard_id: str, schedule_id: str, schedule: Schedul :returns: :class:`Schedule` """ + body = schedule.as_dict() headers = { "Accept": "application/json", diff --git a/databricks/sdk/service/database.py b/databricks/sdk/service/database.py index aed67de1d..b0bbbd7cb 100755 --- a/databricks/sdk/service/database.py +++ b/databricks/sdk/service/database.py @@ -5,6 +5,7 @@ import logging import random import time +import uuid from dataclasses import dataclass from datetime import timedelta from enum import Enum @@ -1570,6 +1571,7 @@ def create_database_catalog(self, catalog: DatabaseCatalog) -> DatabaseCatalog: :returns: :class:`DatabaseCatalog` """ + body = catalog.as_dict() headers = { "Accept": "application/json", @@ -1589,6 +1591,7 @@ def create_database_instance(self, database_instance: DatabaseInstance) -> Wait[ Long-running operation waiter for :class:`DatabaseInstance`. See :method:wait_get_database_instance_database_available for more details. """ + body = database_instance.as_dict() headers = { "Accept": "application/json", @@ -1622,6 +1625,7 @@ def create_database_instance_role( :returns: :class:`DatabaseInstanceRole` """ + body = database_instance_role.as_dict() query = {} if database_instance_name is not None: @@ -1644,6 +1648,7 @@ def create_database_table(self, table: DatabaseTable) -> DatabaseTable: :returns: :class:`DatabaseTable` """ + body = table.as_dict() headers = { "Accept": "application/json", @@ -1660,6 +1665,7 @@ def create_synced_database_table(self, synced_table: SyncedDatabaseTable) -> Syn :returns: :class:`SyncedDatabaseTable` """ + body = synced_table.as_dict() headers = { "Accept": "application/json", @@ -1806,6 +1812,9 @@ def generate_database_credential( :returns: :class:`DatabaseCredential` """ + + if request_id is None or request_id == "": + request_id = str(uuid.uuid4()) body = {} if claims is not None: body["claims"] = [v.as_dict() for v in claims] @@ -2049,6 +2058,7 @@ def update_database_catalog( :returns: :class:`DatabaseCatalog` """ + body = database_catalog.as_dict() query = {} if update_mask is not None: @@ -2075,6 +2085,7 @@ def update_database_instance( :returns: :class:`DatabaseInstance` """ + body = database_instance.as_dict() query = {} if update_mask is not None: @@ -2101,6 +2112,7 @@ def update_synced_database_table( :returns: :class:`SyncedDatabaseTable` """ + body = synced_table.as_dict() query = {} if update_mask is not None: diff --git a/databricks/sdk/service/dataquality.py b/databricks/sdk/service/dataquality.py index fa99857fb..d9a64e5df 100755 --- a/databricks/sdk/service/dataquality.py +++ b/databricks/sdk/service/dataquality.py @@ -909,6 +909,7 @@ def create_monitor(self, monitor: Monitor) -> Monitor: :returns: :class:`Monitor` """ + body = monitor.as_dict() headers = { "Accept": "application/json", @@ -946,6 +947,7 @@ def create_refresh(self, object_type: str, object_id: str, refresh: Refresh) -> :returns: :class:`Refresh` """ + body = refresh.as_dict() headers = { "Accept": "application/json", @@ -1229,6 +1231,7 @@ def update_monitor(self, object_type: str, object_id: str, monitor: Monitor, upd :returns: :class:`Monitor` """ + body = monitor.as_dict() query = {} if update_mask is not None: @@ -1271,6 +1274,7 @@ def update_refresh( :returns: :class:`Refresh` """ + body = refresh.as_dict() query = {} if update_mask is not None: diff --git a/databricks/sdk/service/files.py b/databricks/sdk/service/files.py index e26de85ab..e434df884 100755 --- a/databricks/sdk/service/files.py +++ b/databricks/sdk/service/files.py @@ -534,6 +534,7 @@ def add_block(self, handle: int, data: str): """ + body = {} if data is not None: body["data"] = data @@ -555,6 +556,7 @@ def close(self, handle: int): """ + body = {} if handle is not None: body["handle"] = handle @@ -582,6 +584,7 @@ def create(self, path: str, *, overwrite: Optional[bool] = None) -> CreateRespon :returns: :class:`CreateResponse` """ + body = {} if overwrite is not None: body["overwrite"] = overwrite @@ -619,6 +622,7 @@ def delete(self, path: str, *, recursive: Optional[bool] = None): """ + body = {} if path is not None: body["path"] = path @@ -690,6 +694,7 @@ def mkdirs(self, path: str): """ + body = {} if path is not None: body["path"] = path @@ -713,6 +718,7 @@ def move(self, source_path: str, destination_path: str): """ + body = {} if destination_path is not None: body["destination_path"] = destination_path @@ -746,6 +752,7 @@ def put(self, path: str, *, contents: Optional[str] = None, overwrite: Optional[ """ + body = {} if contents is not None: body["contents"] = contents diff --git a/databricks/sdk/service/iam.py b/databricks/sdk/service/iam.py index 0a1f53ca2..f4b9f3050 100755 --- a/databricks/sdk/service/iam.py +++ b/databricks/sdk/service/iam.py @@ -2338,6 +2338,7 @@ def update_rule_set(self, name: str, rule_set: RuleSetUpdateRequest) -> RuleSetR :returns: :class:`RuleSetResponse` """ + body = {} if name is not None: body["name"] = name @@ -2444,6 +2445,7 @@ def update_rule_set(self, name: str, rule_set: RuleSetUpdateRequest) -> RuleSetR :returns: :class:`RuleSetResponse` """ + body = {} if name is not None: body["name"] = name @@ -2494,6 +2496,7 @@ def create( :returns: :class:`AccountGroup` """ + body = {} if display_name is not None: body["displayName"] = display_name @@ -2628,6 +2631,7 @@ def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: O """ + body = {} if operations is not None: body["Operations"] = [v.as_dict() for v in operations] @@ -2666,6 +2670,7 @@ def update( """ + body = {} if display_name is not None: body["displayName"] = display_name @@ -2721,6 +2726,7 @@ def create( :returns: :class:`AccountServicePrincipal` """ + body = {} if active is not None: body["active"] = active @@ -2860,6 +2866,7 @@ def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: O """ + body = {} if operations is not None: body["Operations"] = [v.as_dict() for v in operations] @@ -2905,6 +2912,7 @@ def update( """ + body = {} if active is not None: body["active"] = active @@ -2976,6 +2984,7 @@ def create( :returns: :class:`AccountUser` """ + body = {} if active is not None: body["active"] = active @@ -3162,6 +3171,7 @@ def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: O """ + body = {} if operations is not None: body["Operations"] = [v.as_dict() for v in operations] @@ -3208,6 +3218,7 @@ def update( """ + body = {} if active is not None: body["active"] = active @@ -3299,6 +3310,7 @@ def create( :returns: :class:`Group` """ + body = {} if display_name is not None: body["displayName"] = display_name @@ -3433,6 +3445,7 @@ def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: O """ + body = {} if operations is not None: body["Operations"] = [v.as_dict() for v in operations] @@ -3481,6 +3494,7 @@ def update( """ + body = {} if display_name is not None: body["displayName"] = display_name @@ -3533,6 +3547,7 @@ def migrate_permissions( :returns: :class:`MigratePermissionsResponse` """ + body = {} if from_workspace_group_name is not None: body["from_workspace_group_name"] = from_workspace_group_name @@ -3644,6 +3659,7 @@ def set( :returns: :class:`ObjectPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -3678,6 +3694,7 @@ def update( :returns: :class:`ObjectPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -3739,6 +3756,7 @@ def create( :returns: :class:`ServicePrincipal` """ + body = {} if active is not None: body["active"] = active @@ -3873,6 +3891,7 @@ def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: O """ + body = {} if operations is not None: body["Operations"] = [v.as_dict() for v in operations] @@ -3924,6 +3943,7 @@ def update( """ + body = {} if active is not None: body["active"] = active @@ -4010,6 +4030,7 @@ def create( :returns: :class:`User` """ + body = {} if active is not None: body["active"] = active @@ -4224,6 +4245,7 @@ def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: O """ + body = {} if operations is not None: body["Operations"] = [v.as_dict() for v in operations] @@ -4246,6 +4268,7 @@ def set_permissions( :returns: :class:`PasswordPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -4303,6 +4326,7 @@ def update( """ + body = {} if active is not None: body["active"] = active @@ -4340,6 +4364,7 @@ def update_permissions( :returns: :class:`PasswordPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -4441,6 +4466,7 @@ def update( :returns: :class:`PermissionAssignment` """ + body = {} if permissions is not None: body["permissions"] = [v.value for v in permissions] diff --git a/databricks/sdk/service/iamv2.py b/databricks/sdk/service/iamv2.py index b95605da5..0422f37f8 100755 --- a/databricks/sdk/service/iamv2.py +++ b/databricks/sdk/service/iamv2.py @@ -472,6 +472,7 @@ def resolve_group(self, external_id: str) -> ResolveGroupResponse: :returns: :class:`ResolveGroupResponse` """ + body = {} if external_id is not None: body["external_id"] = external_id @@ -498,6 +499,7 @@ def resolve_service_principal(self, external_id: str) -> ResolveServicePrincipal :returns: :class:`ResolveServicePrincipalResponse` """ + body = {} if external_id is not None: body["external_id"] = external_id @@ -524,6 +526,7 @@ def resolve_user(self, external_id: str) -> ResolveUserResponse: :returns: :class:`ResolveUserResponse` """ + body = {} if external_id is not None: body["external_id"] = external_id @@ -587,6 +590,7 @@ def resolve_group_proxy(self, external_id: str) -> ResolveGroupResponse: :returns: :class:`ResolveGroupResponse` """ + body = {} if external_id is not None: body["external_id"] = external_id @@ -608,6 +612,7 @@ def resolve_service_principal_proxy(self, external_id: str) -> ResolveServicePri :returns: :class:`ResolveServicePrincipalResponse` """ + body = {} if external_id is not None: body["external_id"] = external_id @@ -631,6 +636,7 @@ def resolve_user_proxy(self, external_id: str) -> ResolveUserResponse: :returns: :class:`ResolveUserResponse` """ + body = {} if external_id is not None: body["external_id"] = external_id diff --git a/databricks/sdk/service/jobs.py b/databricks/sdk/service/jobs.py index 6b50e3f9f..74303cfb1 100755 --- a/databricks/sdk/service/jobs.py +++ b/databricks/sdk/service/jobs.py @@ -8415,6 +8415,7 @@ def cancel_all_runs(self, *, all_queued_runs: Optional[bool] = None, job_id: Opt """ + body = {} if all_queued_runs is not None: body["all_queued_runs"] = all_queued_runs @@ -8437,6 +8438,7 @@ def cancel_run(self, run_id: int) -> Wait[Run]: Long-running operation waiter for :class:`Run`. See :method:wait_get_run_job_terminated_or_skipped for more details. """ + body = {} if run_id is not None: body["run_id"] = run_id @@ -8581,6 +8583,7 @@ def create( :returns: :class:`CreateResponse` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -8650,6 +8653,7 @@ def delete(self, job_id: int): """ + body = {} if job_id is not None: body["job_id"] = job_id @@ -8667,6 +8671,7 @@ def delete_run(self, run_id: int): """ + body = {} if run_id is not None: body["run_id"] = run_id @@ -9093,6 +9098,7 @@ def repair_run( Long-running operation waiter for :class:`Run`. See :method:wait_get_run_job_terminated_or_skipped for more details. """ + body = {} if dbt_commands is not None: body["dbt_commands"] = [v for v in dbt_commands] @@ -9188,6 +9194,7 @@ def reset(self, job_id: int, new_settings: JobSettings): """ + body = {} if job_id is not None: body["job_id"] = job_id @@ -9328,6 +9335,7 @@ def run_now( Long-running operation waiter for :class:`Run`. See :method:wait_get_run_job_terminated_or_skipped for more details. """ + body = {} if dbt_commands is not None: body["dbt_commands"] = [v for v in dbt_commands] @@ -9417,6 +9425,7 @@ def set_permissions( :returns: :class:`JobPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -9506,6 +9515,7 @@ def submit( Long-running operation waiter for :class:`Run`. See :method:wait_get_run_job_terminated_or_skipped for more details. """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -9612,6 +9622,7 @@ def update( """ + body = {} if fields_to_remove is not None: body["fields_to_remove"] = [v for v in fields_to_remove] @@ -9636,6 +9647,7 @@ def update_permissions( :returns: :class:`JobPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -9677,6 +9689,7 @@ def enforce_compliance( :returns: :class:`EnforcePolicyComplianceResponse` """ + body = {} if job_id is not None: body["job_id"] = job_id diff --git a/databricks/sdk/service/marketplace.py b/databricks/sdk/service/marketplace.py index 8fc57b942..5e5ccc267 100755 --- a/databricks/sdk/service/marketplace.py +++ b/databricks/sdk/service/marketplace.py @@ -3,6 +3,7 @@ from __future__ import annotations import logging +import uuid from dataclasses import dataclass from enum import Enum from typing import Any, Dict, Iterator, List, Optional @@ -3032,6 +3033,7 @@ def create( :returns: :class:`Installation` """ + body = {} if accepted_consumer_terms is not None: body["accepted_consumer_terms"] = accepted_consumer_terms.as_dict() @@ -3156,6 +3158,7 @@ def update( :returns: :class:`UpdateInstallationResponse` """ + body = {} if installation is not None: body["installation"] = installation.as_dict() @@ -3377,6 +3380,7 @@ def create( :returns: :class:`CreatePersonalizationRequestResponse` """ + body = {} if accepted_consumer_terms is not None: body["accepted_consumer_terms"] = accepted_consumer_terms.as_dict() @@ -3542,6 +3546,7 @@ def create(self, filter: ExchangeFilter) -> CreateExchangeFilterResponse: :returns: :class:`CreateExchangeFilterResponse` """ + body = {} if filter is not None: body["filter"] = filter.as_dict() @@ -3607,6 +3612,7 @@ def update(self, id: str, filter: ExchangeFilter) -> UpdateExchangeFilterRespons :returns: :class:`UpdateExchangeFilterResponse` """ + body = {} if filter is not None: body["filter"] = filter.as_dict() @@ -3633,6 +3639,7 @@ def add_listing_to_exchange(self, listing_id: str, exchange_id: str) -> AddExcha :returns: :class:`AddExchangeForListingResponse` """ + body = {} if exchange_id is not None: body["exchange_id"] = exchange_id @@ -3653,6 +3660,7 @@ def create(self, exchange: Exchange) -> CreateExchangeResponse: :returns: :class:`CreateExchangeResponse` """ + body = {} if exchange is not None: body["exchange"] = exchange.as_dict() @@ -3810,6 +3818,7 @@ def update(self, id: str, exchange: Exchange) -> UpdateExchangeResponse: :returns: :class:`UpdateExchangeResponse` """ + body = {} if exchange is not None: body["exchange"] = exchange.as_dict() @@ -3845,6 +3854,7 @@ def create( :returns: :class:`CreateFileResponse` """ + body = {} if display_name is not None: body["display_name"] = display_name @@ -3938,6 +3948,7 @@ def create(self, listing: Listing) -> CreateListingResponse: :returns: :class:`CreateListingResponse` """ + body = {} if listing is not None: body["listing"] = listing.as_dict() @@ -4013,6 +4024,7 @@ def update(self, id: str, listing: Listing) -> UpdateListingResponse: :returns: :class:`UpdateListingResponse` """ + body = {} if listing is not None: body["listing"] = listing.as_dict() @@ -4083,6 +4095,9 @@ def update( :returns: :class:`UpdatePersonalizationRequestResponse` """ + + if request_id is None or request_id == "": + request_id = str(uuid.uuid4()) body = {} if reason is not None: body["reason"] = reason @@ -4164,6 +4179,7 @@ def update(self, id: str, *, version: Optional[int] = None) -> UpdateProviderAna :returns: :class:`UpdateProviderAnalyticsDashboardResponse` """ + body = {} if version is not None: body["version"] = version @@ -4189,6 +4205,7 @@ def create(self, provider: ProviderInfo) -> CreateProviderResponse: :returns: :class:`CreateProviderResponse` """ + body = {} if provider is not None: body["provider"] = provider.as_dict() @@ -4264,6 +4281,7 @@ def update(self, id: str, provider: ProviderInfo) -> UpdateProviderResponse: :returns: :class:`UpdateProviderResponse` """ + body = {} if provider is not None: body["provider"] = provider.as_dict() diff --git a/databricks/sdk/service/ml.py b/databricks/sdk/service/ml.py index 1e0d689d8..79b9a625b 100755 --- a/databricks/sdk/service/ml.py +++ b/databricks/sdk/service/ml.py @@ -5305,6 +5305,7 @@ def create_experiment( :returns: :class:`CreateExperimentResponse` """ + body = {} if artifact_location is not None: body["artifact_location"] = artifact_location @@ -5347,6 +5348,7 @@ def create_logged_model( :returns: :class:`CreateLoggedModelResponse` """ + body = {} if experiment_id is not None: body["experiment_id"] = experiment_id @@ -5395,6 +5397,7 @@ def create_run( :returns: :class:`CreateRunResponse` """ + body = {} if experiment_id is not None: body["experiment_id"] = experiment_id @@ -5423,6 +5426,7 @@ def delete_experiment(self, experiment_id: str): """ + body = {} if experiment_id is not None: body["experiment_id"] = experiment_id @@ -5473,6 +5477,7 @@ def delete_run(self, run_id: str): """ + body = {} if run_id is not None: body["run_id"] = run_id @@ -5501,6 +5506,7 @@ def delete_runs( :returns: :class:`DeleteRunsResponse` """ + body = {} if experiment_id is not None: body["experiment_id"] = experiment_id @@ -5527,6 +5533,7 @@ def delete_tag(self, run_id: str, key: str): """ + body = {} if key is not None: body["key"] = key @@ -5550,6 +5557,7 @@ def finalize_logged_model(self, model_id: str, status: LoggedModelStatus) -> Fin :returns: :class:`FinalizeLoggedModelResponse` """ + body = {} if status is not None: body["status"] = status.value @@ -5888,6 +5896,7 @@ def log_batch( """ + body = {} if metrics is not None: body["metrics"] = [v.as_dict() for v in metrics] @@ -5918,6 +5927,7 @@ def log_inputs( """ + body = {} if datasets is not None: body["datasets"] = [v.as_dict() for v in datasets] @@ -5944,6 +5954,7 @@ def log_logged_model_params(self, model_id: str, *, params: Optional[List[Logged """ + body = {} if params is not None: body["params"] = [v.as_dict() for v in params] @@ -5995,6 +6006,7 @@ def log_metric( """ + body = {} if dataset_digest is not None: body["dataset_digest"] = dataset_digest @@ -6034,6 +6046,7 @@ def log_model(self, *, model_json: Optional[str] = None, run_id: Optional[str] = """ + body = {} if model_json is not None: body["model_json"] = model_json @@ -6056,6 +6069,7 @@ def log_outputs(self, run_id: str, *, models: Optional[List[ModelOutput]] = None """ + body = {} if models is not None: body["models"] = [v.as_dict() for v in models] @@ -6085,6 +6099,7 @@ def log_param(self, key: str, value: str, *, run_id: Optional[str] = None, run_u """ + body = {} if key is not None: body["key"] = key @@ -6113,6 +6128,7 @@ def restore_experiment(self, experiment_id: str): """ + body = {} if experiment_id is not None: body["experiment_id"] = experiment_id @@ -6133,6 +6149,7 @@ def restore_run(self, run_id: str): """ + body = {} if run_id is not None: body["run_id"] = run_id @@ -6161,6 +6178,7 @@ def restore_runs( :returns: :class:`RestoreRunsResponse` """ + body = {} if experiment_id is not None: body["experiment_id"] = experiment_id @@ -6202,6 +6220,7 @@ def search_experiments( :returns: Iterator over :class:`Experiment` """ + body = {} if filter is not None: body["filter"] = filter @@ -6261,6 +6280,7 @@ def search_logged_models( :returns: :class:`SearchLoggedModelsResponse` """ + body = {} if datasets is not None: body["datasets"] = [v.as_dict() for v in datasets] @@ -6324,6 +6344,7 @@ def search_runs( :returns: Iterator over :class:`Run` """ + body = {} if experiment_ids is not None: body["experiment_ids"] = [v for v in experiment_ids] @@ -6363,6 +6384,7 @@ def set_experiment_tag(self, experiment_id: str, key: str, value: str): """ + body = {} if experiment_id is not None: body["experiment_id"] = experiment_id @@ -6387,6 +6409,7 @@ def set_logged_model_tags(self, model_id: str, *, tags: Optional[List[LoggedMode """ + body = {} if tags is not None: body["tags"] = [v.as_dict() for v in tags] @@ -6409,6 +6432,7 @@ def set_permissions( :returns: :class:`ExperimentPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -6435,6 +6459,7 @@ def set_tag(self, key: str, value: str, *, run_id: Optional[str] = None, run_uui """ + body = {} if key is not None: body["key"] = key @@ -6461,6 +6486,7 @@ def update_experiment(self, experiment_id: str, *, new_name: Optional[str] = Non """ + body = {} if experiment_id is not None: body["experiment_id"] = experiment_id @@ -6484,6 +6510,7 @@ def update_permissions( :returns: :class:`ExperimentPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -6520,6 +6547,7 @@ def update_run( :returns: :class:`UpdateRunResponse` """ + body = {} if end_time is not None: body["end_time"] = end_time @@ -6554,6 +6582,7 @@ def create_feature(self, feature: Feature) -> Feature: :returns: :class:`Feature` """ + body = feature.as_dict() headers = { "Accept": "application/json", @@ -6635,6 +6664,7 @@ def update_feature(self, full_name: str, feature: Feature, update_mask: str) -> :returns: :class:`Feature` """ + body = feature.as_dict() query = {} if update_mask is not None: @@ -6669,6 +6699,7 @@ def create_online_store(self, online_store: OnlineStore) -> OnlineStore: :returns: :class:`OnlineStore` """ + body = online_store.as_dict() headers = { "Accept": "application/json", @@ -6750,6 +6781,7 @@ def publish_table(self, source_table_name: str, publish_spec: PublishSpec) -> Pu :returns: :class:`PublishTableResponse` """ + body = {} if publish_spec is not None: body["publish_spec"] = publish_spec.as_dict() @@ -6775,6 +6807,7 @@ def update_online_store(self, name: str, online_store: OnlineStore, update_mask: :returns: :class:`OnlineStore` """ + body = online_store.as_dict() query = {} if update_mask is not None: @@ -6907,6 +6940,7 @@ def create_experiment( Long-running operation waiter for :class:`ForecastingExperiment`. See :method:wait_get_experiment_forecasting_succeeded for more details. """ + body = {} if custom_weights_column is not None: body["custom_weights_column"] = custom_weights_column @@ -7029,6 +7063,7 @@ def create_feature_tag(self, table_name: str, feature_name: str, feature_tag: Fe :returns: :class:`FeatureTag` """ + body = feature_tag.as_dict() headers = { "Accept": "application/json", @@ -7167,6 +7202,7 @@ def update_feature_tag( :returns: :class:`FeatureTag` """ + body = feature_tag.as_dict() query = {} if update_mask is not None: @@ -7224,6 +7260,7 @@ def approve_transition_request( :returns: :class:`ApproveTransitionRequestResponse` """ + body = {} if archive_existing_versions is not None: body["archive_existing_versions"] = archive_existing_versions @@ -7256,6 +7293,7 @@ def create_comment(self, name: str, version: str, comment: str) -> CreateComment :returns: :class:`CreateCommentResponse` """ + body = {} if comment is not None: body["comment"] = comment @@ -7286,6 +7324,7 @@ def create_model( :returns: :class:`CreateModelResponse` """ + body = {} if description is not None: body["description"] = description @@ -7330,6 +7369,7 @@ def create_model_version( :returns: :class:`CreateModelVersionResponse` """ + body = {} if description is not None: body["description"] = description @@ -7375,6 +7415,7 @@ def create_transition_request( :returns: :class:`CreateTransitionRequestResponse` """ + body = {} if comment is not None: body["comment"] = comment @@ -7453,6 +7494,7 @@ def create_webhook( :returns: :class:`CreateWebhookResponse` """ + body = {} if description is not None: body["description"] = description @@ -7656,6 +7698,7 @@ def get_latest_versions(self, name: str, *, stages: Optional[List[str]] = None) :returns: Iterator over :class:`ModelVersion` """ + body = {} if name is not None: body["name"] = name @@ -7925,6 +7968,7 @@ def reject_transition_request( :returns: :class:`RejectTransitionRequestResponse` """ + body = {} if comment is not None: body["comment"] = comment @@ -7952,6 +7996,7 @@ def rename_model(self, name: str, *, new_name: Optional[str] = None) -> RenameMo :returns: :class:`RenameModelResponse` """ + body = {} if name is not None: body["name"] = name @@ -8075,6 +8120,7 @@ def set_model_tag(self, name: str, key: str, value: str): """ + body = {} if key is not None: body["key"] = key @@ -8106,6 +8152,7 @@ def set_model_version_tag(self, name: str, version: str, key: str, value: str): """ + body = {} if key is not None: body["key"] = key @@ -8137,6 +8184,7 @@ def set_permissions( :returns: :class:`RegisteredModelPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -8163,6 +8211,7 @@ def test_registry_webhook( :returns: :class:`TestRegistryWebhookResponse` """ + body = {} if event is not None: body["event"] = event.value @@ -8205,6 +8254,7 @@ def transition_stage( :returns: :class:`TransitionStageResponse` """ + body = {} if archive_existing_versions is not None: body["archive_existing_versions"] = archive_existing_versions @@ -8236,6 +8286,7 @@ def update_comment(self, id: str, comment: str) -> UpdateCommentResponse: :returns: :class:`UpdateCommentResponse` """ + body = {} if comment is not None: body["comment"] = comment @@ -8259,6 +8310,7 @@ def update_model(self, name: str, *, description: Optional[str] = None) -> Updat :returns: :class:`UpdateModelResponse` """ + body = {} if description is not None: body["description"] = description @@ -8286,6 +8338,7 @@ def update_model_version( :returns: :class:`UpdateModelVersionResponse` """ + body = {} if description is not None: body["description"] = description @@ -8316,6 +8369,7 @@ def update_permissions( :returns: :class:`RegisteredModelPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -8380,6 +8434,7 @@ def update_webhook( :returns: :class:`UpdateWebhookResponse` """ + body = {} if description is not None: body["description"] = description diff --git a/databricks/sdk/service/oauth2.py b/databricks/sdk/service/oauth2.py index 28bae5347..5c0f1bd27 100755 --- a/databricks/sdk/service/oauth2.py +++ b/databricks/sdk/service/oauth2.py @@ -1013,6 +1013,7 @@ def create(self, policy: FederationPolicy, *, policy_id: Optional[str] = None) - :returns: :class:`FederationPolicy` """ + body = policy.as_dict() query = {} if policy_id is not None: @@ -1112,6 +1113,7 @@ def update( :returns: :class:`FederationPolicy` """ + body = policy.as_dict() query = {} if update_mask is not None: @@ -1169,6 +1171,7 @@ def create( :returns: :class:`CreateCustomAppIntegrationOutput` """ + body = {} if confidential is not None: body["confidential"] = confidential @@ -1301,6 +1304,7 @@ def update( """ + body = {} if redirect_urls is not None: body["redirect_urls"] = [v for v in redirect_urls] @@ -1386,6 +1390,7 @@ def create( :returns: :class:`CreatePublishedAppIntegrationOutput` """ + body = {} if app_id is not None: body["app_id"] = app_id @@ -1486,6 +1491,7 @@ def update(self, integration_id: str, *, token_access_policy: Optional[TokenAcce """ + body = {} if token_access_policy is not None: body["token_access_policy"] = token_access_policy.as_dict() @@ -1561,6 +1567,7 @@ def create( :returns: :class:`FederationPolicy` """ + body = policy.as_dict() query = {} if policy_id is not None: @@ -1677,6 +1684,7 @@ def update( :returns: :class:`FederationPolicy` """ + body = policy.as_dict() query = {} if update_mask is not None: @@ -1726,6 +1734,7 @@ def create( :returns: :class:`CreateServicePrincipalSecretResponse` """ + body = {} if lifetime is not None: body["lifetime"] = lifetime @@ -1836,6 +1845,7 @@ def create( :returns: :class:`CreateServicePrincipalSecretResponse` """ + body = {} if lifetime is not None: body["lifetime"] = lifetime diff --git a/databricks/sdk/service/pipelines.py b/databricks/sdk/service/pipelines.py index 084d0126d..6d7b2354e 100755 --- a/databricks/sdk/service/pipelines.py +++ b/databricks/sdk/service/pipelines.py @@ -3391,6 +3391,7 @@ def create( :returns: :class:`CreatePipelineResponse` """ + body = {} if allow_duplicate_names is not None: body["allow_duplicate_names"] = allow_duplicate_names @@ -3699,6 +3700,7 @@ def set_permissions( :returns: :class:`PipelinePermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -3741,6 +3743,7 @@ def start_update( :returns: :class:`StartUpdateResponse` """ + body = {} if cause is not None: body["cause"] = cause.value @@ -3891,6 +3894,7 @@ def update( """ + body = {} if allow_duplicate_names is not None: body["allow_duplicate_names"] = allow_duplicate_names @@ -3970,6 +3974,7 @@ def update_permissions( :returns: :class:`PipelinePermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] diff --git a/databricks/sdk/service/provisioning.py b/databricks/sdk/service/provisioning.py index 2f173112e..a2e651647 100755 --- a/databricks/sdk/service/provisioning.py +++ b/databricks/sdk/service/provisioning.py @@ -1765,6 +1765,7 @@ def create(self, credentials_name: str, aws_credentials: CreateCredentialAwsCred :returns: :class:`Credential` """ + body = {} if aws_credentials is not None: body["aws_credentials"] = aws_credentials.as_dict() @@ -1876,6 +1877,7 @@ def create( :returns: :class:`CustomerManagedKey` """ + body = {} if aws_key_info is not None: body["aws_key_info"] = aws_key_info.as_dict() @@ -1996,6 +1998,7 @@ def create( :returns: :class:`Network` """ + body = {} if gcp_network_info is not None: body["gcp_network_info"] = gcp_network_info.as_dict() @@ -2111,6 +2114,7 @@ def create( :returns: :class:`PrivateAccessSettings` """ + body = {} if allowed_vpc_endpoint_ids is not None: body["allowed_vpc_endpoint_ids"] = [v for v in allowed_vpc_endpoint_ids] @@ -2205,6 +2209,7 @@ def replace( :returns: :class:`PrivateAccessSettings` """ + body = customer_facing_private_access_settings.as_dict() headers = { "Accept": "application/json", @@ -2247,6 +2252,7 @@ def create( :returns: :class:`StorageConfiguration` """ + body = {} if role_arn is not None: body["role_arn"] = role_arn @@ -2356,6 +2362,7 @@ def create( :returns: :class:`VpcEndpoint` """ + body = {} if aws_vpc_endpoint_id is not None: body["aws_vpc_endpoint_id"] = aws_vpc_endpoint_id @@ -2595,6 +2602,7 @@ def create( Long-running operation waiter for :class:`Workspace`. See :method:wait_get_workspace_running for more details. """ + body = {} if aws_region is not None: body["aws_region"] = aws_region @@ -2768,6 +2776,7 @@ def update( Long-running operation waiter for :class:`Workspace`. See :method:wait_get_workspace_running for more details. """ + body = customer_facing_workspace.as_dict() query = {} if update_mask is not None: diff --git a/databricks/sdk/service/qualitymonitorv2.py b/databricks/sdk/service/qualitymonitorv2.py index 337bb86a5..322989fc9 100755 --- a/databricks/sdk/service/qualitymonitorv2.py +++ b/databricks/sdk/service/qualitymonitorv2.py @@ -151,6 +151,7 @@ def create_quality_monitor(self, quality_monitor: QualityMonitor) -> QualityMoni :returns: :class:`QualityMonitor` """ + body = quality_monitor.as_dict() headers = { "Accept": "application/json", @@ -237,6 +238,7 @@ def update_quality_monitor( :returns: :class:`QualityMonitor` """ + body = quality_monitor.as_dict() headers = { "Accept": "application/json", diff --git a/databricks/sdk/service/serving.py b/databricks/sdk/service/serving.py index d219f7495..9a5ac90a4 100755 --- a/databricks/sdk/service/serving.py +++ b/databricks/sdk/service/serving.py @@ -4109,6 +4109,7 @@ def create( Long-running operation waiter for :class:`ServingEndpointDetailed`. See :method:wait_get_serving_endpoint_not_updating for more details. """ + body = {} if ai_gateway is not None: body["ai_gateway"] = ai_gateway.as_dict() @@ -4196,6 +4197,7 @@ def create_provisioned_throughput_endpoint( Long-running operation waiter for :class:`ServingEndpointDetailed`. See :method:wait_get_serving_endpoint_not_updating for more details. """ + body = {} if ai_gateway is not None: body["ai_gateway"] = ai_gateway.as_dict() @@ -4366,6 +4368,7 @@ def http_request( :returns: :class:`HttpRequestResponse` """ + body = {} if connection_name is not None: body["connection_name"] = connection_name @@ -4436,6 +4439,7 @@ def patch( :returns: :class:`EndpointTags` """ + body = {} if add_tags is not None: body["add_tags"] = [v.as_dict() for v in add_tags] @@ -4459,6 +4463,7 @@ def put(self, name: str, *, rate_limits: Optional[List[RateLimit]] = None) -> Pu :returns: :class:`PutResponse` """ + body = {} if rate_limits is not None: body["rate_limits"] = [v.as_dict() for v in rate_limits] @@ -4501,6 +4506,7 @@ def put_ai_gateway( :returns: :class:`PutAiGatewayResponse` """ + body = {} if fallback_config is not None: body["fallback_config"] = fallback_config.as_dict() @@ -4593,6 +4599,7 @@ def query( :returns: :class:`QueryEndpointResponse` """ + body = {} if client_request_id is not None: body["client_request_id"] = client_request_id @@ -4656,6 +4663,7 @@ def set_permissions( :returns: :class:`ServingEndpointPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -4701,6 +4709,7 @@ def update_config( Long-running operation waiter for :class:`ServingEndpointDetailed`. See :method:wait_get_serving_endpoint_not_updating for more details. """ + body = {} if auto_capture_config is not None: body["auto_capture_config"] = auto_capture_config.as_dict() @@ -4753,6 +4762,7 @@ def update_notifications( :returns: :class:`UpdateInferenceEndpointNotificationsResponse` """ + body = {} if email_notifications is not None: body["email_notifications"] = email_notifications.as_dict() @@ -4779,6 +4789,7 @@ def update_permissions( :returns: :class:`ServingEndpointPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -4807,6 +4818,7 @@ def update_provisioned_throughput_endpoint_config( Long-running operation waiter for :class:`ServingEndpointDetailed`. See :method:wait_get_serving_endpoint_not_updating for more details. """ + body = {} if config is not None: body["config"] = config.as_dict() @@ -4931,6 +4943,7 @@ def query( :returns: :class:`QueryEndpointResponse` """ + body = {} if client_request_id is not None: body["client_request_id"] = client_request_id diff --git a/databricks/sdk/service/settings.py b/databricks/sdk/service/settings.py index 3bc7a2969..503103f2b 100755 --- a/databricks/sdk/service/settings.py +++ b/databricks/sdk/service/settings.py @@ -5317,6 +5317,7 @@ def create( :returns: :class:`CreateIpAccessListResponse` """ + body = {} if ip_addresses is not None: body["ip_addresses"] = [v for v in ip_addresses] @@ -5412,6 +5413,7 @@ def replace( """ + body = {} if enabled is not None: body["enabled"] = enabled @@ -5466,6 +5468,7 @@ def update( """ + body = {} if enabled is not None: body["enabled"] = enabled @@ -5619,6 +5622,7 @@ def update( :returns: :class:`AibiDashboardEmbeddingAccessPolicySetting` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -5723,6 +5727,7 @@ def update( :returns: :class:`AibiDashboardEmbeddingApprovedDomainsSetting` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -5800,6 +5805,7 @@ def update( :returns: :class:`AutomaticClusterUpdateSetting` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -5876,6 +5882,7 @@ def update( :returns: :class:`ComplianceSecurityProfileSetting` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -5916,6 +5923,7 @@ def exchange_token( :returns: :class:`ExchangeTokenResponse` """ + body = {} if partition_id is not None: body["partitionId"] = partition_id.as_dict() @@ -5992,6 +6000,7 @@ def update( :returns: :class:`CspEnablementAccountSetting` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -6095,6 +6104,7 @@ def update( :returns: :class:`DashboardEmailSubscriptions` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -6205,6 +6215,7 @@ def update(self, allow_missing: bool, setting: DefaultNamespaceSetting, field_ma :returns: :class:`DefaultNamespaceSetting` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -6299,6 +6310,7 @@ def update(self, allow_missing: bool, setting: DefaultWarehouseId, field_mask: s :returns: :class:`DefaultWarehouseId` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -6396,6 +6408,7 @@ def update(self, allow_missing: bool, setting: DisableLegacyAccess, field_mask: :returns: :class:`DisableLegacyAccess` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -6496,6 +6509,7 @@ def update(self, allow_missing: bool, setting: DisableLegacyDbfs, field_mask: st :returns: :class:`DisableLegacyDbfs` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -6599,6 +6613,7 @@ def update(self, allow_missing: bool, setting: DisableLegacyFeatures, field_mask :returns: :class:`DisableLegacyFeatures` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -6663,6 +6678,7 @@ def patch_enable_export_notebook( :returns: :class:`EnableExportNotebook` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -6763,6 +6779,7 @@ def update(self, allow_missing: bool, setting: AccountIpAccessEnable, field_mask :returns: :class:`AccountIpAccessEnable` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -6829,6 +6846,7 @@ def patch_enable_notebook_table_clipboard( :returns: :class:`EnableNotebookTableClipboard` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -6889,6 +6907,7 @@ def patch_enable_results_downloading( :returns: :class:`EnableResultsDownloading` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -6967,6 +6986,7 @@ def update( :returns: :class:`EnhancedSecurityMonitoringSetting` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -7042,6 +7062,7 @@ def update( :returns: :class:`EsmEnablementAccountSetting` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -7110,6 +7131,7 @@ def create( :returns: :class:`CreateIpAccessListResponse` """ + body = {} if ip_addresses is not None: body["ip_addresses"] = [v for v in ip_addresses] @@ -7200,6 +7222,7 @@ def replace( """ + body = {} if enabled is not None: body["enabled"] = enabled @@ -7250,6 +7273,7 @@ def update( """ + body = {} if enabled is not None: body["enabled"] = enabled @@ -7321,6 +7345,7 @@ def update( :returns: :class:`LlmProxyPartnerPoweredAccount` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -7398,6 +7423,7 @@ def update( :returns: :class:`LlmProxyPartnerPoweredEnforce` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -7496,6 +7522,7 @@ def update( :returns: :class:`LlmProxyPartnerPoweredWorkspace` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -7546,6 +7573,7 @@ def create_network_connectivity_configuration( :returns: :class:`NetworkConnectivityConfiguration` """ + body = network_connectivity_config.as_dict() headers = { "Accept": "application/json", @@ -7576,6 +7604,7 @@ def create_private_endpoint_rule( :returns: :class:`NccPrivateEndpointRule` """ + body = private_endpoint_rule.as_dict() headers = { "Accept": "application/json", @@ -7773,6 +7802,7 @@ def update_private_endpoint_rule( :returns: :class:`NccPrivateEndpointRule` """ + body = private_endpoint_rule.as_dict() query = {} if update_mask is not None: @@ -7812,6 +7842,7 @@ def create_network_policy_rpc(self, network_policy: AccountNetworkPolicy) -> Acc :returns: :class:`AccountNetworkPolicy` """ + body = network_policy.as_dict() headers = { "Accept": "application/json", @@ -7897,6 +7928,7 @@ def update_network_policy_rpc( :returns: :class:`AccountNetworkPolicy` """ + body = network_policy.as_dict() headers = { "Accept": "application/json", @@ -7931,6 +7963,7 @@ def create(self, *, config: Optional[Config] = None, display_name: Optional[str] :returns: :class:`NotificationDestination` """ + body = {} if config is not None: body["config"] = config.as_dict() @@ -8017,6 +8050,7 @@ def update( :returns: :class:`NotificationDestination` """ + body = {} if config is not None: body["config"] = config.as_dict() @@ -8118,6 +8152,7 @@ def update(self, allow_missing: bool, setting: PersonalComputeSetting, field_mas :returns: :class:`PersonalComputeSetting` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -8230,6 +8265,7 @@ def update( :returns: :class:`RestrictWorkspaceAdminsSetting` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -8428,6 +8464,7 @@ def update(self, allow_missing: bool, setting: SqlResultsDownload, field_mask: s :returns: :class:`SqlResultsDownload` """ + body = {} if allow_missing is not None: body["allow_missing"] = allow_missing @@ -8467,6 +8504,7 @@ def create_obo_token( :returns: :class:`CreateOboTokenResponse` """ + body = {} if application_id is not None: body["application_id"] = application_id @@ -8575,6 +8613,7 @@ def set_permissions( :returns: :class:`TokenPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -8595,6 +8634,7 @@ def update_permissions( :returns: :class:`TokenPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -8628,6 +8668,7 @@ def create(self, *, comment: Optional[str] = None, lifetime_seconds: Optional[in :returns: :class:`CreateTokenResponse` """ + body = {} if comment is not None: body["comment"] = comment @@ -8651,6 +8692,7 @@ def delete(self, token_id: str): """ + body = {} if token_id is not None: body["token_id"] = token_id @@ -8753,6 +8795,7 @@ def update_workspace_network_option_rpc( :returns: :class:`WorkspaceNetworkOption` """ + body = workspace_network_option.as_dict() headers = { "Accept": "application/json", diff --git a/databricks/sdk/service/settingsv2.py b/databricks/sdk/service/settingsv2.py index 322ffd47c..a529d7a5a 100755 --- a/databricks/sdk/service/settingsv2.py +++ b/databricks/sdk/service/settingsv2.py @@ -793,6 +793,7 @@ def patch_public_account_setting(self, name: str, setting: Setting) -> Setting: :returns: :class:`Setting` """ + body = setting.as_dict() headers = { "Accept": "application/json", @@ -875,6 +876,7 @@ def patch_public_workspace_setting(self, name: str, setting: Setting) -> Setting :returns: :class:`Setting` """ + body = setting.as_dict() headers = { "Accept": "application/json", diff --git a/databricks/sdk/service/sharing.py b/databricks/sdk/service/sharing.py index fe45bd6d8..0823db202 100755 --- a/databricks/sdk/service/sharing.py +++ b/databricks/sdk/service/sharing.py @@ -2563,6 +2563,7 @@ def create( :returns: :class:`ProviderInfo` """ + body = {} if authentication_type is not None: body["authentication_type"] = authentication_type.value @@ -2778,6 +2779,7 @@ def update( :returns: :class:`ProviderInfo` """ + body = {} if comment is not None: body["comment"] = comment @@ -2898,6 +2900,7 @@ def create(self, recipient_name: str, policy: FederationPolicy) -> FederationPol :returns: :class:`FederationPolicy` """ + body = policy.as_dict() headers = { "Accept": "application/json", @@ -3047,6 +3050,7 @@ def create( :returns: :class:`RecipientInfo` """ + body = {} if authentication_type is not None: body["authentication_type"] = authentication_type.value @@ -3169,6 +3173,7 @@ def rotate_token(self, name: str, existing_token_expire_in_seconds: int) -> Reci :returns: :class:`RecipientInfo` """ + body = {} if existing_token_expire_in_seconds is not None: body["existing_token_expire_in_seconds"] = existing_token_expire_in_seconds @@ -3250,6 +3255,7 @@ def update( :returns: :class:`RecipientInfo` """ + body = {} if comment is not None: body["comment"] = comment @@ -3294,6 +3300,7 @@ def create(self, name: str, *, comment: Optional[str] = None, storage_root: Opti :returns: :class:`ShareInfo` """ + body = {} if comment is not None: body["comment"] = comment @@ -3459,6 +3466,7 @@ def update( :returns: :class:`ShareInfo` """ + body = {} if comment is not None: body["comment"] = comment @@ -3500,6 +3508,7 @@ def update_permissions( :returns: :class:`UpdateSharePermissionsResponse` """ + body = {} if changes is not None: body["changes"] = [v.as_dict() for v in changes] diff --git a/databricks/sdk/service/sql.py b/databricks/sdk/service/sql.py index 1411c9951..f4c66d53a 100755 --- a/databricks/sdk/service/sql.py +++ b/databricks/sdk/service/sql.py @@ -7410,6 +7410,7 @@ def create( :returns: :class:`Alert` """ + body = {} if alert is not None: body["alert"] = alert.as_dict() @@ -7512,6 +7513,7 @@ def update( :returns: :class:`Alert` """ + body = {} if alert is not None: body["alert"] = alert.as_dict() @@ -7573,6 +7575,7 @@ def create( :returns: :class:`LegacyAlert` """ + body = {} if name is not None: body["name"] = name @@ -7672,6 +7675,7 @@ def update(self, alert_id: str, name: str, options: AlertOptions, query_id: str, """ + body = {} if name is not None: body["name"] = name @@ -7702,6 +7706,7 @@ def create_alert(self, alert: AlertV2) -> AlertV2: :returns: :class:`AlertV2` """ + body = alert.as_dict() headers = { "Accept": "application/json", @@ -7788,6 +7793,7 @@ def update_alert(self, id: str, alert: AlertV2, update_mask: str) -> AlertV2: :returns: :class:`AlertV2` """ + body = alert.as_dict() query = {} if update_mask is not None: @@ -7832,6 +7838,7 @@ def create( :returns: :class:`Widget` """ + body = {} if dashboard_id is not None: body["dashboard_id"] = dashboard_id @@ -7893,6 +7900,7 @@ def update( :returns: :class:`Widget` """ + body = {} if dashboard_id is not None: body["dashboard_id"] = dashboard_id @@ -8038,6 +8046,7 @@ def update( :returns: :class:`Dashboard` """ + body = {} if name is not None: body["name"] = name @@ -8158,6 +8167,7 @@ def set( :returns: :class:`SetResponse` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -8190,6 +8200,7 @@ def transfer_ownership( :returns: :class:`Success` """ + body = {} if new_owner is not None: body["new_owner"] = new_owner @@ -8227,6 +8238,7 @@ def create( :returns: :class:`Query` """ + body = {} if auto_resolve_display_name is not None: body["auto_resolve_display_name"] = auto_resolve_display_name @@ -8359,6 +8371,7 @@ def update( :returns: :class:`Query` """ + body = {} if auto_resolve_display_name is not None: body["auto_resolve_display_name"] = auto_resolve_display_name @@ -8438,6 +8451,7 @@ def create( :returns: :class:`LegacyQuery` """ + body = {} if data_source_id is not None: body["data_source_id"] = data_source_id @@ -8633,6 +8647,7 @@ def update( :returns: :class:`LegacyQuery` """ + body = {} if data_source_id is not None: body["data_source_id"] = data_source_id @@ -8726,6 +8741,7 @@ def create(self, *, visualization: Optional[CreateVisualizationRequestVisualizat :returns: :class:`Visualization` """ + body = {} if visualization is not None: body["visualization"] = visualization.as_dict() @@ -8771,6 +8787,7 @@ def update( :returns: :class:`Visualization` """ + body = {} if update_mask is not None: body["update_mask"] = update_mask @@ -8821,6 +8838,7 @@ def create( :returns: :class:`LegacyVisualization` """ + body = {} if description is not None: body["description"] = description @@ -8896,6 +8914,7 @@ def update( :returns: :class:`LegacyVisualization` """ + body = {} if created_at is not None: body["created_at"] = created_at @@ -9234,6 +9253,7 @@ def execute_statement( :returns: :class:`StatementResponse` """ + body = {} if byte_limit is not None: body["byte_limit"] = byte_limit @@ -9462,6 +9482,7 @@ def create( Long-running operation waiter for :class:`GetWarehouseResponse`. See :method:wait_get_warehouse_running for more details. """ + body = {} if auto_stop_mins is not None: body["auto_stop_mins"] = auto_stop_mins @@ -9631,6 +9652,7 @@ def edit( Long-running operation waiter for :class:`GetWarehouseResponse`. See :method:wait_get_warehouse_running for more details. """ + body = {} if auto_stop_mins is not None: body["auto_stop_mins"] = auto_stop_mins @@ -9817,6 +9839,7 @@ def set_permissions( :returns: :class:`WarehousePermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -9872,6 +9895,7 @@ def set_workspace_warehouse_config( """ + body = {} if channel is not None: body["channel"] = channel.as_dict() @@ -9954,6 +9978,7 @@ def update_permissions( :returns: :class:`WarehousePermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] diff --git a/databricks/sdk/service/tags.py b/databricks/sdk/service/tags.py index f643984ed..91bdc27ef 100755 --- a/databricks/sdk/service/tags.py +++ b/databricks/sdk/service/tags.py @@ -149,6 +149,7 @@ def create_tag_policy(self, tag_policy: TagPolicy) -> TagPolicy: :returns: :class:`TagPolicy` """ + body = tag_policy.as_dict() headers = { "Accept": "application/json", @@ -238,6 +239,7 @@ def update_tag_policy(self, tag_key: str, tag_policy: TagPolicy, update_mask: st :returns: :class:`TagPolicy` """ + body = tag_policy.as_dict() query = {} if update_mask is not None: diff --git a/databricks/sdk/service/vectorsearch.py b/databricks/sdk/service/vectorsearch.py index 4b75889f1..370ce78d4 100755 --- a/databricks/sdk/service/vectorsearch.py +++ b/databricks/sdk/service/vectorsearch.py @@ -1429,6 +1429,7 @@ def create_endpoint( Long-running operation waiter for :class:`EndpointInfo`. See :method:wait_get_endpoint_vector_search_endpoint_online for more details. """ + body = {} if budget_policy_id is not None: body["budget_policy_id"] = budget_policy_id @@ -1529,6 +1530,7 @@ def update_endpoint_budget_policy( :returns: :class:`PatchEndpointBudgetPolicyResponse` """ + body = {} if budget_policy_id is not None: body["budget_policy_id"] = budget_policy_id @@ -1554,6 +1556,7 @@ def update_endpoint_custom_tags( :returns: :class:`UpdateEndpointCustomTagsResponse` """ + body = {} if custom_tags is not None: body["custom_tags"] = [v.as_dict() for v in custom_tags] @@ -1606,6 +1609,7 @@ def create_index( :returns: :class:`VectorIndex` """ + body = {} if delta_sync_index_spec is not None: body["delta_sync_index_spec"] = delta_sync_index_spec.as_dict() @@ -1762,6 +1766,7 @@ def query_index( :returns: :class:`QueryVectorIndexResponse` """ + body = {} if columns is not None: body["columns"] = [v for v in columns] @@ -1804,6 +1809,7 @@ def query_next_page( :returns: :class:`QueryVectorIndexResponse` """ + body = {} if endpoint_name is not None: body["endpoint_name"] = endpoint_name @@ -1834,6 +1840,7 @@ def scan_index( :returns: :class:`ScanVectorIndexResponse` """ + body = {} if last_primary_key is not None: body["last_primary_key"] = last_primary_key @@ -1872,6 +1879,7 @@ def upsert_data_vector_index(self, index_name: str, inputs_json: str) -> UpsertD :returns: :class:`UpsertDataVectorIndexResponse` """ + body = {} if inputs_json is not None: body["inputs_json"] = inputs_json diff --git a/databricks/sdk/service/workspace.py b/databricks/sdk/service/workspace.py index 1a6f39588..54fe1d9de 100755 --- a/databricks/sdk/service/workspace.py +++ b/databricks/sdk/service/workspace.py @@ -1840,6 +1840,7 @@ def create( :returns: :class:`CreateCredentialsResponse` """ + body = {} if git_email is not None: body["git_email"] = git_email @@ -1948,6 +1949,7 @@ def update( """ + body = {} if git_email is not None: body["git_email"] = git_email @@ -2004,6 +2006,7 @@ def create( :returns: :class:`CreateRepoResponse` """ + body = {} if path is not None: body["path"] = path @@ -2129,6 +2132,7 @@ def set_permissions( :returns: :class:`RepoPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -2165,6 +2169,7 @@ def update( """ + body = {} if branch is not None: body["branch"] = branch @@ -2190,6 +2195,7 @@ def update_permissions( :returns: :class:`RepoPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -2268,6 +2274,7 @@ def create_scope( """ + body = {} if backend_azure_keyvault is not None: body["backend_azure_keyvault"] = backend_azure_keyvault.as_dict() @@ -2305,6 +2312,7 @@ def delete_acl(self, scope: str, principal: str): """ + body = {} if principal is not None: body["principal"] = principal @@ -2334,6 +2342,7 @@ def delete_scope(self, scope: str): """ + body = {} if scope is not None: body["scope"] = scope @@ -2365,6 +2374,7 @@ def delete_secret(self, scope: str, key: str): """ + body = {} if key is not None: body["key"] = key @@ -2586,6 +2596,7 @@ def put_acl(self, scope: str, principal: str, permission: AclPermission): """ + body = {} if permission is not None: body["permission"] = permission.value @@ -2637,6 +2648,7 @@ def put_secret( """ + body = {} if bytes_value is not None: body["bytes_value"] = bytes_value @@ -2679,6 +2691,7 @@ def delete(self, path: str, *, recursive: Optional[bool] = None): """ + body = {} if path is not None: body["path"] = path @@ -2836,6 +2849,7 @@ def import_( """ + body = {} if content is not None: body["content"] = content @@ -2893,6 +2907,7 @@ def mkdirs(self, path: str): """ + body = {} if path is not None: body["path"] = path @@ -2922,6 +2937,7 @@ def set_permissions( :returns: :class:`WorkspaceObjectPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] @@ -2953,6 +2969,7 @@ def update_permissions( :returns: :class:`WorkspaceObjectPermissions` """ + body = {} if access_control_list is not None: body["access_control_list"] = [v.as_dict() for v in access_control_list] diff --git a/tests/databricks/sdk/service/httpcallv2.py b/tests/databricks/sdk/service/httpcallv2.py index 60693ac41..d0d381ac7 100755 --- a/tests/databricks/sdk/service/httpcallv2.py +++ b/tests/databricks/sdk/service/httpcallv2.py @@ -120,6 +120,7 @@ def create_resource( :returns: :class:`Resource` """ + body = {} if body_field is not None: body["body_field"] = body_field @@ -215,6 +216,7 @@ def update_resource( :returns: :class:`Resource` """ + body = resource.as_dict() query = {} if field_mask is not None: diff --git a/tests/databricks/sdk/service/idempotencytesting.py b/tests/databricks/sdk/service/idempotencytesting.py index 550795aa2..672efc09c 100755 --- a/tests/databricks/sdk/service/idempotencytesting.py +++ b/tests/databricks/sdk/service/idempotencytesting.py @@ -3,6 +3,7 @@ from __future__ import annotations import logging +import uuid from dataclasses import dataclass from typing import Any, Dict, Optional @@ -50,6 +51,8 @@ def __init__(self, api_client): def create_test_resource(self, test_resource: TestResource, *, request_id: Optional[str] = None) -> TestResource: + if request_id is None or request_id == "": + request_id = str(uuid.uuid4()) body = test_resource.as_dict() query = {} if request_id is not None: diff --git a/tests/databricks/sdk/service/lrotesting.py b/tests/databricks/sdk/service/lrotesting.py index 6a4325b53..5e56382d7 100755 --- a/tests/databricks/sdk/service/lrotesting.py +++ b/tests/databricks/sdk/service/lrotesting.py @@ -325,6 +325,7 @@ def create_test_resource(self, resource: TestResource) -> CreateTestResourceOper :returns: :class:`Operation` """ + body = resource.as_dict() headers = { "Accept": "application/json",