diff --git a/sdk/databricks/azure-resourcemanager-databricks/README.md b/sdk/databricks/azure-resourcemanager-databricks/README.md index ee1b343f7dee..27507549cefc 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/README.md +++ b/sdk/databricks/azure-resourcemanager-databricks/README.md @@ -1,8 +1,8 @@ -# Azure Resource Manager AzureDatabricks client library for Java +# Azure Resource Manager Azure Databricks client library for Java -Azure Resource Manager AzureDatabricks client library for Java. +Azure Resource Manager Azure Databricks client library for Java. -This package contains Microsoft Azure SDK for AzureDatabricks Management SDK. The Microsoft Azure management APIs allow end users to operate on Azure Databricks Workspace / Access Connector resources. Package tag package-2023-05-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Azure Databricks Management SDK. ARM Databricks. Package api-version 2026-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ AzureDatabricksManager manager = AzureDatabricksManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -75,8 +75,8 @@ workspace = databricksManager.workspaces() .define(workspaceName) .withRegion(REGION) .withExistingResourceGroup(resourceGroupName) - .withManagedResourceGroupId(managedResourceGroupId) - .withSku(new Sku().withName("standard")) + .withComputeMode(ComputeMode.SERVERLESS) + .withSku(new Sku().withName("premium")) .create(); ``` [Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/databricks/azure-resourcemanager-databricks/SAMPLE.md) @@ -109,5 +109,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/databricks/azure-resourcemanager-databricks/SAMPLE.md b/sdk/databricks/azure-resourcemanager-databricks/SAMPLE.md index 7decd148d27e..f3948ca15d3e 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/SAMPLE.md +++ b/sdk/databricks/azure-resourcemanager-databricks/SAMPLE.md @@ -53,15 +53,14 @@ */ public final class AccessConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/ - * AccessConnectorCreateOrUpdateWithUserAssigned.json + * x-ms-original-file: 2026-01-01/AccessConnectorCreateOrUpdate.json */ /** - * Sample code: Create an azure databricks accessConnector with UserAssigned Identity. + * Sample code: Create an Azure Databricks Access Connector with SystemAssigned Identity. * * @param manager Entry point to AzureDatabricksManager. */ - public static void createAnAzureDatabricksAccessConnectorWithUserAssignedIdentity( + public static void createAnAzureDatabricksAccessConnectorWithSystemAssignedIdentity( com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { manager.accessConnectors() .define("myAccessConnector") @@ -71,15 +70,14 @@ public final class AccessConnectorsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/ - * AccessConnectorCreateOrUpdate.json + * x-ms-original-file: 2026-01-01/AccessConnectorCreateOrUpdateWithUserAssigned.json */ /** - * Sample code: Create an azure databricks accessConnector with SystemAssigned Identity. + * Sample code: Create an Azure Databricks Access Connector with UserAssigned Identity. * * @param manager Entry point to AzureDatabricksManager. */ - public static void createAnAzureDatabricksAccessConnectorWithSystemAssignedIdentity( + public static void createAnAzureDatabricksAccessConnectorWithUserAssignedIdentity( com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { manager.accessConnectors() .define("myAccessConnector") @@ -98,12 +96,10 @@ public final class AccessConnectorsCreateOrUpdateSamples { */ public final class AccessConnectorsDeleteSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/AccessConnectorDelete. - * json + * x-ms-original-file: 2026-01-01/AccessConnectorDelete.json */ /** - * Sample code: Delete an azure databricks accessConnector. + * Sample code: Delete an Azure Databricks Access Connector. * * @param manager Entry point to AzureDatabricksManager. */ @@ -122,11 +118,10 @@ public final class AccessConnectorsDeleteSamples { */ public final class AccessConnectorsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/AccessConnectorGet.json + * x-ms-original-file: 2026-01-01/AccessConnectorGet.json */ /** - * Sample code: Get an azure databricks accessConnector. + * Sample code: Get an Azure Databricks Access Connector. * * @param manager Entry point to AzureDatabricksManager. */ @@ -146,11 +141,10 @@ public final class AccessConnectorsGetByResourceGroupSamples { */ public final class AccessConnectorsListSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/ - * AccessConnectorsListBySubscriptionId.json + * x-ms-original-file: 2026-01-01/AccessConnectorsListBySubscriptionId.json */ /** - * Sample code: Lists all the azure databricks accessConnectors within a subscription. + * Sample code: Lists all the Azure Databricks Access Connectors within a subscription. * * @param manager Entry point to AzureDatabricksManager. */ @@ -169,11 +163,10 @@ public final class AccessConnectorsListSamples { */ public final class AccessConnectorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/ - * AccessConnectorsListByResourceGroup.json + * x-ms-original-file: 2026-01-01/AccessConnectorsListByResourceGroup.json */ /** - * Sample code: Lists azure databricks accessConnectors within a resource group. + * Sample code: Lists Azure Databricks Access Connectors within a resource group. * * @param manager Entry point to AzureDatabricksManager. */ @@ -196,11 +189,10 @@ import java.util.Map; */ public final class AccessConnectorsUpdateSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/ - * AccessConnectorPatchUpdate.json + * x-ms-original-file: 2026-01-01/AccessConnectorPatchUpdate.json */ /** - * Sample code: Update an azure databricks accessConnector. + * Sample code: Update an Azure Databricks Access Connector. * * @param manager Entry point to AzureDatabricksManager. */ @@ -234,8 +226,7 @@ public final class AccessConnectorsUpdateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/OperationsList.json + * x-ms-original-file: 2026-01-01/OperationsList.json */ /** * Sample code: Operations. @@ -256,8 +247,7 @@ public final class OperationsListSamples { */ public final class OutboundNetworkDependenciesEndpointsListSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * OutboundNetworkDependenciesEndpointsList.json + * x-ms-original-file: 2026-01-01/OutboundNetworkDependenciesEndpointsList.json */ /** * Sample code: List OutboundNetworkDependenciesEndpoints by Workspace. @@ -284,8 +274,7 @@ import com.azure.resourcemanager.databricks.models.PrivateLinkServiceConnectionS */ public final class PrivateEndpointConnectionsCreateSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * PrivateEndpointConnectionsUpdate.json + * x-ms-original-file: 2026-01-01/PrivateEndpointConnectionsUpdate.json */ /** * Sample code: Update a private endpoint connection. @@ -313,8 +302,7 @@ public final class PrivateEndpointConnectionsCreateSamples { */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * PrivateEndpointConnectionsDelete.json + * x-ms-original-file: 2026-01-01/PrivateEndpointConnectionsDelete.json */ /** * Sample code: Remove a private endpoint connection. @@ -338,8 +326,7 @@ public final class PrivateEndpointConnectionsDeleteSamples { */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * PrivateEndpointConnectionsGet.json + * x-ms-original-file: 2026-01-01/PrivateEndpointConnectionsGet.json */ /** * Sample code: Get a private endpoint connection. @@ -363,8 +350,7 @@ public final class PrivateEndpointConnectionsGetSamples { */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * ListPrivateEndpointConnections.json + * x-ms-original-file: 2026-01-01/ListPrivateEndpointConnections.json */ /** * Sample code: List private endpoint connections. @@ -386,9 +372,7 @@ public final class PrivateEndpointConnectionsListSamples { */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/PrivateLinkResourcesGet - * .json + * x-ms-original-file: 2026-01-01/PrivateLinkResourcesGet.json */ /** * Sample code: Get a private link resource. @@ -410,8 +394,7 @@ public final class PrivateLinkResourcesGetSamples { */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * ListPrivateLinkResources.json + * x-ms-original-file: 2026-01-01/ListPrivateLinkResources.json */ /** * Sample code: List private link resources. @@ -434,8 +417,7 @@ import com.azure.resourcemanager.databricks.models.VirtualNetworkPeeringProperti */ public final class VNetPeeringCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceVirtualNetworkPeeringCreateOrUpdate.json + * x-ms-original-file: 2026-01-01/WorkspaceVirtualNetworkPeeringCreateOrUpdate.json */ /** * Sample code: Create vNet Peering for Workspace. @@ -446,7 +428,7 @@ public final class VNetPeeringCreateOrUpdateSamples { createVNetPeeringForWorkspace(com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { manager.vNetPeerings() .define("vNetPeeringTest") - .withExistingWorkspace("rg", "myWorkspace") + .withExistingWorkspace("subramantest", "adbworkspace") .withRemoteVirtualNetwork(new VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork().withId( "/subscriptions/0140911e-1040-48da-8bc9-b99fb3dd88a6/resourceGroups/subramantest/providers/Microsoft.Network/virtualNetworks/subramanvnet")) .withAllowVirtualNetworkAccess(true) @@ -466,8 +448,7 @@ public final class VNetPeeringCreateOrUpdateSamples { */ public final class VNetPeeringDeleteSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceVirtualNetworkPeeringDelete.json + * x-ms-original-file: 2026-01-01/WorkspaceVirtualNetworkPeeringDelete.json */ /** * Sample code: Delete a workspace vNet Peering. @@ -476,7 +457,8 @@ public final class VNetPeeringDeleteSamples { */ public static void deleteAWorkspaceVNetPeering(com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { - manager.vNetPeerings().delete("rg", "myWorkspace", "vNetPeering", com.azure.core.util.Context.NONE); + manager.vNetPeerings() + .delete("subramantest", "adbworkspace", "vNetPeeringTest", com.azure.core.util.Context.NONE); } } ``` @@ -489,8 +471,7 @@ public final class VNetPeeringDeleteSamples { */ public final class VNetPeeringGetSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceVirtualNetPeeringGet.json + * x-ms-original-file: 2026-01-01/WorkspaceVirtualNetPeeringGet.json */ /** * Sample code: Get a workspace with vNet Peering Configured. @@ -499,7 +480,8 @@ public final class VNetPeeringGetSamples { */ public static void getAWorkspaceWithVNetPeeringConfigured(com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { - manager.vNetPeerings().getWithResponse("rg", "myWorkspace", "vNetPeering", com.azure.core.util.Context.NONE); + manager.vNetPeerings() + .getWithResponse("subramantest", "adbworkspace", "vNetPeeringTest", com.azure.core.util.Context.NONE); } } ``` @@ -512,8 +494,7 @@ public final class VNetPeeringGetSamples { */ public final class VNetPeeringListByWorkspaceSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceVirtualNetPeeringList.json + * x-ms-original-file: 2026-01-01/WorkspaceVirtualNetPeeringList.json */ /** * Sample code: List all vNet Peerings for the workspace. @@ -522,7 +503,7 @@ public final class VNetPeeringListByWorkspaceSamples { */ public static void listAllVNetPeeringsForTheWorkspace(com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { - manager.vNetPeerings().listByWorkspace("rg", "myWorkspace", com.azure.core.util.Context.NONE); + manager.vNetPeerings().listByWorkspace("subramantest", "adbworkspace", com.azure.core.util.Context.NONE); } } ``` @@ -530,17 +511,32 @@ public final class VNetPeeringListByWorkspaceSamples { ### Workspaces_CreateOrUpdate ```java +import com.azure.resourcemanager.databricks.models.AutomaticClusterUpdateDefinition; +import com.azure.resourcemanager.databricks.models.AutomaticClusterUpdateValue; +import com.azure.resourcemanager.databricks.models.ComplianceSecurityProfileDefinition; +import com.azure.resourcemanager.databricks.models.ComplianceSecurityProfileValue; +import com.azure.resourcemanager.databricks.models.ComputeMode; +import com.azure.resourcemanager.databricks.models.DefaultCatalogProperties; +import com.azure.resourcemanager.databricks.models.DefaultStorageFirewall; import com.azure.resourcemanager.databricks.models.Encryption; import com.azure.resourcemanager.databricks.models.EncryptionEntitiesDefinition; import com.azure.resourcemanager.databricks.models.EncryptionKeySource; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityComplianceDefinition; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityMonitoringDefinition; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityMonitoringValue; +import com.azure.resourcemanager.databricks.models.IdentityType; +import com.azure.resourcemanager.databricks.models.InitialType; import com.azure.resourcemanager.databricks.models.KeySource; import com.azure.resourcemanager.databricks.models.ManagedDiskEncryption; import com.azure.resourcemanager.databricks.models.ManagedDiskEncryptionKeyVaultProperties; +import com.azure.resourcemanager.databricks.models.Sku; import com.azure.resourcemanager.databricks.models.WorkspaceCustomBooleanParameter; import com.azure.resourcemanager.databricks.models.WorkspaceCustomParameters; import com.azure.resourcemanager.databricks.models.WorkspaceCustomStringParameter; import com.azure.resourcemanager.databricks.models.WorkspaceEncryptionParameter; +import com.azure.resourcemanager.databricks.models.WorkspacePropertiesAccessConnector; import com.azure.resourcemanager.databricks.models.WorkspacePropertiesEncryption; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -549,8 +545,26 @@ import java.util.Map; */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceManagedDiskEncryptionCreate.json + * x-ms-original-file: 2026-01-01/WorkspaceCreateServerless.json + */ + /** + * Sample code: Create or update serverless workspace. + * + * @param manager Entry point to AzureDatabricksManager. + */ + public static void + createOrUpdateServerlessWorkspace(com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { + manager.workspaces() + .define("myWorkspace") + .withRegion("westus") + .withExistingResourceGroup("rg") + .withComputeMode(ComputeMode.SERVERLESS) + .withSku(new Sku().withName("premium")) + .create(); + } + + /* + * x-ms-original-file: 2026-01-01/WorkspaceManagedDiskEncryptionCreate.json */ /** * Sample code: Create a workspace with Customer-Managed Key (CMK) encryption for Managed Disks. @@ -563,7 +577,10 @@ public final class WorkspacesCreateOrUpdateSamples { .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") .withEncryption( new WorkspacePropertiesEncryption() .withEntities( @@ -578,8 +595,7 @@ public final class WorkspacesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceManagedDiskEncryptionUpdate.json + * x-ms-original-file: 2026-01-01/WorkspaceManagedDiskEncryptionUpdate.json */ /** * Sample code: Update a workspace with Customer-Managed Key (CMK) encryption for Managed Disks. @@ -592,8 +608,11 @@ public final class WorkspacesCreateOrUpdateSamples { .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) .withTags(mapOf("mytag1", "myvalue1")) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") .withEncryption( new WorkspacePropertiesEncryption() .withEntities( @@ -608,8 +627,7 @@ public final class WorkspacesCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/DisableEncryption.json + * x-ms-original-file: 2026-01-01/DisableEncryption.json */ /** * Sample code: Revert Customer-Managed Key (CMK) encryption to Microsoft Managed Keys encryption on a workspace. @@ -622,15 +640,17 @@ public final class WorkspacesCreateOrUpdateSamples { .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") .withParameters(new WorkspaceCustomParameters().withEncryption( new WorkspaceEncryptionParameter().withValue(new Encryption().withKeySource(KeySource.DEFAULT)))) .create(); } /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/PrepareEncryption.json + * x-ms-original-file: 2026-01-01/PrepareEncryption.json */ /** * Sample code: Create a workspace which is ready for Customer-Managed Key (CMK) encryption. @@ -643,15 +663,46 @@ public final class WorkspacesCreateOrUpdateSamples { .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") .withParameters(new WorkspaceCustomParameters() .withPrepareEncryption(new WorkspaceCustomBooleanParameter().withValue(true))) .create(); } /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceCreateWithParameters.json + * x-ms-original-file: 2026-01-01/WorkspaceEnhancedSecurityComplianceCreateOrUpdate.json + */ + /** + * Sample code: Create or update a workspace with Enhanced Security & Compliance Add-On. + * + * @param manager Entry point to AzureDatabricksManager. + */ + public static void createOrUpdateAWorkspaceWithEnhancedSecurityComplianceAddOn( + com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { + manager.workspaces() + .define("myWorkspace") + .withRegion("eastus2") + .withExistingResourceGroup("rg") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") + .withEnhancedSecurityCompliance(new EnhancedSecurityComplianceDefinition() + .withAutomaticClusterUpdate( + new AutomaticClusterUpdateDefinition().withValue(AutomaticClusterUpdateValue.ENABLED)) + .withComplianceSecurityProfile( + new ComplianceSecurityProfileDefinition().withComplianceStandards(Arrays.asList("PCI_DSS", "HIPAA")) + .withValue(ComplianceSecurityProfileValue.ENABLED)) + .withEnhancedSecurityMonitoring( + new EnhancedSecurityMonitoringDefinition().withValue(EnhancedSecurityMonitoringValue.ENABLED))) + .create(); + } + + /* + * x-ms-original-file: 2026-01-01/WorkspaceCreateWithParameters.json */ /** * Sample code: Create or update workspace with custom parameters. @@ -664,18 +715,28 @@ public final class WorkspacesCreateOrUpdateSamples { .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") .withParameters(new WorkspaceCustomParameters() .withCustomVirtualNetworkId(new WorkspaceCustomStringParameter().withValue( - "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/myNetwork")) + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/myNetwork")) .withCustomPublicSubnetName(new WorkspaceCustomStringParameter().withValue("myPublicSubnet")) .withCustomPrivateSubnetName(new WorkspaceCustomStringParameter().withValue("myPrivateSubnet"))) + .withDefaultCatalog( + new DefaultCatalogProperties().withInitialType(InitialType.HIVE_METASTORE).withInitialName("")) + .withAccessConnector(new WorkspacePropertiesAccessConnector().withId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/adbrg/providers/Microsoft.Databricks/accessConnectors/myAccessConnector") + .withIdentityType(IdentityType.USER_ASSIGNED) + .withUserAssignedIdentityId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity")) + .withDefaultStorageFirewall(DefaultStorageFirewall.ENABLED) .create(); } /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/WorkspaceCreate.json + * x-ms-original-file: 2026-01-01/WorkspaceCreate.json */ /** * Sample code: Create or update workspace. @@ -687,13 +748,21 @@ public final class WorkspacesCreateOrUpdateSamples { .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") + .withDefaultCatalog( + new DefaultCatalogProperties().withInitialType(InitialType.UNITY_CATALOG).withInitialName("")) + .withAccessConnector(new WorkspacePropertiesAccessConnector().withId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/adbrg/providers/Microsoft.Databricks/accessConnectors/myAccessConnector") + .withIdentityType(IdentityType.SYSTEM_ASSIGNED)) + .withDefaultStorageFirewall(DefaultStorageFirewall.ENABLED) .create(); } /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/EnableEncryption.json + * x-ms-original-file: 2026-01-01/EnableEncryption.json */ /** * Sample code: Enable Customer-Managed Key (CMK) encryption on a workspace which is prepared for encryption. @@ -706,7 +775,10 @@ public final class WorkspacesCreateOrUpdateSamples { .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") .withParameters(new WorkspaceCustomParameters() .withPrepareEncryption(new WorkspaceCustomBooleanParameter().withValue(true)) .withEncryption(new WorkspaceEncryptionParameter() @@ -739,8 +811,20 @@ public final class WorkspacesCreateOrUpdateSamples { */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/WorkspaceDelete.json + * x-ms-original-file: 2026-01-01/WorkspaceDeleteForceDeletion.json + */ + /** + * Sample code: Delete a workspace with forceDeletion parameter. + * + * @param manager Entry point to AzureDatabricksManager. + */ + public static void deleteAWorkspaceWithForceDeletionParameter( + com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { + manager.workspaces().delete("rg", "myWorkspace", false, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-01-01/WorkspaceDelete.json */ /** * Sample code: Delete a workspace. @@ -748,7 +832,7 @@ public final class WorkspacesDeleteSamples { * @param manager Entry point to AzureDatabricksManager. */ public static void deleteAWorkspace(com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { - manager.workspaces().delete("rg", "myWorkspace", com.azure.core.util.Context.NONE); + manager.workspaces().delete("rg", "myWorkspace", null, com.azure.core.util.Context.NONE); } } ``` @@ -761,8 +845,7 @@ public final class WorkspacesDeleteSamples { */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/WorkspaceGet.json + * x-ms-original-file: 2026-01-01/WorkspaceGet.json */ /** * Sample code: Get a workspace. @@ -774,8 +857,7 @@ public final class WorkspacesGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceManagedDiskEncryptionGet.json + * x-ms-original-file: 2026-01-01/WorkspaceManagedDiskEncryptionGet.json */ /** * Sample code: Get a workspace with Customer-Managed Key (CMK) encryption for Managed Disks. @@ -788,9 +870,20 @@ public final class WorkspacesGetByResourceGroupSamples { } /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/WorkspaceGetParameters. - * json + * x-ms-original-file: 2026-01-01/WorkspaceEnhancedSecurityComplianceGet.json + */ + /** + * Sample code: Get a workspace with Enhanced Security & Compliance Add-On. + * + * @param manager Entry point to AzureDatabricksManager. + */ + public static void getAWorkspaceWithEnhancedSecurityComplianceAddOn( + com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { + manager.workspaces().getByResourceGroupWithResponse("rg", "myWorkspace", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-01-01/WorkspaceGetParameters.json */ /** * Sample code: Get a workspace with custom parameters. @@ -812,8 +905,7 @@ public final class WorkspacesGetByResourceGroupSamples { */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspacesListBySubscription.json + * x-ms-original-file: 2026-01-01/WorkspacesListBySubscription.json */ /** * Sample code: Lists workspaces. @@ -834,8 +926,7 @@ public final class WorkspacesListSamples { */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspacesListByResourceGroup.json + * x-ms-original-file: 2026-01-01/WorkspacesListByResourceGroup.json */ /** * Sample code: Lists workspaces. @@ -860,8 +951,7 @@ import java.util.Map; */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/WorkspaceUpdate.json + * x-ms-original-file: 2026-01-01/WorkspaceUpdate.json */ /** * Sample code: Update a workspace's tags. diff --git a/sdk/databricks/azure-resourcemanager-databricks/pom.xml b/sdk/databricks/azure-resourcemanager-databricks/pom.xml index e16900849a62..563b30c4aed1 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/pom.xml +++ b/sdk/databricks/azure-resourcemanager-databricks/pom.xml @@ -1,9 +1,9 @@ - + 4.0.0 com.azure @@ -17,8 +17,8 @@ 1.1.0-beta.1 jar - Microsoft Azure SDK for AzureDatabricks Management - This package contains Microsoft Azure SDK for AzureDatabricks Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management APIs allow end users to operate on Azure Databricks Workspace / Access Connector resources. Package tag package-2023-05-01. + Microsoft Azure SDK for Azure Databricks Management + This package contains Microsoft Azure SDK for Azure Databricks Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. ARM Databricks. Package api-version 2026-01-01. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/AzureDatabricksManager.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/AzureDatabricksManager.java index ffa2d74384dd..3b58c371bef5 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/AzureDatabricksManager.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/AzureDatabricksManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks; @@ -22,6 +22,7 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.databricks.fluent.AzureDatabricksManagementClient; import com.azure.resourcemanager.databricks.implementation.AccessConnectorsImpl; @@ -43,28 +44,28 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; /** * Entry point to AzureDatabricksManager. - * The Microsoft Azure management APIs allow end users to operate on Azure Databricks Workspace / Access Connector - * resources. + * ARM Databricks. */ public final class AzureDatabricksManager { - private Workspaces workspaces; - private Operations operations; - private PrivateLinkResources privateLinkResources; + private Workspaces workspaces; private PrivateEndpointConnections privateEndpointConnections; + private AccessConnectors accessConnectors; + private OutboundNetworkDependenciesEndpoints outboundNetworkDependenciesEndpoints; - private VNetPeerings vNetPeerings; + private PrivateLinkResources privateLinkResources; - private AccessConnectors accessConnectors; + private VNetPeerings vNetPeerings; private final AzureDatabricksManagementClient clientObject; @@ -79,11 +80,11 @@ private AzureDatabricksManager(HttpPipeline httpPipeline, AzureProfile profile, } /** - * Creates an instance of AzureDatabricks service API entry point. + * Creates an instance of Azure Databricks service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the AzureDatabricks service API instance. + * @return the Azure Databricks service API instance. */ public static AzureDatabricksManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); @@ -92,11 +93,11 @@ public static AzureDatabricksManager authenticate(TokenCredential credential, Az } /** - * Creates an instance of AzureDatabricks service API entry point. + * Creates an instance of Azure Databricks service API entry point. * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. - * @return the AzureDatabricks service API instance. + * @return the Azure Databricks service API instance. */ public static AzureDatabricksManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); @@ -118,6 +119,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-databricks.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -215,22 +219,24 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { } /** - * Creates an instance of AzureDatabricks service API entry point. + * Creates an instance of Azure Databricks service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the AzureDatabricks service API instance. + * @return the Azure Databricks service API instance. */ public AzureDatabricksManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.databricks") .append("/") - .append("1.0.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -276,18 +282,6 @@ public AzureDatabricksManager authenticate(TokenCredential credential, AzureProf } } - /** - * Gets the resource collection API of Workspaces. It manages Workspace. - * - * @return Resource collection API of Workspaces. - */ - public Workspaces workspaces() { - if (this.workspaces == null) { - this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); - } - return workspaces; - } - /** * Gets the resource collection API of Operations. * @@ -301,15 +295,15 @@ public Operations operations() { } /** - * Gets the resource collection API of PrivateLinkResources. + * Gets the resource collection API of Workspaces. It manages Workspace. * - * @return Resource collection API of PrivateLinkResources. + * @return Resource collection API of Workspaces. */ - public PrivateLinkResources privateLinkResources() { - if (this.privateLinkResources == null) { - this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + public Workspaces workspaces() { + if (this.workspaces == null) { + this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); } - return privateLinkResources; + return workspaces; } /** @@ -325,6 +319,18 @@ public PrivateEndpointConnections privateEndpointConnections() { return privateEndpointConnections; } + /** + * Gets the resource collection API of AccessConnectors. It manages AccessConnector. + * + * @return Resource collection API of AccessConnectors. + */ + public AccessConnectors accessConnectors() { + if (this.accessConnectors == null) { + this.accessConnectors = new AccessConnectorsImpl(clientObject.getAccessConnectors(), this); + } + return accessConnectors; + } + /** * Gets the resource collection API of OutboundNetworkDependenciesEndpoints. * @@ -339,27 +345,27 @@ public OutboundNetworkDependenciesEndpoints outboundNetworkDependenciesEndpoints } /** - * Gets the resource collection API of VNetPeerings. It manages VirtualNetworkPeering. + * Gets the resource collection API of PrivateLinkResources. * - * @return Resource collection API of VNetPeerings. + * @return Resource collection API of PrivateLinkResources. */ - public VNetPeerings vNetPeerings() { - if (this.vNetPeerings == null) { - this.vNetPeerings = new VNetPeeringsImpl(clientObject.getVNetPeerings(), this); + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); } - return vNetPeerings; + return privateLinkResources; } /** - * Gets the resource collection API of AccessConnectors. It manages AccessConnector. + * Gets the resource collection API of VNetPeerings. It manages VirtualNetworkPeering. * - * @return Resource collection API of AccessConnectors. + * @return Resource collection API of VNetPeerings. */ - public AccessConnectors accessConnectors() { - if (this.accessConnectors == null) { - this.accessConnectors = new AccessConnectorsImpl(clientObject.getAccessConnectors(), this); + public VNetPeerings vNetPeerings() { + if (this.vNetPeerings == null) { + this.vNetPeerings = new VNetPeeringsImpl(clientObject.getVNetPeerings(), this); } - return accessConnectors; + return vNetPeerings; } /** diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/AccessConnectorsClient.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/AccessConnectorsClient.java index b099f166f7b9..64b3059e717e 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/AccessConnectorsClient.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/AccessConnectorsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent; @@ -19,238 +19,238 @@ */ public interface AccessConnectorsClient { /** - * Gets an azure databricks accessConnector. + * Gets an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an azure databricks accessConnector along with {@link Response}. + * @return an Azure Databricks Access Connector along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String connectorName, Context context); /** - * Gets an azure databricks accessConnector. + * Gets an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an azure databricks accessConnector. + * @return an Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessConnectorInner getByResourceGroup(String resourceGroupName, String connectorName); /** - * Deletes the azure databricks accessConnector. + * Creates or updates Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters Parameters supplied to the create or update an Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String connectorName); + SyncPoller, AccessConnectorInner> beginCreateOrUpdate(String resourceGroupName, + String connectorName, AccessConnectorInner parameters); /** - * Deletes the azure databricks accessConnector. + * Creates or updates Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters Parameters supplied to the create or update an Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String connectorName, Context context); + SyncPoller, AccessConnectorInner> beginCreateOrUpdate(String resourceGroupName, + String connectorName, AccessConnectorInner parameters, Context context); /** - * Deletes the azure databricks accessConnector. + * Creates or updates Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters Parameters supplied to the create or update an Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String connectorName); + AccessConnectorInner createOrUpdate(String resourceGroupName, String connectorName, + AccessConnectorInner parameters); /** - * Deletes the azure databricks accessConnector. + * Creates or updates Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters Parameters supplied to the create or update an Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String connectorName, Context context); + AccessConnectorInner createOrUpdate(String resourceGroupName, String connectorName, AccessConnectorInner parameters, + Context context); /** - * Creates or updates azure databricks accessConnector. + * Updates an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters The update to the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about azure databricks accessConnector. + * @return the {@link SyncPoller} for polling of information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AccessConnectorInner> beginCreateOrUpdate(String resourceGroupName, - String connectorName, AccessConnectorInner parameters); + SyncPoller, AccessConnectorInner> beginUpdate(String resourceGroupName, + String connectorName, AccessConnectorUpdate parameters); /** - * Creates or updates azure databricks accessConnector. + * Updates an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters The update to the Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about azure databricks accessConnector. + * @return the {@link SyncPoller} for polling of information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AccessConnectorInner> beginCreateOrUpdate(String resourceGroupName, - String connectorName, AccessConnectorInner parameters, Context context); + SyncPoller, AccessConnectorInner> beginUpdate(String resourceGroupName, + String connectorName, AccessConnectorUpdate parameters, Context context); /** - * Creates or updates azure databricks accessConnector. + * Updates an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters The update to the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector. + * @return information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - AccessConnectorInner createOrUpdate(String resourceGroupName, String connectorName, - AccessConnectorInner parameters); + AccessConnectorInner update(String resourceGroupName, String connectorName, AccessConnectorUpdate parameters); /** - * Creates or updates azure databricks accessConnector. + * Updates an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters The update to the Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector. + * @return information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - AccessConnectorInner createOrUpdate(String resourceGroupName, String connectorName, AccessConnectorInner parameters, + AccessConnectorInner update(String resourceGroupName, String connectorName, AccessConnectorUpdate parameters, Context context); /** - * Updates an azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about azure databricks accessConnector. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AccessConnectorInner> beginUpdate(String resourceGroupName, - String connectorName, AccessConnectorUpdate parameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String connectorName); /** - * Updates an azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about azure databricks accessConnector. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AccessConnectorInner> beginUpdate(String resourceGroupName, - String connectorName, AccessConnectorUpdate parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String connectorName, Context context); /** - * Updates an azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector. */ @ServiceMethod(returns = ReturnType.SINGLE) - AccessConnectorInner update(String resourceGroupName, String connectorName, AccessConnectorUpdate parameters); + void delete(String resourceGroupName, String connectorName); /** - * Updates an azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector. */ @ServiceMethod(returns = ReturnType.SINGLE) - AccessConnectorInner update(String resourceGroupName, String connectorName, AccessConnectorUpdate parameters, - Context context); + void delete(String resourceGroupName, String connectorName, Context context); /** - * Gets all the azure databricks accessConnectors within a resource group. + * Gets all the Azure Databricks Access Connectors within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a resource group as paginated response with + * @return all the Azure Databricks Access Connectors within a resource group as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets all the azure databricks accessConnectors within a resource group. + * Gets all the Azure Databricks Access Connectors within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -258,33 +258,33 @@ AccessConnectorInner update(String resourceGroupName, String connectorName, Acce * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a resource group as paginated response with + * @return all the Azure Databricks Access Connectors within a resource group as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Gets all the azure databricks accessConnectors within a subscription. + * Gets all the Azure Databricks Access Connectors within a subscription. * * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a subscription as paginated response with + * @return all the Azure Databricks Access Connectors within a subscription as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * Gets all the azure databricks accessConnectors within a subscription. + * Gets all the Azure Databricks Access Connectors within a subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a subscription as paginated response with + * @return all the Azure Databricks Access Connectors within a subscription as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/AzureDatabricksManagementClient.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/AzureDatabricksManagementClient.java index 3f47285da419..de64f89b87e8 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/AzureDatabricksManagementClient.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/AzureDatabricksManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent; @@ -12,18 +12,25 @@ */ public interface AzureDatabricksManagementClient { /** - * Gets The ID of the target subscription. + * Gets Service host. * - * @return the subscriptionId value. + * @return the endpoint value. */ - String getSubscriptionId(); + String getEndpoint(); /** - * Gets server parameter. + * Gets Version parameter. * - * @return the endpoint value. + * @return the apiVersion value. */ - String getEndpoint(); + String getApiVersion(); + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); /** * Gets The HTTP pipeline to send requests through. @@ -39,13 +46,6 @@ public interface AzureDatabricksManagementClient { */ Duration getDefaultPollInterval(); - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - WorkspacesClient getWorkspaces(); - /** * Gets the OperationsClient object to access its operations. * @@ -54,11 +54,11 @@ public interface AzureDatabricksManagementClient { OperationsClient getOperations(); /** - * Gets the PrivateLinkResourcesClient object to access its operations. + * Gets the WorkspacesClient object to access its operations. * - * @return the PrivateLinkResourcesClient object. + * @return the WorkspacesClient object. */ - PrivateLinkResourcesClient getPrivateLinkResources(); + WorkspacesClient getWorkspaces(); /** * Gets the PrivateEndpointConnectionsClient object to access its operations. @@ -67,6 +67,13 @@ public interface AzureDatabricksManagementClient { */ PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + /** + * Gets the AccessConnectorsClient object to access its operations. + * + * @return the AccessConnectorsClient object. + */ + AccessConnectorsClient getAccessConnectors(); + /** * Gets the OutboundNetworkDependenciesEndpointsClient object to access its operations. * @@ -75,16 +82,16 @@ public interface AzureDatabricksManagementClient { OutboundNetworkDependenciesEndpointsClient getOutboundNetworkDependenciesEndpoints(); /** - * Gets the VNetPeeringsClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the VNetPeeringsClient object. + * @return the PrivateLinkResourcesClient object. */ - VNetPeeringsClient getVNetPeerings(); + PrivateLinkResourcesClient getPrivateLinkResources(); /** - * Gets the AccessConnectorsClient object to access its operations. + * Gets the VNetPeeringsClient object to access its operations. * - * @return the AccessConnectorsClient object. + * @return the VNetPeeringsClient object. */ - AccessConnectorsClient getAccessConnectors(); + VNetPeeringsClient getVNetPeerings(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/OperationsClient.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/OperationsClient.java index 601ae706de22..f2fc2b796b27 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/OperationsClient.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent; @@ -15,7 +15,7 @@ */ public interface OperationsClient { /** - * Lists all of the available RP operations. + * List the operations for the provider. * * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. @@ -27,7 +27,7 @@ public interface OperationsClient { PagedIterable list(); /** - * Lists all of the available RP operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/OutboundNetworkDependenciesEndpointsClient.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/OutboundNetworkDependenciesEndpointsClient.java index 1ad21b3a6873..88e4589473c9 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/OutboundNetworkDependenciesEndpointsClient.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/OutboundNetworkDependenciesEndpointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent; @@ -30,7 +30,9 @@ public interface OutboundNetworkDependenciesEndpointsClient { * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane along with + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified Workspace. + * + * Gets the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane along with * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -50,7 +52,9 @@ Response> listWithResponse(String resourc * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified Workspace. + * + * Gets the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane. */ @ServiceMethod(returns = ReturnType.SINGLE) List list(String resourceGroupName, String workspaceName); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/PrivateEndpointConnectionsClient.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/PrivateEndpointConnectionsClient.java index a46ede51f532..099453743ad1 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/PrivateEndpointConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent; @@ -17,39 +17,6 @@ * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public interface PrivateEndpointConnectionsClient { - /** - * List private endpoint connections - * - * List private endpoint connections of the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by - * server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private link connections as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List private endpoint connections - * - * List private endpoint connections of the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by - * server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private link connections as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - /** * Get private endpoint connection * @@ -63,7 +30,9 @@ public interface PrivateEndpointConnectionsClient { * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection properties for a workspace along with {@link Response}. + * @return private endpoint connection + * + * Get a private endpoint connection properties for a workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String workspaceName, @@ -81,7 +50,9 @@ Response getWithResponse(String resourceGroupNam * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection properties for a workspace. + * @return private endpoint connection + * + * Get a private endpoint connection properties for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateEndpointConnectionInner get(String resourceGroupName, String workspaceName, @@ -237,4 +208,37 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + + /** + * List private endpoint connections + * + * List private endpoint connections of the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by + * server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private link connections as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List private endpoint connections + * + * List private endpoint connections of the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by + * server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private link connections as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/PrivateLinkResourcesClient.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/PrivateLinkResourcesClient.java index 687a7193c327..6be3336c2434 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/PrivateLinkResourcesClient.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/PrivateLinkResourcesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent; @@ -16,71 +16,75 @@ */ public interface PrivateLinkResourcesClient { /** - * List private link resources + * Get the specified private link resource * - * List private link resources for a given workspace. + * Get the specified private link resource for the given group id (sub-resource). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param groupId The name of the private link resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available private link resources for a workspace as paginated response with {@link PagedIterable}. + * @return the specified private link resource + * + * Get the specified private link resource for the given group id (sub-resource) along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String groupId, + Context context); /** - * List private link resources + * Get the specified private link resource * - * List private link resources for a given workspace. + * Get the specified private link resource for the given group id (sub-resource). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. + * @param groupId The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available private link resources for a workspace as paginated response with {@link PagedIterable}. + * @return the specified private link resource + * + * Get the specified private link resource for the given group id (sub-resource). */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + GroupIdInformationInner get(String resourceGroupName, String workspaceName, String groupId); /** - * Get the specified private link resource + * List private link resources * - * Get the specified private link resource for the given group id (sub-resource). + * List private link resources for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param groupId The name of the private link resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private link resource for the given group id (sub-resource) along with {@link Response}. + * @return the available private link resources for a workspace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String groupId, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get the specified private link resource + * List private link resources * - * Get the specified private link resource for the given group id (sub-resource). + * List private link resources for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param groupId The name of the private link resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private link resource for the given group id (sub-resource). + * @return the available private link resources for a workspace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - GroupIdInformationInner get(String resourceGroupName, String workspaceName, String groupId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/VNetPeeringsClient.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/VNetPeeringsClient.java index 0ade77bd944b..35f773792ef1 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/VNetPeeringsClient.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/VNetPeeringsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent; @@ -50,137 +50,137 @@ Response getWithResponse(String resourceGroupName, S VirtualNetworkPeeringInner get(String resourceGroupName, String workspaceName, String peeringName); /** - * Deletes the workspace vNetPeering. + * Creates vNet Peering for workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of peerings in a VirtualNetwork resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String peeringName); + SyncPoller, VirtualNetworkPeeringInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String peeringName, + VirtualNetworkPeeringInner virtualNetworkPeeringParameters); /** - * Deletes the workspace vNetPeering. + * Creates vNet Peering for workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of peerings in a VirtualNetwork resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String peeringName, - Context context); + SyncPoller, VirtualNetworkPeeringInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String peeringName, + VirtualNetworkPeeringInner virtualNetworkPeeringParameters, Context context); /** - * Deletes the workspace vNetPeering. + * Creates vNet Peering for workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return peerings in a VirtualNetwork resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String peeringName); + VirtualNetworkPeeringInner createOrUpdate(String resourceGroupName, String workspaceName, String peeringName, + VirtualNetworkPeeringInner virtualNetworkPeeringParameters); /** - * Deletes the workspace vNetPeering. + * Creates vNet Peering for workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return peerings in a VirtualNetwork resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String peeringName, Context context); + VirtualNetworkPeeringInner createOrUpdate(String resourceGroupName, String workspaceName, String peeringName, + VirtualNetworkPeeringInner virtualNetworkPeeringParameters, Context context); /** - * Creates vNet Peering for workspace. + * Deletes the workspace vNetPeering. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of peerings in a VirtualNetwork resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualNetworkPeeringInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String peeringName, - VirtualNetworkPeeringInner virtualNetworkPeeringParameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String peeringName); /** - * Creates vNet Peering for workspace. + * Deletes the workspace vNetPeering. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of peerings in a VirtualNetwork resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualNetworkPeeringInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String peeringName, - VirtualNetworkPeeringInner virtualNetworkPeeringParameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String peeringName, + Context context); /** - * Creates vNet Peering for workspace. + * Deletes the workspace vNetPeering. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return peerings in a VirtualNetwork resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualNetworkPeeringInner createOrUpdate(String resourceGroupName, String workspaceName, String peeringName, - VirtualNetworkPeeringInner virtualNetworkPeeringParameters); + void delete(String resourceGroupName, String workspaceName, String peeringName); /** - * Creates vNet Peering for workspace. + * Deletes the workspace vNetPeering. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return peerings in a VirtualNetwork resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualNetworkPeeringInner createOrUpdate(String resourceGroupName, String workspaceName, String peeringName, - VirtualNetworkPeeringInner virtualNetworkPeeringParameters, Context context); + void delete(String resourceGroupName, String workspaceName, String peeringName, Context context); /** * Lists the workspace vNet Peerings. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/WorkspacesClient.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/WorkspacesClient.java index 0e79cf9a1d8a..ed267c57741f 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/WorkspacesClient.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/WorkspacesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent; @@ -49,67 +49,76 @@ Response getByResourceGroupWithResponse(String resourceGroupName WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); /** - * Deletes the workspace. + * Creates a new workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param parameters Parameters supplied to the create or update a workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of information about workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName); + SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, WorkspaceInner parameters); /** - * Deletes the workspace. + * Creates a new workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param parameters Parameters supplied to the create or update a workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of information about workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, Context context); + SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, WorkspaceInner parameters, Context context); /** - * Deletes the workspace. + * Creates a new workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param parameters Parameters supplied to the create or update a workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName); + WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters); /** - * Deletes the workspace. + * Creates a new workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param parameters Parameters supplied to the create or update a workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, Context context); + WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters, + Context context); /** - * Creates a new workspace. + * Updates a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. + * @param parameters The update to the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. @@ -117,15 +126,15 @@ Response getByResourceGroupWithResponse(String resourceGroupName * @return the {@link SyncPoller} for polling of information about workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters); + SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, + WorkspaceUpdate parameters); /** - * Creates a new workspace. + * Updates a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. + * @param parameters The update to the workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by @@ -134,15 +143,15 @@ SyncPoller, WorkspaceInner> beginCreateOrUpdate(Strin * @return the {@link SyncPoller} for polling of information about workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context); + SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, + WorkspaceUpdate parameters, Context context); /** - * Creates a new workspace. + * Updates a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. + * @param parameters The update to the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. @@ -150,14 +159,14 @@ SyncPoller, WorkspaceInner> beginCreateOrUpdate(Strin * @return information about workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters); + WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate parameters); /** - * Creates a new workspace. + * Updates a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. + * @param parameters The update to the workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by @@ -166,72 +175,68 @@ SyncPoller, WorkspaceInner> beginCreateOrUpdate(Strin * @return information about workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters, - Context context); + WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate parameters, Context context); /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, - WorkspaceUpdate parameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName); /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. + * @param forceDeletion Optional parameter to retain default unity catalog data. By default the data will retained + * if Uc is enabled on the workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, - WorkspaceUpdate parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + Boolean forceDeletion, Context context); /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate parameters); + void delete(String resourceGroupName, String workspaceName); /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. + * @param forceDeletion Optional parameter to retain default unity catalog data. By default the data will retained + * if Uc is enabled on the workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate parameters, Context context); + void delete(String resourceGroupName, String workspaceName, Boolean forceDeletion, Context context); /** * Gets all the workspaces within a resource group. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/AccessConnectorInner.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/AccessConnectorInner.java index c7c63e83ca17..40fda97ba413 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/AccessConnectorInner.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/AccessConnectorInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent.models; @@ -16,24 +16,24 @@ import java.util.Map; /** - * Information about azure databricks accessConnector. + * Information about Azure Databricks Access Connector. */ @Fluent public final class AccessConnectorInner extends Resource { /* - * Managed service identity (system assigned and/or user assigned identities) + * Azure Databricks Access Connector properties */ - private ManagedServiceIdentity identity; + private AccessConnectorProperties properties; /* - * The system metadata relating to this resource + * The managed service identities assigned to this resource. */ - private SystemData systemData; + private ManagedServiceIdentity identity; /* - * Azure Databricks accessConnector properties + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private AccessConnectorProperties properties; + private SystemData systemData; /* * The type of the resource. @@ -57,52 +57,52 @@ public AccessConnectorInner() { } /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * Get the properties property: Azure Databricks Access Connector properties. * - * @return the identity value. + * @return the properties value. */ - public ManagedServiceIdentity identity() { - return this.identity; + public AccessConnectorProperties properties() { + return this.properties; } /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * Set the properties property: Azure Databricks Access Connector properties. * - * @param identity the identity value to set. + * @param properties the properties value to set. * @return the AccessConnectorInner object itself. */ - public AccessConnectorInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; + public AccessConnectorInner withProperties(AccessConnectorProperties properties) { + this.properties = properties; return this; } /** - * Get the systemData property: The system metadata relating to this resource. + * Get the identity property: The managed service identities assigned to this resource. * - * @return the systemData value. + * @return the identity value. */ - public SystemData systemData() { - return this.systemData; + public ManagedServiceIdentity identity() { + return this.identity; } /** - * Get the properties property: Azure Databricks accessConnector properties. + * Set the identity property: The managed service identities assigned to this resource. * - * @return the properties value. + * @param identity the identity value to set. + * @return the AccessConnectorInner object itself. */ - public AccessConnectorProperties properties() { - return this.properties; + public AccessConnectorInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; } /** - * Set the properties property: Azure Databricks accessConnector properties. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param properties the properties value to set. - * @return the AccessConnectorInner object itself. + * @return the systemData value. */ - public AccessConnectorInner withProperties(AccessConnectorProperties properties) { - this.properties = properties; - return this; + public SystemData systemData() { + return this.systemData; } /** @@ -153,20 +153,6 @@ public AccessConnectorInner withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ @@ -175,8 +161,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -207,12 +193,12 @@ public static AccessConnectorInner fromJson(JsonReader jsonReader) throws IOExce } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedAccessConnectorInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedAccessConnectorInner.properties = AccessConnectorProperties.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedAccessConnectorInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedAccessConnectorInner.systemData = SystemData.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedAccessConnectorInner.properties = AccessConnectorProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/GroupIdInformationInner.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/GroupIdInformationInner.java index 92868269edea..a03da77bb793 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/GroupIdInformationInner.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/GroupIdInformationInner.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -16,13 +16,18 @@ /** * The group information for creating a private endpoint on a workspace. */ -@Fluent +@Immutable public final class GroupIdInformationInner extends ProxyResource { /* * The group id properties. */ private GroupIdInformationProperties properties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -41,7 +46,7 @@ public final class GroupIdInformationInner extends ProxyResource { /** * Creates an instance of GroupIdInformationInner class. */ - public GroupIdInformationInner() { + private GroupIdInformationInner() { } /** @@ -54,14 +59,12 @@ public GroupIdInformationProperties properties() { } /** - * Set the properties property: The group id properties. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param properties the properties value to set. - * @return the GroupIdInformationInner object itself. + * @return the systemData value. */ - public GroupIdInformationInner withProperties(GroupIdInformationProperties properties) { - this.properties = properties; - return this; + public SystemData systemData() { + return this.systemData; } /** @@ -94,23 +97,6 @@ public String id() { return this.id; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model GroupIdInformationInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(GroupIdInformationInner.class); - /** * {@inheritDoc} */ @@ -145,6 +131,8 @@ public static GroupIdInformationInner fromJson(JsonReader jsonReader) throws IOE deserializedGroupIdInformationInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedGroupIdInformationInner.properties = GroupIdInformationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedGroupIdInformationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/OperationInner.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/OperationInner.java index eb0a528c9d3a..0af527d72932 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/OperationInner.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/OperationInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * REST API operation. */ -@Fluent +@Immutable public final class OperationInner implements JsonSerializable { /* * Operation name: {provider}/{resource}/{operation} @@ -30,7 +30,7 @@ public final class OperationInner implements JsonSerializable { /** * Creates an instance of OperationInner class. */ - public OperationInner() { + private OperationInner() { } /** @@ -42,17 +42,6 @@ public String name() { return this.name; } - /** - * Set the name property: Operation name: {provider}/{resource}/{operation}. - * - * @param name the name value to set. - * @return the OperationInner object itself. - */ - public OperationInner withName(String name) { - this.name = name; - return this; - } - /** * Get the display property: The object that represents the operation. * @@ -62,28 +51,6 @@ public OperationDisplay display() { return this.display; } - /** - * Set the display property: The object that represents the operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/OutboundEnvironmentEndpointInner.java index 5eb3ded8fffa..45d32dcee5eb 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/OutboundEnvironmentEndpointInner.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/OutboundEnvironmentEndpointInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Egress endpoints which Workspace connects to for common purposes. */ -@Fluent +@Immutable public final class OutboundEnvironmentEndpointInner implements JsonSerializable { /* * The category of endpoints accessed by the Workspace, e.g. azure-storage, azure-mysql, etc. @@ -31,7 +31,7 @@ public final class OutboundEnvironmentEndpointInner implements JsonSerializable< /** * Creates an instance of OutboundEnvironmentEndpointInner class. */ - public OutboundEnvironmentEndpointInner() { + private OutboundEnvironmentEndpointInner() { } /** @@ -44,18 +44,6 @@ public String category() { return this.category; } - /** - * Set the category property: The category of endpoints accessed by the Workspace, e.g. azure-storage, azure-mysql, - * etc. - * - * @param category the category value to set. - * @return the OutboundEnvironmentEndpointInner object itself. - */ - public OutboundEnvironmentEndpointInner withCategory(String category) { - this.category = category; - return this; - } - /** * Get the endpoints property: The endpoints that Workspace connect to. * @@ -65,28 +53,6 @@ public List endpoints() { return this.endpoints; } - /** - * Set the endpoints property: The endpoints that Workspace connect to. - * - * @param endpoints the endpoints value to set. - * @return the OutboundEnvironmentEndpointInner object itself. - */ - public OutboundEnvironmentEndpointInner withEndpoints(List endpoints) { - this.endpoints = endpoints; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (endpoints() != null) { - endpoints().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/PrivateEndpointConnectionInner.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/PrivateEndpointConnectionInner.java index d06d1a067a79..2c0f3041fbd1 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/PrivateEndpointConnectionInner.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -23,6 +23,11 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { */ private PrivateEndpointConnectionProperties properties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -64,6 +69,15 @@ public PrivateEndpointConnectionInner withProperties(PrivateEndpointConnectionPr return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -94,23 +108,6 @@ public String id() { return this.id; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model PrivateEndpointConnectionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionInner.class); - /** * {@inheritDoc} */ @@ -147,6 +144,8 @@ public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) thr } else if ("properties".equals(fieldName)) { deserializedPrivateEndpointConnectionInner.properties = PrivateEndpointConnectionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/VirtualNetworkPeeringInner.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/VirtualNetworkPeeringInner.java index af9ce6e82b98..e3c84d2137d6 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/VirtualNetworkPeeringInner.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/VirtualNetworkPeeringInner.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -27,6 +27,11 @@ public final class VirtualNetworkPeeringInner extends ProxyResource { */ private VirtualNetworkPeeringPropertiesFormat innerProperties = new VirtualNetworkPeeringPropertiesFormat(); + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -57,6 +62,15 @@ private VirtualNetworkPeeringPropertiesFormat innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -311,23 +325,6 @@ public PeeringProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model VirtualNetworkPeeringInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkPeeringInner.class); - /** * {@inheritDoc} */ @@ -363,6 +360,8 @@ public static VirtualNetworkPeeringInner fromJson(JsonReader jsonReader) throws } else if ("properties".equals(fieldName)) { deserializedVirtualNetworkPeeringInner.innerProperties = VirtualNetworkPeeringPropertiesFormat.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedVirtualNetworkPeeringInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/VirtualNetworkPeeringPropertiesFormat.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/VirtualNetworkPeeringPropertiesFormat.java index 926b89d0d8c2..e5215721e7c0 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/VirtualNetworkPeeringPropertiesFormat.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/VirtualNetworkPeeringPropertiesFormat.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -285,32 +284,6 @@ public PeeringProvisioningState provisioningState() { return this.provisioningState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (databricksVirtualNetwork() != null) { - databricksVirtualNetwork().validate(); - } - if (databricksAddressSpace() != null) { - databricksAddressSpace().validate(); - } - if (remoteVirtualNetwork() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property remoteVirtualNetwork in model VirtualNetworkPeeringPropertiesFormat")); - } else { - remoteVirtualNetwork().validate(); - } - if (remoteAddressSpace() != null) { - remoteAddressSpace().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkPeeringPropertiesFormat.class); - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/WorkspaceInner.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/WorkspaceInner.java index fed002055f07..57aaff053fa0 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/WorkspaceInner.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/WorkspaceInner.java @@ -1,23 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.databricks.models.ComputeMode; import com.azure.resourcemanager.databricks.models.CreatedBy; +import com.azure.resourcemanager.databricks.models.DefaultCatalogProperties; +import com.azure.resourcemanager.databricks.models.DefaultStorageFirewall; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityComplianceDefinition; import com.azure.resourcemanager.databricks.models.ManagedIdentityConfiguration; import com.azure.resourcemanager.databricks.models.ProvisioningState; import com.azure.resourcemanager.databricks.models.PublicNetworkAccess; import com.azure.resourcemanager.databricks.models.RequiredNsgRules; import com.azure.resourcemanager.databricks.models.Sku; import com.azure.resourcemanager.databricks.models.WorkspaceCustomParameters; +import com.azure.resourcemanager.databricks.models.WorkspacePropertiesAccessConnector; import com.azure.resourcemanager.databricks.models.WorkspacePropertiesEncryption; import com.azure.resourcemanager.databricks.models.WorkspaceProviderAuthorization; import java.io.IOException; @@ -41,7 +45,7 @@ public final class WorkspaceInner extends Resource { private Sku sku; /* - * The system metadata relating to this resource + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -96,7 +100,7 @@ public WorkspaceInner withSku(Sku sku) { } /** - * Get the systemData property: The system metadata relating to this resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -153,7 +157,33 @@ public WorkspaceInner withTags(Map tags) { } /** - * Get the managedResourceGroupId property: The managed resource group Id. + * Get the computeMode property: The workspace compute mode. Required on create, cannot be changed. Possible values + * include: 'Serverless', 'Hybrid'. + * + * @return the computeMode value. + */ + public ComputeMode computeMode() { + return this.innerProperties() == null ? null : this.innerProperties().computeMode(); + } + + /** + * Set the computeMode property: The workspace compute mode. Required on create, cannot be changed. Possible values + * include: 'Serverless', 'Hybrid'. + * + * @param computeMode the computeMode value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withComputeMode(ComputeMode computeMode) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspaceProperties(); + } + this.innerProperties().withComputeMode(computeMode); + return this; + } + + /** + * Get the managedResourceGroupId property: The managed resource group Id. Required in Hybrid ComputeMode workspace. + * Not allowed in Serverless ComputeMode workspace. * * @return the managedResourceGroupId value. */ @@ -162,7 +192,8 @@ public String managedResourceGroupId() { } /** - * Set the managedResourceGroupId property: The managed resource group Id. + * Set the managedResourceGroupId property: The managed resource group Id. Required in Hybrid ComputeMode workspace. + * Not allowed in Serverless ComputeMode workspace. * * @param managedResourceGroupId the managedResourceGroupId value to set. * @return the WorkspaceInner object itself. @@ -332,7 +363,8 @@ public String workspaceUrl() { } /** - * Get the storageAccountIdentity property: The details of Managed Identity of Storage Account. + * Get the storageAccountIdentity property: The details of Managed Identity of Storage Account. Only returned in + * Hybrid ComputeMode workspace. * * @return the storageAccountIdentity value. */ @@ -341,7 +373,8 @@ public ManagedIdentityConfiguration storageAccountIdentity() { } /** - * Set the storageAccountIdentity property: The details of Managed Identity of Storage Account. + * Set the storageAccountIdentity property: The details of Managed Identity of Storage Account. Only returned in + * Hybrid ComputeMode workspace. * * @param storageAccountIdentity the storageAccountIdentity value to set. * @return the WorkspaceInner object itself. @@ -356,7 +389,7 @@ public WorkspaceInner withStorageAccountIdentity(ManagedIdentityConfiguration st /** * Get the managedDiskIdentity property: The details of Managed Identity of Disk Encryption Set used for Managed - * Disk Encryption. + * Disk Encryption. Only returned in Hybrid ComputeMode workspace. * * @return the managedDiskIdentity value. */ @@ -366,7 +399,7 @@ public ManagedIdentityConfiguration managedDiskIdentity() { /** * Set the managedDiskIdentity property: The details of Managed Identity of Disk Encryption Set used for Managed - * Disk Encryption. + * Disk Encryption. Only returned in Hybrid ComputeMode workspace. * * @param managedDiskIdentity the managedDiskIdentity value to set. * @return the WorkspaceInner object itself. @@ -380,7 +413,8 @@ public WorkspaceInner withManagedDiskIdentity(ManagedIdentityConfiguration manag } /** - * Get the diskEncryptionSetId property: The resource Id of the managed disk encryption set. + * Get the diskEncryptionSetId property: The resource Id of the managed disk encryption set. Not allowed in + * Serverless ComputeMode workspace. * * @return the diskEncryptionSetId value. */ @@ -389,7 +423,8 @@ public String diskEncryptionSetId() { } /** - * Get the encryption property: Encryption properties for databricks workspace. + * Get the encryption property: Encryption properties for databricks workspace. Supported in both Serverless and + * Hybrid ComputeMode workspace. * * @return the encryption value. */ @@ -398,7 +433,8 @@ public WorkspacePropertiesEncryption encryption() { } /** - * Set the encryption property: Encryption properties for databricks workspace. + * Set the encryption property: Encryption properties for databricks workspace. Supported in both Serverless and + * Hybrid ComputeMode workspace. * * @param encryption the encryption value to set. * @return the WorkspaceInner object itself. @@ -412,7 +448,34 @@ public WorkspaceInner withEncryption(WorkspacePropertiesEncryption encryption) { } /** - * Get the privateEndpointConnections property: Private endpoint connections created on the workspace. + * Get the enhancedSecurityCompliance property: Contains settings related to the Enhanced Security and Compliance + * Add-On. Supported in both Serverless and Hybrid ComputeMode workspace. + * + * @return the enhancedSecurityCompliance value. + */ + public EnhancedSecurityComplianceDefinition enhancedSecurityCompliance() { + return this.innerProperties() == null ? null : this.innerProperties().enhancedSecurityCompliance(); + } + + /** + * Set the enhancedSecurityCompliance property: Contains settings related to the Enhanced Security and Compliance + * Add-On. Supported in both Serverless and Hybrid ComputeMode workspace. + * + * @param enhancedSecurityCompliance the enhancedSecurityCompliance value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner + withEnhancedSecurityCompliance(EnhancedSecurityComplianceDefinition enhancedSecurityCompliance) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspaceProperties(); + } + this.innerProperties().withEnhancedSecurityCompliance(enhancedSecurityCompliance); + return this; + } + + /** + * Get the privateEndpointConnections property: Private endpoint connections created on the workspace. Supported in + * both Serverless and Hybrid ComputeMode workspace. * * @return the privateEndpointConnections value. */ @@ -422,7 +485,8 @@ public List privateEndpointConnections() { /** * Get the publicNetworkAccess property: The network access type for accessing workspace. Set value to disabled to - * access workspace only via private link. + * access workspace only via private link. Used to configure front-end only private link for Serverless ComputeMode + * workspace. * * @return the publicNetworkAccess value. */ @@ -432,7 +496,8 @@ public PublicNetworkAccess publicNetworkAccess() { /** * Set the publicNetworkAccess property: The network access type for accessing workspace. Set value to disabled to - * access workspace only via private link. + * access workspace only via private link. Used to configure front-end only private link for Serverless ComputeMode + * workspace. * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the WorkspaceInner object itself. @@ -448,7 +513,7 @@ public WorkspaceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkA /** * Get the requiredNsgRules property: Gets or sets a value indicating whether data plane (clusters) to control plane * communication happen over private endpoint. Supported values are 'AllRules' and 'NoAzureDatabricksRules'. - * 'NoAzureServiceRules' value is for internal use only. + * 'NoAzureServiceRules' value is for internal use only. Not allowed in Serverless ComputeMode workspace. * * @return the requiredNsgRules value. */ @@ -459,7 +524,7 @@ public RequiredNsgRules requiredNsgRules() { /** * Set the requiredNsgRules property: Gets or sets a value indicating whether data plane (clusters) to control plane * communication happen over private endpoint. Supported values are 'AllRules' and 'NoAzureDatabricksRules'. - * 'NoAzureServiceRules' value is for internal use only. + * 'NoAzureServiceRules' value is for internal use only. Not allowed in Serverless ComputeMode workspace. * * @param requiredNsgRules the requiredNsgRules value to set. * @return the WorkspaceInner object itself. @@ -473,23 +538,89 @@ public WorkspaceInner withRequiredNsgRules(RequiredNsgRules requiredNsgRules) { } /** - * Validates the instance. + * Get the defaultCatalog property: Properties for Default Catalog configuration during workspace creation. Not + * allowed in Serverless ComputeMode workspace. + * + * @return the defaultCatalog value. + */ + public DefaultCatalogProperties defaultCatalog() { + return this.innerProperties() == null ? null : this.innerProperties().defaultCatalog(); + } + + /** + * Set the defaultCatalog property: Properties for Default Catalog configuration during workspace creation. Not + * allowed in Serverless ComputeMode workspace. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param defaultCatalog the defaultCatalog value to set. + * @return the WorkspaceInner object itself. */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model WorkspaceInner")); - } else { - innerProperties().validate(); + public WorkspaceInner withDefaultCatalog(DefaultCatalogProperties defaultCatalog) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspaceProperties(); } - if (sku() != null) { - sku().validate(); + this.innerProperties().withDefaultCatalog(defaultCatalog); + return this; + } + + /** + * Get the isUcEnabled property: Indicates whether unity catalog enabled for the workspace or not. Set as true in + * Serverless ComputeMode workspace. + * + * @return the isUcEnabled value. + */ + public Boolean isUcEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().isUcEnabled(); + } + + /** + * Get the accessConnector property: Access Connector Resource that is going to be associated with Databricks + * Workspace. Not allowed in Serverless ComputeMode workspace. + * + * @return the accessConnector value. + */ + public WorkspacePropertiesAccessConnector accessConnector() { + return this.innerProperties() == null ? null : this.innerProperties().accessConnector(); + } + + /** + * Set the accessConnector property: Access Connector Resource that is going to be associated with Databricks + * Workspace. Not allowed in Serverless ComputeMode workspace. + * + * @param accessConnector the accessConnector value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withAccessConnector(WorkspacePropertiesAccessConnector accessConnector) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspaceProperties(); } + this.innerProperties().withAccessConnector(accessConnector); + return this; + } + + /** + * Get the defaultStorageFirewall property: Gets or Sets Default Storage Firewall configuration information. Not + * allowed in Serverless ComputeMode workspace. + * + * @return the defaultStorageFirewall value. + */ + public DefaultStorageFirewall defaultStorageFirewall() { + return this.innerProperties() == null ? null : this.innerProperties().defaultStorageFirewall(); } - private static final ClientLogger LOGGER = new ClientLogger(WorkspaceInner.class); + /** + * Set the defaultStorageFirewall property: Gets or Sets Default Storage Firewall configuration information. Not + * allowed in Serverless ComputeMode workspace. + * + * @param defaultStorageFirewall the defaultStorageFirewall value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withDefaultStorageFirewall(DefaultStorageFirewall defaultStorageFirewall) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspaceProperties(); + } + this.innerProperties().withDefaultStorageFirewall(defaultStorageFirewall); + return this; + } /** * {@inheritDoc} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/WorkspaceProperties.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/WorkspaceProperties.java index 10562ac05359..4d80652a416c 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/WorkspaceProperties.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/WorkspaceProperties.java @@ -1,22 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.databricks.models.ComputeMode; import com.azure.resourcemanager.databricks.models.CreatedBy; +import com.azure.resourcemanager.databricks.models.DefaultCatalogProperties; +import com.azure.resourcemanager.databricks.models.DefaultStorageFirewall; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityComplianceDefinition; import com.azure.resourcemanager.databricks.models.ManagedIdentityConfiguration; import com.azure.resourcemanager.databricks.models.ProvisioningState; import com.azure.resourcemanager.databricks.models.PublicNetworkAccess; import com.azure.resourcemanager.databricks.models.RequiredNsgRules; import com.azure.resourcemanager.databricks.models.WorkspaceCustomParameters; +import com.azure.resourcemanager.databricks.models.WorkspacePropertiesAccessConnector; import com.azure.resourcemanager.databricks.models.WorkspacePropertiesEncryption; import com.azure.resourcemanager.databricks.models.WorkspaceProviderAuthorization; import java.io.IOException; @@ -29,7 +33,14 @@ @Fluent public final class WorkspaceProperties implements JsonSerializable { /* - * The managed resource group Id. + * The workspace compute mode. Required on create, cannot be changed. Possible values include: 'Serverless', + * 'Hybrid' + */ + private ComputeMode computeMode; + + /* + * The managed resource group Id. Required in Hybrid ComputeMode workspace. Not allowed in Serverless ComputeMode + * workspace. */ private String managedResourceGroupId; @@ -79,42 +90,74 @@ public final class WorkspaceProperties implements JsonSerializable privateEndpointConnections; /* * The network access type for accessing workspace. Set value to disabled to access workspace only via private link. + * Used to configure front-end only private link for Serverless ComputeMode workspace. */ private PublicNetworkAccess publicNetworkAccess; /* * Gets or sets a value indicating whether data plane (clusters) to control plane communication happen over private * endpoint. Supported values are 'AllRules' and 'NoAzureDatabricksRules'. 'NoAzureServiceRules' value is for - * internal use only. + * internal use only. Not allowed in Serverless ComputeMode workspace. */ private RequiredNsgRules requiredNsgRules; + /* + * Properties for Default Catalog configuration during workspace creation. Not allowed in Serverless ComputeMode + * workspace. + */ + private DefaultCatalogProperties defaultCatalog; + + /* + * Indicates whether unity catalog enabled for the workspace or not. Set as true in Serverless ComputeMode + * workspace. + */ + private Boolean isUcEnabled; + + /* + * Access Connector Resource that is going to be associated with Databricks Workspace. Not allowed in Serverless + * ComputeMode workspace. + */ + private WorkspacePropertiesAccessConnector accessConnector; + + /* + * Gets or Sets Default Storage Firewall configuration information. Not allowed in Serverless ComputeMode workspace. + */ + private DefaultStorageFirewall defaultStorageFirewall; + /** * Creates an instance of WorkspaceProperties class. */ @@ -122,7 +165,30 @@ public WorkspaceProperties() { } /** - * Get the managedResourceGroupId property: The managed resource group Id. + * Get the computeMode property: The workspace compute mode. Required on create, cannot be changed. Possible values + * include: 'Serverless', 'Hybrid'. + * + * @return the computeMode value. + */ + public ComputeMode computeMode() { + return this.computeMode; + } + + /** + * Set the computeMode property: The workspace compute mode. Required on create, cannot be changed. Possible values + * include: 'Serverless', 'Hybrid'. + * + * @param computeMode the computeMode value to set. + * @return the WorkspaceProperties object itself. + */ + public WorkspaceProperties withComputeMode(ComputeMode computeMode) { + this.computeMode = computeMode; + return this; + } + + /** + * Get the managedResourceGroupId property: The managed resource group Id. Required in Hybrid ComputeMode workspace. + * Not allowed in Serverless ComputeMode workspace. * * @return the managedResourceGroupId value. */ @@ -131,7 +197,8 @@ public String managedResourceGroupId() { } /** - * Set the managedResourceGroupId property: The managed resource group Id. + * Set the managedResourceGroupId property: The managed resource group Id. Required in Hybrid ComputeMode workspace. + * Not allowed in Serverless ComputeMode workspace. * * @param managedResourceGroupId the managedResourceGroupId value to set. * @return the WorkspaceProperties object itself. @@ -283,7 +350,8 @@ public String workspaceUrl() { } /** - * Get the storageAccountIdentity property: The details of Managed Identity of Storage Account. + * Get the storageAccountIdentity property: The details of Managed Identity of Storage Account. Only returned in + * Hybrid ComputeMode workspace. * * @return the storageAccountIdentity value. */ @@ -292,7 +360,8 @@ public ManagedIdentityConfiguration storageAccountIdentity() { } /** - * Set the storageAccountIdentity property: The details of Managed Identity of Storage Account. + * Set the storageAccountIdentity property: The details of Managed Identity of Storage Account. Only returned in + * Hybrid ComputeMode workspace. * * @param storageAccountIdentity the storageAccountIdentity value to set. * @return the WorkspaceProperties object itself. @@ -304,7 +373,7 @@ public WorkspaceProperties withStorageAccountIdentity(ManagedIdentityConfigurati /** * Get the managedDiskIdentity property: The details of Managed Identity of Disk Encryption Set used for Managed - * Disk Encryption. + * Disk Encryption. Only returned in Hybrid ComputeMode workspace. * * @return the managedDiskIdentity value. */ @@ -314,7 +383,7 @@ public ManagedIdentityConfiguration managedDiskIdentity() { /** * Set the managedDiskIdentity property: The details of Managed Identity of Disk Encryption Set used for Managed - * Disk Encryption. + * Disk Encryption. Only returned in Hybrid ComputeMode workspace. * * @param managedDiskIdentity the managedDiskIdentity value to set. * @return the WorkspaceProperties object itself. @@ -325,7 +394,8 @@ public WorkspaceProperties withManagedDiskIdentity(ManagedIdentityConfiguration } /** - * Get the diskEncryptionSetId property: The resource Id of the managed disk encryption set. + * Get the diskEncryptionSetId property: The resource Id of the managed disk encryption set. Not allowed in + * Serverless ComputeMode workspace. * * @return the diskEncryptionSetId value. */ @@ -334,7 +404,8 @@ public String diskEncryptionSetId() { } /** - * Get the encryption property: Encryption properties for databricks workspace. + * Get the encryption property: Encryption properties for databricks workspace. Supported in both Serverless and + * Hybrid ComputeMode workspace. * * @return the encryption value. */ @@ -343,7 +414,8 @@ public WorkspacePropertiesEncryption encryption() { } /** - * Set the encryption property: Encryption properties for databricks workspace. + * Set the encryption property: Encryption properties for databricks workspace. Supported in both Serverless and + * Hybrid ComputeMode workspace. * * @param encryption the encryption value to set. * @return the WorkspaceProperties object itself. @@ -354,7 +426,31 @@ public WorkspaceProperties withEncryption(WorkspacePropertiesEncryption encrypti } /** - * Get the privateEndpointConnections property: Private endpoint connections created on the workspace. + * Get the enhancedSecurityCompliance property: Contains settings related to the Enhanced Security and Compliance + * Add-On. Supported in both Serverless and Hybrid ComputeMode workspace. + * + * @return the enhancedSecurityCompliance value. + */ + public EnhancedSecurityComplianceDefinition enhancedSecurityCompliance() { + return this.enhancedSecurityCompliance; + } + + /** + * Set the enhancedSecurityCompliance property: Contains settings related to the Enhanced Security and Compliance + * Add-On. Supported in both Serverless and Hybrid ComputeMode workspace. + * + * @param enhancedSecurityCompliance the enhancedSecurityCompliance value to set. + * @return the WorkspaceProperties object itself. + */ + public WorkspaceProperties + withEnhancedSecurityCompliance(EnhancedSecurityComplianceDefinition enhancedSecurityCompliance) { + this.enhancedSecurityCompliance = enhancedSecurityCompliance; + return this; + } + + /** + * Get the privateEndpointConnections property: Private endpoint connections created on the workspace. Supported in + * both Serverless and Hybrid ComputeMode workspace. * * @return the privateEndpointConnections value. */ @@ -364,7 +460,8 @@ public List privateEndpointConnections() { /** * Get the publicNetworkAccess property: The network access type for accessing workspace. Set value to disabled to - * access workspace only via private link. + * access workspace only via private link. Used to configure front-end only private link for Serverless ComputeMode + * workspace. * * @return the publicNetworkAccess value. */ @@ -374,7 +471,8 @@ public PublicNetworkAccess publicNetworkAccess() { /** * Set the publicNetworkAccess property: The network access type for accessing workspace. Set value to disabled to - * access workspace only via private link. + * access workspace only via private link. Used to configure front-end only private link for Serverless ComputeMode + * workspace. * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the WorkspaceProperties object itself. @@ -387,7 +485,7 @@ public WorkspaceProperties withPublicNetworkAccess(PublicNetworkAccess publicNet /** * Get the requiredNsgRules property: Gets or sets a value indicating whether data plane (clusters) to control plane * communication happen over private endpoint. Supported values are 'AllRules' and 'NoAzureDatabricksRules'. - * 'NoAzureServiceRules' value is for internal use only. + * 'NoAzureServiceRules' value is for internal use only. Not allowed in Serverless ComputeMode workspace. * * @return the requiredNsgRules value. */ @@ -398,7 +496,7 @@ public RequiredNsgRules requiredNsgRules() { /** * Set the requiredNsgRules property: Gets or sets a value indicating whether data plane (clusters) to control plane * communication happen over private endpoint. Supported values are 'AllRules' and 'NoAzureDatabricksRules'. - * 'NoAzureServiceRules' value is for internal use only. + * 'NoAzureServiceRules' value is for internal use only. Not allowed in Serverless ComputeMode workspace. * * @param requiredNsgRules the requiredNsgRules value to set. * @return the WorkspaceProperties object itself. @@ -409,43 +507,80 @@ public WorkspaceProperties withRequiredNsgRules(RequiredNsgRules requiredNsgRule } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (managedResourceGroupId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property managedResourceGroupId in model WorkspaceProperties")); - } - if (parameters() != null) { - parameters().validate(); - } - if (authorizations() != null) { - authorizations().forEach(e -> e.validate()); - } - if (createdBy() != null) { - createdBy().validate(); - } - if (updatedBy() != null) { - updatedBy().validate(); - } - if (storageAccountIdentity() != null) { - storageAccountIdentity().validate(); - } - if (managedDiskIdentity() != null) { - managedDiskIdentity().validate(); - } - if (encryption() != null) { - encryption().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WorkspaceProperties.class); + * Get the defaultCatalog property: Properties for Default Catalog configuration during workspace creation. Not + * allowed in Serverless ComputeMode workspace. + * + * @return the defaultCatalog value. + */ + public DefaultCatalogProperties defaultCatalog() { + return this.defaultCatalog; + } + + /** + * Set the defaultCatalog property: Properties for Default Catalog configuration during workspace creation. Not + * allowed in Serverless ComputeMode workspace. + * + * @param defaultCatalog the defaultCatalog value to set. + * @return the WorkspaceProperties object itself. + */ + public WorkspaceProperties withDefaultCatalog(DefaultCatalogProperties defaultCatalog) { + this.defaultCatalog = defaultCatalog; + return this; + } + + /** + * Get the isUcEnabled property: Indicates whether unity catalog enabled for the workspace or not. Set as true in + * Serverless ComputeMode workspace. + * + * @return the isUcEnabled value. + */ + public Boolean isUcEnabled() { + return this.isUcEnabled; + } + + /** + * Get the accessConnector property: Access Connector Resource that is going to be associated with Databricks + * Workspace. Not allowed in Serverless ComputeMode workspace. + * + * @return the accessConnector value. + */ + public WorkspacePropertiesAccessConnector accessConnector() { + return this.accessConnector; + } + + /** + * Set the accessConnector property: Access Connector Resource that is going to be associated with Databricks + * Workspace. Not allowed in Serverless ComputeMode workspace. + * + * @param accessConnector the accessConnector value to set. + * @return the WorkspaceProperties object itself. + */ + public WorkspaceProperties withAccessConnector(WorkspacePropertiesAccessConnector accessConnector) { + this.accessConnector = accessConnector; + return this; + } + + /** + * Get the defaultStorageFirewall property: Gets or Sets Default Storage Firewall configuration information. Not + * allowed in Serverless ComputeMode workspace. + * + * @return the defaultStorageFirewall value. + */ + public DefaultStorageFirewall defaultStorageFirewall() { + return this.defaultStorageFirewall; + } + + /** + * Set the defaultStorageFirewall property: Gets or Sets Default Storage Firewall configuration information. Not + * allowed in Serverless ComputeMode workspace. + * + * @param defaultStorageFirewall the defaultStorageFirewall value to set. + * @return the WorkspaceProperties object itself. + */ + public WorkspaceProperties withDefaultStorageFirewall(DefaultStorageFirewall defaultStorageFirewall) { + this.defaultStorageFirewall = defaultStorageFirewall; + return this; + } /** * {@inheritDoc} @@ -453,6 +588,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("computeMode", this.computeMode == null ? null : this.computeMode.toString()); jsonWriter.writeStringField("managedResourceGroupId", this.managedResourceGroupId); jsonWriter.writeJsonField("parameters", this.parameters); jsonWriter.writeStringField("uiDefinitionUri", this.uiDefinitionUri); @@ -463,10 +599,15 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("storageAccountIdentity", this.storageAccountIdentity); jsonWriter.writeJsonField("managedDiskIdentity", this.managedDiskIdentity); jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeJsonField("enhancedSecurityCompliance", this.enhancedSecurityCompliance); jsonWriter.writeStringField("publicNetworkAccess", this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); jsonWriter.writeStringField("requiredNsgRules", this.requiredNsgRules == null ? null : this.requiredNsgRules.toString()); + jsonWriter.writeJsonField("defaultCatalog", this.defaultCatalog); + jsonWriter.writeJsonField("accessConnector", this.accessConnector); + jsonWriter.writeStringField("defaultStorageFirewall", + this.defaultStorageFirewall == null ? null : this.defaultStorageFirewall.toString()); return jsonWriter.writeEndObject(); } @@ -486,7 +627,9 @@ public static WorkspaceProperties fromJson(JsonReader jsonReader) throws IOExcep String fieldName = reader.getFieldName(); reader.nextToken(); - if ("managedResourceGroupId".equals(fieldName)) { + if ("computeMode".equals(fieldName)) { + deserializedWorkspaceProperties.computeMode = ComputeMode.fromString(reader.getString()); + } else if ("managedResourceGroupId".equals(fieldName)) { deserializedWorkspaceProperties.managedResourceGroupId = reader.getString(); } else if ("parameters".equals(fieldName)) { deserializedWorkspaceProperties.parameters = WorkspaceCustomParameters.fromJson(reader); @@ -519,6 +662,9 @@ public static WorkspaceProperties fromJson(JsonReader jsonReader) throws IOExcep deserializedWorkspaceProperties.diskEncryptionSetId = reader.getString(); } else if ("encryption".equals(fieldName)) { deserializedWorkspaceProperties.encryption = WorkspacePropertiesEncryption.fromJson(reader); + } else if ("enhancedSecurityCompliance".equals(fieldName)) { + deserializedWorkspaceProperties.enhancedSecurityCompliance + = EnhancedSecurityComplianceDefinition.fromJson(reader); } else if ("privateEndpointConnections".equals(fieldName)) { List privateEndpointConnections = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); @@ -528,6 +674,16 @@ public static WorkspaceProperties fromJson(JsonReader jsonReader) throws IOExcep = PublicNetworkAccess.fromString(reader.getString()); } else if ("requiredNsgRules".equals(fieldName)) { deserializedWorkspaceProperties.requiredNsgRules = RequiredNsgRules.fromString(reader.getString()); + } else if ("defaultCatalog".equals(fieldName)) { + deserializedWorkspaceProperties.defaultCatalog = DefaultCatalogProperties.fromJson(reader); + } else if ("isUcEnabled".equals(fieldName)) { + deserializedWorkspaceProperties.isUcEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("accessConnector".equals(fieldName)) { + deserializedWorkspaceProperties.accessConnector + = WorkspacePropertiesAccessConnector.fromJson(reader); + } else if ("defaultStorageFirewall".equals(fieldName)) { + deserializedWorkspaceProperties.defaultStorageFirewall + = DefaultStorageFirewall.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/package-info.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/package-info.java index 870245b106e5..3b1063f34d84 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/package-info.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/models/package-info.java @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for AzureDatabricksManagementClient. - * The Microsoft Azure management APIs allow end users to operate on Azure Databricks Workspace / Access Connector - * resources. + * Package containing the inner data models for AzureDatabricks. + * ARM Databricks. */ package com.azure.resourcemanager.databricks.fluent.models; diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/package-info.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/package-info.java index 5950fadae41a..0c9e7e984f7f 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/package-info.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/package-info.java @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for AzureDatabricksManagementClient. - * The Microsoft Azure management APIs allow end users to operate on Azure Databricks Workspace / Access Connector - * resources. + * Package containing the service clients for AzureDatabricks. + * ARM Databricks. */ package com.azure.resourcemanager.databricks.fluent; diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorImpl.java index 177c3f384a43..5c96ab8728e6 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -45,6 +45,10 @@ public Map tags() { } } + public AccessConnectorProperties properties() { + return this.innerModel().properties(); + } + public ManagedServiceIdentity identity() { return this.innerModel().identity(); } @@ -53,10 +57,6 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public AccessConnectorProperties properties() { - return this.innerModel().properties(); - } - public Region region() { return Region.fromName(this.regionName()); } @@ -171,6 +171,11 @@ public AccessConnectorImpl withTags(Map tags) { } } + public AccessConnectorImpl withProperties(AccessConnectorProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + public AccessConnectorImpl withIdentity(ManagedServiceIdentity identity) { if (isInCreateMode()) { this.innerModel().withIdentity(identity); @@ -181,12 +186,7 @@ public AccessConnectorImpl withIdentity(ManagedServiceIdentity identity) { } } - public AccessConnectorImpl withProperties(AccessConnectorProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorsClientImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorsClientImpl.java index f1f2ed473796..4f9411a5c622 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorsClientImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -27,13 +27,14 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.databricks.fluent.AccessConnectorsClient; import com.azure.resourcemanager.databricks.fluent.models.AccessConnectorInner; -import com.azure.resourcemanager.databricks.models.AccessConnectorListResult; +import com.azure.resourcemanager.databricks.implementation.models.AccessConnectorListResult; import com.azure.resourcemanager.databricks.models.AccessConnectorUpdate; import com.azure.resourcemanager.databricks.models.ErrorInfoException; import java.nio.ByteBuffer; @@ -69,60 +70,112 @@ public final class AccessConnectorsClientImpl implements AccessConnectorsClient * The interface defining all the services for AzureDatabricksManagementClientAccessConnectors to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureDatabricksManag") + @Host("{endpoint}") + @ServiceInterface(name = "AzureDatabricksManagementClientAccessConnectors") public interface AccessConnectorsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors/{connectorName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectorName") String connectorName, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectorName") String connectorName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors/{connectorName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors/{connectorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectorName") String connectorName, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectorName") String connectorName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors/{connectorName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectorName") String connectorName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessConnectorInner parameters, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors/{connectorName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") AccessConnectorInner parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectorName") String connectorName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessConnectorInner parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors/{connectorName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectorName") String connectorName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessConnectorUpdate parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors/{connectorName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono>> update(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectorName") String connectorName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AccessConnectorUpdate parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors/{connectorName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectorName") String connectorName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors/{connectorName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") AccessConnectorUpdate parameters, @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectorName") String connectorName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/accessConnectors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Databricks/accessConnectors") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Databricks/accessConnectors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -131,7 +184,15 @@ Mono> list(@HostParam("$host") String endpoi @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -139,91 +200,48 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets an azure databricks accessConnector. + * Gets an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an azure databricks accessConnector along with {@link Response} on successful completion of {@link Mono}. + * @return an Azure Databricks Access Connector along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String connectorName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-05-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - connectorName, apiVersion, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, connectorName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets an azure databricks accessConnector. + * Gets an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param context The context to associate with this operation. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an azure databricks accessConnector along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String connectorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, connectorName, apiVersion, - this.client.getSubscriptionId(), accept, context); - } - - /** - * Gets an azure databricks accessConnector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an azure databricks accessConnector on successful completion of {@link Mono}. + * @return an Azure Databricks Access Connector on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String connectorName) { @@ -232,31 +250,33 @@ private Mono getByResourceGroupAsync(String resourceGroupN } /** - * Gets an azure databricks accessConnector. + * Gets an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an azure databricks accessConnector along with {@link Response}. + * @return an Azure Databricks Access Connector along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String connectorName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, connectorName, context).block(); + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, connectorName, accept, context); } /** - * Gets an azure databricks accessConnector. + * Gets an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an azure databricks accessConnector. + * @return an Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessConnectorInner getByResourceGroup(String resourceGroupName, String connectorName) { @@ -264,921 +284,711 @@ public AccessConnectorInner getByResourceGroup(String resourceGroupName, String } /** - * Deletes the azure databricks accessConnector. + * Creates or updates Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters Parameters supplied to the create or update an Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return information about Azure Databricks Access Connector along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String connectorName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-05-01"; + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String connectorName, AccessConnectorInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, connectorName, - apiVersion, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, connectorName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes the azure databricks accessConnector. + * Creates or updates Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param context The context to associate with this operation. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters Parameters supplied to the create or update an Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return information about Azure Databricks Access Connector along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String connectorName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-05-01"; + private Response createOrUpdateWithResponse(String resourceGroupName, String connectorName, + AccessConnectorInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, connectorName, apiVersion, - this.client.getSubscriptionId(), accept, context); - } - - /** - * Deletes the azure databricks accessConnector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String connectorName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, connectorName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, connectorName, contentType, accept, parameters, + Context.NONE); } /** - * Deletes the azure databricks accessConnector. + * Creates or updates Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters Parameters supplied to the create or update an Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return information about Azure Databricks Access Connector along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String connectorName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, connectorName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String connectorName, + AccessConnectorInner parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, connectorName, contentType, accept, parameters, context); } /** - * Deletes the azure databricks accessConnector. + * Creates or updates Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters Parameters supplied to the create or update an Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String connectorName) { - return this.beginDeleteAsync(resourceGroupName, connectorName).getSyncPoller(); + private PollerFlux, AccessConnectorInner> + beginCreateOrUpdateAsync(String resourceGroupName, String connectorName, AccessConnectorInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, connectorName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + AccessConnectorInner.class, AccessConnectorInner.class, this.client.getContext()); } /** - * Deletes the azure databricks accessConnector. + * Creates or updates Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param context The context to associate with this operation. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters Parameters supplied to the create or update an Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String connectorName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, connectorName, context).getSyncPoller(); + public SyncPoller, AccessConnectorInner> + beginCreateOrUpdate(String resourceGroupName, String connectorName, AccessConnectorInner parameters) { + Response response = createOrUpdateWithResponse(resourceGroupName, connectorName, parameters); + return this.client.getLroResult(response, + AccessConnectorInner.class, AccessConnectorInner.class, Context.NONE); } /** - * Deletes the azure databricks accessConnector. + * Creates or updates Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters Parameters supplied to the create or update an Azure Databricks Access Connector. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link SyncPoller} for polling of information about Azure Databricks Access Connector. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String connectorName) { - return beginDeleteAsync(resourceGroupName, connectorName).last().flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessConnectorInner> beginCreateOrUpdate( + String resourceGroupName, String connectorName, AccessConnectorInner parameters, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, connectorName, parameters, context); + return this.client.getLroResult(response, + AccessConnectorInner.class, AccessConnectorInner.class, context); } /** - * Deletes the azure databricks accessConnector. + * Creates or updates Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param context The context to associate with this operation. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters Parameters supplied to the create or update an Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return information about Azure Databricks Access Connector on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String connectorName, Context context) { - return beginDeleteAsync(resourceGroupName, connectorName, context).last() + private Mono createOrUpdateAsync(String resourceGroupName, String connectorName, + AccessConnectorInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, connectorName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes the azure databricks accessConnector. + * Creates or updates Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters Parameters supplied to the create or update an Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String connectorName) { - deleteAsync(resourceGroupName, connectorName).block(); + public AccessConnectorInner createOrUpdate(String resourceGroupName, String connectorName, + AccessConnectorInner parameters) { + return beginCreateOrUpdate(resourceGroupName, connectorName, parameters).getFinalResult(); } /** - * Deletes the azure databricks accessConnector. + * Creates or updates Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters Parameters supplied to the create or update an Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String connectorName, Context context) { - deleteAsync(resourceGroupName, connectorName, context).block(); + public AccessConnectorInner createOrUpdate(String resourceGroupName, String connectorName, + AccessConnectorInner parameters, Context context) { + return beginCreateOrUpdate(resourceGroupName, connectorName, parameters, context).getFinalResult(); } /** - * Creates or updates azure databricks accessConnector. + * Updates an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters The update to the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector along with {@link Response} on successful completion + * @return information about Azure Databricks Access Connector along with {@link Response} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String connectorName, AccessConnectorInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2023-05-01"; + private Mono>> updateWithResponseAsync(String resourceGroupName, String connectorName, + AccessConnectorUpdate parameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, connectorName, - apiVersion, this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, connectorName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates azure databricks accessConnector. + * Updates an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. - * @param context The context to associate with this operation. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters The update to the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector along with {@link Response} on successful completion - * of {@link Mono}. + * @return information about Azure Databricks Access Connector along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String connectorName, AccessConnectorInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2023-05-01"; + private Response updateWithResponse(String resourceGroupName, String connectorName, + AccessConnectorUpdate parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, connectorName, apiVersion, - this.client.getSubscriptionId(), parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, connectorName, contentType, accept, parameters, + Context.NONE); } /** - * Creates or updates azure databricks accessConnector. + * Updates an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters The update to the Azure Databricks Access Connector. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of information about azure databricks accessConnector. + * @return information about Azure Databricks Access Connector along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AccessConnectorInner> - beginCreateOrUpdateAsync(String resourceGroupName, String connectorName, AccessConnectorInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, connectorName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AccessConnectorInner.class, AccessConnectorInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String connectorName, + AccessConnectorUpdate parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, connectorName, contentType, accept, parameters, + context); } /** - * Creates or updates azure databricks accessConnector. + * Updates an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. - * @param context The context to associate with this operation. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters The update to the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of information about azure databricks accessConnector. + * @return the {@link PollerFlux} for polling of information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AccessConnectorInner> beginCreateOrUpdateAsync( - String resourceGroupName, String connectorName, AccessConnectorInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, connectorName, parameters, context); + private PollerFlux, AccessConnectorInner> + beginUpdateAsync(String resourceGroupName, String connectorName, AccessConnectorUpdate parameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, connectorName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AccessConnectorInner.class, AccessConnectorInner.class, context); + AccessConnectorInner.class, AccessConnectorInner.class, this.client.getContext()); } /** - * Creates or updates azure databricks accessConnector. + * Updates an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters The update to the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about azure databricks accessConnector. + * @return the {@link SyncPoller} for polling of information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AccessConnectorInner> - beginCreateOrUpdate(String resourceGroupName, String connectorName, AccessConnectorInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, connectorName, parameters).getSyncPoller(); + public SyncPoller, AccessConnectorInner> beginUpdate(String resourceGroupName, + String connectorName, AccessConnectorUpdate parameters) { + Response response = updateWithResponse(resourceGroupName, connectorName, parameters); + return this.client.getLroResult(response, + AccessConnectorInner.class, AccessConnectorInner.class, Context.NONE); } /** - * Creates or updates azure databricks accessConnector. + * Updates an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters The update to the Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about azure databricks accessConnector. + * @return the {@link SyncPoller} for polling of information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AccessConnectorInner> beginCreateOrUpdate( - String resourceGroupName, String connectorName, AccessConnectorInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, connectorName, parameters, context).getSyncPoller(); - } - - /** - * Creates or updates azure databricks accessConnector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String connectorName, - AccessConnectorInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, connectorName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, AccessConnectorInner> beginUpdate(String resourceGroupName, + String connectorName, AccessConnectorUpdate parameters, Context context) { + Response response = updateWithResponse(resourceGroupName, connectorName, parameters, context); + return this.client.getLroResult(response, + AccessConnectorInner.class, AccessConnectorInner.class, context); } /** - * Creates or updates azure databricks accessConnector. + * Updates an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. - * @param context The context to associate with this operation. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters The update to the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector on successful completion of {@link Mono}. + * @return information about Azure Databricks Access Connector on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String connectorName, - AccessConnectorInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, connectorName, parameters, context).last() + private Mono updateAsync(String resourceGroupName, String connectorName, + AccessConnectorUpdate parameters) { + return beginUpdateAsync(resourceGroupName, connectorName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates or updates azure databricks accessConnector. + * Updates an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters The update to the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector. + * @return information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AccessConnectorInner createOrUpdate(String resourceGroupName, String connectorName, - AccessConnectorInner parameters) { - return createOrUpdateAsync(resourceGroupName, connectorName, parameters).block(); + public AccessConnectorInner update(String resourceGroupName, String connectorName, + AccessConnectorUpdate parameters) { + return beginUpdate(resourceGroupName, connectorName, parameters).getFinalResult(); } /** - * Creates or updates azure databricks accessConnector. + * Updates an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters Parameters supplied to the create or update an azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param parameters The update to the Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector. + * @return information about Azure Databricks Access Connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AccessConnectorInner createOrUpdate(String resourceGroupName, String connectorName, - AccessConnectorInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, connectorName, parameters, context).block(); + public AccessConnectorInner update(String resourceGroupName, String connectorName, AccessConnectorUpdate parameters, + Context context) { + return beginUpdate(resourceGroupName, connectorName, parameters, context).getFinalResult(); } /** - * Updates an azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector along with {@link Response} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String connectorName, - AccessConnectorUpdate parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2023-05-01"; - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String connectorName) { return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, connectorName, - apiVersion, this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, connectorName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates an azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. - * @param context The context to associate with this operation. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector along with {@link Response} on successful completion - * of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String connectorName, - AccessConnectorUpdate parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2023-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, connectorName, apiVersion, - this.client.getSubscriptionId(), parameters, accept, context); + private Response deleteWithResponse(String resourceGroupName, String connectorName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, connectorName, Context.NONE); } /** - * Updates an azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of information about azure databricks accessConnector. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AccessConnectorInner> - beginUpdateAsync(String resourceGroupName, String connectorName, AccessConnectorUpdate parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, connectorName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AccessConnectorInner.class, AccessConnectorInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String connectorName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, connectorName, context); } /** - * Updates an azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. - * @param context The context to associate with this operation. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of information about azure databricks accessConnector. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AccessConnectorInner> beginUpdateAsync( - String resourceGroupName, String connectorName, AccessConnectorUpdate parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, connectorName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - AccessConnectorInner.class, AccessConnectorInner.class, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String connectorName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, connectorName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Updates an azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about azure databricks accessConnector. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AccessConnectorInner> beginUpdate(String resourceGroupName, - String connectorName, AccessConnectorUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, connectorName, parameters).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String connectorName) { + Response response = deleteWithResponse(resourceGroupName, connectorName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Updates an azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about azure databricks accessConnector. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AccessConnectorInner> beginUpdate(String resourceGroupName, - String connectorName, AccessConnectorUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, connectorName, parameters, context).getSyncPoller(); - } - - /** - * Updates an azure databricks accessConnector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String connectorName, - AccessConnectorUpdate parameters) { - return beginUpdateAsync(resourceGroupName, connectorName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, Void> beginDelete(String resourceGroupName, String connectorName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, connectorName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Updates an azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. - * @param context The context to associate with this operation. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String connectorName, - AccessConnectorUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, connectorName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String connectorName) { + return beginDeleteAsync(resourceGroupName, connectorName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AccessConnectorInner update(String resourceGroupName, String connectorName, - AccessConnectorUpdate parameters) { - return updateAsync(resourceGroupName, connectorName, parameters).block(); + public void delete(String resourceGroupName, String connectorName) { + beginDelete(resourceGroupName, connectorName).getFinalResult(); } /** - * Updates an azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. - * @param parameters The update to the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about azure databricks accessConnector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AccessConnectorInner update(String resourceGroupName, String connectorName, AccessConnectorUpdate parameters, - Context context) { - return updateAsync(resourceGroupName, connectorName, parameters, context).block(); + public void delete(String resourceGroupName, String connectorName, Context context) { + beginDelete(resourceGroupName, connectorName, context).getFinalResult(); } /** - * Gets all the azure databricks accessConnectors within a resource group. + * Gets all the Azure Databricks Access Connectors within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a resource group along with {@link PagedResponse} on + * @return all the Azure Databricks Access Connectors within a resource group along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-05-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - apiVersion, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets all the azure databricks accessConnectors within a resource group. + * Gets all the Azure Databricks Access Connectors within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return all the Azure Databricks Access Connectors within a resource group as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Gets all the azure databricks accessConnectors within a resource group. + * Gets all the Azure Databricks Access Connectors within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a resource group as paginated response with - * {@link PagedFlux}. + * @return all the Azure Databricks Access Connectors within a resource group along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets all the azure databricks accessConnectors within a resource group. + * Gets all the Azure Databricks Access Connectors within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a resource group as paginated response with - * {@link PagedFlux}. + * @return all the Azure Databricks Access Connectors within a resource group along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets all the azure databricks accessConnectors within a resource group. + * Gets all the Azure Databricks Access Connectors within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a resource group as paginated response with + * @return all the Azure Databricks Access Connectors within a resource group as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Gets all the azure databricks accessConnectors within a resource group. + * Gets all the Azure Databricks Access Connectors within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a resource group as paginated response with + * @return all the Azure Databricks Access Connectors within a resource group as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Gets all the azure databricks accessConnectors within a subscription. + * Gets all the Azure Databricks Access Connectors within a subscription. * * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a subscription along with {@link PagedResponse} on + * @return all the Azure Databricks Access Connectors within a subscription along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-05-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets all the azure databricks accessConnectors within a subscription. + * Gets all the Azure Databricks Access Connectors within a subscription. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return all the Azure Databricks Access Connectors within a subscription as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Gets all the azure databricks accessConnectors within a subscription. + * Gets all the Azure Databricks Access Connectors within a subscription. * * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a subscription as paginated response with - * {@link PagedFlux}. + * @return all the Azure Databricks Access Connectors within a subscription along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets all the azure databricks accessConnectors within a subscription. + * Gets all the Azure Databricks Access Connectors within a subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a subscription as paginated response with - * {@link PagedFlux}. + * @return all the Azure Databricks Access Connectors within a subscription along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets all the azure databricks accessConnectors within a subscription. + * Gets all the Azure Databricks Access Connectors within a subscription. * * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a subscription as paginated response with + * @return all the Azure Databricks Access Connectors within a subscription as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * Gets all the azure databricks accessConnectors within a subscription. + * Gets all the Azure Databricks Access Connectors within a subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a subscription as paginated response with + * @return all the Azure Databricks Access Connectors within a subscription as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1188,18 +998,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of azure databricks accessConnector along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return all the Azure Databricks Access Connectors within a resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1209,6 +1012,24 @@ private Mono> listByResourceGroupNextSingleP .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorInfoException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the Azure Databricks Access Connectors within a resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1217,24 +1038,15 @@ private Mono> listByResourceGroupNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of azure databricks accessConnector along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return all the Azure Databricks Access Connectors within a resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1244,18 +1056,11 @@ private Mono> listByResourceGroupNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of azure databricks accessConnector along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return all the Azure Databricks Access Connectors within a subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1265,6 +1070,24 @@ private Mono> listBySubscriptionNextSinglePa .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorInfoException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the Azure Databricks Access Connectors within a subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1273,23 +1096,14 @@ private Mono> listBySubscriptionNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of azure databricks accessConnector along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return all the Azure Databricks Access Connectors within a subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorsImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorsImpl.java index b4f9d174dc76..454f6e29af7e 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorsImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String resourceG Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, connectorName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new AccessConnectorImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AccessConnectorImpl(inner.getValue(), this.manager())); } public AccessConnector getByResourceGroup(String resourceGroupName, String connectorName) { diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AzureDatabricksManagementClientBuilder.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AzureDatabricksManagementClientBuilder.java index ff6d542c4f1f..b0df26178b11 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AzureDatabricksManagementClientBuilder.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AzureDatabricksManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { AzureDatabricksManagementClientImpl.class }) public final class AzureDatabricksManagementClientBuilder { /* - * The ID of the target subscription. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the AzureDatabricksManagementClientBuilder. */ - public AzureDatabricksManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public AzureDatabricksManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the AzureDatabricksManagementClientBuilder. */ - public AzureDatabricksManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public AzureDatabricksManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public AzureDatabricksManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); AzureDatabricksManagementClientImpl client = new AzureDatabricksManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AzureDatabricksManagementClientImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AzureDatabricksManagementClientImpl.java index f26c6d45ee8f..53da03b72671 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AzureDatabricksManagementClientImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AzureDatabricksManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -15,12 +15,15 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.databricks.fluent.AccessConnectorsClient; @@ -46,31 +49,45 @@ @ServiceClient(builder = AzureDatabricksManagementClientBuilder.class) public final class AzureDatabricksManagementClientImpl implements AzureDatabricksManagementClient { /** - * The ID of the target subscription. + * Service host. */ - private final String subscriptionId; + private final String endpoint; /** - * Gets The ID of the target subscription. + * Gets Service host. * - * @return the subscriptionId value. + * @return the endpoint value. */ - public String getSubscriptionId() { - return this.subscriptionId; + public String getEndpoint() { + return this.endpoint; } /** - * server parameter. + * Version parameter. */ - private final String endpoint; + private final String apiVersion; /** - * Gets server parameter. + * Gets Version parameter. * - * @return the endpoint value. + * @return the apiVersion value. */ - public String getEndpoint() { - return this.endpoint; + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; } /** @@ -115,20 +132,6 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** - * The WorkspacesClient object to access its operations. - */ - private final WorkspacesClient workspaces; - - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - public WorkspacesClient getWorkspaces() { - return this.workspaces; - } - /** * The OperationsClient object to access its operations. */ @@ -144,17 +147,17 @@ public OperationsClient getOperations() { } /** - * The PrivateLinkResourcesClient object to access its operations. + * The WorkspacesClient object to access its operations. */ - private final PrivateLinkResourcesClient privateLinkResources; + private final WorkspacesClient workspaces; /** - * Gets the PrivateLinkResourcesClient object to access its operations. + * Gets the WorkspacesClient object to access its operations. * - * @return the PrivateLinkResourcesClient object. + * @return the WorkspacesClient object. */ - public PrivateLinkResourcesClient getPrivateLinkResources() { - return this.privateLinkResources; + public WorkspacesClient getWorkspaces() { + return this.workspaces; } /** @@ -171,6 +174,20 @@ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { return this.privateEndpointConnections; } + /** + * The AccessConnectorsClient object to access its operations. + */ + private final AccessConnectorsClient accessConnectors; + + /** + * Gets the AccessConnectorsClient object to access its operations. + * + * @return the AccessConnectorsClient object. + */ + public AccessConnectorsClient getAccessConnectors() { + return this.accessConnectors; + } + /** * The OutboundNetworkDependenciesEndpointsClient object to access its operations. */ @@ -186,31 +203,31 @@ public OutboundNetworkDependenciesEndpointsClient getOutboundNetworkDependencies } /** - * The VNetPeeringsClient object to access its operations. + * The PrivateLinkResourcesClient object to access its operations. */ - private final VNetPeeringsClient vNetPeerings; + private final PrivateLinkResourcesClient privateLinkResources; /** - * Gets the VNetPeeringsClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the VNetPeeringsClient object. + * @return the PrivateLinkResourcesClient object. */ - public VNetPeeringsClient getVNetPeerings() { - return this.vNetPeerings; + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; } /** - * The AccessConnectorsClient object to access its operations. + * The VNetPeeringsClient object to access its operations. */ - private final AccessConnectorsClient accessConnectors; + private final VNetPeeringsClient vNetPeerings; /** - * Gets the AccessConnectorsClient object to access its operations. + * Gets the VNetPeeringsClient object to access its operations. * - * @return the AccessConnectorsClient object. + * @return the VNetPeeringsClient object. */ - public AccessConnectorsClient getAccessConnectors() { - return this.accessConnectors; + public VNetPeeringsClient getVNetPeerings() { + return this.vNetPeerings; } /** @@ -220,23 +237,24 @@ public AccessConnectorsClient getAccessConnectors() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ AzureDatabricksManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.workspaces = new WorkspacesClientImpl(this); + this.subscriptionId = subscriptionId; + this.apiVersion = "2026-01-01"; this.operations = new OperationsClientImpl(this); - this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); + this.workspaces = new WorkspacesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.accessConnectors = new AccessConnectorsClientImpl(this); this.outboundNetworkDependenciesEndpoints = new OutboundNetworkDependenciesEndpointsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.vNetPeerings = new VNetPeeringsClientImpl(this); - this.accessConnectors = new AccessConnectorsClientImpl(this); } /** @@ -276,6 +294,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/GroupIdInformationImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/GroupIdInformationImpl.java index 1c688c949460..3e46cecfbc62 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/GroupIdInformationImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/GroupIdInformationImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databricks.fluent.models.GroupIdInformationInner; import com.azure.resourcemanager.databricks.models.GroupIdInformation; import com.azure.resourcemanager.databricks.models.GroupIdInformationProperties; @@ -35,6 +36,10 @@ public GroupIdInformationProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public GroupIdInformationInner innerModel() { return this.innerObject; } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OperationImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OperationImpl.java index c65548f9d28b..caa6f0e3ea3a 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OperationImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OperationsClientImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OperationsClientImpl.java index c58cc43f1a0a..d6feb2ee5953 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OperationsClientImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -26,8 +26,8 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.databricks.fluent.OperationsClient; import com.azure.resourcemanager.databricks.fluent.models.OperationInner; +import com.azure.resourcemanager.databricks.implementation.models.OperationListResult; import com.azure.resourcemanager.databricks.models.ErrorInfoException; -import com.azure.resourcemanager.databricks.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +59,21 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for AzureDatabricksManagementClientOperations to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureDatabricksManag") + @Host("{endpoint}") + @ServiceInterface(name = "AzureDatabricksManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Databricks/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.Databricks/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,11 +81,18 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists all of the available RP operations. + * List the operations for the provider. * * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -87,71 +101,63 @@ Mono> listNext(@PathParam(value = "nextLink", enco */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all of the available RP operations. + * List the operations for the provider. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return result of the request to list Resource Provider operations as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Lists all of the available RP operations. + * List the operations for the provider. * * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations as paginated response with {@link PagedFlux}. + * @return result of the request to list Resource Provider operations along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Lists all of the available RP operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations as paginated response with {@link PagedFlux}. + * @return result of the request to list Resource Provider operations along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Lists all of the available RP operations. + * List the operations for the provider. * * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -160,11 +166,11 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * Lists all of the available RP operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -175,7 +181,7 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -190,13 +196,6 @@ public PagedIterable list(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -204,6 +203,24 @@ private Mono> listNextSinglePageAsync(String nextL .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorInfoException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list Resource Provider operations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -212,22 +229,13 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return result of the request to list Resource Provider operations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OperationsImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OperationsImpl.java index 18f952cfa17f..10119110af6c 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OperationsImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundEnvironmentEndpointImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundEnvironmentEndpointImpl.java index cc7ae16deea3..bb10e4fb17ba 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundEnvironmentEndpointImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundEnvironmentEndpointImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundNetworkDependenciesEndpointsClientImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundNetworkDependenciesEndpointsClientImpl.java index b0f72bed9ec0..edcba0a3e27e 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundNetworkDependenciesEndpointsClientImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundNetworkDependenciesEndpointsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -57,16 +57,25 @@ public final class OutboundNetworkDependenciesEndpointsClientImpl * The interface defining all the services for AzureDatabricksManagementClientOutboundNetworkDependenciesEndpoints * to be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureDatabricksManag") + @Host("{endpoint}") + @ServiceInterface(name = "AzureDatabricksManagementClientOutboundNetworkDependenciesEndpoints") public interface OutboundNetworkDependenciesEndpointsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono>> list(@HostParam("$host") String endpoint, + Mono>> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response> listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); } @@ -82,32 +91,18 @@ Mono>> list(@HostParam("$host") * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane along with + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified Workspace. + * + * Gets the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane along with * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> listWithResponseAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, workspaceName, - apiVersion, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -120,51 +115,12 @@ private Mono>> listWithResponseA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listWithResponseAsync(String resourceGroupName, - String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), accept, context); - } - - /** - * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified Workspace. - * - * Gets the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane. You must configure - * outbound access with these endpoints. For more information, see - * https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/udr. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified Workspace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane on successful + * Gets the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -185,13 +141,17 @@ private Mono> listAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane along with + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified Workspace. + * + * Gets the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane along with * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response> listWithResponse(String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + final String accept = "application/json"; + return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, context); } /** @@ -206,7 +166,9 @@ public Response> listWithResponse(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified Workspace. + * + * Gets the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane. */ @ServiceMethod(returns = ReturnType.SINGLE) public List list(String resourceGroupName, String workspaceName) { diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundNetworkDependenciesEndpointsImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundNetworkDependenciesEndpointsImpl.java index ee4107c23c2e..5a66775f8579 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundNetworkDependenciesEndpointsImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundNetworkDependenciesEndpointsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -33,15 +33,11 @@ public Response> listWithResponse(String resou Context context) { Response> inner = this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - inner.getValue() - .stream() - .map(inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + inner.getValue() + .stream() + .map(inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())) + .collect(Collectors.toList())); } public List list(String resourceGroupName, String workspaceName) { diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionImpl.java index 98a1f3c73dfc..8ef86112aa3a 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databricks.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.databricks.models.PrivateEndpointConnection; @@ -37,6 +38,10 @@ public PrivateEndpointConnectionProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public PrivateEndpointConnectionInner innerModel() { return this.innerObject; } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionsClientImpl.java index 6c9bc1cd42cd..3863a86b6157 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -26,14 +26,15 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.databricks.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.databricks.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.databricks.implementation.models.PrivateEndpointConnectionsList; import com.azure.resourcemanager.databricks.models.ErrorInfoException; -import com.azure.resourcemanager.databricks.models.PrivateEndpointConnectionsList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,47 +68,83 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi * The interface defining all the services for AzureDatabricksManagementClientPrivateEndpointConnections to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureDatabricksManag") + @Host("{endpoint}") + @ServiceInterface(name = "AzureDatabricksManagementClientPrivateEndpointConnections") public interface PrivateEndpointConnectionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnection, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response createSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnection, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnection, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -115,165 +152,16 @@ Mono>> delete(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List private endpoint connections - * - * List private endpoint connections of the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private link connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, workspaceName, - apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List private endpoint connections - * - * List private endpoint connections of the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private link connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - /** - * List private endpoint connections - * - * List private endpoint connections of the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private link connections as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List private endpoint connections - * - * List private endpoint connections of the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private link connections as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List private endpoint connections - * - * List private endpoint connections of the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private link connections as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * List private endpoint connections - * - * List private endpoint connections of the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private link connections as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** @@ -287,36 +175,19 @@ public PagedIterable list(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection properties for a workspace along with {@link Response} on successful - * completion of {@link Mono}. + * @return private endpoint connection + * + * Get a private endpoint connection properties for a workspace along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), privateEndpointConnectionName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -328,54 +199,12 @@ private Mono> getWithResponseAsync(Stri * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection properties for a workspace along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), privateEndpointConnectionName, accept, context); - } - - /** - * Get private endpoint connection + * @return private endpoint connection * - * Get a private endpoint connection properties for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection properties for a workspace on successful completion of {@link Mono}. + * Get a private endpoint connection properties for a workspace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String workspaceName, @@ -396,12 +225,16 @@ private Mono getAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection properties for a workspace along with {@link Response}. + * @return private endpoint connection + * + * Get a private endpoint connection properties for a workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, privateEndpointConnectionName, accept, context); } /** @@ -415,7 +248,9 @@ public Response getWithResponse(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection properties for a workspace. + * @return private endpoint connection + * + * Get a private endpoint connection properties for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionInner get(String resourceGroupName, String workspaceName, @@ -442,37 +277,12 @@ public PrivateEndpointConnectionInner get(String resourceGroupName, String works @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (privateEndpointConnection == null) { - return Mono.error( - new IllegalArgumentException("Parameter privateEndpointConnection is required and cannot be null.")); - } else { - privateEndpointConnection.validate(); - } - final String apiVersion = "2023-02-01"; + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, workspaceName, - apiVersion, this.client.getSubscriptionId(), privateEndpointConnectionName, privateEndpointConnection, - accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, + contentType, accept, privateEndpointConnection, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -485,47 +295,19 @@ private Mono>> createWithResponseAsync(String resource * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param privateEndpointConnection The private endpoint connection with updated properties. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection of a workspace along with {@link Response} on successful completion of - * {@link Mono}. + * @return the private endpoint connection of a workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (privateEndpointConnection == null) { - return Mono.error( - new IllegalArgumentException("Parameter privateEndpointConnection is required and cannot be null.")); - } else { - privateEndpointConnection.validate(); - } - final String apiVersion = "2023-02-01"; + private Response createWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), privateEndpointConnectionName, privateEndpointConnection, accept, context); + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, + contentType, accept, privateEndpointConnection, Context.NONE); } /** @@ -537,20 +319,21 @@ private Mono>> createWithResponseAsync(String resource * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param privateEndpointConnection The private endpoint connection with updated properties. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the private endpoint connection of a workspace. + * @return the private endpoint connection of a workspace along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateEndpointConnectionInner> beginCreateAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnection) { - Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, - privateEndpointConnectionName, privateEndpointConnection); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, + contentType, accept, privateEndpointConnection, context); } /** @@ -562,7 +345,6 @@ private PollerFlux, PrivateEndpointCo * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param privateEndpointConnection The private endpoint connection with updated properties. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -571,13 +353,12 @@ private PollerFlux, PrivateEndpointCo @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginCreateAsync( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnection, Context context) { - context = this.client.mergeContext(context); + PrivateEndpointConnectionInner privateEndpointConnection) { Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, - privateEndpointConnectionName, privateEndpointConnection, context); + privateEndpointConnectionName, privateEndpointConnection); return this.client.getLroResult(mono, this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - context); + this.client.getContext()); } /** @@ -598,10 +379,10 @@ private PollerFlux, PrivateEndpointCo public SyncPoller, PrivateEndpointConnectionInner> beginCreate( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { - return this - .beginCreateAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, - privateEndpointConnection) - .getSyncPoller(); + Response response = createWithResponse(resourceGroupName, workspaceName, + privateEndpointConnectionName, privateEndpointConnection); + return this.client.getLroResult(response, + PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, Context.NONE); } /** @@ -623,10 +404,10 @@ public SyncPoller, PrivateEndpointCon public SyncPoller, PrivateEndpointConnectionInner> beginCreate( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, Context context) { - return this - .beginCreateAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, - privateEndpointConnection, context) - .getSyncPoller(); + Response response = createWithResponse(resourceGroupName, workspaceName, + privateEndpointConnectionName, privateEndpointConnection, context); + return this.client.getLroResult(response, + PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, context); } /** @@ -650,29 +431,6 @@ private Mono createAsync(String resourceGroupNam privateEndpointConnection).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Update private endpoint connection status - * - * Update the status of a private endpoint connection with the specified name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param privateEndpointConnection The private endpoint connection with updated properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connection of a workspace on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, - Context context) { - return beginCreateAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, - privateEndpointConnection, context).last().flatMap(this.client::getLroFinalResultOrError); - } - /** * Update private endpoint connection status * @@ -690,8 +448,8 @@ private Mono createAsync(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionInner create(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { - return createAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, privateEndpointConnection) - .block(); + return beginCreate(resourceGroupName, workspaceName, privateEndpointConnectionName, privateEndpointConnection) + .getFinalResult(); } /** @@ -713,8 +471,8 @@ public PrivateEndpointConnectionInner create(String resourceGroupName, String wo public PrivateEndpointConnectionInner create(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, Context context) { - return createAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, privateEndpointConnection, - context).block(); + return beginCreate(resourceGroupName, workspaceName, privateEndpointConnectionName, privateEndpointConnection, + context).getFinalResult(); } /** @@ -733,30 +491,8 @@ public PrivateEndpointConnectionInner create(String resourceGroupName, String wo @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, - apiVersion, this.client.getSubscriptionId(), privateEndpointConnectionName, accept, context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -768,39 +504,17 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), privateEndpointConnectionName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, + Context.NONE); } /** @@ -811,18 +525,17 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, context); } /** @@ -833,7 +546,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -841,12 +553,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context) { - context = this.client.mergeContext(context); + String privateEndpointConnectionName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context); + = deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -865,7 +576,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -885,8 +598,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -917,17 +631,13 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + beginDelete(resourceGroupName, workspaceName, privateEndpointConnectionName).getFinalResult(); } /** @@ -938,35 +648,148 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - deleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).block(); + public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, + Context context) { + beginDelete(resourceGroupName, workspaceName, privateEndpointConnectionName, context).getFinalResult(); } /** - * Remove private endpoint connection + * List private endpoint connections * - * Remove private endpoint connection with the specified name. + * List private endpoint connections of the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorInfoException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private link connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List private endpoint connections + * + * List private endpoint connections of the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorInfoException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private link connections as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List private endpoint connections + * + * List private endpoint connections of the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorInfoException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private link connections along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List private endpoint connections + * + * List private endpoint connections of the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private link connections along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, Context context) { - deleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).block(); + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * List private endpoint connections + * + * List private endpoint connections of the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorInfoException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private link connections as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List private endpoint connections + * + * List private endpoint connections of the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorInfoException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private link connections as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * List private endpoint connections + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -978,13 +801,6 @@ public void delete(String resourceGroupName, String workspaceName, String privat */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -993,6 +809,28 @@ private Mono> listNextSinglePageAs } /** + * List private endpoint connections + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorInfoException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private link connections along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List private endpoint connections + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1000,23 +838,14 @@ private Mono> listNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private link connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of private link connections along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionsImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionsImpl.java index ef81c5bf6c9d..e48fe8dd50d1 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -27,29 +27,12 @@ public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClie this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); } public PrivateEndpointConnection get(String resourceGroupName, String workspaceName, @@ -72,6 +55,19 @@ public void delete(String resourceGroupName, String workspaceName, String privat this.serviceClient().delete(resourceGroupName, workspaceName, privateEndpointConnectionName, context); } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + public PrivateEndpointConnection getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateLinkResourcesClientImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateLinkResourcesClientImpl.java index 8486ff13edb7..180f4f765213 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateLinkResourcesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -26,8 +26,8 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.databricks.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.databricks.fluent.models.GroupIdInformationInner; +import com.azure.resourcemanager.databricks.implementation.models.PrivateLinkResourcesList; import com.azure.resourcemanager.databricks.models.ErrorInfoException; -import com.azure.resourcemanager.databricks.models.PrivateLinkResourcesList; import reactor.core.publisher.Mono; /** @@ -59,155 +59,151 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource * The interface defining all the services for AzureDatabricksManagementClientPrivateLinkResources to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureDatabricksManag") + @Host("{endpoint}") + @ServiceInterface(name = "AzureDatabricksManagementClientPrivateLinkResources") public interface PrivateLinkResourcesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources/{groupId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("groupId") String groupId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources/{groupId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("groupId") String groupId, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List private link resources + * Get the specified private link resource * - * List private link resources for a given workspace. + * Get the specified private link resource for the given group id (sub-resource). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param groupId The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available private link resources for a workspace along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the specified private link resource + * + * Get the specified private link resource for the given group id (sub-resource) along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String groupId) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, workspaceName, - apiVersion, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, groupId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List private link resources + * Get the specified private link resource * - * List private link resources for a given workspace. + * Get the specified private link resource for the given group id (sub-resource). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. + * @param groupId The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available private link resources for a workspace along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the specified private link resource + * + * Get the specified private link resource for the given group id (sub-resource) on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String workspaceName, String groupId) { + return getWithResponseAsync(resourceGroupName, workspaceName, groupId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List private link resources + * Get the specified private link resource * - * List private link resources for a given workspace. + * Get the specified private link resource for the given group id (sub-resource). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param groupId The name of the private link resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available private link resources for a workspace as paginated response with {@link PagedFlux}. + * @return the specified private link resource + * + * Get the specified private link resource for the given group id (sub-resource) along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String groupId, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, groupId, accept, context); } /** - * List private link resources + * Get the specified private link resource * - * List private link resources for a given workspace. + * Get the specified private link resource for the given group id (sub-resource). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. + * @param groupId The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available private link resources for a workspace as paginated response with {@link PagedFlux}. + * @return the specified private link resource + * + * Get the specified private link resource for the given group id (sub-resource). */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public GroupIdInformationInner get(String resourceGroupName, String workspaceName, String groupId) { + return getWithResponse(resourceGroupName, workspaceName, groupId, Context.NONE).getValue(); } /** @@ -220,11 +216,19 @@ private PagedFlux listAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available private link resources for a workspace as paginated response with {@link PagedIterable}. + * @return the available private link resources for a workspace along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -234,189 +238,145 @@ public PagedIterable list(String resourceGroupName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available private link resources for a workspace as paginated response with {@link PagedIterable}. + * @return the available private link resources for a workspace as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get the specified private link resource + * List private link resources * - * Get the specified private link resource for the given group id (sub-resource). + * List private link resources for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param groupId The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private link resource for the given group id (sub-resource) along with {@link Response} on - * successful completion of {@link Mono}. + * @return the available private link resources for a workspace along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String groupId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupId == null) { - return Mono.error(new IllegalArgumentException("Parameter groupId is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), groupId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get the specified private link resource + * List private link resources * - * Get the specified private link resource for the given group id (sub-resource). + * List private link resources for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param groupId The name of the private link resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private link resource for the given group id (sub-resource) along with {@link Response} on - * successful completion of {@link Mono}. + * @return the available private link resources for a workspace along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String groupId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (groupId == null) { - return Mono.error(new IllegalArgumentException("Parameter groupId is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), groupId, accept, context); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get the specified private link resource + * List private link resources * - * Get the specified private link resource for the given group id (sub-resource). + * List private link resources for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param groupId The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private link resource for the given group id (sub-resource) on successful completion of - * {@link Mono}. + * @return the available private link resources for a workspace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String groupId) { - return getWithResponseAsync(resourceGroupName, workspaceName, groupId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName), + nextLink -> listNextSinglePage(nextLink)); } /** - * Get the specified private link resource + * List private link resources * - * Get the specified private link resource for the given group id (sub-resource). + * List private link resources for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param groupId The name of the private link resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private link resource for the given group id (sub-resource) along with {@link Response}. + * @return the available private link resources for a workspace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String groupId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, groupId, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Get the specified private link resource + * List private link resources * - * Get the specified private link resource for the given group id (sub-resource). + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param groupId The name of the private link resource. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private link resource for the given group id (sub-resource). + * @return the available private link resources for a workspace along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GroupIdInformationInner get(String resourceGroupName, String workspaceName, String groupId) { - return getWithResponse(resourceGroupName, workspaceName, groupId, Context.NONE).getValue(); + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List private link resources + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available private link resources for a workspace along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the available private link resources for a workspace along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * List private link resources + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -424,22 +384,14 @@ private Mono> listNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available private link resources for a workspace along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the available private link resources for a workspace along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateLinkResourcesImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateLinkResourcesImpl.java index eb2dcaaf167d..8e6e5852aba2 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateLinkResourcesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -27,27 +27,12 @@ public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new GroupIdInformationImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new GroupIdInformationImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String workspaceName, String groupId, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, groupId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new GroupIdInformationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GroupIdInformationImpl(inner.getValue(), this.manager())); } public GroupIdInformation get(String resourceGroupName, String workspaceName, String groupId) { @@ -59,6 +44,17 @@ public GroupIdInformation get(String resourceGroupName, String workspaceName, St } } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GroupIdInformationImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GroupIdInformationImpl(inner1, this.manager())); + } + private PrivateLinkResourcesClient serviceClient() { return this.innerClient; } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/ResourceManagerUtils.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/ResourceManagerUtils.java index 692355bc8549..9dec3edab2d8 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/ResourceManagerUtils.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/VNetPeeringsClientImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/VNetPeeringsClientImpl.java index 3e436a96bc4f..ef72e804a1c5 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/VNetPeeringsClientImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/VNetPeeringsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -26,14 +26,15 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.databricks.fluent.VNetPeeringsClient; import com.azure.resourcemanager.databricks.fluent.models.VirtualNetworkPeeringInner; +import com.azure.resourcemanager.databricks.implementation.models.VirtualNetworkPeeringList; import com.azure.resourcemanager.databricks.models.ErrorInfoException; -import com.azure.resourcemanager.databricks.models.VirtualNetworkPeeringList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,45 +68,81 @@ public final class VNetPeeringsClientImpl implements VNetPeeringsClient { * The interface defining all the services for AzureDatabricksManagementClientVNetPeerings to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureDatabricksManag") + @Host("{endpoint}") + @ServiceInterface(name = "AzureDatabricksManagementClientVNetPeerings") public interface VNetPeeringsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("peeringName") String peeringName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("peeringName") String peeringName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("peeringName") String peeringName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualNetworkPeeringInner virtualNetworkPeeringParameters, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("peeringName") String peeringName, - @BodyParam("application/json") VirtualNetworkPeeringInner virtualNetworkPeeringParameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("peeringName") String peeringName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualNetworkPeeringInner virtualNetworkPeeringParameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("peeringName") String peeringName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("peeringName") String peeringName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono> listByWorkspace(@HostParam("$host") String endpoint, + Mono> listByWorkspace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listByWorkspaceSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -113,7 +150,15 @@ Mono> listByWorkspace(@HostParam("$host") St @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) Mono> listByWorkspaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listByWorkspaceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -131,72 +176,13 @@ Mono> listByWorkspaceNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, String peeringName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (peeringName == null) { - return Mono.error(new IllegalArgumentException("Parameter peeringName is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), peeringName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, peeringName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Gets the workspace vNet Peering. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param peeringName The name of the workspace vNet peering. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the workspace vNet Peering along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String peeringName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (peeringName == null) { - return Mono.error(new IllegalArgumentException("Parameter peeringName is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), peeringName, accept, context); - } - /** * Gets the workspace vNet Peering. * @@ -230,7 +216,9 @@ private Mono getAsync(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String workspaceName, String peeringName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, peeringName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, peeringName, accept, context); } /** @@ -250,210 +238,200 @@ public VirtualNetworkPeeringInner get(String resourceGroupName, String workspace } /** - * Deletes the workspace vNetPeering. + * Creates vNet Peering for workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return peerings in a VirtualNetwork resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String peeringName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (peeringName == null) { - return Mono.error(new IllegalArgumentException("Parameter peeringName is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String peeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, - apiVersion, this.client.getSubscriptionId(), peeringName, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, peeringName, contentType, accept, + virtualNetworkPeeringParameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes the workspace vNetPeering. + * Creates vNet Peering for workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param context The context to associate with this operation. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return peerings in a VirtualNetwork resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String peeringName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (peeringName == null) { - return Mono.error(new IllegalArgumentException("Parameter peeringName is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String peeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), peeringName, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, peeringName, contentType, accept, + virtualNetworkPeeringParameters, Context.NONE); } /** - * Deletes the workspace vNetPeering. + * Creates vNet Peering for workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return peerings in a VirtualNetwork resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String peeringName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, peeringName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String peeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, peeringName, contentType, accept, + virtualNetworkPeeringParameters, context); } /** - * Deletes the workspace vNetPeering. + * Creates vNet Peering for workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param context The context to associate with this operation. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of peerings in a VirtualNetwork resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String peeringName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, peeringName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + private PollerFlux, VirtualNetworkPeeringInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String peeringName, + VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, + peeringName, virtualNetworkPeeringParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualNetworkPeeringInner.class, VirtualNetworkPeeringInner.class, + this.client.getContext()); } /** - * Deletes the workspace vNetPeering. + * Creates vNet Peering for workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of peerings in a VirtualNetwork resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String peeringName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, peeringName).getSyncPoller(); + public SyncPoller, VirtualNetworkPeeringInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String peeringName, + VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, peeringName, + virtualNetworkPeeringParameters); + return this.client.getLroResult(response, + VirtualNetworkPeeringInner.class, VirtualNetworkPeeringInner.class, Context.NONE); } /** - * Deletes the workspace vNetPeering. + * Creates vNet Peering for workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of peerings in a VirtualNetwork resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String peeringName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, peeringName, context).getSyncPoller(); + public SyncPoller, VirtualNetworkPeeringInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String peeringName, + VirtualNetworkPeeringInner virtualNetworkPeeringParameters, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, peeringName, + virtualNetworkPeeringParameters, context); + return this.client.getLroResult(response, + VirtualNetworkPeeringInner.class, VirtualNetworkPeeringInner.class, context); } /** - * Deletes the workspace vNetPeering. + * Creates vNet Peering for workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return peerings in a VirtualNetwork resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String peeringName) { - return beginDeleteAsync(resourceGroupName, workspaceName, peeringName).last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String peeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, peeringName, virtualNetworkPeeringParameters) + .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes the workspace vNetPeering. + * Creates vNet Peering for workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param context The context to associate with this operation. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return peerings in a VirtualNetwork resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String peeringName, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, peeringName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public VirtualNetworkPeeringInner createOrUpdate(String resourceGroupName, String workspaceName, String peeringName, + VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, peeringName, virtualNetworkPeeringParameters) + .getFinalResult(); } /** - * Deletes the workspace vNetPeering. + * Creates vNet Peering for workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. + * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return peerings in a VirtualNetwork resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String peeringName) { - deleteAsync(resourceGroupName, workspaceName, peeringName).block(); + public VirtualNetworkPeeringInner createOrUpdate(String resourceGroupName, String workspaceName, String peeringName, + VirtualNetworkPeeringInner virtualNetworkPeeringParameters, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, peeringName, virtualNetworkPeeringParameters, + context).getFinalResult(); } /** @@ -462,282 +440,159 @@ public void delete(String resourceGroupName, String workspaceName, String peerin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String peeringName, Context context) { - deleteAsync(resourceGroupName, workspaceName, peeringName, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String peeringName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, peeringName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates vNet Peering for workspace. + * Deletes the workspace vNetPeering. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return peerings in a VirtualNetwork resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String peeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (peeringName == null) { - return Mono.error(new IllegalArgumentException("Parameter peeringName is required and cannot be null.")); - } - if (virtualNetworkPeeringParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter virtualNetworkPeeringParameters is required and cannot be null.")); - } else { - virtualNetworkPeeringParameters.validate(); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, workspaceName, - apiVersion, this.client.getSubscriptionId(), peeringName, virtualNetworkPeeringParameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String peeringName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, peeringName, Context.NONE); } /** - * Creates vNet Peering for workspace. + * Deletes the workspace vNetPeering. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return peerings in a VirtualNetwork resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String peeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters, + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String peeringName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (peeringName == null) { - return Mono.error(new IllegalArgumentException("Parameter peeringName is required and cannot be null.")); - } - if (virtualNetworkPeeringParameters == null) { - return Mono.error(new IllegalArgumentException( - "Parameter virtualNetworkPeeringParameters is required and cannot be null.")); - } else { - virtualNetworkPeeringParameters.validate(); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), peeringName, virtualNetworkPeeringParameters, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, peeringName, context); } /** - * Creates vNet Peering for workspace. + * Deletes the workspace vNetPeering. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of peerings in a VirtualNetwork resource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualNetworkPeeringInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String peeringName, - VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, - peeringName, virtualNetworkPeeringParameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), VirtualNetworkPeeringInner.class, VirtualNetworkPeeringInner.class, + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String peeringName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, peeringName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Creates vNet Peering for workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of peerings in a VirtualNetwork resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualNetworkPeeringInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String peeringName, - VirtualNetworkPeeringInner virtualNetworkPeeringParameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, - peeringName, virtualNetworkPeeringParameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), VirtualNetworkPeeringInner.class, VirtualNetworkPeeringInner.class, context); - } - - /** - * Creates vNet Peering for workspace. + * Deletes the workspace vNetPeering. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of peerings in a VirtualNetwork resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualNetworkPeeringInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String peeringName, - VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, peeringName, virtualNetworkPeeringParameters) - .getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String peeringName) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, peeringName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Creates vNet Peering for workspace. + * Deletes the workspace vNetPeering. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of peerings in a VirtualNetwork resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualNetworkPeeringInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String peeringName, - VirtualNetworkPeeringInner virtualNetworkPeeringParameters, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, peeringName, virtualNetworkPeeringParameters, - context) - .getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String peeringName, Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, peeringName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Creates vNet Peering for workspace. + * Deletes the workspace vNetPeering. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return peerings in a VirtualNetwork resource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String peeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, peeringName, virtualNetworkPeeringParameters) - .last() + private Mono deleteAsync(String resourceGroupName, String workspaceName, String peeringName) { + return beginDeleteAsync(resourceGroupName, workspaceName, peeringName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates vNet Peering for workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return peerings in a VirtualNetwork resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String peeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, peeringName, virtualNetworkPeeringParameters, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates vNet Peering for workspace. + * Deletes the workspace vNetPeering. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return peerings in a VirtualNetwork resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkPeeringInner createOrUpdate(String resourceGroupName, String workspaceName, String peeringName, - VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, peeringName, virtualNetworkPeeringParameters) - .block(); + public void delete(String resourceGroupName, String workspaceName, String peeringName) { + beginDelete(resourceGroupName, workspaceName, peeringName).getFinalResult(); } /** - * Creates vNet Peering for workspace. + * Deletes the workspace vNetPeering. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param peeringName The name of the workspace vNet peering. - * @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return peerings in a VirtualNetwork resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkPeeringInner createOrUpdate(String resourceGroupName, String workspaceName, String peeringName, - VirtualNetworkPeeringInner virtualNetworkPeeringParameters, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, peeringName, virtualNetworkPeeringParameters, - context).block(); + public void delete(String resourceGroupName, String workspaceName, String peeringName, Context context) { + beginDelete(resourceGroupName, workspaceName, peeringName, context).getFinalResult(); } /** @@ -754,26 +609,10 @@ public VirtualNetworkPeeringInner createOrUpdate(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByWorkspace(this.client.getEndpoint(), resourceGroupName, workspaceName, - apiVersion, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.listByWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -784,39 +623,15 @@ private Mono> listByWorkspaceSinglePag * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return gets all virtual network peerings under a workspace along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return gets all virtual network peerings under a workspace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, - String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByWorkspace(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), + nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); } /** @@ -827,12 +642,17 @@ private Mono> listByWorkspaceSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return gets all virtual network peerings under a workspace as paginated response with {@link PagedFlux}. + * @return gets all virtual network peerings under a workspace along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByWorkspaceSinglePage(String resourceGroupName, + String workspaceName) { + final String accept = "application/json"; + Response res + = service.listByWorkspaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -844,13 +664,17 @@ private PagedFlux listByWorkspaceAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return gets all virtual network peerings under a workspace as paginated response with {@link PagedFlux}. + * @return gets all virtual network peerings under a workspace along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, - Context context) { - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByWorkspaceSinglePage(String resourceGroupName, + String workspaceName, Context context) { + final String accept = "application/json"; + Response res + = service.listByWorkspaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -865,7 +689,8 @@ private PagedFlux listByWorkspaceAsync(String resour */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName)); + return new PagedIterable<>(() -> listByWorkspaceSinglePage(resourceGroupName, workspaceName), + nextLink -> listByWorkspaceNextSinglePage(nextLink)); } /** @@ -882,7 +707,8 @@ public PagedIterable listByWorkspace(String resource @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, context)); + return new PagedIterable<>(() -> listByWorkspaceSinglePage(resourceGroupName, workspaceName, context), + nextLink -> listByWorkspaceNextSinglePage(nextLink, context)); } /** @@ -897,13 +723,6 @@ public PagedIterable listByWorkspace(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByWorkspaceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -912,6 +731,24 @@ private Mono> listByWorkspaceNextSingl .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorInfoException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return gets all virtual network peerings under a workspace along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByWorkspaceNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByWorkspaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -920,23 +757,14 @@ private Mono> listByWorkspaceNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return gets all virtual network peerings under a workspace along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return gets all virtual network peerings under a workspace along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByWorkspaceNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByWorkspaceNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/VNetPeeringsImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/VNetPeeringsImpl.java index 78443080fe76..327bffc54016 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/VNetPeeringsImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/VNetPeeringsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -31,12 +31,8 @@ public Response getWithResponse(String resourceGroupName, String peeringName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, peeringName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VirtualNetworkPeeringImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VirtualNetworkPeeringImpl(inner.getValue(), this.manager())); } public VirtualNetworkPeering get(String resourceGroupName, String workspaceName, String peeringName) { diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/VirtualNetworkPeeringImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/VirtualNetworkPeeringImpl.java index b8ffab938e90..a059a4198d88 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/VirtualNetworkPeeringImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/VirtualNetworkPeeringImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databricks.fluent.models.VirtualNetworkPeeringInner; import com.azure.resourcemanager.databricks.models.AddressSpace; @@ -31,6 +32,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Boolean allowVirtualNetworkAccess() { return this.innerModel().allowVirtualNetworkAccess(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspaceImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspaceImpl.java index 0ac95c472749..352ca100d458 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspaceImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspaceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -9,7 +9,11 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.databricks.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.databricks.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.databricks.models.ComputeMode; import com.azure.resourcemanager.databricks.models.CreatedBy; +import com.azure.resourcemanager.databricks.models.DefaultCatalogProperties; +import com.azure.resourcemanager.databricks.models.DefaultStorageFirewall; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityComplianceDefinition; import com.azure.resourcemanager.databricks.models.ManagedIdentityConfiguration; import com.azure.resourcemanager.databricks.models.PrivateEndpointConnection; import com.azure.resourcemanager.databricks.models.ProvisioningState; @@ -18,6 +22,7 @@ import com.azure.resourcemanager.databricks.models.Sku; import com.azure.resourcemanager.databricks.models.Workspace; import com.azure.resourcemanager.databricks.models.WorkspaceCustomParameters; +import com.azure.resourcemanager.databricks.models.WorkspacePropertiesAccessConnector; import com.azure.resourcemanager.databricks.models.WorkspacePropertiesEncryption; import com.azure.resourcemanager.databricks.models.WorkspaceProviderAuthorization; import com.azure.resourcemanager.databricks.models.WorkspaceUpdate; @@ -65,6 +70,10 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public ComputeMode computeMode() { + return this.innerModel().computeMode(); + } + public String managedResourceGroupId() { return this.innerModel().managedResourceGroupId(); } @@ -126,6 +135,10 @@ public WorkspacePropertiesEncryption encryption() { return this.innerModel().encryption(); } + public EnhancedSecurityComplianceDefinition enhancedSecurityCompliance() { + return this.innerModel().enhancedSecurityCompliance(); + } + public List privateEndpointConnections() { List inner = this.innerModel().privateEndpointConnections(); if (inner != null) { @@ -145,6 +158,22 @@ public RequiredNsgRules requiredNsgRules() { return this.innerModel().requiredNsgRules(); } + public DefaultCatalogProperties defaultCatalog() { + return this.innerModel().defaultCatalog(); + } + + public Boolean isUcEnabled() { + return this.innerModel().isUcEnabled(); + } + + public WorkspacePropertiesAccessConnector accessConnector() { + return this.innerModel().accessConnector(); + } + + public DefaultStorageFirewall defaultStorageFirewall() { + return this.innerModel().defaultStorageFirewall(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -249,8 +278,8 @@ public WorkspaceImpl withRegion(String location) { return this; } - public WorkspaceImpl withManagedResourceGroupId(String managedResourceGroupId) { - this.innerModel().withManagedResourceGroupId(managedResourceGroupId); + public WorkspaceImpl withComputeMode(ComputeMode computeMode) { + this.innerModel().withComputeMode(computeMode); return this; } @@ -269,6 +298,11 @@ public WorkspaceImpl withSku(Sku sku) { return this; } + public WorkspaceImpl withManagedResourceGroupId(String managedResourceGroupId) { + this.innerModel().withManagedResourceGroupId(managedResourceGroupId); + return this; + } + public WorkspaceImpl withParameters(WorkspaceCustomParameters parameters) { this.innerModel().withParameters(parameters); return this; @@ -309,6 +343,12 @@ public WorkspaceImpl withEncryption(WorkspacePropertiesEncryption encryption) { return this; } + public WorkspaceImpl + withEnhancedSecurityCompliance(EnhancedSecurityComplianceDefinition enhancedSecurityCompliance) { + this.innerModel().withEnhancedSecurityCompliance(enhancedSecurityCompliance); + return this; + } + public WorkspaceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { this.innerModel().withPublicNetworkAccess(publicNetworkAccess); return this; @@ -319,7 +359,22 @@ public WorkspaceImpl withRequiredNsgRules(RequiredNsgRules requiredNsgRules) { return this; } + public WorkspaceImpl withDefaultCatalog(DefaultCatalogProperties defaultCatalog) { + this.innerModel().withDefaultCatalog(defaultCatalog); + return this; + } + + public WorkspaceImpl withAccessConnector(WorkspacePropertiesAccessConnector accessConnector) { + this.innerModel().withAccessConnector(accessConnector); + return this; + } + + public WorkspaceImpl withDefaultStorageFirewall(DefaultStorageFirewall defaultStorageFirewall) { + this.innerModel().withDefaultStorageFirewall(defaultStorageFirewall); + return this; + } + private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspacesClientImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspacesClientImpl.java index 3e287b00e8f9..1a8ed3df283a 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspacesClientImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspacesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -27,14 +27,15 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.databricks.fluent.WorkspacesClient; import com.azure.resourcemanager.databricks.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.databricks.implementation.models.WorkspaceListResult; import com.azure.resourcemanager.databricks.models.ErrorInfoException; -import com.azure.resourcemanager.databricks.models.WorkspaceListResult; import com.azure.resourcemanager.databricks.models.WorkspaceUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -69,60 +70,112 @@ public final class WorkspacesClientImpl implements WorkspacesClient { * The interface defining all the services for AzureDatabricksManagementClientWorkspaces to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureDatabricksManag") + @Host("{endpoint}") + @ServiceInterface(name = "AzureDatabricksManagementClientWorkspaces") public interface WorkspacesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceInner parameters, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") WorkspaceInner parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceInner parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceUpdate parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono>> update(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceUpdate parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") WorkspaceUpdate parameters, @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("forceDeletion") Boolean forceDeletion, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("forceDeletion") Boolean forceDeletion, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Databricks/workspaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Databricks/workspaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) - Mono> list(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -131,7 +184,15 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -139,7 +200,15 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ErrorInfoException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ErrorInfoException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -156,65 +225,13 @@ Mono> listBySubscriptionNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - workspaceName, apiVersion, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Gets the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorInfoException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the workspace along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), accept, context); - } - /** * Gets the workspace. * @@ -245,7 +262,9 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); } /** @@ -264,667 +283,580 @@ public WorkspaceInner getByResourceGroup(String resourceGroupName, String worksp } /** - * Deletes the workspace. + * Creates a new workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param parameters Parameters supplied to the create or update a workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return information about workspace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, WorkspaceInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, - apiVersion, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes the workspace. + * Creates a new workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. + * @param parameters Parameters supplied to the create or update a workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return information about workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, parameters, + Context.NONE); } /** - * Deletes the workspace. + * Creates a new workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param parameters Parameters supplied to the create or update a workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return information about workspace along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceInner parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, parameters, + context); } /** - * Deletes the workspace. + * Creates a new workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. + * @param parameters Parameters supplied to the create or update a workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of information about workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, + String workspaceName, WorkspaceInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); } /** - * Deletes the workspace. + * Creates a new workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param parameters Parameters supplied to the create or update a workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of information about workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName).getSyncPoller(); + public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, WorkspaceInner parameters) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, parameters); + return this.client.getLroResult(response, WorkspaceInner.class, + WorkspaceInner.class, Context.NONE); } /** - * Deletes the workspace. + * Creates a new workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param parameters Parameters supplied to the create or update a workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of information about workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, context).getSyncPoller(); + public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, WorkspaceInner parameters, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, parameters, context); + return this.client.getLroResult(response, WorkspaceInner.class, + WorkspaceInner.class, context); } /** - * Deletes the workspace. + * Creates a new workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param parameters Parameters supplied to the create or update a workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return information about workspace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName) { - return beginDeleteAsync(resourceGroupName, workspaceName).last().flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + WorkspaceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes the workspace. + * Creates a new workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. + * @param parameters Parameters supplied to the create or update a workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return information about workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, parameters).getFinalResult(); } /** - * Deletes the workspace. + * Creates a new workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param parameters Parameters supplied to the create or update a workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName) { - deleteAsync(resourceGroupName, workspaceName).block(); + public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters, + Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, parameters, context).getFinalResult(); } /** - * Deletes the workspace. + * Updates a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. + * @param parameters The update to the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about workspace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, Context context) { - deleteAsync(resourceGroupName, workspaceName, context).block(); + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + WorkspaceUpdate parameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, parameters, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a new workspace. + * Updates a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. + * @param parameters The update to the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace along with {@link Response} on successful completion of {@link Mono}. + * @return information about workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2023-02-01"; + private Response updateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceUpdate parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, workspaceName, - apiVersion, this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, parameters, + Context.NONE); } /** - * Creates a new workspace. + * Updates a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. + * @param parameters The update to the workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace along with {@link Response} on successful completion of {@link Mono}. + * @return information about workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2023-02-01"; + private Response updateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceUpdate parameters, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, parameters, + context); } /** - * Creates a new workspace. + * Updates a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. + * @param parameters The update to the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of information about workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, parameters); + private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, WorkspaceUpdate parameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); } /** - * Creates a new workspace. + * Updates a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. - * @param context The context to associate with this operation. + * @param parameters The update to the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of information about workspace. + * @return the {@link SyncPoller} for polling of information about workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, context); + public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, + String workspaceName, WorkspaceUpdate parameters) { + Response response = updateWithResponse(resourceGroupName, workspaceName, parameters); + return this.client.getLroResult(response, WorkspaceInner.class, + WorkspaceInner.class, Context.NONE); } /** - * Creates a new workspace. + * Updates a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. + * @param parameters The update to the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of information about workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); + public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, + String workspaceName, WorkspaceUpdate parameters, Context context) { + Response response = updateWithResponse(resourceGroupName, workspaceName, parameters, context); + return this.client.getLroResult(response, WorkspaceInner.class, + WorkspaceInner.class, context); } /** - * Creates a new workspace. + * Updates a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. - * @param context The context to associate with this operation. + * @param parameters The update to the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about workspace. + * @return information about workspace on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String workspaceName, + WorkspaceUpdate parameters) { + return beginUpdateAsync(resourceGroupName, workspaceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new workspace. + * Updates a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. + * @param parameters The update to the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace on successful completion of {@link Mono}. + * @return information about workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - WorkspaceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate parameters) { + return beginUpdate(resourceGroupName, workspaceName, parameters).getFinalResult(); } /** - * Creates a new workspace. + * Updates a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. + * @param parameters The update to the workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace on successful completion of {@link Mono}. + * @return information about workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - WorkspaceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate parameters, + Context context) { + return beginUpdate(resourceGroupName, workspaceName, parameters, context).getFinalResult(); } /** - * Creates a new workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. + * @param forceDeletion Optional parameter to retain default unity catalog data. By default the data will retained + * if Uc is enabled on the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, parameters).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + Boolean forceDeletion) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, forceDeletion, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a new workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters Parameters supplied to the create or update a workspace. - * @param context The context to associate with this operation. + * @param forceDeletion Optional parameter to retain default unity catalog data. By default the data will retained + * if Uc is enabled on the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters, - Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).block(); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + Boolean forceDeletion) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, forceDeletion, Context.NONE); } /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. + * @param forceDeletion Optional parameter to retain default unity catalog data. By default the data will retained + * if Uc is enabled on the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdate parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, workspaceName, - apiVersion, this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + Boolean forceDeletion, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, forceDeletion, context); } /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. - * @param context The context to associate with this operation. + * @param forceDeletion Optional parameter to retain default unity catalog data. By default the data will retained + * if Uc is enabled on the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdate parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, workspaceName, apiVersion, - this.client.getSubscriptionId(), parameters, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + Boolean forceDeletion) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, forceDeletion); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of information about workspace. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceUpdate parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { + final Boolean forceDeletion = null; + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, forceDeletion); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. - * @param context The context to associate with this operation. + * @param forceDeletion Optional parameter to retain default unity catalog data. By default the data will retained + * if Uc is enabled on the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of information about workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceUpdate parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + Boolean forceDeletion) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, forceDeletion); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, - String workspaceName, WorkspaceUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName) { + final Boolean forceDeletion = null; + Response response = deleteWithResponse(resourceGroupName, workspaceName, forceDeletion); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. + * @param forceDeletion Optional parameter to retain default unity catalog data. By default the data will retained + * if Uc is enabled on the workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, - String workspaceName, WorkspaceUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + Boolean forceDeletion, Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, forceDeletion, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. + * @param forceDeletion Optional parameter to retain default unity catalog data. By default the data will retained + * if Uc is enabled on the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdate parameters) { - return beginUpdateAsync(resourceGroupName, workspaceName, parameters).last() + private Mono deleteAsync(String resourceGroupName, String workspaceName, Boolean forceDeletion) { + return beginDeleteAsync(resourceGroupName, workspaceName, forceDeletion).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, WorkspaceUpdate parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, parameters, context).last() + private Mono deleteAsync(String resourceGroupName, String workspaceName) { + final Boolean forceDeletion = null; + return beginDeleteAsync(resourceGroupName, workspaceName, forceDeletion).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate parameters) { - return updateAsync(resourceGroupName, workspaceName, parameters).block(); + public void delete(String resourceGroupName, String workspaceName) { + final Boolean forceDeletion = null; + beginDelete(resourceGroupName, workspaceName, forceDeletion).getFinalResult(); } /** - * Updates a workspace. + * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param parameters The update to the workspace. + * @param forceDeletion Optional parameter to retain default unity catalog data. By default the data will retained + * if Uc is enabled on the workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdate parameters, - Context context) { - return updateAsync(resourceGroupName, workspaceName, parameters, context).block(); + public void delete(String resourceGroupName, String workspaceName, Boolean forceDeletion, Context context) { + beginDelete(resourceGroupName, workspaceName, forceDeletion, context).getFinalResult(); } /** @@ -939,23 +871,10 @@ public WorkspaceInner update(String resourceGroupName, String workspaceName, Wor */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - apiVersion, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -965,36 +884,15 @@ private Mono> listByResourceGroupSinglePageAsync(S * Gets all the workspaces within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the workspaces within a resource group along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return all the workspaces within a resource group as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** @@ -1004,12 +902,15 @@ private Mono> listByResourceGroupSinglePageAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the workspaces within a resource group as paginated response with {@link PagedFlux}. + * @return all the workspaces within a resource group along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1020,12 +921,15 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the workspaces within a resource group as paginated response with {@link PagedFlux}. + * @return all the workspaces within a resource group along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1039,7 +943,8 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupN */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** @@ -1054,7 +959,8 @@ public PagedIterable listByResourceGroup(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** @@ -1067,19 +973,10 @@ public PagedIterable listByResourceGroup(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), - accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1088,29 +985,14 @@ private Mono> listSinglePageAsync() { /** * Gets all the workspaces within a subscription. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the workspaces within a subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return all the workspaces within a subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String apiVersion = "2023-02-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** @@ -1118,12 +1000,15 @@ private Mono> listSinglePageAsync(Context context) * * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the workspaces within a subscription as paginated response with {@link PagedFlux}. + * @return all the workspaces within a subscription along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1133,12 +1018,15 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the workspaces within a subscription as paginated response with {@link PagedFlux}. + * @return all the workspaces within a subscription along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1150,7 +1038,7 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** @@ -1164,7 +1052,8 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1174,17 +1063,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of workspaces along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the workspaces within a resource group along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1194,6 +1077,24 @@ private Mono> listByResourceGroupNextSinglePageAsy .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorInfoException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the workspaces within a resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1202,23 +1103,15 @@ private Mono> listByResourceGroupNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of workspaces along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the workspaces within a resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1228,17 +1121,11 @@ private Mono> listByResourceGroupNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of workspaces along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the workspaces within a subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1248,6 +1135,24 @@ private Mono> listBySubscriptionNextSinglePageAsyn .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorInfoException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the workspaces within a subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1256,22 +1161,14 @@ private Mono> listBySubscriptionNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorInfoException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of workspaces along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all the workspaces within a subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspacesImpl.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspacesImpl.java index 4a93aecd8187..fdba4a3dc14f 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspacesImpl.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspacesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.implementation; @@ -31,12 +31,8 @@ public Response getByResourceGroupWithResponse(String resourceGroupNa Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkspaceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkspaceImpl(inner.getValue(), this.manager())); } public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { @@ -48,12 +44,12 @@ public Workspace getByResourceGroup(String resourceGroupName, String workspaceNa } } - public void deleteByResourceGroup(String resourceGroupName, String workspaceName) { + public void delete(String resourceGroupName, String workspaceName) { this.serviceClient().delete(resourceGroupName, workspaceName); } - public void delete(String resourceGroupName, String workspaceName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, context); + public void delete(String resourceGroupName, String workspaceName, Boolean forceDeletion, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, forceDeletion, context); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -115,10 +111,11 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - this.delete(resourceGroupName, workspaceName, Context.NONE); + Boolean localForceDeletion = null; + this.delete(resourceGroupName, workspaceName, localForceDeletion, Context.NONE); } - public void deleteByIdWithResponse(String id, Context context) { + public void deleteByIdWithResponse(String id, Boolean forceDeletion, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -129,7 +126,7 @@ public void deleteByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - this.delete(resourceGroupName, workspaceName, context); + this.delete(resourceGroupName, workspaceName, forceDeletion, context); } private WorkspacesClient serviceClient() { diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectorListResult.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/AccessConnectorListResult.java similarity index 64% rename from sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectorListResult.java rename to sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/AccessConnectorListResult.java index 0d147cc81a86..9229682d6ba5 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectorListResult.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/AccessConnectorListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.databricks.models; +package com.azure.resourcemanager.databricks.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of azure databricks accessConnector. + * The response of a AccessConnector list operation. */ -@Fluent +@Immutable public final class AccessConnectorListResult implements JsonSerializable { /* - * The array of azure databricks accessConnector. + * The AccessConnector items on this page */ private List value; /* - * The URL to use for getting the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of AccessConnectorListResult class. */ - public AccessConnectorListResult() { + private AccessConnectorListResult() { } /** - * Get the value property: The array of azure databricks accessConnector. + * Get the value property: The AccessConnector items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: The array of azure databricks accessConnector. - * - * @param value the value value to set. - * @return the AccessConnectorListResult object itself. - */ - public AccessConnectorListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to use for getting the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URL to use for getting the next set of results. - * - * @param nextLink the nextLink value to set. - * @return the AccessConnectorListResult object itself. - */ - public AccessConnectorListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AccessConnectorListResult if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AccessConnectorListResult. */ public static AccessConnectorListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OperationListResult.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/OperationListResult.java similarity index 71% rename from sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OperationListResult.java rename to sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/OperationListResult.java index c4ed0634a4e8..5a9f1491c12a 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OperationListResult.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/OperationListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.databricks.models; +package com.azure.resourcemanager.databricks.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,7 +17,7 @@ * Result of the request to list Resource Provider operations. It contains a list of operations and a URL link to get * the next set of results. */ -@Fluent +@Immutable public final class OperationListResult implements JsonSerializable { /* * List of Resource Provider operations supported by the Resource Provider resource provider. @@ -32,7 +32,7 @@ public final class OperationListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: List of Resource Provider operations supported by the Resource Provider resource - * provider. - * - * @param value the value value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: URL to get the next set of operation list results if there are any. * @@ -66,28 +54,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of operation list results if there are any. - * - * @param nextLink the nextLink value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -95,7 +61,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnectionsList.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/PrivateEndpointConnectionsList.java similarity index 66% rename from sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnectionsList.java rename to sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/PrivateEndpointConnectionsList.java index 790ab9f769f8..ae7b7f83cb85 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnectionsList.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/PrivateEndpointConnectionsList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.databricks.models; +package com.azure.resourcemanager.databricks.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of private link connections. */ -@Fluent +@Immutable public final class PrivateEndpointConnectionsList implements JsonSerializable { /* - * The list of returned private endpoint connection. + * The PrivateEndpointConnection items on this page */ private List value; /* - * The URL to get the next set of endpoint connections. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PrivateEndpointConnectionsList class. */ - public PrivateEndpointConnectionsList() { + private PrivateEndpointConnectionsList() { } /** - * Get the value property: The list of returned private endpoint connection. + * Get the value property: The PrivateEndpointConnection items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: The list of returned private endpoint connection. - * - * @param value the value value to set. - * @return the PrivateEndpointConnectionsList object itself. - */ - public PrivateEndpointConnectionsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of endpoint connections. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URL to get the next set of endpoint connections. - * - * @param nextLink the nextLink value to set. - * @return the PrivateEndpointConnectionsList object itself. - */ - public PrivateEndpointConnectionsList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PrivateEndpointConnectionsList if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PrivateEndpointConnectionsList. */ public static PrivateEndpointConnectionsList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkResourcesList.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/PrivateLinkResourcesList.java similarity index 65% rename from sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkResourcesList.java rename to sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/PrivateLinkResourcesList.java index 4c3c86e794d2..ded36526005d 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkResourcesList.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/PrivateLinkResourcesList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.databricks.models; +package com.azure.resourcemanager.databricks.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * The available private link resources for a workspace. */ -@Fluent +@Immutable public final class PrivateLinkResourcesList implements JsonSerializable { /* - * The list of available private link resources for a workspace + * The GroupIdInformation items on this page */ private List value; /* - * The URL to get the next set of private link resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PrivateLinkResourcesList class. */ - public PrivateLinkResourcesList() { + private PrivateLinkResourcesList() { } /** - * Get the value property: The list of available private link resources for a workspace. + * Get the value property: The GroupIdInformation items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: The list of available private link resources for a workspace. - * - * @param value the value value to set. - * @return the PrivateLinkResourcesList object itself. - */ - public PrivateLinkResourcesList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of private link resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URL to get the next set of private link resources. - * - * @param nextLink the nextLink value to set. - * @return the PrivateLinkResourcesList object itself. - */ - public PrivateLinkResourcesList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PrivateLinkResourcesList if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PrivateLinkResourcesList. */ public static PrivateLinkResourcesList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeeringList.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/VirtualNetworkPeeringList.java similarity index 64% rename from sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeeringList.java rename to sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/VirtualNetworkPeeringList.java index 6dd6bdf1fe75..ba7a66015ff7 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeeringList.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/VirtualNetworkPeeringList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.databricks.models; +package com.azure.resourcemanager.databricks.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Gets all virtual network peerings under a workspace. */ -@Fluent +@Immutable public final class VirtualNetworkPeeringList implements JsonSerializable { /* - * List of virtual network peerings on workspace. + * The VirtualNetworkPeering items on this page */ private List value; /* - * URL to get the next set of virtual network peering list results if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of VirtualNetworkPeeringList class. */ - public VirtualNetworkPeeringList() { + private VirtualNetworkPeeringList() { } /** - * Get the value property: List of virtual network peerings on workspace. + * Get the value property: The VirtualNetworkPeering items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of virtual network peerings on workspace. - * - * @param value the value value to set. - * @return the VirtualNetworkPeeringList object itself. - */ - public VirtualNetworkPeeringList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to get the next set of virtual network peering list results if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of virtual network peering list results if there are any. - * - * @param nextLink the nextLink value to set. - * @return the VirtualNetworkPeeringList object itself. - */ - public VirtualNetworkPeeringList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of VirtualNetworkPeeringList if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the VirtualNetworkPeeringList. */ public static VirtualNetworkPeeringList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceListResult.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/WorkspaceListResult.java similarity index 65% rename from sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceListResult.java rename to sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/WorkspaceListResult.java index 0b28d92e6249..b2a14e79983c 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceListResult.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/models/WorkspaceListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.databricks.models; +package com.azure.resourcemanager.databricks.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of workspaces. + * The response of a Workspace list operation. */ -@Fluent +@Immutable public final class WorkspaceListResult implements JsonSerializable { /* - * The array of workspaces. + * The Workspace items on this page */ private List value; /* - * The URL to use for getting the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of WorkspaceListResult class. */ - public WorkspaceListResult() { + private WorkspaceListResult() { } /** - * Get the value property: The array of workspaces. + * Get the value property: The Workspace items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: The array of workspaces. - * - * @param value the value value to set. - * @return the WorkspaceListResult object itself. - */ - public WorkspaceListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to use for getting the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URL to use for getting the next set of results. - * - * @param nextLink the nextLink value to set. - * @return the WorkspaceListResult object itself. - */ - public WorkspaceListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of WorkspaceListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the WorkspaceListResult. */ public static WorkspaceListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/package-info.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/package-info.java index fa770fb2c9ae..77138097f3a6 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/package-info.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/package-info.java @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for AzureDatabricksManagementClient. - * The Microsoft Azure management APIs allow end users to operate on Azure Databricks Workspace / Access Connector - * resources. + * Package containing the implementations for AzureDatabricks. + * ARM Databricks. */ package com.azure.resourcemanager.databricks.implementation; diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnector.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnector.java index 439cc0a896fd..0092934b79c6 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnector.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnector.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -50,25 +50,25 @@ public interface AccessConnector { Map tags(); /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * Gets the properties property: Azure Databricks Access Connector properties. * - * @return the identity value. + * @return the properties value. */ - ManagedServiceIdentity identity(); + AccessConnectorProperties properties(); /** - * Gets the systemData property: The system metadata relating to this resource. + * Gets the identity property: The managed service identities assigned to this resource. * - * @return the systemData value. + * @return the identity value. */ - SystemData systemData(); + ManagedServiceIdentity identity(); /** - * Gets the properties property: Azure Databricks accessConnector properties. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the properties value. + * @return the systemData value. */ - AccessConnectorProperties properties(); + SystemData systemData(); /** * Gets the region of the resource. @@ -154,7 +154,7 @@ interface WithResourceGroup { * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithProperties { + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { /** * Executes the create request. * @@ -185,30 +185,29 @@ interface WithTags { } /** - * The stage of the AccessConnector definition allowing to specify identity. + * The stage of the AccessConnector definition allowing to specify properties. */ - interface WithIdentity { + interface WithProperties { /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). + * Specifies the properties property: Azure Databricks Access Connector properties. * - * @param identity Managed service identity (system assigned and/or user assigned identities). + * @param properties Azure Databricks Access Connector properties. * @return the next definition stage. */ - WithCreate withIdentity(ManagedServiceIdentity identity); + WithCreate withProperties(AccessConnectorProperties properties); } /** - * The stage of the AccessConnector definition allowing to specify properties. + * The stage of the AccessConnector definition allowing to specify identity. */ - interface WithProperties { + interface WithIdentity { /** - * Specifies the properties property: Azure Databricks accessConnector properties. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param properties Azure Databricks accessConnector properties. + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ - WithCreate withProperties(AccessConnectorProperties properties); + WithCreate withIdentity(ManagedServiceIdentity identity); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectorProperties.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectorProperties.java index 9893336d8763..4c08730691ec 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectorProperties.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectorProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * The AccessConnectorProperties model. @@ -17,10 +18,15 @@ @Immutable public final class AccessConnectorProperties implements JsonSerializable { /* - * Provisioning status of the accessConnector. + * Provisioning status of the Access Connector. */ private ProvisioningState provisioningState; + /* + * List of workspaces referring this Access Connector. + */ + private List referedBy; + /** * Creates an instance of AccessConnectorProperties class. */ @@ -28,7 +34,7 @@ public AccessConnectorProperties() { } /** - * Get the provisioningState property: Provisioning status of the accessConnector. + * Get the provisioningState property: Provisioning status of the Access Connector. * * @return the provisioningState value. */ @@ -37,11 +43,12 @@ public ProvisioningState provisioningState() { } /** - * Validates the instance. + * Get the referedBy property: List of workspaces referring this Access Connector. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the referedBy value. */ - public void validate() { + public List referedBy() { + return this.referedBy; } /** @@ -71,6 +78,9 @@ public static AccessConnectorProperties fromJson(JsonReader jsonReader) throws I if ("provisioningState".equals(fieldName)) { deserializedAccessConnectorProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("referedBy".equals(fieldName)) { + List referedBy = reader.readArray(reader1 -> reader1.getString()); + deserializedAccessConnectorProperties.referedBy = referedBy; } else { reader.skipChildren(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectorUpdate.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectorUpdate.java index 0d3ee689c03d..c662e04719e9 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectorUpdate.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectorUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -13,7 +13,7 @@ import java.util.Map; /** - * An update to an azure databricks accessConnector. + * An update to an Azure Databricks Access Connector. */ @Fluent public final class AccessConnectorUpdate implements JsonSerializable { @@ -73,17 +73,6 @@ public AccessConnectorUpdate withIdentity(ManagedServiceIdentity identity) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectors.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectors.java index 5b9ec2633e9f..ae4c6f2b7b11 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectors.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectors.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -13,38 +13,38 @@ */ public interface AccessConnectors { /** - * Gets an azure databricks accessConnector. + * Gets an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an azure databricks accessConnector along with {@link Response}. + * @return an Azure Databricks Access Connector along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String connectorName, Context context); /** - * Gets an azure databricks accessConnector. + * Gets an Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an azure databricks accessConnector. + * @return an Azure Databricks Access Connector. */ AccessConnector getByResourceGroup(String resourceGroupName, String connectorName); /** - * Deletes the azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. @@ -53,10 +53,10 @@ Response getByResourceGroupWithResponse(String resourceGroupNam void deleteByResourceGroup(String resourceGroupName, String connectorName); /** - * Deletes the azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectorName The name of the azure databricks accessConnector. + * @param connectorName The name of the Azure Databricks Access Connector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by @@ -66,20 +66,20 @@ Response getByResourceGroupWithResponse(String resourceGroupNam void delete(String resourceGroupName, String connectorName, Context context); /** - * Gets all the azure databricks accessConnectors within a resource group. + * Gets all the Azure Databricks Access Connectors within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a resource group as paginated response with + * @return all the Azure Databricks Access Connectors within a resource group as paginated response with * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets all the azure databricks accessConnectors within a resource group. + * Gets all the Azure Databricks Access Connectors within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -87,49 +87,49 @@ Response getByResourceGroupWithResponse(String resourceGroupNam * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a resource group as paginated response with + * @return all the Azure Databricks Access Connectors within a resource group as paginated response with * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Gets all the azure databricks accessConnectors within a subscription. + * Gets all the Azure Databricks Access Connectors within a subscription. * * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a subscription as paginated response with + * @return all the Azure Databricks Access Connectors within a subscription as paginated response with * {@link PagedIterable}. */ PagedIterable list(); /** - * Gets all the azure databricks accessConnectors within a subscription. + * Gets all the Azure Databricks Access Connectors within a subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the azure databricks accessConnectors within a subscription as paginated response with + * @return all the Azure Databricks Access Connectors within a subscription as paginated response with * {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Gets an azure databricks accessConnector. + * Gets an Azure Databricks Access Connector. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an azure databricks accessConnector along with {@link Response}. + * @return an Azure Databricks Access Connector along with {@link Response}. */ AccessConnector getById(String id); /** - * Gets an azure databricks accessConnector. + * Gets an Azure Databricks Access Connector. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -137,12 +137,12 @@ Response getByResourceGroupWithResponse(String resourceGroupNam * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an azure databricks accessConnector along with {@link Response}. + * @return an Azure Databricks Access Connector along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes the azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -153,7 +153,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNam void deleteById(String id); /** - * Deletes the azure databricks accessConnector. + * Deletes the Azure Databricks Access Connector. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AddressSpace.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AddressSpace.java index d7187f25ebd1..66cd85674ec3 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AddressSpace.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AddressSpace.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -48,14 +48,6 @@ public AddressSpace withAddressPrefixes(List addressPrefixes) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AutomaticClusterUpdateDefinition.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AutomaticClusterUpdateDefinition.java new file mode 100644 index 000000000000..1fc306db751f --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AutomaticClusterUpdateDefinition.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Status of automated cluster updates feature. + */ +@Fluent +public final class AutomaticClusterUpdateDefinition implements JsonSerializable { + /* + * The value property. + */ + private AutomaticClusterUpdateValue value; + + /** + * Creates an instance of AutomaticClusterUpdateDefinition class. + */ + public AutomaticClusterUpdateDefinition() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public AutomaticClusterUpdateValue value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the AutomaticClusterUpdateDefinition object itself. + */ + public AutomaticClusterUpdateDefinition withValue(AutomaticClusterUpdateValue value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("value", this.value == null ? null : this.value.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AutomaticClusterUpdateDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AutomaticClusterUpdateDefinition if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AutomaticClusterUpdateDefinition. + */ + public static AutomaticClusterUpdateDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AutomaticClusterUpdateDefinition deserializedAutomaticClusterUpdateDefinition + = new AutomaticClusterUpdateDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedAutomaticClusterUpdateDefinition.value + = AutomaticClusterUpdateValue.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAutomaticClusterUpdateDefinition; + }); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AutomaticClusterUpdateValue.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AutomaticClusterUpdateValue.java new file mode 100644 index 000000000000..4174f181ddc0 --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/AutomaticClusterUpdateValue.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for AutomaticClusterUpdateValue. + */ +public final class AutomaticClusterUpdateValue extends ExpandableStringEnum { + /** + * Enabled. + */ + public static final AutomaticClusterUpdateValue ENABLED = fromString("Enabled"); + + /** + * Disabled. + */ + public static final AutomaticClusterUpdateValue DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of AutomaticClusterUpdateValue value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomaticClusterUpdateValue() { + } + + /** + * Creates or finds a AutomaticClusterUpdateValue from its string representation. + * + * @param name a name to look for. + * @return the corresponding AutomaticClusterUpdateValue. + */ + public static AutomaticClusterUpdateValue fromString(String name) { + return fromString(name, AutomaticClusterUpdateValue.class); + } + + /** + * Gets known AutomaticClusterUpdateValue values. + * + * @return known AutomaticClusterUpdateValue values. + */ + public static Collection values() { + return values(AutomaticClusterUpdateValue.class); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ComplianceSecurityProfileDefinition.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ComplianceSecurityProfileDefinition.java new file mode 100644 index 000000000000..76044f57cafd --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ComplianceSecurityProfileDefinition.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Status of Compliance Security Profile feature. + */ +@Fluent +public final class ComplianceSecurityProfileDefinition + implements JsonSerializable { + /* + * Compliance standards associated with the workspace. + */ + private List complianceStandards; + + /* + * The value property. + */ + private ComplianceSecurityProfileValue value; + + /** + * Creates an instance of ComplianceSecurityProfileDefinition class. + */ + public ComplianceSecurityProfileDefinition() { + } + + /** + * Get the complianceStandards property: Compliance standards associated with the workspace. + * + * @return the complianceStandards value. + */ + public List complianceStandards() { + return this.complianceStandards; + } + + /** + * Set the complianceStandards property: Compliance standards associated with the workspace. + * + * @param complianceStandards the complianceStandards value to set. + * @return the ComplianceSecurityProfileDefinition object itself. + */ + public ComplianceSecurityProfileDefinition withComplianceStandards(List complianceStandards) { + this.complianceStandards = complianceStandards; + return this; + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public ComplianceSecurityProfileValue value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the ComplianceSecurityProfileDefinition object itself. + */ + public ComplianceSecurityProfileDefinition withValue(ComplianceSecurityProfileValue value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("complianceStandards", this.complianceStandards, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("value", this.value == null ? null : this.value.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ComplianceSecurityProfileDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ComplianceSecurityProfileDefinition if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ComplianceSecurityProfileDefinition. + */ + public static ComplianceSecurityProfileDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ComplianceSecurityProfileDefinition deserializedComplianceSecurityProfileDefinition + = new ComplianceSecurityProfileDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("complianceStandards".equals(fieldName)) { + List complianceStandards = reader.readArray(reader1 -> reader1.getString()); + deserializedComplianceSecurityProfileDefinition.complianceStandards = complianceStandards; + } else if ("value".equals(fieldName)) { + deserializedComplianceSecurityProfileDefinition.value + = ComplianceSecurityProfileValue.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedComplianceSecurityProfileDefinition; + }); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ComplianceSecurityProfileValue.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ComplianceSecurityProfileValue.java new file mode 100644 index 000000000000..2ac53bd98ec5 --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ComplianceSecurityProfileValue.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ComplianceSecurityProfileValue. + */ +public final class ComplianceSecurityProfileValue extends ExpandableStringEnum { + /** + * Enabled. + */ + public static final ComplianceSecurityProfileValue ENABLED = fromString("Enabled"); + + /** + * Disabled. + */ + public static final ComplianceSecurityProfileValue DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ComplianceSecurityProfileValue value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ComplianceSecurityProfileValue() { + } + + /** + * Creates or finds a ComplianceSecurityProfileValue from its string representation. + * + * @param name a name to look for. + * @return the corresponding ComplianceSecurityProfileValue. + */ + public static ComplianceSecurityProfileValue fromString(String name) { + return fromString(name, ComplianceSecurityProfileValue.class); + } + + /** + * Gets known ComplianceSecurityProfileValue values. + * + * @return known ComplianceSecurityProfileValue values. + */ + public static Collection values() { + return values(ComplianceSecurityProfileValue.class); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ComputeMode.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ComputeMode.java new file mode 100644 index 000000000000..52e1690896f1 --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ComputeMode.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The workspace compute mode. Required on create, cannot be changed. Possible values include: 'Serverless', 'Hybrid'. + */ +public final class ComputeMode extends ExpandableStringEnum { + /** + * Serverless. + */ + public static final ComputeMode SERVERLESS = fromString("Serverless"); + + /** + * Hybrid. + */ + public static final ComputeMode HYBRID = fromString("Hybrid"); + + /** + * Creates a new instance of ComputeMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ComputeMode() { + } + + /** + * Creates or finds a ComputeMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ComputeMode. + */ + public static ComputeMode fromString(String name) { + return fromString(name, ComputeMode.class); + } + + /** + * Gets known ComputeMode values. + * + * @return known ComputeMode values. + */ + public static Collection values() { + return values(ComputeMode.class); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/CreatedBy.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/CreatedBy.java index 1be63aad928c..c8d68909c33c 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/CreatedBy.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/CreatedBy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.UUID; /** * Provides details of the entity that created/updated the workspace. @@ -20,7 +19,7 @@ public final class CreatedBy implements JsonSerializable { /* * The Object ID that created the workspace. */ - private UUID oid; + private String oid; /* * The Personal Object ID corresponding to the object ID above @@ -30,7 +29,7 @@ public final class CreatedBy implements JsonSerializable { /* * The application ID of the application that initiated the creation of the workspace. For example, Azure Portal. */ - private UUID applicationId; + private String applicationId; /** * Creates an instance of CreatedBy class. @@ -43,7 +42,7 @@ public CreatedBy() { * * @return the oid value. */ - public UUID oid() { + public String oid() { return this.oid; } @@ -62,18 +61,10 @@ public String puid() { * * @return the applicationId value. */ - public UUID applicationId() { + public String applicationId() { return this.applicationId; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -99,13 +90,11 @@ public static CreatedBy fromJson(JsonReader jsonReader) throws IOException { reader.nextToken(); if ("oid".equals(fieldName)) { - deserializedCreatedBy.oid - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedCreatedBy.oid = reader.getString(); } else if ("puid".equals(fieldName)) { deserializedCreatedBy.puid = reader.getString(); } else if ("applicationId".equals(fieldName)) { - deserializedCreatedBy.applicationId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedCreatedBy.applicationId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/CustomParameterType.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/CustomParameterType.java index aa0c6478cb76..905cb78a127f 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/CustomParameterType.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/CustomParameterType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -8,21 +8,21 @@ import java.util.Collection; /** - * Provisioning status of the workspace. + * The workspace's custom parameters. */ public final class CustomParameterType extends ExpandableStringEnum { /** - * Static value Bool for CustomParameterType. + * Bool. */ public static final CustomParameterType BOOL = fromString("Bool"); /** - * Static value Object for CustomParameterType. + * Object. */ public static final CustomParameterType OBJECT = fromString("Object"); /** - * Static value String for CustomParameterType. + * String. */ public static final CustomParameterType STRING = fromString("String"); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/DefaultCatalogProperties.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/DefaultCatalogProperties.java new file mode 100644 index 000000000000..bdd94f3dde40 --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/DefaultCatalogProperties.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * These properties lets user specify default catalog properties during workspace creation. Not allowed in Serverless + * ComputeMode workspace. + */ +@Fluent +public final class DefaultCatalogProperties implements JsonSerializable { + /* + * Defines the initial type of the default catalog. Possible values (case-insensitive): HiveMetastore, UnityCatalog + */ + private InitialType initialType; + + /* + * Specifies the initial Name of default catalog. If not specified, the name of the workspace will be used. + */ + private String initialName; + + /** + * Creates an instance of DefaultCatalogProperties class. + */ + public DefaultCatalogProperties() { + } + + /** + * Get the initialType property: Defines the initial type of the default catalog. Possible values + * (case-insensitive): HiveMetastore, UnityCatalog. + * + * @return the initialType value. + */ + public InitialType initialType() { + return this.initialType; + } + + /** + * Set the initialType property: Defines the initial type of the default catalog. Possible values + * (case-insensitive): HiveMetastore, UnityCatalog. + * + * @param initialType the initialType value to set. + * @return the DefaultCatalogProperties object itself. + */ + public DefaultCatalogProperties withInitialType(InitialType initialType) { + this.initialType = initialType; + return this; + } + + /** + * Get the initialName property: Specifies the initial Name of default catalog. If not specified, the name of the + * workspace will be used. + * + * @return the initialName value. + */ + public String initialName() { + return this.initialName; + } + + /** + * Set the initialName property: Specifies the initial Name of default catalog. If not specified, the name of the + * workspace will be used. + * + * @param initialName the initialName value to set. + * @return the DefaultCatalogProperties object itself. + */ + public DefaultCatalogProperties withInitialName(String initialName) { + this.initialName = initialName; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("initialType", this.initialType == null ? null : this.initialType.toString()); + jsonWriter.writeStringField("initialName", this.initialName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DefaultCatalogProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DefaultCatalogProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DefaultCatalogProperties. + */ + public static DefaultCatalogProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DefaultCatalogProperties deserializedDefaultCatalogProperties = new DefaultCatalogProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("initialType".equals(fieldName)) { + deserializedDefaultCatalogProperties.initialType = InitialType.fromString(reader.getString()); + } else if ("initialName".equals(fieldName)) { + deserializedDefaultCatalogProperties.initialName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDefaultCatalogProperties; + }); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/DefaultStorageFirewall.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/DefaultStorageFirewall.java new file mode 100644 index 000000000000..773b6d14a47e --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/DefaultStorageFirewall.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Gets or Sets Default Storage Firewall configuration information. Not allowed in Serverless ComputeMode workspace. + */ +public final class DefaultStorageFirewall extends ExpandableStringEnum { + /** + * Disabled. + */ + public static final DefaultStorageFirewall DISABLED = fromString("Disabled"); + + /** + * Enabled. + */ + public static final DefaultStorageFirewall ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of DefaultStorageFirewall value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DefaultStorageFirewall() { + } + + /** + * Creates or finds a DefaultStorageFirewall from its string representation. + * + * @param name a name to look for. + * @return the corresponding DefaultStorageFirewall. + */ + public static DefaultStorageFirewall fromString(String name) { + return fromString(name, DefaultStorageFirewall.class); + } + + /** + * Gets known DefaultStorageFirewall values. + * + * @return known DefaultStorageFirewall values. + */ + public static Collection values() { + return values(DefaultStorageFirewall.class); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Encryption.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Encryption.java index 7f45b91b6c7b..5c15b3b3a47f 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Encryption.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Encryption.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -124,14 +124,6 @@ public Encryption withKeyVaultUri(String keyVaultUri) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionEntitiesDefinition.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionEntitiesDefinition.java index 49f95beafb38..185926f85d92 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionEntitiesDefinition.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionEntitiesDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -17,12 +17,12 @@ @Fluent public final class EncryptionEntitiesDefinition implements JsonSerializable { /* - * Encryption properties for the databricks managed services. + * Encryption properties for the databricks managed services. Supported in both Serverless and Hybrid ComputeMode. */ private EncryptionV2 managedServices; /* - * Encryption properties for the databricks managed disks. + * Encryption properties for the databricks managed disks. Not allowed in Serverless ComputeMode workspace. */ private ManagedDiskEncryption managedDisk; @@ -33,7 +33,8 @@ public EncryptionEntitiesDefinition() { } /** - * Get the managedServices property: Encryption properties for the databricks managed services. + * Get the managedServices property: Encryption properties for the databricks managed services. Supported in both + * Serverless and Hybrid ComputeMode. * * @return the managedServices value. */ @@ -42,7 +43,8 @@ public EncryptionV2 managedServices() { } /** - * Set the managedServices property: Encryption properties for the databricks managed services. + * Set the managedServices property: Encryption properties for the databricks managed services. Supported in both + * Serverless and Hybrid ComputeMode. * * @param managedServices the managedServices value to set. * @return the EncryptionEntitiesDefinition object itself. @@ -53,7 +55,8 @@ public EncryptionEntitiesDefinition withManagedServices(EncryptionV2 managedServ } /** - * Get the managedDisk property: Encryption properties for the databricks managed disks. + * Get the managedDisk property: Encryption properties for the databricks managed disks. Not allowed in Serverless + * ComputeMode workspace. * * @return the managedDisk value. */ @@ -62,7 +65,8 @@ public ManagedDiskEncryption managedDisk() { } /** - * Set the managedDisk property: Encryption properties for the databricks managed disks. + * Set the managedDisk property: Encryption properties for the databricks managed disks. Not allowed in Serverless + * ComputeMode workspace. * * @param managedDisk the managedDisk value to set. * @return the EncryptionEntitiesDefinition object itself. @@ -72,20 +76,6 @@ public EncryptionEntitiesDefinition withManagedDisk(ManagedDiskEncryption manage return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (managedServices() != null) { - managedServices().validate(); - } - if (managedDisk() != null) { - managedDisk().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionKeySource.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionKeySource.java index 2edcbd6a8276..cb15ee626db2 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionKeySource.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionKeySource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -12,7 +12,7 @@ */ public final class EncryptionKeySource extends ExpandableStringEnum { /** - * Static value Microsoft.Keyvault for EncryptionKeySource. + * Microsoft.Keyvault. */ public static final EncryptionKeySource MICROSOFT_KEYVAULT = fromString("Microsoft.Keyvault"); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionV2.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionV2.java index 63a31730035a..8bbb9b632fb9 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionV2.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionV2.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -75,23 +74,6 @@ public EncryptionV2 withKeyVaultProperties(EncryptionV2KeyVaultProperties keyVau return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keySource() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property keySource in model EncryptionV2")); - } - if (keyVaultProperties() != null) { - keyVaultProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncryptionV2.class); - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionV2KeyVaultProperties.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionV2KeyVaultProperties.java index df900c954e5f..dabe05e06cf0 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionV2KeyVaultProperties.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EncryptionV2KeyVaultProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -98,31 +97,6 @@ public EncryptionV2KeyVaultProperties withKeyVersion(String keyVersion) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyVaultUri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVaultUri in model EncryptionV2KeyVaultProperties")); - } - if (keyName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyName in model EncryptionV2KeyVaultProperties")); - } - if (keyVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVersion in model EncryptionV2KeyVaultProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncryptionV2KeyVaultProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EndpointDependency.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EndpointDependency.java index e38eca887d54..c24d3464fe81 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EndpointDependency.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EndpointDependency.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * A domain name or IP address the Workspace is reaching at. */ -@Fluent +@Immutable public final class EndpointDependency implements JsonSerializable { /* * The domain name of the dependency. @@ -30,7 +30,7 @@ public final class EndpointDependency implements JsonSerializable endpointDetails() { return this.endpointDetails; } - /** - * Set the endpointDetails property: The Ports used when connecting to domainName. - * - * @param endpointDetails the endpointDetails value to set. - * @return the EndpointDependency object itself. - */ - public EndpointDependency withEndpointDetails(List endpointDetails) { - this.endpointDetails = endpointDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (endpointDetails() != null) { - endpointDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EndpointDetail.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EndpointDetail.java index d4717638679b..08a4871a19db 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EndpointDetail.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EndpointDetail.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Connect information from the Workspace to a single endpoint. */ -@Fluent +@Immutable public final class EndpointDetail implements JsonSerializable { /* * An IP Address that Domain Name currently resolves to. @@ -40,7 +40,7 @@ public final class EndpointDetail implements JsonSerializable { /** * Creates an instance of EndpointDetail class. */ - public EndpointDetail() { + private EndpointDetail() { } /** @@ -52,17 +52,6 @@ public String ipAddress() { return this.ipAddress; } - /** - * Set the ipAddress property: An IP Address that Domain Name currently resolves to. - * - * @param ipAddress the ipAddress value to set. - * @return the EndpointDetail object itself. - */ - public EndpointDetail withIpAddress(String ipAddress) { - this.ipAddress = ipAddress; - return this; - } - /** * Get the port property: The port an endpoint is connected to. * @@ -72,17 +61,6 @@ public Integer port() { return this.port; } - /** - * Set the port property: The port an endpoint is connected to. - * - * @param port the port value to set. - * @return the EndpointDetail object itself. - */ - public EndpointDetail withPort(Integer port) { - this.port = port; - return this; - } - /** * Get the latency property: The time in milliseconds it takes for the connection to be created from the Workspace * to this IpAddress at this Port. @@ -93,18 +71,6 @@ public Double latency() { return this.latency; } - /** - * Set the latency property: The time in milliseconds it takes for the connection to be created from the Workspace - * to this IpAddress at this Port. - * - * @param latency the latency value to set. - * @return the EndpointDetail object itself. - */ - public EndpointDetail withLatency(Double latency) { - this.latency = latency; - return this; - } - /** * Get the isAccessible property: Whether it is possible to create a connection from the Workspace to this IpAddress * at this Port. @@ -115,26 +81,6 @@ public Boolean isAccessible() { return this.isAccessible; } - /** - * Set the isAccessible property: Whether it is possible to create a connection from the Workspace to this IpAddress - * at this Port. - * - * @param isAccessible the isAccessible value to set. - * @return the EndpointDetail object itself. - */ - public EndpointDetail withIsAccessible(Boolean isAccessible) { - this.isAccessible = isAccessible; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EnhancedSecurityComplianceDefinition.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EnhancedSecurityComplianceDefinition.java new file mode 100644 index 000000000000..90310eb4998d --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EnhancedSecurityComplianceDefinition.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Status of settings related to the Enhanced Security and Compliance Add-On. + */ +@Fluent +public final class EnhancedSecurityComplianceDefinition + implements JsonSerializable { + /* + * Status of automated cluster updates feature. + */ + private AutomaticClusterUpdateDefinition automaticClusterUpdate; + + /* + * Status of Compliance Security Profile feature. + */ + private ComplianceSecurityProfileDefinition complianceSecurityProfile; + + /* + * Status of Enhanced Security Monitoring feature. + */ + private EnhancedSecurityMonitoringDefinition enhancedSecurityMonitoring; + + /** + * Creates an instance of EnhancedSecurityComplianceDefinition class. + */ + public EnhancedSecurityComplianceDefinition() { + } + + /** + * Get the automaticClusterUpdate property: Status of automated cluster updates feature. + * + * @return the automaticClusterUpdate value. + */ + public AutomaticClusterUpdateDefinition automaticClusterUpdate() { + return this.automaticClusterUpdate; + } + + /** + * Set the automaticClusterUpdate property: Status of automated cluster updates feature. + * + * @param automaticClusterUpdate the automaticClusterUpdate value to set. + * @return the EnhancedSecurityComplianceDefinition object itself. + */ + public EnhancedSecurityComplianceDefinition + withAutomaticClusterUpdate(AutomaticClusterUpdateDefinition automaticClusterUpdate) { + this.automaticClusterUpdate = automaticClusterUpdate; + return this; + } + + /** + * Get the complianceSecurityProfile property: Status of Compliance Security Profile feature. + * + * @return the complianceSecurityProfile value. + */ + public ComplianceSecurityProfileDefinition complianceSecurityProfile() { + return this.complianceSecurityProfile; + } + + /** + * Set the complianceSecurityProfile property: Status of Compliance Security Profile feature. + * + * @param complianceSecurityProfile the complianceSecurityProfile value to set. + * @return the EnhancedSecurityComplianceDefinition object itself. + */ + public EnhancedSecurityComplianceDefinition + withComplianceSecurityProfile(ComplianceSecurityProfileDefinition complianceSecurityProfile) { + this.complianceSecurityProfile = complianceSecurityProfile; + return this; + } + + /** + * Get the enhancedSecurityMonitoring property: Status of Enhanced Security Monitoring feature. + * + * @return the enhancedSecurityMonitoring value. + */ + public EnhancedSecurityMonitoringDefinition enhancedSecurityMonitoring() { + return this.enhancedSecurityMonitoring; + } + + /** + * Set the enhancedSecurityMonitoring property: Status of Enhanced Security Monitoring feature. + * + * @param enhancedSecurityMonitoring the enhancedSecurityMonitoring value to set. + * @return the EnhancedSecurityComplianceDefinition object itself. + */ + public EnhancedSecurityComplianceDefinition + withEnhancedSecurityMonitoring(EnhancedSecurityMonitoringDefinition enhancedSecurityMonitoring) { + this.enhancedSecurityMonitoring = enhancedSecurityMonitoring; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("automaticClusterUpdate", this.automaticClusterUpdate); + jsonWriter.writeJsonField("complianceSecurityProfile", this.complianceSecurityProfile); + jsonWriter.writeJsonField("enhancedSecurityMonitoring", this.enhancedSecurityMonitoring); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EnhancedSecurityComplianceDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EnhancedSecurityComplianceDefinition if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EnhancedSecurityComplianceDefinition. + */ + public static EnhancedSecurityComplianceDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EnhancedSecurityComplianceDefinition deserializedEnhancedSecurityComplianceDefinition + = new EnhancedSecurityComplianceDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("automaticClusterUpdate".equals(fieldName)) { + deserializedEnhancedSecurityComplianceDefinition.automaticClusterUpdate + = AutomaticClusterUpdateDefinition.fromJson(reader); + } else if ("complianceSecurityProfile".equals(fieldName)) { + deserializedEnhancedSecurityComplianceDefinition.complianceSecurityProfile + = ComplianceSecurityProfileDefinition.fromJson(reader); + } else if ("enhancedSecurityMonitoring".equals(fieldName)) { + deserializedEnhancedSecurityComplianceDefinition.enhancedSecurityMonitoring + = EnhancedSecurityMonitoringDefinition.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEnhancedSecurityComplianceDefinition; + }); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EnhancedSecurityMonitoringDefinition.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EnhancedSecurityMonitoringDefinition.java new file mode 100644 index 000000000000..ac7853d59ceb --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EnhancedSecurityMonitoringDefinition.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Status of Enhanced Security Monitoring feature. + */ +@Fluent +public final class EnhancedSecurityMonitoringDefinition + implements JsonSerializable { + /* + * The value property. + */ + private EnhancedSecurityMonitoringValue value; + + /** + * Creates an instance of EnhancedSecurityMonitoringDefinition class. + */ + public EnhancedSecurityMonitoringDefinition() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public EnhancedSecurityMonitoringValue value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the EnhancedSecurityMonitoringDefinition object itself. + */ + public EnhancedSecurityMonitoringDefinition withValue(EnhancedSecurityMonitoringValue value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("value", this.value == null ? null : this.value.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EnhancedSecurityMonitoringDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EnhancedSecurityMonitoringDefinition if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EnhancedSecurityMonitoringDefinition. + */ + public static EnhancedSecurityMonitoringDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EnhancedSecurityMonitoringDefinition deserializedEnhancedSecurityMonitoringDefinition + = new EnhancedSecurityMonitoringDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedEnhancedSecurityMonitoringDefinition.value + = EnhancedSecurityMonitoringValue.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedEnhancedSecurityMonitoringDefinition; + }); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EnhancedSecurityMonitoringValue.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EnhancedSecurityMonitoringValue.java new file mode 100644 index 000000000000..10ecaf761171 --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/EnhancedSecurityMonitoringValue.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for EnhancedSecurityMonitoringValue. + */ +public final class EnhancedSecurityMonitoringValue extends ExpandableStringEnum { + /** + * Enabled. + */ + public static final EnhancedSecurityMonitoringValue ENABLED = fromString("Enabled"); + + /** + * Disabled. + */ + public static final EnhancedSecurityMonitoringValue DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of EnhancedSecurityMonitoringValue value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EnhancedSecurityMonitoringValue() { + } + + /** + * Creates or finds a EnhancedSecurityMonitoringValue from its string representation. + * + * @param name a name to look for. + * @return the corresponding EnhancedSecurityMonitoringValue. + */ + public static EnhancedSecurityMonitoringValue fromString(String name) { + return fromString(name, EnhancedSecurityMonitoringValue.class); + } + + /** + * Gets known EnhancedSecurityMonitoringValue values. + * + * @return known EnhancedSecurityMonitoringValue values. + */ + public static Collection values() { + return values(EnhancedSecurityMonitoringValue.class); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ErrorInfo.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ErrorInfo.java index f18c1c9d9a59..46120f57cc84 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ErrorInfo.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ErrorInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -14,8 +14,6 @@ import java.util.List; /** - * Error response. - * * Contains details when the response code indicates an error. */ @Immutable @@ -53,7 +51,7 @@ public final class ErrorInfo extends ManagementError { /** * Creates an instance of ErrorInfo class. */ - public ErrorInfo() { + private ErrorInfo() { } /** @@ -115,14 +113,6 @@ public String getCode() { return this.code; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ErrorInfoException.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ErrorInfoException.java index de660e8ffa32..0ab2c621a025 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ErrorInfoException.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ErrorInfoException.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/GroupIdInformation.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/GroupIdInformation.java index 1724fbb0e9fe..4dbaa68016e4 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/GroupIdInformation.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/GroupIdInformation.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.databricks.fluent.models.GroupIdInformationInner; /** @@ -38,6 +39,13 @@ public interface GroupIdInformation { */ GroupIdInformationProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.databricks.fluent.models.GroupIdInformationInner object. * diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/GroupIdInformationProperties.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/GroupIdInformationProperties.java index 0864a8db02f9..437f3d70aa25 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/GroupIdInformationProperties.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/GroupIdInformationProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * The properties for a group information object. */ -@Fluent +@Immutable public final class GroupIdInformationProperties implements JsonSerializable { /* * The group id @@ -35,7 +35,7 @@ public final class GroupIdInformationProperties implements JsonSerializable requiredMembers() { return this.requiredMembers; } - /** - * Set the requiredMembers property: The required members for a specific group id. - * - * @param requiredMembers the requiredMembers value to set. - * @return the GroupIdInformationProperties object itself. - */ - public GroupIdInformationProperties withRequiredMembers(List requiredMembers) { - this.requiredMembers = requiredMembers; - return this; - } - /** * Get the requiredZoneNames property: The required DNS zones for a specific group id. * @@ -87,25 +65,6 @@ public List requiredZoneNames() { return this.requiredZoneNames; } - /** - * Set the requiredZoneNames property: The required DNS zones for a specific group id. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the GroupIdInformationProperties object itself. - */ - public GroupIdInformationProperties withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/IdentityType.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/IdentityType.java new file mode 100644 index 000000000000..7e0a69a382eb --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/IdentityType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The identity type of the Access Connector Resource. + */ +public final class IdentityType extends ExpandableStringEnum { + /** + * SystemAssigned. + */ + public static final IdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** + * UserAssigned. + */ + public static final IdentityType USER_ASSIGNED = fromString("UserAssigned"); + + /** + * Creates a new instance of IdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IdentityType() { + } + + /** + * Creates or finds a IdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding IdentityType. + */ + public static IdentityType fromString(String name) { + return fromString(name, IdentityType.class); + } + + /** + * Gets known IdentityType values. + * + * @return known IdentityType values. + */ + public static Collection values() { + return values(IdentityType.class); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/InitialType.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/InitialType.java new file mode 100644 index 000000000000..05ebac0b2f77 --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/InitialType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines the initial type of the default catalog. Possible values (case-insensitive): HiveMetastore, UnityCatalog. + */ +public final class InitialType extends ExpandableStringEnum { + /** + * HiveMetastore. + */ + public static final InitialType HIVE_METASTORE = fromString("HiveMetastore"); + + /** + * UnityCatalog. + */ + public static final InitialType UNITY_CATALOG = fromString("UnityCatalog"); + + /** + * Creates a new instance of InitialType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InitialType() { + } + + /** + * Creates or finds a InitialType from its string representation. + * + * @param name a name to look for. + * @return the corresponding InitialType. + */ + public static InitialType fromString(String name) { + return fromString(name, InitialType.class); + } + + /** + * Gets known InitialType values. + * + * @return known InitialType values. + */ + public static Collection values() { + return values(InitialType.class); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/KeySource.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/KeySource.java index 6a81de6d3a43..13b5243586b9 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/KeySource.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/KeySource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -12,12 +12,12 @@ */ public final class KeySource extends ExpandableStringEnum { /** - * Static value Default for KeySource. + * Default. */ public static final KeySource DEFAULT = fromString("Default"); /** - * Static value Microsoft.Keyvault for KeySource. + * Microsoft.Keyvault. */ public static final KeySource MICROSOFT_KEYVAULT = fromString("Microsoft.Keyvault"); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedDiskEncryption.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedDiskEncryption.java index 9fcd64bce01c..1854ee28113c 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedDiskEncryption.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedDiskEncryption.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -18,7 +17,8 @@ @Fluent public final class ManagedDiskEncryption implements JsonSerializable { /* - * The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Keyvault + * The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Keyvault. Not allowed in + * Serverless ComputeMode workspace. */ private EncryptionKeySource keySource; @@ -40,7 +40,7 @@ public ManagedDiskEncryption() { /** * Get the keySource property: The encryption keySource (provider). Possible values (case-insensitive): - * Microsoft.Keyvault. + * Microsoft.Keyvault. Not allowed in Serverless ComputeMode workspace. * * @return the keySource value. */ @@ -50,7 +50,7 @@ public EncryptionKeySource keySource() { /** * Set the keySource property: The encryption keySource (provider). Possible values (case-insensitive): - * Microsoft.Keyvault. + * Microsoft.Keyvault. Not allowed in Serverless ComputeMode workspace. * * @param keySource the keySource value to set. * @return the ManagedDiskEncryption object itself. @@ -102,28 +102,6 @@ public ManagedDiskEncryption withRotationToLatestKeyVersionEnabled(Boolean rotat return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keySource() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property keySource in model ManagedDiskEncryption")); - } - if (keyVaultProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVaultProperties in model ManagedDiskEncryption")); - } else { - keyVaultProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedDiskEncryption.class); - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedDiskEncryptionKeyVaultProperties.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedDiskEncryptionKeyVaultProperties.java index fac5017825a8..74aaac2ad46a 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedDiskEncryptionKeyVaultProperties.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedDiskEncryptionKeyVaultProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -99,31 +98,6 @@ public ManagedDiskEncryptionKeyVaultProperties withKeyVersion(String keyVersion) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyVaultUri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVaultUri in model ManagedDiskEncryptionKeyVaultProperties")); - } - if (keyName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyName in model ManagedDiskEncryptionKeyVaultProperties")); - } - if (keyVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVersion in model ManagedDiskEncryptionKeyVaultProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedDiskEncryptionKeyVaultProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedIdentityConfiguration.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedIdentityConfiguration.java index 1bb3cc343dd3..fb526fe13b70 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedIdentityConfiguration.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedIdentityConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.UUID; /** * The Managed Identity details for storage account. @@ -20,12 +19,12 @@ public final class ManagedIdentityConfiguration implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedManagedIdentityConfiguration.principalId = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedManagedIdentityConfiguration.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedIdentityConfiguration.tenantId = reader.getString(); } else if ("type".equals(fieldName)) { deserializedManagedIdentityConfiguration.type = reader.getString(); } else { diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedServiceIdentity.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedServiceIdentity.java index 8340494a6073..7ac0adf76288 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedServiceIdentity.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedServiceIdentity.java @@ -1,18 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.util.Map; -import java.util.UUID; /** * Managed service identity (system assigned and/or user assigned identities). @@ -23,24 +21,21 @@ public final class ManagedServiceIdentity implements JsonSerializable userAssignedIdentities; @@ -56,7 +51,7 @@ public ManagedServiceIdentity() { * * @return the principalId value. */ - public UUID principalId() { + public String principalId() { return this.principalId; } @@ -66,13 +61,12 @@ public UUID principalId() { * * @return the tenantId value. */ - public UUID tenantId() { + public String tenantId() { return this.tenantId; } /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Get the type property: The type of managed identity assigned to this resource. * * @return the type value. */ @@ -81,8 +75,7 @@ public ManagedServiceIdentityType type() { } /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Set the type property: The type of managed identity assigned to this resource. * * @param type the type value to set. * @return the ManagedServiceIdentity object itself. @@ -93,10 +86,7 @@ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { } /** - * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Get the userAssignedIdentities property: The identities assigned to this resource by the user. * * @return the userAssignedIdentities value. */ @@ -105,10 +95,7 @@ public Map userAssignedIdentities() { } /** - * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Set the userAssignedIdentities property: The identities assigned to this resource by the user. * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ManagedServiceIdentity object itself. @@ -118,27 +105,6 @@ public ManagedServiceIdentity withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); - /** * {@inheritDoc} */ @@ -170,11 +136,9 @@ public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOEx if ("type".equals(fieldName)) { deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedServiceIdentity.principalId = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedServiceIdentity.tenantId = reader.getString(); } else if ("userAssignedIdentities".equals(fieldName)) { Map userAssignedIdentities = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedServiceIdentityType.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedServiceIdentityType.java index bfdc652faae8..2764eefa645f 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedServiceIdentityType.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ManagedServiceIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -12,22 +12,22 @@ */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** - * Static value None for ManagedServiceIdentityType. + * No managed identity. */ public static final ManagedServiceIdentityType NONE = fromString("None"); /** - * Static value SystemAssigned for ManagedServiceIdentityType. + * System assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for ManagedServiceIdentityType. + * User assigned managed identity. */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); /** - * Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. + * System and user assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = fromString("SystemAssigned,UserAssigned"); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Operation.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Operation.java index 0a8ff07379d2..14cb6c26a732 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Operation.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OperationDisplay.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OperationDisplay.java index 3db4edcd8f3a..f0adf2f04a0b 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OperationDisplay.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OperationDisplay.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The object that represents the operation. */ -@Fluent +@Immutable public final class OperationDisplay implements JsonSerializable { /* * Service provider: ex Microsoft.Databricks @@ -39,7 +39,7 @@ public final class OperationDisplay implements JsonSerializable list(); /** - * Lists all of the available RP operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OutboundEnvironmentEndpoint.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OutboundEnvironmentEndpoint.java index adaaa5086be2..188b146cde36 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OutboundEnvironmentEndpoint.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OutboundEnvironmentEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OutboundNetworkDependenciesEndpoints.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OutboundNetworkDependenciesEndpoints.java index d6b6eab9b6dc..9b1f6174c58b 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OutboundNetworkDependenciesEndpoints.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/OutboundNetworkDependenciesEndpoints.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -26,7 +26,9 @@ public interface OutboundNetworkDependenciesEndpoints { * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane along with + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified Workspace. + * + * Gets the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane along with * {@link Response}. */ Response> listWithResponse(String resourceGroupName, String workspaceName, @@ -45,7 +47,9 @@ Response> listWithResponse(String resourceGrou * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane. + * @return a list of egress endpoints (network endpoints of all outbound dependencies) in the specified Workspace. + * + * Gets the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane. */ List list(String resourceGroupName, String workspaceName); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PeeringProvisioningState.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PeeringProvisioningState.java index 1c997613ef76..a39379c2bfb2 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PeeringProvisioningState.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PeeringProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -12,22 +12,22 @@ */ public final class PeeringProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for PeeringProvisioningState. + * Succeeded. */ public static final PeeringProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Updating for PeeringProvisioningState. + * Updating. */ public static final PeeringProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for PeeringProvisioningState. + * Deleting. */ public static final PeeringProvisioningState DELETING = fromString("Deleting"); /** - * Static value Failed for PeeringProvisioningState. + * Failed. */ public static final PeeringProvisioningState FAILED = fromString("Failed"); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PeeringState.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PeeringState.java index 04bae09b2801..44c2e4b97716 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PeeringState.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PeeringState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -12,17 +12,17 @@ */ public final class PeeringState extends ExpandableStringEnum { /** - * Static value Initiated for PeeringState. + * Initiated. */ public static final PeeringState INITIATED = fromString("Initiated"); /** - * Static value Connected for PeeringState. + * Connected. */ public static final PeeringState CONNECTED = fromString("Connected"); /** - * Static value Disconnected for PeeringState. + * Disconnected. */ public static final PeeringState DISCONNECTED = fromString("Disconnected"); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpoint.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpoint.java index ad1ee21452e3..4d5a1455aad1 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpoint.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -36,14 +36,6 @@ public String id() { return this.id; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnection.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnection.java index bc35bad4e5e2..2ae7fb229b7d 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnection.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnection.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databricks.fluent.models.PrivateEndpointConnectionInner; @@ -39,6 +40,13 @@ public interface PrivateEndpointConnection { */ PrivateEndpointConnectionProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.databricks.fluent.models.PrivateEndpointConnectionInner object. * diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnectionProperties.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnectionProperties.java index 82e154dc4185..72c8504c586e 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnectionProperties.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnectionProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -115,26 +114,6 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { return this.provisioningState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property privateLinkServiceConnectionState in model PrivateEndpointConnectionProperties")); - } else { - privateLinkServiceConnectionState().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnectionProvisioningState.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnectionProvisioningState.java index 8cb7382738a5..cd1d79b70852 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnectionProvisioningState.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnectionProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -13,27 +13,27 @@ public final class PrivateEndpointConnectionProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for PrivateEndpointConnectionProvisioningState. + * Succeeded. */ public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Creating for PrivateEndpointConnectionProvisioningState. + * Creating. */ public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for PrivateEndpointConnectionProvisioningState. + * Updating. */ public static final PrivateEndpointConnectionProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for PrivateEndpointConnectionProvisioningState. + * Deleting. */ public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); /** - * Static value Failed for PrivateEndpointConnectionProvisioningState. + * Failed. */ public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnections.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnections.java index 391e51fd8c96..41efdee084f3 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnections.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnections.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -13,100 +13,104 @@ */ public interface PrivateEndpointConnections { /** - * List private endpoint connections + * Get private endpoint connection * - * List private endpoint connections of the workspace. + * Get a private endpoint connection properties for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private link connections as paginated response with {@link PagedIterable}. + * @return private endpoint connection + * + * Get a private endpoint connection properties for a workspace along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context); /** - * List private endpoint connections + * Get private endpoint connection * - * List private endpoint connections of the workspace. + * Get a private endpoint connection properties for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. + * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private link connections as paginated response with {@link PagedIterable}. + * @return private endpoint connection + * + * Get a private endpoint connection properties for a workspace. */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + PrivateEndpointConnection get(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** - * Get private endpoint connection + * Remove private endpoint connection * - * Get a private endpoint connection properties for a workspace. + * Remove private endpoint connection with the specified name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection properties for a workspace along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context); + void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** - * Get private endpoint connection + * Remove private endpoint connection * - * Get a private endpoint connection properties for a workspace. + * Remove private endpoint connection with the specified name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection properties for a workspace. */ - PrivateEndpointConnection get(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); /** - * Remove private endpoint connection + * List private endpoint connections * - * Remove private endpoint connection with the specified name. + * List private endpoint connections of the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private link connections as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Remove private endpoint connection + * List private endpoint connections * - * Remove private endpoint connection with the specified name. + * List private endpoint connections of the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private link connections as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, Context context); /** * Get private endpoint connection @@ -118,7 +122,9 @@ Response getWithResponse(String resourceGroupName, St * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection properties for a workspace along with {@link Response}. + * @return private endpoint connection + * + * Get a private endpoint connection properties for a workspace along with {@link Response}. */ PrivateEndpointConnection getById(String id); @@ -133,7 +139,9 @@ Response getWithResponse(String resourceGroupName, St * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection properties for a workspace along with {@link Response}. + * @return private endpoint connection + * + * Get a private endpoint connection properties for a workspace along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkResources.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkResources.java index 11b25beb573f..9e0a1186f645 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkResources.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkResources.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -13,67 +13,71 @@ */ public interface PrivateLinkResources { /** - * List private link resources + * Get the specified private link resource * - * List private link resources for a given workspace. + * Get the specified private link resource for the given group id (sub-resource). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param groupId The name of the private link resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available private link resources for a workspace as paginated response with {@link PagedIterable}. + * @return the specified private link resource + * + * Get the specified private link resource for the given group id (sub-resource) along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String groupId, + Context context); /** - * List private link resources + * Get the specified private link resource * - * List private link resources for a given workspace. + * Get the specified private link resource for the given group id (sub-resource). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. + * @param groupId The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available private link resources for a workspace as paginated response with {@link PagedIterable}. + * @return the specified private link resource + * + * Get the specified private link resource for the given group id (sub-resource). */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + GroupIdInformation get(String resourceGroupName, String workspaceName, String groupId); /** - * Get the specified private link resource + * List private link resources * - * Get the specified private link resource for the given group id (sub-resource). + * List private link resources for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param groupId The name of the private link resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private link resource for the given group id (sub-resource) along with {@link Response}. + * @return the available private link resources for a workspace as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String groupId, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get the specified private link resource + * List private link resources * - * Get the specified private link resource for the given group id (sub-resource). + * List private link resources for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param groupId The name of the private link resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private link resource for the given group id (sub-resource). + * @return the available private link resources for a workspace as paginated response with {@link PagedIterable}. */ - GroupIdInformation get(String resourceGroupName, String workspaceName, String groupId); + PagedIterable list(String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkServiceConnectionState.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkServiceConnectionState.java index dff27f1ad17e..709fc74a8c41 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkServiceConnectionState.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkServiceConnectionState.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -98,21 +97,6 @@ public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (status() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property status in model PrivateLinkServiceConnectionState")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkServiceConnectionState.class); - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkServiceConnectionStatus.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkServiceConnectionStatus.java index 1599cf6b5dda..5ed17a2fc1b6 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkServiceConnectionStatus.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkServiceConnectionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -12,22 +12,22 @@ */ public final class PrivateLinkServiceConnectionStatus extends ExpandableStringEnum { /** - * Static value Pending for PrivateLinkServiceConnectionStatus. + * Pending. */ public static final PrivateLinkServiceConnectionStatus PENDING = fromString("Pending"); /** - * Static value Approved for PrivateLinkServiceConnectionStatus. + * Approved. */ public static final PrivateLinkServiceConnectionStatus APPROVED = fromString("Approved"); /** - * Static value Rejected for PrivateLinkServiceConnectionStatus. + * Rejected. */ public static final PrivateLinkServiceConnectionStatus REJECTED = fromString("Rejected"); /** - * Static value Disconnected for PrivateLinkServiceConnectionStatus. + * Disconnected. */ public static final PrivateLinkServiceConnectionStatus DISCONNECTED = fromString("Disconnected"); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ProvisioningState.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ProvisioningState.java index 5e00c2a5e40e..352fba3593ab 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ProvisioningState.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -12,57 +12,57 @@ */ public final class ProvisioningState extends ExpandableStringEnum { /** - * Static value Accepted for ProvisioningState. + * Accepted. */ public static final ProvisioningState ACCEPTED = fromString("Accepted"); /** - * Static value Running for ProvisioningState. + * Running. */ public static final ProvisioningState RUNNING = fromString("Running"); /** - * Static value Ready for ProvisioningState. + * Ready. */ public static final ProvisioningState READY = fromString("Ready"); /** - * Static value Creating for ProvisioningState. + * Creating. */ public static final ProvisioningState CREATING = fromString("Creating"); /** - * Static value Created for ProvisioningState. + * Created. */ public static final ProvisioningState CREATED = fromString("Created"); /** - * Static value Deleting for ProvisioningState. + * Deleting. */ public static final ProvisioningState DELETING = fromString("Deleting"); /** - * Static value Deleted for ProvisioningState. + * Deleted. */ public static final ProvisioningState DELETED = fromString("Deleted"); /** - * Static value Canceled for ProvisioningState. + * Canceled. */ public static final ProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Failed for ProvisioningState. + * Failed. */ public static final ProvisioningState FAILED = fromString("Failed"); /** - * Static value Succeeded for ProvisioningState. + * Succeeded. */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Updating for ProvisioningState. + * Updating. */ public static final ProvisioningState UPDATING = fromString("Updating"); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PublicNetworkAccess.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PublicNetworkAccess.java index 3a18320d1846..5d6879b5c0e3 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PublicNetworkAccess.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/PublicNetworkAccess.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -9,15 +9,16 @@ /** * The network access type for accessing workspace. Set value to disabled to access workspace only via private link. + * Used to configure front-end only private link for Serverless ComputeMode workspace. */ public final class PublicNetworkAccess extends ExpandableStringEnum { /** - * Static value Enabled for PublicNetworkAccess. + * Enabled. */ public static final PublicNetworkAccess ENABLED = fromString("Enabled"); /** - * Static value Disabled for PublicNetworkAccess. + * Disabled. */ public static final PublicNetworkAccess DISABLED = fromString("Disabled"); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/RequiredNsgRules.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/RequiredNsgRules.java index 962d54f0f6df..fe714d690b0c 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/RequiredNsgRules.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/RequiredNsgRules.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -10,21 +10,21 @@ /** * Gets or sets a value indicating whether data plane (clusters) to control plane communication happen over private * endpoint. Supported values are 'AllRules' and 'NoAzureDatabricksRules'. 'NoAzureServiceRules' value is for internal - * use only. + * use only. Not allowed in Serverless ComputeMode workspace. */ public final class RequiredNsgRules extends ExpandableStringEnum { /** - * Static value AllRules for RequiredNsgRules. + * AllRules. */ public static final RequiredNsgRules ALL_RULES = fromString("AllRules"); /** - * Static value NoAzureDatabricksRules for RequiredNsgRules. + * NoAzureDatabricksRules. */ public static final RequiredNsgRules NO_AZURE_DATABRICKS_RULES = fromString("NoAzureDatabricksRules"); /** - * Static value NoAzureServiceRules for RequiredNsgRules. + * NoAzureServiceRules. */ public static final RequiredNsgRules NO_AZURE_SERVICE_RULES = fromString("NoAzureServiceRules"); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Sku.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Sku.java index 4a613b814288..bf2a0317ad25 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Sku.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Sku.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -73,19 +72,6 @@ public Sku withTier(String tier) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Sku")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Sku.class); - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/UserAssignedIdentity.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/UserAssignedIdentity.java index d4cc33855c44..9cd632256fd9 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/UserAssignedIdentity.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/UserAssignedIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.UUID; /** * User assigned identity properties. @@ -20,12 +19,12 @@ public final class UserAssignedIdentity implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.principalId = reader.getString(); } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.clientId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VNetPeerings.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VNetPeerings.java index b8880e386878..c9d7dd1c75bf 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VNetPeerings.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VNetPeerings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeering.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeering.java index 254e1098b360..a86c8145e2b3 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeering.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeering.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.databricks.fluent.models.VirtualNetworkPeeringInner; @@ -32,6 +33,13 @@ public interface VirtualNetworkPeering { */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the allowVirtualNetworkAccess property: Whether the VMs in the local virtual network space would be able to * access the VMs in remote virtual network space. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork.java index c66c7da03216..f04c19aeead7 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -49,14 +49,6 @@ public VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork withId(Stri return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork.java index d4d3041f37c1..ffb0094f4ac5 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -49,14 +49,6 @@ public VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork withId(String i return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Workspace.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Workspace.java index 76a6b0ba28ea..dc08ad0660da 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Workspace.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Workspace.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -59,14 +59,23 @@ public interface Workspace { Sku sku(); /** - * Gets the systemData property: The system metadata relating to this resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ SystemData systemData(); /** - * Gets the managedResourceGroupId property: The managed resource group Id. + * Gets the computeMode property: The workspace compute mode. Required on create, cannot be changed. Possible values + * include: 'Serverless', 'Hybrid'. + * + * @return the computeMode value. + */ + ComputeMode computeMode(); + + /** + * Gets the managedResourceGroupId property: The managed resource group Id. Required in Hybrid ComputeMode + * workspace. Not allowed in Serverless ComputeMode workspace. * * @return the managedResourceGroupId value. */ @@ -139,7 +148,8 @@ public interface Workspace { String workspaceUrl(); /** - * Gets the storageAccountIdentity property: The details of Managed Identity of Storage Account. + * Gets the storageAccountIdentity property: The details of Managed Identity of Storage Account. Only returned in + * Hybrid ComputeMode workspace. * * @return the storageAccountIdentity value. */ @@ -147,28 +157,39 @@ public interface Workspace { /** * Gets the managedDiskIdentity property: The details of Managed Identity of Disk Encryption Set used for Managed - * Disk Encryption. + * Disk Encryption. Only returned in Hybrid ComputeMode workspace. * * @return the managedDiskIdentity value. */ ManagedIdentityConfiguration managedDiskIdentity(); /** - * Gets the diskEncryptionSetId property: The resource Id of the managed disk encryption set. + * Gets the diskEncryptionSetId property: The resource Id of the managed disk encryption set. Not allowed in + * Serverless ComputeMode workspace. * * @return the diskEncryptionSetId value. */ String diskEncryptionSetId(); /** - * Gets the encryption property: Encryption properties for databricks workspace. + * Gets the encryption property: Encryption properties for databricks workspace. Supported in both Serverless and + * Hybrid ComputeMode workspace. * * @return the encryption value. */ WorkspacePropertiesEncryption encryption(); /** - * Gets the privateEndpointConnections property: Private endpoint connections created on the workspace. + * Gets the enhancedSecurityCompliance property: Contains settings related to the Enhanced Security and Compliance + * Add-On. Supported in both Serverless and Hybrid ComputeMode workspace. + * + * @return the enhancedSecurityCompliance value. + */ + EnhancedSecurityComplianceDefinition enhancedSecurityCompliance(); + + /** + * Gets the privateEndpointConnections property: Private endpoint connections created on the workspace. Supported in + * both Serverless and Hybrid ComputeMode workspace. * * @return the privateEndpointConnections value. */ @@ -176,7 +197,8 @@ public interface Workspace { /** * Gets the publicNetworkAccess property: The network access type for accessing workspace. Set value to disabled to - * access workspace only via private link. + * access workspace only via private link. Used to configure front-end only private link for Serverless ComputeMode + * workspace. * * @return the publicNetworkAccess value. */ @@ -185,12 +207,44 @@ public interface Workspace { /** * Gets the requiredNsgRules property: Gets or sets a value indicating whether data plane (clusters) to control * plane communication happen over private endpoint. Supported values are 'AllRules' and 'NoAzureDatabricksRules'. - * 'NoAzureServiceRules' value is for internal use only. + * 'NoAzureServiceRules' value is for internal use only. Not allowed in Serverless ComputeMode workspace. * * @return the requiredNsgRules value. */ RequiredNsgRules requiredNsgRules(); + /** + * Gets the defaultCatalog property: Properties for Default Catalog configuration during workspace creation. Not + * allowed in Serverless ComputeMode workspace. + * + * @return the defaultCatalog value. + */ + DefaultCatalogProperties defaultCatalog(); + + /** + * Gets the isUcEnabled property: Indicates whether unity catalog enabled for the workspace or not. Set as true in + * Serverless ComputeMode workspace. + * + * @return the isUcEnabled value. + */ + Boolean isUcEnabled(); + + /** + * Gets the accessConnector property: Access Connector Resource that is going to be associated with Databricks + * Workspace. Not allowed in Serverless ComputeMode workspace. + * + * @return the accessConnector value. + */ + WorkspacePropertiesAccessConnector accessConnector(); + + /** + * Gets the defaultStorageFirewall property: Gets or Sets Default Storage Firewall configuration information. Not + * allowed in Serverless ComputeMode workspace. + * + * @return the defaultStorageFirewall value. + */ + DefaultStorageFirewall defaultStorageFirewall(); + /** * Gets the region of the resource. * @@ -223,7 +277,7 @@ public interface Workspace { * The entirety of the Workspace definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithManagedResourceGroupId, DefinitionStages.WithCreate { + DefinitionStages.WithResourceGroup, DefinitionStages.WithComputeMode, DefinitionStages.WithCreate { } /** @@ -267,31 +321,36 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithManagedResourceGroupId withExistingResourceGroup(String resourceGroupName); + WithComputeMode withExistingResourceGroup(String resourceGroupName); } /** - * The stage of the Workspace definition allowing to specify managedResourceGroupId. + * The stage of the Workspace definition allowing to specify computeMode. */ - interface WithManagedResourceGroupId { + interface WithComputeMode { /** - * Specifies the managedResourceGroupId property: The managed resource group Id.. + * Specifies the computeMode property: The workspace compute mode. Required on create, cannot be changed. + * Possible values include: 'Serverless', 'Hybrid'. * - * @param managedResourceGroupId The managed resource group Id. + * @param computeMode The workspace compute mode. Required on create, cannot be changed. Possible values + * include: 'Serverless', 'Hybrid'. * @return the next definition stage. */ - WithCreate withManagedResourceGroupId(String managedResourceGroupId); + WithCreate withComputeMode(ComputeMode computeMode); } /** * The stage of the Workspace definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku, + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithSku, DefinitionStages.WithManagedResourceGroupId, DefinitionStages.WithParameters, DefinitionStages.WithUiDefinitionUri, DefinitionStages.WithAuthorizations, DefinitionStages.WithCreatedBy, DefinitionStages.WithUpdatedBy, DefinitionStages.WithStorageAccountIdentity, DefinitionStages.WithManagedDiskIdentity, DefinitionStages.WithEncryption, - DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithRequiredNsgRules { + DefinitionStages.WithEnhancedSecurityCompliance, DefinitionStages.WithPublicNetworkAccess, + DefinitionStages.WithRequiredNsgRules, DefinitionStages.WithDefaultCatalog, + DefinitionStages.WithAccessConnector, DefinitionStages.WithDefaultStorageFirewall { /** * Executes the create request. * @@ -334,6 +393,21 @@ interface WithSku { WithCreate withSku(Sku sku); } + /** + * The stage of the Workspace definition allowing to specify managedResourceGroupId. + */ + interface WithManagedResourceGroupId { + /** + * Specifies the managedResourceGroupId property: The managed resource group Id. Required in Hybrid + * ComputeMode workspace. Not allowed in Serverless ComputeMode workspace.. + * + * @param managedResourceGroupId The managed resource group Id. Required in Hybrid ComputeMode workspace. + * Not allowed in Serverless ComputeMode workspace. + * @return the next definition stage. + */ + WithCreate withManagedResourceGroupId(String managedResourceGroupId); + } + /** * The stage of the Workspace definition allowing to specify parameters. */ @@ -407,9 +481,11 @@ interface WithUpdatedBy { */ interface WithStorageAccountIdentity { /** - * Specifies the storageAccountIdentity property: The details of Managed Identity of Storage Account. + * Specifies the storageAccountIdentity property: The details of Managed Identity of Storage Account. Only + * returned in Hybrid ComputeMode workspace.. * - * @param storageAccountIdentity The details of Managed Identity of Storage Account. + * @param storageAccountIdentity The details of Managed Identity of Storage Account. Only returned in Hybrid + * ComputeMode workspace. * @return the next definition stage. */ WithCreate withStorageAccountIdentity(ManagedIdentityConfiguration storageAccountIdentity); @@ -421,10 +497,10 @@ interface WithStorageAccountIdentity { interface WithManagedDiskIdentity { /** * Specifies the managedDiskIdentity property: The details of Managed Identity of Disk Encryption Set used - * for Managed Disk Encryption. + * for Managed Disk Encryption. Only returned in Hybrid ComputeMode workspace.. * * @param managedDiskIdentity The details of Managed Identity of Disk Encryption Set used for Managed Disk - * Encryption. + * Encryption. Only returned in Hybrid ComputeMode workspace. * @return the next definition stage. */ WithCreate withManagedDiskIdentity(ManagedIdentityConfiguration managedDiskIdentity); @@ -435,24 +511,43 @@ interface WithManagedDiskIdentity { */ interface WithEncryption { /** - * Specifies the encryption property: Encryption properties for databricks workspace. + * Specifies the encryption property: Encryption properties for databricks workspace. Supported in both + * Serverless and Hybrid ComputeMode workspace.. * - * @param encryption Encryption properties for databricks workspace. + * @param encryption Encryption properties for databricks workspace. Supported in both Serverless and Hybrid + * ComputeMode workspace. * @return the next definition stage. */ WithCreate withEncryption(WorkspacePropertiesEncryption encryption); } + /** + * The stage of the Workspace definition allowing to specify enhancedSecurityCompliance. + */ + interface WithEnhancedSecurityCompliance { + /** + * Specifies the enhancedSecurityCompliance property: Contains settings related to the Enhanced Security and + * Compliance Add-On. Supported in both Serverless and Hybrid ComputeMode workspace.. + * + * @param enhancedSecurityCompliance Contains settings related to the Enhanced Security and Compliance + * Add-On. Supported in both Serverless and Hybrid ComputeMode workspace. + * @return the next definition stage. + */ + WithCreate withEnhancedSecurityCompliance(EnhancedSecurityComplianceDefinition enhancedSecurityCompliance); + } + /** * The stage of the Workspace definition allowing to specify publicNetworkAccess. */ interface WithPublicNetworkAccess { /** * Specifies the publicNetworkAccess property: The network access type for accessing workspace. Set value to - * disabled to access workspace only via private link.. + * disabled to access workspace only via private link. Used to configure front-end only private link for + * Serverless ComputeMode workspace.. * * @param publicNetworkAccess The network access type for accessing workspace. Set value to disabled to - * access workspace only via private link. + * access workspace only via private link. Used to configure front-end only private link for Serverless + * ComputeMode workspace. * @return the next definition stage. */ WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); @@ -465,15 +560,61 @@ interface WithRequiredNsgRules { /** * Specifies the requiredNsgRules property: Gets or sets a value indicating whether data plane (clusters) to * control plane communication happen over private endpoint. Supported values are 'AllRules' and - * 'NoAzureDatabricksRules'. 'NoAzureServiceRules' value is for internal use only.. + * 'NoAzureDatabricksRules'. 'NoAzureServiceRules' value is for internal use only. Not allowed in Serverless + * ComputeMode workspace.. * * @param requiredNsgRules Gets or sets a value indicating whether data plane (clusters) to control plane * communication happen over private endpoint. Supported values are 'AllRules' and 'NoAzureDatabricksRules'. - * 'NoAzureServiceRules' value is for internal use only. + * 'NoAzureServiceRules' value is for internal use only. Not allowed in Serverless ComputeMode workspace. * @return the next definition stage. */ WithCreate withRequiredNsgRules(RequiredNsgRules requiredNsgRules); } + + /** + * The stage of the Workspace definition allowing to specify defaultCatalog. + */ + interface WithDefaultCatalog { + /** + * Specifies the defaultCatalog property: Properties for Default Catalog configuration during workspace + * creation. Not allowed in Serverless ComputeMode workspace.. + * + * @param defaultCatalog Properties for Default Catalog configuration during workspace creation. Not allowed + * in Serverless ComputeMode workspace. + * @return the next definition stage. + */ + WithCreate withDefaultCatalog(DefaultCatalogProperties defaultCatalog); + } + + /** + * The stage of the Workspace definition allowing to specify accessConnector. + */ + interface WithAccessConnector { + /** + * Specifies the accessConnector property: Access Connector Resource that is going to be associated with + * Databricks Workspace. Not allowed in Serverless ComputeMode workspace.. + * + * @param accessConnector Access Connector Resource that is going to be associated with Databricks + * Workspace. Not allowed in Serverless ComputeMode workspace. + * @return the next definition stage. + */ + WithCreate withAccessConnector(WorkspacePropertiesAccessConnector accessConnector); + } + + /** + * The stage of the Workspace definition allowing to specify defaultStorageFirewall. + */ + interface WithDefaultStorageFirewall { + /** + * Specifies the defaultStorageFirewall property: Gets or Sets Default Storage Firewall configuration + * information. Not allowed in Serverless ComputeMode workspace.. + * + * @param defaultStorageFirewall Gets or Sets Default Storage Firewall configuration information. Not + * allowed in Serverless ComputeMode workspace. + * @return the next definition stage. + */ + WithCreate withDefaultStorageFirewall(DefaultStorageFirewall defaultStorageFirewall); + } } /** diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomBooleanParameter.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomBooleanParameter.java index fc08b94bbc46..05bfbb2977d3 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomBooleanParameter.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomBooleanParameter.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -41,6 +41,17 @@ public CustomParameterType type() { return this.type; } + /** + * Set the type property: The type of variable that this is. + * + * @param type the type value to set. + * @return the WorkspaceCustomBooleanParameter object itself. + */ + public WorkspaceCustomBooleanParameter withType(CustomParameterType type) { + this.type = type; + return this; + } + /** * Get the value property: The value which should be used for this field. * @@ -61,14 +72,6 @@ public WorkspaceCustomBooleanParameter withValue(boolean value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -76,6 +79,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeBooleanField("value", this.value); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); return jsonWriter.writeEndObject(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomObjectParameter.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomObjectParameter.java index 994b98ffb793..6e1cc3b5a495 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomObjectParameter.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomObjectParameter.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +14,7 @@ /** * The value which should be used for this field. */ -@Fluent +@Immutable public final class WorkspaceCustomObjectParameter implements JsonSerializable { /* * The type of variable that this is @@ -30,7 +29,7 @@ public final class WorkspaceCustomObjectParameter implements JsonSerializable { /* - * The ID of a Azure Machine Learning workspace to link with Databricks workspace + * The ID of a Azure Machine Learning workspace to link with Databricks workspace. Not allowed in Serverless + * ComputeMode workspace. */ private WorkspaceCustomStringParameter amlWorkspaceId; /* - * The ID of a Virtual Network where this Databricks Cluster should be created + * The ID of a Virtual Network where this Databricks Cluster should be created. Not allowed in Serverless + * ComputeMode workspace. */ private WorkspaceCustomStringParameter customVirtualNetworkId; /* - * The name of a Public Subnet within the Virtual Network + * The name of a Public Subnet within the Virtual Network. Not allowed in Serverless ComputeMode workspace. */ private WorkspaceCustomStringParameter customPublicSubnetName; /* - * The name of the Private Subnet within the Virtual Network + * The name of the Private Subnet within the Virtual Network. Not allowed in Serverless ComputeMode workspace. */ private WorkspaceCustomStringParameter customPrivateSubnetName; /* - * Should the Public IP be Disabled? + * Boolean indicating whether the public IP should be disabled. Default value is true. Not allowed in Serverless + * ComputeMode workspace. */ - private WorkspaceCustomBooleanParameter enableNoPublicIp; + private WorkspaceNoPublicIpBooleanParameter enableNoPublicIp; /* - * Name of the outbound Load Balancer Backend Pool for Secure Cluster Connectivity (No Public IP). + * Name of the outbound Load Balancer Backend Pool for Secure Cluster Connectivity (No Public IP). Not allowed in + * Serverless ComputeMode workspace. */ private WorkspaceCustomStringParameter loadBalancerBackendPoolName; /* - * Resource URI of Outbound Load balancer for Secure Cluster Connectivity (No Public IP) workspace. + * Resource URI of Outbound Load balancer for Secure Cluster Connectivity (No Public IP) workspace. Not allowed in + * Serverless ComputeMode workspace. */ private WorkspaceCustomStringParameter loadBalancerId; /* - * Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace subnets. + * Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace subnets. Not allowed in + * Serverless ComputeMode workspace. */ private WorkspaceCustomStringParameter natGatewayName; /* - * Name of the Public IP for No Public IP workspace with managed vNet. + * Name of the Public IP for No Public IP workspace with managed vNet. Not allowed in Serverless ComputeMode + * workspace. */ private WorkspaceCustomStringParameter publicIpName; /* - * Prepare the workspace for encryption. Enables the Managed Identity for managed storage account. + * Prepare the workspace for encryption. Enables the Managed Identity for managed storage account. Not allowed in + * Serverless ComputeMode workspace. */ private WorkspaceCustomBooleanParameter prepareEncryption; /* - * Contains the encryption details for Customer-Managed Key (CMK) enabled workspace. + * Contains the encryption details for Customer-Managed Key (CMK) enabled workspace.Not allowed in Serverless + * ComputeMode workspace. */ private WorkspaceEncryptionParameter encryption; /* * A boolean indicating whether or not the DBFS root file system will be enabled with secondary layer of encryption - * with platform managed keys for data at rest. + * with platform managed keys for data at rest. Not allowed in Serverless ComputeMode workspace. */ private WorkspaceCustomBooleanParameter requireInfrastructureEncryption; /* - * Default DBFS storage account name. + * Default DBFS storage account name. Not allowed in Serverless ComputeMode workspace. */ private WorkspaceCustomStringParameter storageAccountName; /* - * Storage account SKU name, ex: Standard_GRS, Standard_LRS. Refer https://aka.ms/storageskus for valid inputs. + * Storage account SKU name, ex: Standard_GRS, Standard_LRS. Refer https://aka.ms/storageskus for valid inputs. Not + * allowed in Serverless ComputeMode workspace. */ private WorkspaceCustomStringParameter storageAccountSkuName; /* - * Address prefix for Managed virtual network. Default value for this input is 10.139. + * Address prefix for Managed virtual network. Default value for this input is 10.139. Not allowed in Serverless + * ComputeMode workspace. */ private WorkspaceCustomStringParameter vnetAddressPrefix; /* * Tags applied to resources under Managed resource group. These can be updated by updating tags at workspace level. + * Not allowed in Serverless ComputeMode workspace. */ private WorkspaceCustomObjectParameter resourceTags; @@ -105,6 +117,7 @@ public WorkspaceCustomParameters() { /** * Get the amlWorkspaceId property: The ID of a Azure Machine Learning workspace to link with Databricks workspace. + * Not allowed in Serverless ComputeMode workspace. * * @return the amlWorkspaceId value. */ @@ -114,6 +127,7 @@ public WorkspaceCustomStringParameter amlWorkspaceId() { /** * Set the amlWorkspaceId property: The ID of a Azure Machine Learning workspace to link with Databricks workspace. + * Not allowed in Serverless ComputeMode workspace. * * @param amlWorkspaceId the amlWorkspaceId value to set. * @return the WorkspaceCustomParameters object itself. @@ -125,7 +139,7 @@ public WorkspaceCustomParameters withAmlWorkspaceId(WorkspaceCustomStringParamet /** * Get the customVirtualNetworkId property: The ID of a Virtual Network where this Databricks Cluster should be - * created. + * created. Not allowed in Serverless ComputeMode workspace. * * @return the customVirtualNetworkId value. */ @@ -135,7 +149,7 @@ public WorkspaceCustomStringParameter customVirtualNetworkId() { /** * Set the customVirtualNetworkId property: The ID of a Virtual Network where this Databricks Cluster should be - * created. + * created. Not allowed in Serverless ComputeMode workspace. * * @param customVirtualNetworkId the customVirtualNetworkId value to set. * @return the WorkspaceCustomParameters object itself. @@ -146,7 +160,8 @@ public WorkspaceCustomParameters withCustomVirtualNetworkId(WorkspaceCustomStrin } /** - * Get the customPublicSubnetName property: The name of a Public Subnet within the Virtual Network. + * Get the customPublicSubnetName property: The name of a Public Subnet within the Virtual Network. Not allowed in + * Serverless ComputeMode workspace. * * @return the customPublicSubnetName value. */ @@ -155,7 +170,8 @@ public WorkspaceCustomStringParameter customPublicSubnetName() { } /** - * Set the customPublicSubnetName property: The name of a Public Subnet within the Virtual Network. + * Set the customPublicSubnetName property: The name of a Public Subnet within the Virtual Network. Not allowed in + * Serverless ComputeMode workspace. * * @param customPublicSubnetName the customPublicSubnetName value to set. * @return the WorkspaceCustomParameters object itself. @@ -166,7 +182,8 @@ public WorkspaceCustomParameters withCustomPublicSubnetName(WorkspaceCustomStrin } /** - * Get the customPrivateSubnetName property: The name of the Private Subnet within the Virtual Network. + * Get the customPrivateSubnetName property: The name of the Private Subnet within the Virtual Network. Not allowed + * in Serverless ComputeMode workspace. * * @return the customPrivateSubnetName value. */ @@ -175,7 +192,8 @@ public WorkspaceCustomStringParameter customPrivateSubnetName() { } /** - * Set the customPrivateSubnetName property: The name of the Private Subnet within the Virtual Network. + * Set the customPrivateSubnetName property: The name of the Private Subnet within the Virtual Network. Not allowed + * in Serverless ComputeMode workspace. * * @param customPrivateSubnetName the customPrivateSubnetName value to set. * @return the WorkspaceCustomParameters object itself. @@ -187,28 +205,30 @@ public WorkspaceCustomStringParameter customPrivateSubnetName() { } /** - * Get the enableNoPublicIp property: Should the Public IP be Disabled?. + * Get the enableNoPublicIp property: Boolean indicating whether the public IP should be disabled. Default value is + * true. Not allowed in Serverless ComputeMode workspace. * * @return the enableNoPublicIp value. */ - public WorkspaceCustomBooleanParameter enableNoPublicIp() { + public WorkspaceNoPublicIpBooleanParameter enableNoPublicIp() { return this.enableNoPublicIp; } /** - * Set the enableNoPublicIp property: Should the Public IP be Disabled?. + * Set the enableNoPublicIp property: Boolean indicating whether the public IP should be disabled. Default value is + * true. Not allowed in Serverless ComputeMode workspace. * * @param enableNoPublicIp the enableNoPublicIp value to set. * @return the WorkspaceCustomParameters object itself. */ - public WorkspaceCustomParameters withEnableNoPublicIp(WorkspaceCustomBooleanParameter enableNoPublicIp) { + public WorkspaceCustomParameters withEnableNoPublicIp(WorkspaceNoPublicIpBooleanParameter enableNoPublicIp) { this.enableNoPublicIp = enableNoPublicIp; return this; } /** * Get the loadBalancerBackendPoolName property: Name of the outbound Load Balancer Backend Pool for Secure Cluster - * Connectivity (No Public IP). + * Connectivity (No Public IP). Not allowed in Serverless ComputeMode workspace. * * @return the loadBalancerBackendPoolName value. */ @@ -218,7 +238,7 @@ public WorkspaceCustomStringParameter loadBalancerBackendPoolName() { /** * Set the loadBalancerBackendPoolName property: Name of the outbound Load Balancer Backend Pool for Secure Cluster - * Connectivity (No Public IP). + * Connectivity (No Public IP). Not allowed in Serverless ComputeMode workspace. * * @param loadBalancerBackendPoolName the loadBalancerBackendPoolName value to set. * @return the WorkspaceCustomParameters object itself. @@ -231,7 +251,7 @@ public WorkspaceCustomStringParameter loadBalancerBackendPoolName() { /** * Get the loadBalancerId property: Resource URI of Outbound Load balancer for Secure Cluster Connectivity (No - * Public IP) workspace. + * Public IP) workspace. Not allowed in Serverless ComputeMode workspace. * * @return the loadBalancerId value. */ @@ -241,7 +261,7 @@ public WorkspaceCustomStringParameter loadBalancerId() { /** * Set the loadBalancerId property: Resource URI of Outbound Load balancer for Secure Cluster Connectivity (No - * Public IP) workspace. + * Public IP) workspace. Not allowed in Serverless ComputeMode workspace. * * @param loadBalancerId the loadBalancerId value to set. * @return the WorkspaceCustomParameters object itself. @@ -253,7 +273,7 @@ public WorkspaceCustomParameters withLoadBalancerId(WorkspaceCustomStringParamet /** * Get the natGatewayName property: Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace - * subnets. + * subnets. Not allowed in Serverless ComputeMode workspace. * * @return the natGatewayName value. */ @@ -263,7 +283,7 @@ public WorkspaceCustomStringParameter natGatewayName() { /** * Set the natGatewayName property: Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace - * subnets. + * subnets. Not allowed in Serverless ComputeMode workspace. * * @param natGatewayName the natGatewayName value to set. * @return the WorkspaceCustomParameters object itself. @@ -274,7 +294,8 @@ public WorkspaceCustomParameters withNatGatewayName(WorkspaceCustomStringParamet } /** - * Get the publicIpName property: Name of the Public IP for No Public IP workspace with managed vNet. + * Get the publicIpName property: Name of the Public IP for No Public IP workspace with managed vNet. Not allowed in + * Serverless ComputeMode workspace. * * @return the publicIpName value. */ @@ -283,7 +304,8 @@ public WorkspaceCustomStringParameter publicIpName() { } /** - * Set the publicIpName property: Name of the Public IP for No Public IP workspace with managed vNet. + * Set the publicIpName property: Name of the Public IP for No Public IP workspace with managed vNet. Not allowed in + * Serverless ComputeMode workspace. * * @param publicIpName the publicIpName value to set. * @return the WorkspaceCustomParameters object itself. @@ -295,7 +317,7 @@ public WorkspaceCustomParameters withPublicIpName(WorkspaceCustomStringParameter /** * Get the prepareEncryption property: Prepare the workspace for encryption. Enables the Managed Identity for - * managed storage account. + * managed storage account. Not allowed in Serverless ComputeMode workspace. * * @return the prepareEncryption value. */ @@ -305,7 +327,7 @@ public WorkspaceCustomBooleanParameter prepareEncryption() { /** * Set the prepareEncryption property: Prepare the workspace for encryption. Enables the Managed Identity for - * managed storage account. + * managed storage account. Not allowed in Serverless ComputeMode workspace. * * @param prepareEncryption the prepareEncryption value to set. * @return the WorkspaceCustomParameters object itself. @@ -316,7 +338,8 @@ public WorkspaceCustomParameters withPrepareEncryption(WorkspaceCustomBooleanPar } /** - * Get the encryption property: Contains the encryption details for Customer-Managed Key (CMK) enabled workspace. + * Get the encryption property: Contains the encryption details for Customer-Managed Key (CMK) enabled workspace.Not + * allowed in Serverless ComputeMode workspace. * * @return the encryption value. */ @@ -325,7 +348,8 @@ public WorkspaceEncryptionParameter encryption() { } /** - * Set the encryption property: Contains the encryption details for Customer-Managed Key (CMK) enabled workspace. + * Set the encryption property: Contains the encryption details for Customer-Managed Key (CMK) enabled workspace.Not + * allowed in Serverless ComputeMode workspace. * * @param encryption the encryption value to set. * @return the WorkspaceCustomParameters object itself. @@ -337,7 +361,8 @@ public WorkspaceCustomParameters withEncryption(WorkspaceEncryptionParameter enc /** * Get the requireInfrastructureEncryption property: A boolean indicating whether or not the DBFS root file system - * will be enabled with secondary layer of encryption with platform managed keys for data at rest. + * will be enabled with secondary layer of encryption with platform managed keys for data at rest. Not allowed in + * Serverless ComputeMode workspace. * * @return the requireInfrastructureEncryption value. */ @@ -347,7 +372,8 @@ public WorkspaceCustomBooleanParameter requireInfrastructureEncryption() { /** * Set the requireInfrastructureEncryption property: A boolean indicating whether or not the DBFS root file system - * will be enabled with secondary layer of encryption with platform managed keys for data at rest. + * will be enabled with secondary layer of encryption with platform managed keys for data at rest. Not allowed in + * Serverless ComputeMode workspace. * * @param requireInfrastructureEncryption the requireInfrastructureEncryption value to set. * @return the WorkspaceCustomParameters object itself. @@ -359,7 +385,8 @@ public WorkspaceCustomBooleanParameter requireInfrastructureEncryption() { } /** - * Get the storageAccountName property: Default DBFS storage account name. + * Get the storageAccountName property: Default DBFS storage account name. Not allowed in Serverless ComputeMode + * workspace. * * @return the storageAccountName value. */ @@ -368,7 +395,8 @@ public WorkspaceCustomStringParameter storageAccountName() { } /** - * Set the storageAccountName property: Default DBFS storage account name. + * Set the storageAccountName property: Default DBFS storage account name. Not allowed in Serverless ComputeMode + * workspace. * * @param storageAccountName the storageAccountName value to set. * @return the WorkspaceCustomParameters object itself. @@ -380,7 +408,7 @@ public WorkspaceCustomParameters withStorageAccountName(WorkspaceCustomStringPar /** * Get the storageAccountSkuName property: Storage account SKU name, ex: Standard_GRS, Standard_LRS. Refer - * https://aka.ms/storageskus for valid inputs. + * https://aka.ms/storageskus for valid inputs. Not allowed in Serverless ComputeMode workspace. * * @return the storageAccountSkuName value. */ @@ -390,7 +418,7 @@ public WorkspaceCustomStringParameter storageAccountSkuName() { /** * Set the storageAccountSkuName property: Storage account SKU name, ex: Standard_GRS, Standard_LRS. Refer - * https://aka.ms/storageskus for valid inputs. + * https://aka.ms/storageskus for valid inputs. Not allowed in Serverless ComputeMode workspace. * * @param storageAccountSkuName the storageAccountSkuName value to set. * @return the WorkspaceCustomParameters object itself. @@ -402,7 +430,7 @@ public WorkspaceCustomParameters withStorageAccountSkuName(WorkspaceCustomString /** * Get the vnetAddressPrefix property: Address prefix for Managed virtual network. Default value for this input is - * 10.139. + * 10.139. Not allowed in Serverless ComputeMode workspace. * * @return the vnetAddressPrefix value. */ @@ -412,7 +440,7 @@ public WorkspaceCustomStringParameter vnetAddressPrefix() { /** * Set the vnetAddressPrefix property: Address prefix for Managed virtual network. Default value for this input is - * 10.139. + * 10.139. Not allowed in Serverless ComputeMode workspace. * * @param vnetAddressPrefix the vnetAddressPrefix value to set. * @return the WorkspaceCustomParameters object itself. @@ -424,7 +452,7 @@ public WorkspaceCustomParameters withVnetAddressPrefix(WorkspaceCustomStringPara /** * Get the resourceTags property: Tags applied to resources under Managed resource group. These can be updated by - * updating tags at workspace level. + * updating tags at workspace level. Not allowed in Serverless ComputeMode workspace. * * @return the resourceTags value. */ @@ -432,62 +460,6 @@ public WorkspaceCustomObjectParameter resourceTags() { return this.resourceTags; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (amlWorkspaceId() != null) { - amlWorkspaceId().validate(); - } - if (customVirtualNetworkId() != null) { - customVirtualNetworkId().validate(); - } - if (customPublicSubnetName() != null) { - customPublicSubnetName().validate(); - } - if (customPrivateSubnetName() != null) { - customPrivateSubnetName().validate(); - } - if (enableNoPublicIp() != null) { - enableNoPublicIp().validate(); - } - if (loadBalancerBackendPoolName() != null) { - loadBalancerBackendPoolName().validate(); - } - if (loadBalancerId() != null) { - loadBalancerId().validate(); - } - if (natGatewayName() != null) { - natGatewayName().validate(); - } - if (publicIpName() != null) { - publicIpName().validate(); - } - if (prepareEncryption() != null) { - prepareEncryption().validate(); - } - if (encryption() != null) { - encryption().validate(); - } - if (requireInfrastructureEncryption() != null) { - requireInfrastructureEncryption().validate(); - } - if (storageAccountName() != null) { - storageAccountName().validate(); - } - if (storageAccountSkuName() != null) { - storageAccountSkuName().validate(); - } - if (vnetAddressPrefix() != null) { - vnetAddressPrefix().validate(); - } - if (resourceTags() != null) { - resourceTags().validate(); - } - } - /** * {@inheritDoc} */ @@ -541,7 +513,7 @@ public static WorkspaceCustomParameters fromJson(JsonReader jsonReader) throws I = WorkspaceCustomStringParameter.fromJson(reader); } else if ("enableNoPublicIp".equals(fieldName)) { deserializedWorkspaceCustomParameters.enableNoPublicIp - = WorkspaceCustomBooleanParameter.fromJson(reader); + = WorkspaceNoPublicIpBooleanParameter.fromJson(reader); } else if ("loadBalancerBackendPoolName".equals(fieldName)) { deserializedWorkspaceCustomParameters.loadBalancerBackendPoolName = WorkspaceCustomStringParameter.fromJson(reader); diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomStringParameter.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomStringParameter.java index 55074bfdbd3d..90152dc22168 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomStringParameter.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomStringParameter.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -42,6 +41,17 @@ public CustomParameterType type() { return this.type; } + /** + * Set the type property: The type of variable that this is. + * + * @param type the type value to set. + * @return the WorkspaceCustomStringParameter object itself. + */ + public WorkspaceCustomStringParameter withType(CustomParameterType type) { + this.type = type; + return this; + } + /** * Get the value property: The value which should be used for this field. * @@ -62,21 +72,6 @@ public WorkspaceCustomStringParameter withValue(String value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model WorkspaceCustomStringParameter")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WorkspaceCustomStringParameter.class); - /** * {@inheritDoc} */ @@ -84,6 +79,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("value", this.value); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); return jsonWriter.writeEndObject(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceEncryptionParameter.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceEncryptionParameter.java index 473445cb43c9..53cf08a8c0a6 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceEncryptionParameter.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceEncryptionParameter.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -41,6 +41,17 @@ public CustomParameterType type() { return this.type; } + /** + * Set the type property: The type of variable that this is. + * + * @param type the type value to set. + * @return the WorkspaceEncryptionParameter object itself. + */ + public WorkspaceEncryptionParameter withType(CustomParameterType type) { + this.type = type; + return this; + } + /** * Get the value property: The value which should be used for this field. * @@ -61,23 +72,13 @@ public WorkspaceEncryptionParameter withValue(Encryption value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeJsonField("value", this.value); return jsonWriter.writeEndObject(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceNoPublicIpBooleanParameter.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceNoPublicIpBooleanParameter.java new file mode 100644 index 000000000000..e679ef7ae936 --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceNoPublicIpBooleanParameter.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The value which should be used for this field. + */ +@Fluent +public final class WorkspaceNoPublicIpBooleanParameter + implements JsonSerializable { + /* + * The type of variable that this is + */ + private CustomParameterType type; + + /* + * The value which should be used for this field. + */ + private boolean value; + + /** + * Creates an instance of WorkspaceNoPublicIpBooleanParameter class. + */ + public WorkspaceNoPublicIpBooleanParameter() { + } + + /** + * Get the type property: The type of variable that this is. + * + * @return the type value. + */ + public CustomParameterType type() { + return this.type; + } + + /** + * Set the type property: The type of variable that this is. + * + * @param type the type value to set. + * @return the WorkspaceNoPublicIpBooleanParameter object itself. + */ + public WorkspaceNoPublicIpBooleanParameter withType(CustomParameterType type) { + this.type = type; + return this; + } + + /** + * Get the value property: The value which should be used for this field. + * + * @return the value value. + */ + public boolean value() { + return this.value; + } + + /** + * Set the value property: The value which should be used for this field. + * + * @param value the value value to set. + * @return the WorkspaceNoPublicIpBooleanParameter object itself. + */ + public WorkspaceNoPublicIpBooleanParameter withValue(boolean value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("value", this.value); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceNoPublicIpBooleanParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceNoPublicIpBooleanParameter if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WorkspaceNoPublicIpBooleanParameter. + */ + public static WorkspaceNoPublicIpBooleanParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceNoPublicIpBooleanParameter deserializedWorkspaceNoPublicIpBooleanParameter + = new WorkspaceNoPublicIpBooleanParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedWorkspaceNoPublicIpBooleanParameter.value = reader.getBoolean(); + } else if ("type".equals(fieldName)) { + deserializedWorkspaceNoPublicIpBooleanParameter.type + = CustomParameterType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceNoPublicIpBooleanParameter; + }); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspacePropertiesAccessConnector.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspacePropertiesAccessConnector.java new file mode 100644 index 000000000000..9dba872acc6f --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspacePropertiesAccessConnector.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Access Connector Resource that is going to be associated with Databricks Workspace. Not allowed in Serverless + * ComputeMode workspace. + */ +@Fluent +public final class WorkspacePropertiesAccessConnector implements JsonSerializable { + /* + * The resource ID of Azure Databricks Access Connector Resource. + */ + private String id; + + /* + * The identity type of the Access Connector Resource. + */ + private IdentityType identityType; + + /* + * The resource ID of the User Assigned Identity associated with the Access Connector Resource. This is required for + * type 'UserAssigned' and not valid for type 'SystemAssigned'. + */ + private String userAssignedIdentityId; + + /** + * Creates an instance of WorkspacePropertiesAccessConnector class. + */ + public WorkspacePropertiesAccessConnector() { + } + + /** + * Get the id property: The resource ID of Azure Databricks Access Connector Resource. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The resource ID of Azure Databricks Access Connector Resource. + * + * @param id the id value to set. + * @return the WorkspacePropertiesAccessConnector object itself. + */ + public WorkspacePropertiesAccessConnector withId(String id) { + this.id = id; + return this; + } + + /** + * Get the identityType property: The identity type of the Access Connector Resource. + * + * @return the identityType value. + */ + public IdentityType identityType() { + return this.identityType; + } + + /** + * Set the identityType property: The identity type of the Access Connector Resource. + * + * @param identityType the identityType value to set. + * @return the WorkspacePropertiesAccessConnector object itself. + */ + public WorkspacePropertiesAccessConnector withIdentityType(IdentityType identityType) { + this.identityType = identityType; + return this; + } + + /** + * Get the userAssignedIdentityId property: The resource ID of the User Assigned Identity associated with the Access + * Connector Resource. This is required for type 'UserAssigned' and not valid for type 'SystemAssigned'. + * + * @return the userAssignedIdentityId value. + */ + public String userAssignedIdentityId() { + return this.userAssignedIdentityId; + } + + /** + * Set the userAssignedIdentityId property: The resource ID of the User Assigned Identity associated with the Access + * Connector Resource. This is required for type 'UserAssigned' and not valid for type 'SystemAssigned'. + * + * @param userAssignedIdentityId the userAssignedIdentityId value to set. + * @return the WorkspacePropertiesAccessConnector object itself. + */ + public WorkspacePropertiesAccessConnector withUserAssignedIdentityId(String userAssignedIdentityId) { + this.userAssignedIdentityId = userAssignedIdentityId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("identityType", this.identityType == null ? null : this.identityType.toString()); + jsonWriter.writeStringField("userAssignedIdentityId", this.userAssignedIdentityId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspacePropertiesAccessConnector from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspacePropertiesAccessConnector if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WorkspacePropertiesAccessConnector. + */ + public static WorkspacePropertiesAccessConnector fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspacePropertiesAccessConnector deserializedWorkspacePropertiesAccessConnector + = new WorkspacePropertiesAccessConnector(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkspacePropertiesAccessConnector.id = reader.getString(); + } else if ("identityType".equals(fieldName)) { + deserializedWorkspacePropertiesAccessConnector.identityType + = IdentityType.fromString(reader.getString()); + } else if ("userAssignedIdentityId".equals(fieldName)) { + deserializedWorkspacePropertiesAccessConnector.userAssignedIdentityId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspacePropertiesAccessConnector; + }); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspacePropertiesEncryption.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspacePropertiesEncryption.java index 91477921817a..817c69f2a230 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspacePropertiesEncryption.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspacePropertiesEncryption.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -13,7 +12,7 @@ import java.io.IOException; /** - * Encryption properties for databricks workspace. + * Encryption properties for databricks workspace. Supported in both Serverless and Hybrid ComputeMode workspace. */ @Fluent public final class WorkspacePropertiesEncryption implements JsonSerializable { @@ -48,23 +47,6 @@ public WorkspacePropertiesEncryption withEntities(EncryptionEntitiesDefinition e return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (entities() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property entities in model WorkspacePropertiesEncryption")); - } else { - entities().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WorkspacePropertiesEncryption.class); - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceProviderAuthorization.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceProviderAuthorization.java index e95f196dc634..12ad07b7a2a9 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceProviderAuthorization.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceProviderAuthorization.java @@ -1,18 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.Objects; -import java.util.UUID; /** * The workspace provider authorization. @@ -23,14 +20,14 @@ public final class WorkspaceProviderAuthorization implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedWorkspaceProviderAuthorization.principalId = reader.getString(); } else if ("roleDefinitionId".equals(fieldName)) { - deserializedWorkspaceProviderAuthorization.roleDefinitionId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedWorkspaceProviderAuthorization.roleDefinitionId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceUpdate.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceUpdate.java index db85cfbe48b7..5193bb529c1e 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceUpdate.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -48,14 +48,6 @@ public WorkspaceUpdate withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Workspaces.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Workspaces.java index 013391112bfd..b98e3f49cbcc 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Workspaces.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/Workspaces.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.models; @@ -49,20 +49,22 @@ public interface Workspaces { * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteByResourceGroup(String resourceGroupName, String workspaceName); + void delete(String resourceGroupName, String workspaceName); /** * Deletes the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param forceDeletion Optional parameter to retain default unity catalog data. By default the data will retained + * if Uc is enabled on the workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String workspaceName, Context context); + void delete(String resourceGroupName, String workspaceName, Boolean forceDeletion, Context context); /** * Gets all the workspaces within a resource group. @@ -151,13 +153,15 @@ public interface Workspaces { * Deletes the workspace. * * @param id the resource ID. + * @param forceDeletion Optional parameter to retain default unity catalog data. By default the data will retained + * if Uc is enabled on the workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.databricks.models.ErrorInfoException thrown if the request is rejected by * server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteByIdWithResponse(String id, Context context); + void deleteByIdWithResponse(String id, Boolean forceDeletion, Context context); /** * Begins definition for a new Workspace resource. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/package-info.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/package-info.java index d347338198bf..01e619d70a9b 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/package-info.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/models/package-info.java @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for AzureDatabricksManagementClient. - * The Microsoft Azure management APIs allow end users to operate on Azure Databricks Workspace / Access Connector - * resources. + * Package containing the data models for AzureDatabricks. + * ARM Databricks. */ package com.azure.resourcemanager.databricks.models; diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/package-info.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/package-info.java index 6c7719ec3cc4..eb1600501172 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/package-info.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/package-info.java @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for AzureDatabricksManagementClient. - * The Microsoft Azure management APIs allow end users to operate on Azure Databricks Workspace / Access Connector - * resources. + * Package containing the classes for AzureDatabricks. + * ARM Databricks. */ package com.azure.resourcemanager.databricks; diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/module-info.java b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/module-info.java index 381530dd9d8f..bc6eb4179054 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/main/java/module-info.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.databricks { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.databricks.fluent.models to com.azure.core; opens com.azure.resourcemanager.databricks.models to com.azure.core; + opens com.azure.resourcemanager.databricks.implementation.models to com.azure.core; } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/resources/META-INF/azure-resourcemanager-databricks_metadata.json b/sdk/databricks/azure-resourcemanager-databricks/src/main/resources/META-INF/azure-resourcemanager-databricks_metadata.json new file mode 100644 index 000000000000..e2efff53289c --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/resources/META-INF/azure-resourcemanager-databricks_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Microsoft.Databricks":"2026-01-01"},"crossLanguageDefinitions":{"com.azure.resourcemanager.databricks.fluent.AccessConnectorsClient":"Microsoft.Databricks.AccessConnectors","com.azure.resourcemanager.databricks.fluent.AccessConnectorsClient.beginCreateOrUpdate":"Microsoft.Databricks.AccessConnectors.createOrUpdate","com.azure.resourcemanager.databricks.fluent.AccessConnectorsClient.beginDelete":"Microsoft.Databricks.AccessConnectors.delete","com.azure.resourcemanager.databricks.fluent.AccessConnectorsClient.beginUpdate":"Microsoft.Databricks.AccessConnectors.update","com.azure.resourcemanager.databricks.fluent.AccessConnectorsClient.createOrUpdate":"Microsoft.Databricks.AccessConnectors.createOrUpdate","com.azure.resourcemanager.databricks.fluent.AccessConnectorsClient.delete":"Microsoft.Databricks.AccessConnectors.delete","com.azure.resourcemanager.databricks.fluent.AccessConnectorsClient.getByResourceGroup":"Microsoft.Databricks.AccessConnectors.get","com.azure.resourcemanager.databricks.fluent.AccessConnectorsClient.getByResourceGroupWithResponse":"Microsoft.Databricks.AccessConnectors.get","com.azure.resourcemanager.databricks.fluent.AccessConnectorsClient.list":"Microsoft.Databricks.AccessConnectors.listBySubscription","com.azure.resourcemanager.databricks.fluent.AccessConnectorsClient.listByResourceGroup":"Microsoft.Databricks.AccessConnectors.listByResourceGroup","com.azure.resourcemanager.databricks.fluent.AccessConnectorsClient.update":"Microsoft.Databricks.AccessConnectors.update","com.azure.resourcemanager.databricks.fluent.AzureDatabricksManagementClient":"Microsoft.Databricks","com.azure.resourcemanager.databricks.fluent.OperationsClient":"Microsoft.Databricks.Operations","com.azure.resourcemanager.databricks.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.databricks.fluent.OutboundNetworkDependenciesEndpointsClient":"Microsoft.Databricks","com.azure.resourcemanager.databricks.fluent.OutboundNetworkDependenciesEndpointsClient.list":"Microsoft.Databricks.Workspaces.list","com.azure.resourcemanager.databricks.fluent.OutboundNetworkDependenciesEndpointsClient.listWithResponse":"Microsoft.Databricks.Workspaces.list","com.azure.resourcemanager.databricks.fluent.PrivateEndpointConnectionsClient":"Microsoft.Databricks.PrivateEndpointConnections","com.azure.resourcemanager.databricks.fluent.PrivateEndpointConnectionsClient.beginCreate":"Microsoft.Databricks.PrivateEndpointConnections.create","com.azure.resourcemanager.databricks.fluent.PrivateEndpointConnectionsClient.beginDelete":"Microsoft.Databricks.PrivateEndpointConnections.delete","com.azure.resourcemanager.databricks.fluent.PrivateEndpointConnectionsClient.create":"Microsoft.Databricks.PrivateEndpointConnections.create","com.azure.resourcemanager.databricks.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.Databricks.PrivateEndpointConnections.delete","com.azure.resourcemanager.databricks.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.Databricks.PrivateEndpointConnections.get","com.azure.resourcemanager.databricks.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.Databricks.PrivateEndpointConnections.get","com.azure.resourcemanager.databricks.fluent.PrivateEndpointConnectionsClient.list":"Microsoft.Databricks.PrivateEndpointConnections.list","com.azure.resourcemanager.databricks.fluent.PrivateLinkResourcesClient":"Microsoft.Databricks","com.azure.resourcemanager.databricks.fluent.PrivateLinkResourcesClient.get":"Microsoft.Databricks.GroupIdInformations.get","com.azure.resourcemanager.databricks.fluent.PrivateLinkResourcesClient.getWithResponse":"Microsoft.Databricks.GroupIdInformations.get","com.azure.resourcemanager.databricks.fluent.PrivateLinkResourcesClient.list":"Microsoft.Databricks.GroupIdInformations.list","com.azure.resourcemanager.databricks.fluent.VNetPeeringsClient":"Microsoft.Databricks","com.azure.resourcemanager.databricks.fluent.VNetPeeringsClient.beginCreateOrUpdate":"Microsoft.Databricks.VirtualNetworkPeerings.createOrUpdate","com.azure.resourcemanager.databricks.fluent.VNetPeeringsClient.beginDelete":"Microsoft.Databricks.VirtualNetworkPeerings.delete","com.azure.resourcemanager.databricks.fluent.VNetPeeringsClient.createOrUpdate":"Microsoft.Databricks.VirtualNetworkPeerings.createOrUpdate","com.azure.resourcemanager.databricks.fluent.VNetPeeringsClient.delete":"Microsoft.Databricks.VirtualNetworkPeerings.delete","com.azure.resourcemanager.databricks.fluent.VNetPeeringsClient.get":"Microsoft.Databricks.VirtualNetworkPeerings.get","com.azure.resourcemanager.databricks.fluent.VNetPeeringsClient.getWithResponse":"Microsoft.Databricks.VirtualNetworkPeerings.get","com.azure.resourcemanager.databricks.fluent.VNetPeeringsClient.listByWorkspace":"Microsoft.Databricks.VirtualNetworkPeerings.listByWorkspace","com.azure.resourcemanager.databricks.fluent.WorkspacesClient":"Microsoft.Databricks.Workspaces","com.azure.resourcemanager.databricks.fluent.WorkspacesClient.beginCreateOrUpdate":"Microsoft.Databricks.Workspaces.createOrUpdate","com.azure.resourcemanager.databricks.fluent.WorkspacesClient.beginDelete":"Microsoft.Databricks.Workspaces.delete","com.azure.resourcemanager.databricks.fluent.WorkspacesClient.beginUpdate":"Microsoft.Databricks.Workspaces.update","com.azure.resourcemanager.databricks.fluent.WorkspacesClient.createOrUpdate":"Microsoft.Databricks.Workspaces.createOrUpdate","com.azure.resourcemanager.databricks.fluent.WorkspacesClient.delete":"Microsoft.Databricks.Workspaces.delete","com.azure.resourcemanager.databricks.fluent.WorkspacesClient.getByResourceGroup":"Microsoft.Databricks.Workspaces.get","com.azure.resourcemanager.databricks.fluent.WorkspacesClient.getByResourceGroupWithResponse":"Microsoft.Databricks.Workspaces.get","com.azure.resourcemanager.databricks.fluent.WorkspacesClient.list":"Microsoft.Databricks.Workspaces.listBySubscription","com.azure.resourcemanager.databricks.fluent.WorkspacesClient.listByResourceGroup":"Microsoft.Databricks.Workspaces.listByResourceGroup","com.azure.resourcemanager.databricks.fluent.WorkspacesClient.update":"Microsoft.Databricks.Workspaces.update","com.azure.resourcemanager.databricks.fluent.models.AccessConnectorInner":"Microsoft.Databricks.AccessConnector","com.azure.resourcemanager.databricks.fluent.models.GroupIdInformationInner":"Microsoft.Databricks.GroupIdInformation","com.azure.resourcemanager.databricks.fluent.models.OperationInner":"Microsoft.Databricks.Operation","com.azure.resourcemanager.databricks.fluent.models.OutboundEnvironmentEndpointInner":"Microsoft.Databricks.OutboundEnvironmentEndpoint","com.azure.resourcemanager.databricks.fluent.models.PrivateEndpointConnectionInner":"Microsoft.Databricks.PrivateEndpointConnection","com.azure.resourcemanager.databricks.fluent.models.VirtualNetworkPeeringInner":"Microsoft.Databricks.VirtualNetworkPeering","com.azure.resourcemanager.databricks.fluent.models.VirtualNetworkPeeringPropertiesFormat":"Microsoft.Databricks.VirtualNetworkPeeringPropertiesFormat","com.azure.resourcemanager.databricks.fluent.models.WorkspaceInner":"Microsoft.Databricks.Workspace","com.azure.resourcemanager.databricks.fluent.models.WorkspaceProperties":"Microsoft.Databricks.WorkspaceProperties","com.azure.resourcemanager.databricks.implementation.AzureDatabricksManagementClientBuilder":"Microsoft.Databricks","com.azure.resourcemanager.databricks.implementation.models.AccessConnectorListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.databricks.implementation.models.OperationListResult":"Microsoft.Databricks.OperationListResult","com.azure.resourcemanager.databricks.implementation.models.PrivateEndpointConnectionsList":"Microsoft.Databricks.PrivateEndpointConnectionsList","com.azure.resourcemanager.databricks.implementation.models.PrivateLinkResourcesList":"Microsoft.Databricks.PrivateLinkResourcesList","com.azure.resourcemanager.databricks.implementation.models.VirtualNetworkPeeringList":"Microsoft.Databricks.VirtualNetworkPeeringList","com.azure.resourcemanager.databricks.implementation.models.WorkspaceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.databricks.models.AccessConnectorProperties":"Microsoft.Databricks.AccessConnectorProperties","com.azure.resourcemanager.databricks.models.AccessConnectorUpdate":"Microsoft.Databricks.AccessConnectorUpdate","com.azure.resourcemanager.databricks.models.AddressSpace":"Microsoft.Databricks.AddressSpace","com.azure.resourcemanager.databricks.models.AutomaticClusterUpdateDefinition":"Microsoft.Databricks.AutomaticClusterUpdateDefinition","com.azure.resourcemanager.databricks.models.AutomaticClusterUpdateValue":"Microsoft.Databricks.AutomaticClusterUpdateValue","com.azure.resourcemanager.databricks.models.ComplianceSecurityProfileDefinition":"Microsoft.Databricks.ComplianceSecurityProfileDefinition","com.azure.resourcemanager.databricks.models.ComplianceSecurityProfileValue":"Microsoft.Databricks.ComplianceSecurityProfileValue","com.azure.resourcemanager.databricks.models.ComputeMode":"Microsoft.Databricks.ComputeMode","com.azure.resourcemanager.databricks.models.CreatedBy":"Microsoft.Databricks.CreatedBy","com.azure.resourcemanager.databricks.models.CustomParameterType":"Microsoft.Databricks.CustomParameterType","com.azure.resourcemanager.databricks.models.DefaultCatalogProperties":"Microsoft.Databricks.DefaultCatalogProperties","com.azure.resourcemanager.databricks.models.DefaultStorageFirewall":"Microsoft.Databricks.DefaultStorageFirewall","com.azure.resourcemanager.databricks.models.Encryption":"Microsoft.Databricks.Encryption","com.azure.resourcemanager.databricks.models.EncryptionEntitiesDefinition":"Microsoft.Databricks.EncryptionEntitiesDefinition","com.azure.resourcemanager.databricks.models.EncryptionKeySource":"Microsoft.Databricks.EncryptionKeySource","com.azure.resourcemanager.databricks.models.EncryptionV2":"Microsoft.Databricks.EncryptionV2","com.azure.resourcemanager.databricks.models.EncryptionV2KeyVaultProperties":"Microsoft.Databricks.EncryptionV2KeyVaultProperties","com.azure.resourcemanager.databricks.models.EndpointDependency":"Microsoft.Databricks.EndpointDependency","com.azure.resourcemanager.databricks.models.EndpointDetail":"Microsoft.Databricks.EndpointDetail","com.azure.resourcemanager.databricks.models.EnhancedSecurityComplianceDefinition":"Microsoft.Databricks.EnhancedSecurityComplianceDefinition","com.azure.resourcemanager.databricks.models.EnhancedSecurityMonitoringDefinition":"Microsoft.Databricks.EnhancedSecurityMonitoringDefinition","com.azure.resourcemanager.databricks.models.EnhancedSecurityMonitoringValue":"Microsoft.Databricks.EnhancedSecurityMonitoringValue","com.azure.resourcemanager.databricks.models.ErrorInfo":"Microsoft.Databricks.ErrorResponse","com.azure.resourcemanager.databricks.models.GroupIdInformationProperties":"Microsoft.Databricks.GroupIdInformationProperties","com.azure.resourcemanager.databricks.models.IdentityType":"Microsoft.Databricks.IdentityType","com.azure.resourcemanager.databricks.models.InitialType":"Microsoft.Databricks.InitialType","com.azure.resourcemanager.databricks.models.KeySource":"Microsoft.Databricks.KeySource","com.azure.resourcemanager.databricks.models.ManagedDiskEncryption":"Microsoft.Databricks.ManagedDiskEncryption","com.azure.resourcemanager.databricks.models.ManagedDiskEncryptionKeyVaultProperties":"Microsoft.Databricks.ManagedDiskEncryptionKeyVaultProperties","com.azure.resourcemanager.databricks.models.ManagedIdentityConfiguration":"Microsoft.Databricks.ManagedIdentityConfiguration","com.azure.resourcemanager.databricks.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.databricks.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.databricks.models.OperationDisplay":"Microsoft.Databricks.OperationDisplay","com.azure.resourcemanager.databricks.models.PeeringProvisioningState":"Microsoft.Databricks.PeeringProvisioningState","com.azure.resourcemanager.databricks.models.PeeringState":"Microsoft.Databricks.PeeringState","com.azure.resourcemanager.databricks.models.PrivateEndpoint":"Microsoft.Databricks.PrivateEndpoint","com.azure.resourcemanager.databricks.models.PrivateEndpointConnectionProperties":"Microsoft.Databricks.PrivateEndpointConnectionProperties","com.azure.resourcemanager.databricks.models.PrivateEndpointConnectionProvisioningState":"Microsoft.Databricks.PrivateEndpointConnectionProvisioningState","com.azure.resourcemanager.databricks.models.PrivateLinkServiceConnectionState":"Microsoft.Databricks.PrivateLinkServiceConnectionState","com.azure.resourcemanager.databricks.models.PrivateLinkServiceConnectionStatus":"Microsoft.Databricks.PrivateLinkServiceConnectionStatus","com.azure.resourcemanager.databricks.models.ProvisioningState":"Microsoft.Databricks.ProvisioningState","com.azure.resourcemanager.databricks.models.PublicNetworkAccess":"Microsoft.Databricks.PublicNetworkAccess","com.azure.resourcemanager.databricks.models.RequiredNsgRules":"Microsoft.Databricks.RequiredNsgRules","com.azure.resourcemanager.databricks.models.Sku":"Microsoft.Databricks.Sku","com.azure.resourcemanager.databricks.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.databricks.models.VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork":"Microsoft.Databricks.VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork","com.azure.resourcemanager.databricks.models.VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork":"Microsoft.Databricks.VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork","com.azure.resourcemanager.databricks.models.WorkspaceCustomBooleanParameter":"Microsoft.Databricks.WorkspaceCustomBooleanParameter","com.azure.resourcemanager.databricks.models.WorkspaceCustomObjectParameter":"Microsoft.Databricks.WorkspaceCustomObjectParameter","com.azure.resourcemanager.databricks.models.WorkspaceCustomParameters":"Microsoft.Databricks.WorkspaceCustomParameters","com.azure.resourcemanager.databricks.models.WorkspaceCustomStringParameter":"Microsoft.Databricks.WorkspaceCustomStringParameter","com.azure.resourcemanager.databricks.models.WorkspaceEncryptionParameter":"Microsoft.Databricks.WorkspaceEncryptionParameter","com.azure.resourcemanager.databricks.models.WorkspaceNoPublicIpBooleanParameter":"Microsoft.Databricks.WorkspaceNoPublicIPBooleanParameter","com.azure.resourcemanager.databricks.models.WorkspacePropertiesAccessConnector":"Microsoft.Databricks.WorkspacePropertiesAccessConnector","com.azure.resourcemanager.databricks.models.WorkspacePropertiesEncryption":"Microsoft.Databricks.WorkspacePropertiesEncryption","com.azure.resourcemanager.databricks.models.WorkspaceProviderAuthorization":"Microsoft.Databricks.WorkspaceProviderAuthorization","com.azure.resourcemanager.databricks.models.WorkspaceUpdate":"Microsoft.Databricks.WorkspaceUpdate"},"generatedFiles":["src/main/java/com/azure/resourcemanager/databricks/AzureDatabricksManager.java","src/main/java/com/azure/resourcemanager/databricks/fluent/AccessConnectorsClient.java","src/main/java/com/azure/resourcemanager/databricks/fluent/AzureDatabricksManagementClient.java","src/main/java/com/azure/resourcemanager/databricks/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/databricks/fluent/OutboundNetworkDependenciesEndpointsClient.java","src/main/java/com/azure/resourcemanager/databricks/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/databricks/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/databricks/fluent/VNetPeeringsClient.java","src/main/java/com/azure/resourcemanager/databricks/fluent/WorkspacesClient.java","src/main/java/com/azure/resourcemanager/databricks/fluent/models/AccessConnectorInner.java","src/main/java/com/azure/resourcemanager/databricks/fluent/models/GroupIdInformationInner.java","src/main/java/com/azure/resourcemanager/databricks/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/databricks/fluent/models/OutboundEnvironmentEndpointInner.java","src/main/java/com/azure/resourcemanager/databricks/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/databricks/fluent/models/VirtualNetworkPeeringInner.java","src/main/java/com/azure/resourcemanager/databricks/fluent/models/VirtualNetworkPeeringPropertiesFormat.java","src/main/java/com/azure/resourcemanager/databricks/fluent/models/WorkspaceInner.java","src/main/java/com/azure/resourcemanager/databricks/fluent/models/WorkspaceProperties.java","src/main/java/com/azure/resourcemanager/databricks/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/databricks/fluent/package-info.java","src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorsClientImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/AccessConnectorsImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/AzureDatabricksManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/databricks/implementation/AzureDatabricksManagementClientImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/GroupIdInformationImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundEnvironmentEndpointImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundNetworkDependenciesEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/OutboundNetworkDependenciesEndpointsImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/PrivateLinkResourcesImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/databricks/implementation/VNetPeeringsClientImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/VNetPeeringsImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/VirtualNetworkPeeringImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspaceImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspacesClientImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/WorkspacesImpl.java","src/main/java/com/azure/resourcemanager/databricks/implementation/models/AccessConnectorListResult.java","src/main/java/com/azure/resourcemanager/databricks/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/databricks/implementation/models/PrivateEndpointConnectionsList.java","src/main/java/com/azure/resourcemanager/databricks/implementation/models/PrivateLinkResourcesList.java","src/main/java/com/azure/resourcemanager/databricks/implementation/models/VirtualNetworkPeeringList.java","src/main/java/com/azure/resourcemanager/databricks/implementation/models/WorkspaceListResult.java","src/main/java/com/azure/resourcemanager/databricks/implementation/package-info.java","src/main/java/com/azure/resourcemanager/databricks/models/AccessConnector.java","src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectorProperties.java","src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectorUpdate.java","src/main/java/com/azure/resourcemanager/databricks/models/AccessConnectors.java","src/main/java/com/azure/resourcemanager/databricks/models/AddressSpace.java","src/main/java/com/azure/resourcemanager/databricks/models/AutomaticClusterUpdateDefinition.java","src/main/java/com/azure/resourcemanager/databricks/models/AutomaticClusterUpdateValue.java","src/main/java/com/azure/resourcemanager/databricks/models/ComplianceSecurityProfileDefinition.java","src/main/java/com/azure/resourcemanager/databricks/models/ComplianceSecurityProfileValue.java","src/main/java/com/azure/resourcemanager/databricks/models/ComputeMode.java","src/main/java/com/azure/resourcemanager/databricks/models/CreatedBy.java","src/main/java/com/azure/resourcemanager/databricks/models/CustomParameterType.java","src/main/java/com/azure/resourcemanager/databricks/models/DefaultCatalogProperties.java","src/main/java/com/azure/resourcemanager/databricks/models/DefaultStorageFirewall.java","src/main/java/com/azure/resourcemanager/databricks/models/Encryption.java","src/main/java/com/azure/resourcemanager/databricks/models/EncryptionEntitiesDefinition.java","src/main/java/com/azure/resourcemanager/databricks/models/EncryptionKeySource.java","src/main/java/com/azure/resourcemanager/databricks/models/EncryptionV2.java","src/main/java/com/azure/resourcemanager/databricks/models/EncryptionV2KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/databricks/models/EndpointDependency.java","src/main/java/com/azure/resourcemanager/databricks/models/EndpointDetail.java","src/main/java/com/azure/resourcemanager/databricks/models/EnhancedSecurityComplianceDefinition.java","src/main/java/com/azure/resourcemanager/databricks/models/EnhancedSecurityMonitoringDefinition.java","src/main/java/com/azure/resourcemanager/databricks/models/EnhancedSecurityMonitoringValue.java","src/main/java/com/azure/resourcemanager/databricks/models/ErrorInfo.java","src/main/java/com/azure/resourcemanager/databricks/models/ErrorInfoException.java","src/main/java/com/azure/resourcemanager/databricks/models/GroupIdInformation.java","src/main/java/com/azure/resourcemanager/databricks/models/GroupIdInformationProperties.java","src/main/java/com/azure/resourcemanager/databricks/models/IdentityType.java","src/main/java/com/azure/resourcemanager/databricks/models/InitialType.java","src/main/java/com/azure/resourcemanager/databricks/models/KeySource.java","src/main/java/com/azure/resourcemanager/databricks/models/ManagedDiskEncryption.java","src/main/java/com/azure/resourcemanager/databricks/models/ManagedDiskEncryptionKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/databricks/models/ManagedIdentityConfiguration.java","src/main/java/com/azure/resourcemanager/databricks/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/databricks/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/databricks/models/Operation.java","src/main/java/com/azure/resourcemanager/databricks/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/databricks/models/Operations.java","src/main/java/com/azure/resourcemanager/databricks/models/OutboundEnvironmentEndpoint.java","src/main/java/com/azure/resourcemanager/databricks/models/OutboundNetworkDependenciesEndpoints.java","src/main/java/com/azure/resourcemanager/databricks/models/PeeringProvisioningState.java","src/main/java/com/azure/resourcemanager/databricks/models/PeeringState.java","src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/databricks/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkResources.java","src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/databricks/models/PrivateLinkServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/databricks/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/databricks/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/databricks/models/RequiredNsgRules.java","src/main/java/com/azure/resourcemanager/databricks/models/Sku.java","src/main/java/com/azure/resourcemanager/databricks/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/databricks/models/VNetPeerings.java","src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeering.java","src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork.java","src/main/java/com/azure/resourcemanager/databricks/models/VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork.java","src/main/java/com/azure/resourcemanager/databricks/models/Workspace.java","src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomBooleanParameter.java","src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomObjectParameter.java","src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomParameters.java","src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceCustomStringParameter.java","src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceEncryptionParameter.java","src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceNoPublicIpBooleanParameter.java","src/main/java/com/azure/resourcemanager/databricks/models/WorkspacePropertiesAccessConnector.java","src/main/java/com/azure/resourcemanager/databricks/models/WorkspacePropertiesEncryption.java","src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceProviderAuthorization.java","src/main/java/com/azure/resourcemanager/databricks/models/WorkspaceUpdate.java","src/main/java/com/azure/resourcemanager/databricks/models/Workspaces.java","src/main/java/com/azure/resourcemanager/databricks/models/package-info.java","src/main/java/com/azure/resourcemanager/databricks/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/main/resources/azure-resourcemanager-databricks.properties b/sdk/databricks/azure-resourcemanager-databricks/src/main/resources/azure-resourcemanager-databricks.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/main/resources/azure-resourcemanager-databricks.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsCreateOrUpdateSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsCreateOrUpdateSamples.java index b956d07732db..3d2205a7341b 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsCreateOrUpdateSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,15 +9,14 @@ */ public final class AccessConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/ - * AccessConnectorCreateOrUpdateWithUserAssigned.json + * x-ms-original-file: 2026-01-01/AccessConnectorCreateOrUpdate.json */ /** - * Sample code: Create an azure databricks accessConnector with UserAssigned Identity. + * Sample code: Create an Azure Databricks Access Connector with SystemAssigned Identity. * * @param manager Entry point to AzureDatabricksManager. */ - public static void createAnAzureDatabricksAccessConnectorWithUserAssignedIdentity( + public static void createAnAzureDatabricksAccessConnectorWithSystemAssignedIdentity( com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { manager.accessConnectors() .define("myAccessConnector") @@ -27,15 +26,14 @@ public static void createAnAzureDatabricksAccessConnectorWithUserAssignedIdentit } /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/ - * AccessConnectorCreateOrUpdate.json + * x-ms-original-file: 2026-01-01/AccessConnectorCreateOrUpdateWithUserAssigned.json */ /** - * Sample code: Create an azure databricks accessConnector with SystemAssigned Identity. + * Sample code: Create an Azure Databricks Access Connector with UserAssigned Identity. * * @param manager Entry point to AzureDatabricksManager. */ - public static void createAnAzureDatabricksAccessConnectorWithSystemAssignedIdentity( + public static void createAnAzureDatabricksAccessConnectorWithUserAssignedIdentity( com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { manager.accessConnectors() .define("myAccessConnector") diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsDeleteSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsDeleteSamples.java index f235350e9a44..a1da78df9a65 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsDeleteSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,12 +9,10 @@ */ public final class AccessConnectorsDeleteSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/AccessConnectorDelete. - * json + * x-ms-original-file: 2026-01-01/AccessConnectorDelete.json */ /** - * Sample code: Delete an azure databricks accessConnector. + * Sample code: Delete an Azure Databricks Access Connector. * * @param manager Entry point to AzureDatabricksManager. */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsGetByResourceGroupSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsGetByResourceGroupSamples.java index 431052a41238..30e0deee44a8 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsGetByResourceGroupSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,11 +9,10 @@ */ public final class AccessConnectorsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/AccessConnectorGet.json + * x-ms-original-file: 2026-01-01/AccessConnectorGet.json */ /** - * Sample code: Get an azure databricks accessConnector. + * Sample code: Get an Azure Databricks Access Connector. * * @param manager Entry point to AzureDatabricksManager. */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListByResourceGroupSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListByResourceGroupSamples.java index e92339347460..6a37e10c1c62 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListByResourceGroupSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,11 +9,10 @@ */ public final class AccessConnectorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/ - * AccessConnectorsListByResourceGroup.json + * x-ms-original-file: 2026-01-01/AccessConnectorsListByResourceGroup.json */ /** - * Sample code: Lists azure databricks accessConnectors within a resource group. + * Sample code: Lists Azure Databricks Access Connectors within a resource group. * * @param manager Entry point to AzureDatabricksManager. */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListSamples.java index 773cfeec8a31..71507885a26d 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,11 +9,10 @@ */ public final class AccessConnectorsListSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/ - * AccessConnectorsListBySubscriptionId.json + * x-ms-original-file: 2026-01-01/AccessConnectorsListBySubscriptionId.json */ /** - * Sample code: Lists all the azure databricks accessConnectors within a subscription. + * Sample code: Lists all the Azure Databricks Access Connectors within a subscription. * * @param manager Entry point to AzureDatabricksManager. */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsUpdateSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsUpdateSamples.java index 59532cb68c26..b74b3b2cf339 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsUpdateSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -13,11 +13,10 @@ */ public final class AccessConnectorsUpdateSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-05-01/examples/ - * AccessConnectorPatchUpdate.json + * x-ms-original-file: 2026-01-01/AccessConnectorPatchUpdate.json */ /** - * Sample code: Update an azure databricks accessConnector. + * Sample code: Update an Azure Databricks Access Connector. * * @param manager Entry point to AzureDatabricksManager. */ diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/OperationsListSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/OperationsListSamples.java index eeb12a910e38..b24adc999247 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/OperationsListSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,8 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/OperationsList.json + * x-ms-original-file: 2026-01-01/OperationsList.json */ /** * Sample code: Operations. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/OutboundNetworkDependenciesEndpointsListSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/OutboundNetworkDependenciesEndpointsListSamples.java index 1afb888e130d..8e45532a8f82 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/OutboundNetworkDependenciesEndpointsListSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/OutboundNetworkDependenciesEndpointsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,8 +9,7 @@ */ public final class OutboundNetworkDependenciesEndpointsListSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * OutboundNetworkDependenciesEndpointsList.json + * x-ms-original-file: 2026-01-01/OutboundNetworkDependenciesEndpointsList.json */ /** * Sample code: List OutboundNetworkDependenciesEndpoints by Workspace. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsCreateSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsCreateSamples.java index 96ee6ce65ce4..a057dd854756 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsCreateSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -13,8 +13,7 @@ */ public final class PrivateEndpointConnectionsCreateSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * PrivateEndpointConnectionsUpdate.json + * x-ms-original-file: 2026-01-01/PrivateEndpointConnectionsUpdate.json */ /** * Sample code: Update a private endpoint connection. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsDeleteSamples.java index 740cbe140a84..8270952433d4 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,8 +9,7 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * PrivateEndpointConnectionsDelete.json + * x-ms-original-file: 2026-01-01/PrivateEndpointConnectionsDelete.json */ /** * Sample code: Remove a private endpoint connection. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsGetSamples.java index f93ff5ae8cb5..6e1067ce7aeb 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,8 +9,7 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * PrivateEndpointConnectionsGet.json + * x-ms-original-file: 2026-01-01/PrivateEndpointConnectionsGet.json */ /** * Sample code: Get a private endpoint connection. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsListSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsListSamples.java index def13ef69fd6..0b0e7817b6f9 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,8 +9,7 @@ */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * ListPrivateEndpointConnections.json + * x-ms-original-file: 2026-01-01/ListPrivateEndpointConnections.json */ /** * Sample code: List private endpoint connections. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesGetSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesGetSamples.java index 9e87b65fd377..01eb5b70818c 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,9 +9,7 @@ */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/PrivateLinkResourcesGet - * .json + * x-ms-original-file: 2026-01-01/PrivateLinkResourcesGet.json */ /** * Sample code: Get a private link resource. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesListSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesListSamples.java index e5c59a73cd60..447cc28a6cc2 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesListSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,8 +9,7 @@ */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * ListPrivateLinkResources.json + * x-ms-original-file: 2026-01-01/ListPrivateLinkResources.json */ /** * Sample code: List private link resources. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringCreateOrUpdateSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringCreateOrUpdateSamples.java index 5cf0bcd2615d..df3f2bb19c17 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringCreateOrUpdateSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -11,8 +11,7 @@ */ public final class VNetPeeringCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceVirtualNetworkPeeringCreateOrUpdate.json + * x-ms-original-file: 2026-01-01/WorkspaceVirtualNetworkPeeringCreateOrUpdate.json */ /** * Sample code: Create vNet Peering for Workspace. @@ -23,7 +22,7 @@ public final class VNetPeeringCreateOrUpdateSamples { createVNetPeeringForWorkspace(com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { manager.vNetPeerings() .define("vNetPeeringTest") - .withExistingWorkspace("rg", "myWorkspace") + .withExistingWorkspace("subramantest", "adbworkspace") .withRemoteVirtualNetwork(new VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork().withId( "/subscriptions/0140911e-1040-48da-8bc9-b99fb3dd88a6/resourceGroups/subramantest/providers/Microsoft.Network/virtualNetworks/subramanvnet")) .withAllowVirtualNetworkAccess(true) diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringDeleteSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringDeleteSamples.java index ec1f06ddbddb..00da250310ad 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringDeleteSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,8 +9,7 @@ */ public final class VNetPeeringDeleteSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceVirtualNetworkPeeringDelete.json + * x-ms-original-file: 2026-01-01/WorkspaceVirtualNetworkPeeringDelete.json */ /** * Sample code: Delete a workspace vNet Peering. @@ -19,6 +18,7 @@ public final class VNetPeeringDeleteSamples { */ public static void deleteAWorkspaceVNetPeering(com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { - manager.vNetPeerings().delete("rg", "myWorkspace", "vNetPeering", com.azure.core.util.Context.NONE); + manager.vNetPeerings() + .delete("subramantest", "adbworkspace", "vNetPeeringTest", com.azure.core.util.Context.NONE); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringGetSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringGetSamples.java index 254cd8870908..4c7f2c80702a 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringGetSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,8 +9,7 @@ */ public final class VNetPeeringGetSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceVirtualNetPeeringGet.json + * x-ms-original-file: 2026-01-01/WorkspaceVirtualNetPeeringGet.json */ /** * Sample code: Get a workspace with vNet Peering Configured. @@ -19,6 +18,7 @@ public final class VNetPeeringGetSamples { */ public static void getAWorkspaceWithVNetPeeringConfigured(com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { - manager.vNetPeerings().getWithResponse("rg", "myWorkspace", "vNetPeering", com.azure.core.util.Context.NONE); + manager.vNetPeerings() + .getWithResponse("subramantest", "adbworkspace", "vNetPeeringTest", com.azure.core.util.Context.NONE); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringListByWorkspaceSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringListByWorkspaceSamples.java index 458e795edd44..0860366a1dca 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringListByWorkspaceSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/VNetPeeringListByWorkspaceSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,8 +9,7 @@ */ public final class VNetPeeringListByWorkspaceSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceVirtualNetPeeringList.json + * x-ms-original-file: 2026-01-01/WorkspaceVirtualNetPeeringList.json */ /** * Sample code: List all vNet Peerings for the workspace. @@ -19,6 +18,6 @@ public final class VNetPeeringListByWorkspaceSamples { */ public static void listAllVNetPeeringsForTheWorkspace(com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { - manager.vNetPeerings().listByWorkspace("rg", "myWorkspace", com.azure.core.util.Context.NONE); + manager.vNetPeerings().listByWorkspace("subramantest", "adbworkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesCreateOrUpdateSamples.java index b9d35aa71280..34320092f241 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesCreateOrUpdateSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesCreateOrUpdateSamples.java @@ -1,20 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; +import com.azure.resourcemanager.databricks.models.AutomaticClusterUpdateDefinition; +import com.azure.resourcemanager.databricks.models.AutomaticClusterUpdateValue; +import com.azure.resourcemanager.databricks.models.ComplianceSecurityProfileDefinition; +import com.azure.resourcemanager.databricks.models.ComplianceSecurityProfileValue; +import com.azure.resourcemanager.databricks.models.ComputeMode; +import com.azure.resourcemanager.databricks.models.DefaultCatalogProperties; +import com.azure.resourcemanager.databricks.models.DefaultStorageFirewall; import com.azure.resourcemanager.databricks.models.Encryption; import com.azure.resourcemanager.databricks.models.EncryptionEntitiesDefinition; import com.azure.resourcemanager.databricks.models.EncryptionKeySource; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityComplianceDefinition; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityMonitoringDefinition; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityMonitoringValue; +import com.azure.resourcemanager.databricks.models.IdentityType; +import com.azure.resourcemanager.databricks.models.InitialType; import com.azure.resourcemanager.databricks.models.KeySource; import com.azure.resourcemanager.databricks.models.ManagedDiskEncryption; import com.azure.resourcemanager.databricks.models.ManagedDiskEncryptionKeyVaultProperties; +import com.azure.resourcemanager.databricks.models.Sku; import com.azure.resourcemanager.databricks.models.WorkspaceCustomBooleanParameter; import com.azure.resourcemanager.databricks.models.WorkspaceCustomParameters; import com.azure.resourcemanager.databricks.models.WorkspaceCustomStringParameter; import com.azure.resourcemanager.databricks.models.WorkspaceEncryptionParameter; +import com.azure.resourcemanager.databricks.models.WorkspacePropertiesAccessConnector; import com.azure.resourcemanager.databricks.models.WorkspacePropertiesEncryption; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -23,8 +38,26 @@ */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceManagedDiskEncryptionCreate.json + * x-ms-original-file: 2026-01-01/WorkspaceCreateServerless.json + */ + /** + * Sample code: Create or update serverless workspace. + * + * @param manager Entry point to AzureDatabricksManager. + */ + public static void + createOrUpdateServerlessWorkspace(com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { + manager.workspaces() + .define("myWorkspace") + .withRegion("westus") + .withExistingResourceGroup("rg") + .withComputeMode(ComputeMode.SERVERLESS) + .withSku(new Sku().withName("premium")) + .create(); + } + + /* + * x-ms-original-file: 2026-01-01/WorkspaceManagedDiskEncryptionCreate.json */ /** * Sample code: Create a workspace with Customer-Managed Key (CMK) encryption for Managed Disks. @@ -37,7 +70,10 @@ public static void createAWorkspaceWithCustomerManagedKeyCMKEncryptionForManaged .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") .withEncryption( new WorkspacePropertiesEncryption() .withEntities( @@ -52,8 +88,7 @@ public static void createAWorkspaceWithCustomerManagedKeyCMKEncryptionForManaged } /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceManagedDiskEncryptionUpdate.json + * x-ms-original-file: 2026-01-01/WorkspaceManagedDiskEncryptionUpdate.json */ /** * Sample code: Update a workspace with Customer-Managed Key (CMK) encryption for Managed Disks. @@ -66,8 +101,11 @@ public static void updateAWorkspaceWithCustomerManagedKeyCMKEncryptionForManaged .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) .withTags(mapOf("mytag1", "myvalue1")) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") .withEncryption( new WorkspacePropertiesEncryption() .withEntities( @@ -82,8 +120,7 @@ public static void updateAWorkspaceWithCustomerManagedKeyCMKEncryptionForManaged } /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/DisableEncryption.json + * x-ms-original-file: 2026-01-01/DisableEncryption.json */ /** * Sample code: Revert Customer-Managed Key (CMK) encryption to Microsoft Managed Keys encryption on a workspace. @@ -96,15 +133,17 @@ public static void revertCustomerManagedKeyCMKEncryptionToMicrosoftManagedKeysEn .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") .withParameters(new WorkspaceCustomParameters().withEncryption( new WorkspaceEncryptionParameter().withValue(new Encryption().withKeySource(KeySource.DEFAULT)))) .create(); } /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/PrepareEncryption.json + * x-ms-original-file: 2026-01-01/PrepareEncryption.json */ /** * Sample code: Create a workspace which is ready for Customer-Managed Key (CMK) encryption. @@ -117,15 +156,46 @@ public static void createAWorkspaceWhichIsReadyForCustomerManagedKeyCMKEncryptio .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") .withParameters(new WorkspaceCustomParameters() .withPrepareEncryption(new WorkspaceCustomBooleanParameter().withValue(true))) .create(); } /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceCreateWithParameters.json + * x-ms-original-file: 2026-01-01/WorkspaceEnhancedSecurityComplianceCreateOrUpdate.json + */ + /** + * Sample code: Create or update a workspace with Enhanced Security & Compliance Add-On. + * + * @param manager Entry point to AzureDatabricksManager. + */ + public static void createOrUpdateAWorkspaceWithEnhancedSecurityComplianceAddOn( + com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { + manager.workspaces() + .define("myWorkspace") + .withRegion("eastus2") + .withExistingResourceGroup("rg") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") + .withEnhancedSecurityCompliance(new EnhancedSecurityComplianceDefinition() + .withAutomaticClusterUpdate( + new AutomaticClusterUpdateDefinition().withValue(AutomaticClusterUpdateValue.ENABLED)) + .withComplianceSecurityProfile( + new ComplianceSecurityProfileDefinition().withComplianceStandards(Arrays.asList("PCI_DSS", "HIPAA")) + .withValue(ComplianceSecurityProfileValue.ENABLED)) + .withEnhancedSecurityMonitoring( + new EnhancedSecurityMonitoringDefinition().withValue(EnhancedSecurityMonitoringValue.ENABLED))) + .create(); + } + + /* + * x-ms-original-file: 2026-01-01/WorkspaceCreateWithParameters.json */ /** * Sample code: Create or update workspace with custom parameters. @@ -138,18 +208,28 @@ public static void createOrUpdateWorkspaceWithCustomParameters( .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") .withParameters(new WorkspaceCustomParameters() .withCustomVirtualNetworkId(new WorkspaceCustomStringParameter().withValue( - "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/myNetwork")) + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/myNetwork")) .withCustomPublicSubnetName(new WorkspaceCustomStringParameter().withValue("myPublicSubnet")) .withCustomPrivateSubnetName(new WorkspaceCustomStringParameter().withValue("myPrivateSubnet"))) + .withDefaultCatalog( + new DefaultCatalogProperties().withInitialType(InitialType.HIVE_METASTORE).withInitialName("")) + .withAccessConnector(new WorkspacePropertiesAccessConnector().withId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/adbrg/providers/Microsoft.Databricks/accessConnectors/myAccessConnector") + .withIdentityType(IdentityType.USER_ASSIGNED) + .withUserAssignedIdentityId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity")) + .withDefaultStorageFirewall(DefaultStorageFirewall.ENABLED) .create(); } /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/WorkspaceCreate.json + * x-ms-original-file: 2026-01-01/WorkspaceCreate.json */ /** * Sample code: Create or update workspace. @@ -161,13 +241,21 @@ public static void createOrUpdateWorkspace(com.azure.resourcemanager.databricks. .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") + .withDefaultCatalog( + new DefaultCatalogProperties().withInitialType(InitialType.UNITY_CATALOG).withInitialName("")) + .withAccessConnector(new WorkspacePropertiesAccessConnector().withId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/adbrg/providers/Microsoft.Databricks/accessConnectors/myAccessConnector") + .withIdentityType(IdentityType.SYSTEM_ASSIGNED)) + .withDefaultStorageFirewall(DefaultStorageFirewall.ENABLED) .create(); } /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/EnableEncryption.json + * x-ms-original-file: 2026-01-01/EnableEncryption.json */ /** * Sample code: Enable Customer-Managed Key (CMK) encryption on a workspace which is prepared for encryption. @@ -180,7 +268,10 @@ public static void enableCustomerManagedKeyCMKEncryptionOnAWorkspaceWhichIsPrepa .define("myWorkspace") .withRegion("westus") .withExistingResourceGroup("rg") - .withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG") + .withComputeMode(ComputeMode.HYBRID) + .withSku(new Sku().withName("premium")) + .withManagedResourceGroupId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/myManagedRG") .withParameters(new WorkspaceCustomParameters() .withPrepareEncryption(new WorkspaceCustomBooleanParameter().withValue(true)) .withEncryption(new WorkspaceEncryptionParameter() diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesDeleteSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesDeleteSamples.java index 39322b47cabf..3e12b24432b6 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesDeleteSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,8 +9,20 @@ */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/WorkspaceDelete.json + * x-ms-original-file: 2026-01-01/WorkspaceDeleteForceDeletion.json + */ + /** + * Sample code: Delete a workspace with forceDeletion parameter. + * + * @param manager Entry point to AzureDatabricksManager. + */ + public static void deleteAWorkspaceWithForceDeletionParameter( + com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { + manager.workspaces().delete("rg", "myWorkspace", false, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-01-01/WorkspaceDelete.json */ /** * Sample code: Delete a workspace. @@ -18,6 +30,6 @@ public final class WorkspacesDeleteSamples { * @param manager Entry point to AzureDatabricksManager. */ public static void deleteAWorkspace(com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { - manager.workspaces().delete("rg", "myWorkspace", com.azure.core.util.Context.NONE); + manager.workspaces().delete("rg", "myWorkspace", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesGetByResourceGroupSamples.java index 02b0d7f52954..fab3da35390a 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesGetByResourceGroupSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,8 +9,7 @@ */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/WorkspaceGet.json + * x-ms-original-file: 2026-01-01/WorkspaceGet.json */ /** * Sample code: Get a workspace. @@ -22,8 +21,7 @@ public static void getAWorkspace(com.azure.resourcemanager.databricks.AzureDatab } /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspaceManagedDiskEncryptionGet.json + * x-ms-original-file: 2026-01-01/WorkspaceManagedDiskEncryptionGet.json */ /** * Sample code: Get a workspace with Customer-Managed Key (CMK) encryption for Managed Disks. @@ -36,9 +34,20 @@ public static void getAWorkspaceWithCustomerManagedKeyCMKEncryptionForManagedDis } /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/WorkspaceGetParameters. - * json + * x-ms-original-file: 2026-01-01/WorkspaceEnhancedSecurityComplianceGet.json + */ + /** + * Sample code: Get a workspace with Enhanced Security & Compliance Add-On. + * + * @param manager Entry point to AzureDatabricksManager. + */ + public static void getAWorkspaceWithEnhancedSecurityComplianceAddOn( + com.azure.resourcemanager.databricks.AzureDatabricksManager manager) { + manager.workspaces().getByResourceGroupWithResponse("rg", "myWorkspace", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-01-01/WorkspaceGetParameters.json */ /** * Sample code: Get a workspace with custom parameters. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesListByResourceGroupSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesListByResourceGroupSamples.java index f7bb0c65c183..967662e18a30 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesListByResourceGroupSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,8 +9,7 @@ */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspacesListByResourceGroup.json + * x-ms-original-file: 2026-01-01/WorkspacesListByResourceGroup.json */ /** * Sample code: Lists workspaces. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesListSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesListSamples.java index d98dddda8648..f9a4db85a403 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesListSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -9,8 +9,7 @@ */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/ - * WorkspacesListBySubscription.json + * x-ms-original-file: 2026-01-01/WorkspacesListBySubscription.json */ /** * Sample code: Lists workspaces. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesUpdateSamples.java b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesUpdateSamples.java index 60b9b011ccf5..358583e7d0a3 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesUpdateSamples.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/samples/java/com/azure/resourcemanager/databricks/generated/WorkspacesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -13,8 +13,7 @@ */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: - * specification/databricks/resource-manager/Microsoft.Databricks/stable/2023-02-01/examples/WorkspaceUpdate.json + * x-ms-original-file: 2026-01-01/WorkspaceUpdate.json */ /** * Sample code: Update a workspace's tags. diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/DatabricksTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/DatabricksTests.java index 31bb08037b4b..1ff7a4e2ac93 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/DatabricksTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/DatabricksTests.java @@ -13,6 +13,7 @@ import com.azure.core.test.annotation.LiveOnly; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; +import com.azure.resourcemanager.databricks.models.ComputeMode; import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.resourcemanager.databricks.models.Sku; import com.azure.resourcemanager.databricks.models.Workspace; @@ -71,17 +72,13 @@ public void testCrudWorkspace() { Workspace workspace = null; try { String workspaceName = "workspace" + randomPadding(); - String managedResourceGroupId = resourceManager.resourceGroups() - .getByName(resourceGroupName) - .id() - .replace(resourceGroupName, "databricks-" + resourceGroupName); // @embedmeStart workspace = databricksManager.workspaces() .define(workspaceName) .withRegion(REGION) .withExistingResourceGroup(resourceGroupName) - .withManagedResourceGroupId(managedResourceGroupId) - .withSku(new Sku().withName("standard")) + .withComputeMode(ComputeMode.SERVERLESS) + .withSku(new Sku().withName("premium")) .create(); // @embedmeEnd diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorInnerTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorInnerTests.java index ffccfc85c462..4153119ea1be 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorInnerTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -18,23 +18,24 @@ public final class AccessConnectorInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessConnectorInner model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"81b89abc-bc7b-4f17-901e-7141e851e9be\",\"tenantId\":\"29e95803-715f-4dc5-9c08-583342f5c98c\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"vnchrkcci\":{\"principalId\":\"445da7b5-12f4-4203-a88c-2b134c0eb3d1\",\"clientId\":\"3505b4a1-beda-49d4-853d-09c7225ec85d\"}}},\"properties\":{\"provisioningState\":\"Accepted\"},\"location\":\"qkhr\",\"tags\":{\"ghsauuimjmvxied\":\"iwkuofos\",\"byao\":\"ugidyjrr\",\"xc\":\"v\",\"hocohslkev\":\"onpc\"},\"id\":\"eggzfb\",\"name\":\"hfmvfaxkffe\",\"type\":\"ithlvmezyvshxm\"}") + "{\"properties\":{\"provisioningState\":\"Deleted\",\"referedBy\":[\"uhrzayvvt\"]},\"identity\":{\"principalId\":\"dfgiot\",\"tenantId\":\"tutqxlngxlefgug\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"hjybigehoqfbo\":{\"principalId\":\"dqmidtt\",\"clientId\":\"rvqdra\"}}},\"location\":\"kanyktzlcuiywg\",\"tags\":{\"gpphrcgyn\":\"gndrvynh\",\"fsxlzevgbmqjqa\":\"ocpecfvmmco\",\"pmivkwlzu\":\"c\",\"ebxetqgtzxdp\":\"ccfwnfnbacfion\"},\"id\":\"qbqqwxr\",\"name\":\"feallnwsu\",\"type\":\"isnjampmngnz\"}") .toObject(AccessConnectorInner.class); - Assertions.assertEquals("qkhr", model.location()); - Assertions.assertEquals("iwkuofos", model.tags().get("ghsauuimjmvxied")); + Assertions.assertEquals("kanyktzlcuiywg", model.location()); + Assertions.assertEquals("gndrvynh", model.tags().get("gpphrcgyn")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AccessConnectorInner model = new AccessConnectorInner().withLocation("qkhr") - .withTags(mapOf("ghsauuimjmvxied", "iwkuofos", "byao", "ugidyjrr", "xc", "v", "hocohslkev", "onpc")) + AccessConnectorInner model = new AccessConnectorInner().withLocation("kanyktzlcuiywg") + .withTags(mapOf("gpphrcgyn", "gndrvynh", "fsxlzevgbmqjqa", "ocpecfvmmco", "pmivkwlzu", "c", "ebxetqgtzxdp", + "ccfwnfnbacfion")) + .withProperties(new AccessConnectorProperties()) .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("vnchrkcci", new UserAssignedIdentity()))) - .withProperties(new AccessConnectorProperties()); + .withUserAssignedIdentities(mapOf("hjybigehoqfbo", new UserAssignedIdentity()))); model = BinaryData.fromObject(model).toObject(AccessConnectorInner.class); - Assertions.assertEquals("qkhr", model.location()); - Assertions.assertEquals("iwkuofos", model.tags().get("ghsauuimjmvxied")); + Assertions.assertEquals("kanyktzlcuiywg", model.location()); + Assertions.assertEquals("gndrvynh", model.tags().get("gpphrcgyn")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorListResultTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorListResultTests.java index 35eb9dbbdd8a..627ab820c7c2 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorListResultTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorListResultTests.java @@ -1,80 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databricks.fluent.models.AccessConnectorInner; -import com.azure.resourcemanager.databricks.models.AccessConnectorListResult; -import com.azure.resourcemanager.databricks.models.AccessConnectorProperties; -import com.azure.resourcemanager.databricks.models.ManagedServiceIdentity; +import com.azure.resourcemanager.databricks.implementation.models.AccessConnectorListResult; import com.azure.resourcemanager.databricks.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.databricks.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AccessConnectorListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessConnectorListResult model = BinaryData.fromString( - "{\"value\":[{\"identity\":{\"principalId\":\"58e56ee6-1c32-43f2-80ef-1c0dff914207\",\"tenantId\":\"03db1339-b9de-433b-906d-6adab620cb53\",\"type\":\"None\",\"userAssignedIdentities\":{\"injep\":{\"principalId\":\"52c6b6d6-23e1-4b7c-8ea6-97fdebd9fc48\",\"clientId\":\"de7c4968-3907-4f80-8a69-3930ee7b968a\"},\"mryw\":{\"principalId\":\"a8978ced-9f9c-4b1d-855d-cbcadcc02c54\",\"clientId\":\"fc9442bf-840c-43c3-8f4d-018717403a14\"},\"oqftiyqzrnkcq\":{\"principalId\":\"fa22478f-9c2e-4b6c-9210-3880a271c920\",\"clientId\":\"cdbb3d53-54b2-45b7-8b12-c43919a15e6c\"}}},\"properties\":{\"provisioningState\":\"Deleted\"},\"location\":\"hzls\",\"tags\":{\"avwhheunm\":\"hoqqnwvlr\",\"yaxuconuqszfkb\":\"qhgyxzkonocukok\",\"xsenhwlr\":\"ypewrmjmwvvjekt\",\"ihkaetcktvfc\":\"ffrzpwvlqdqgbiqy\"},\"id\":\"vf\",\"name\":\"nkymuctqhjfbebrj\",\"type\":\"xerf\"},{\"identity\":{\"principalId\":\"7a0b7f4a-6b97-4c50-8779-ad5a0edd6a83\",\"tenantId\":\"e052eb19-82e5-40ec-989d-c589de7522f5\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"jrbirphxepcyv\":{\"principalId\":\"6ed33997-4bb1-4ba4-9bbb-3f33b40868ad\",\"clientId\":\"fce303ec-7323-4fa2-befb-5815b572c59a\"},\"nljky\":{\"principalId\":\"7790d89a-9337-4f7e-b052-adb2a99db63e\",\"clientId\":\"bb32538f-80a0-4d48-bf5c-85bf3e756061\"},\"vuujq\":{\"principalId\":\"e482e8aa-e477-43e5-a2a9-ca277cf1948c\",\"clientId\":\"098b70cb-cdc3-41ec-9061-96171b7dac75\"}}},\"properties\":{\"provisioningState\":\"Failed\"},\"location\":\"gjljyoxgvc\",\"tags\":{\"bijhtxfvgxbf\":\"gsncghkjeszz\",\"ec\":\"mxnehmp\",\"gr\":\"godebfqkkrbmpu\",\"ispnqzahmgkbrp\":\"wflzlfbxzpuzy\"},\"id\":\"y\",\"name\":\"hibnuqqkpika\",\"type\":\"rgvtqag\"},{\"identity\":{\"principalId\":\"3907f8b6-db04-4668-bdaf-83b021d84bb1\",\"tenantId\":\"0db3313c-8573-41b9-a972-71d45bba250c\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"gmebfsiarbutrcv\":{\"principalId\":\"957069c3-2ff6-4feb-ab0c-b54fb9457ac6\",\"clientId\":\"aa99ca34-cb8c-4039-9124-f4b5b21fe32d\"},\"zzmhjrunmpxttd\":{\"principalId\":\"efcc70d1-744a-4340-b1bb-f84f5c2fb63d\",\"clientId\":\"11878665-d9b6-4ecc-aa3a-8af8e1839471\"},\"bnlankxmyskpb\":{\"principalId\":\"8d93f807-1c52-4da4-a9ab-c8bd2140b650\",\"clientId\":\"be15804c-0481-4734-88e8-7f798640e83d\"}}},\"properties\":{\"provisioningState\":\"Deleted\"},\"location\":\"kcxywnyt\",\"tags\":{\"qidybyx\":\"yn\",\"aaxdbabphlwrq\":\"zfcl\",\"hsucoc\":\"fkts\",\"ckzywbiexzfeyue\":\"nyyazttbtwwrqpue\"},\"id\":\"xibxujwbhqwalm\",\"name\":\"zyoxaepdkzjan\",\"type\":\"ux\"},{\"identity\":{\"principalId\":\"5617e200-7bcc-4e7f-8f80-9006271d881f\",\"tenantId\":\"1a63d9ab-85e4-4581-ad62-948dc32e1655\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"niwdjsw\":{\"principalId\":\"dda02fdd-7ec0-4438-ad33-18b7a77069fa\",\"clientId\":\"67c8713e-13e1-4272-a89d-32dcae1faaa3\"}}},\"properties\":{\"provisioningState\":\"Deleted\"},\"location\":\"pgn\",\"tags\":{\"pzxbz\":\"x\"},\"id\":\"fzab\",\"name\":\"lcuhxwtctyqiklb\",\"type\":\"ovplw\"}],\"nextLink\":\"hvgyuguosvmk\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Created\",\"referedBy\":[\"a\",\"oaeupfhyhltrpmo\",\"jmcmatuokthfu\"]},\"identity\":{\"principalId\":\"odsfcpkvxodpuozm\",\"tenantId\":\"ydagfuaxbe\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"xim\":{\"principalId\":\"kktwhrdxw\",\"clientId\":\"wqsmbsur\"},\"ys\":{\"principalId\":\"yocf\",\"clientId\":\"ksymd\"},\"oczvy\":{\"principalId\":\"i\",\"clientId\":\"xhqyudxorrqnb\"}}},\"location\":\"qrvkdv\",\"tags\":{\"d\":\"lrmv\"},\"id\":\"watkpnpulexxb\",\"name\":\"zwtruwiqzbqjvsov\",\"type\":\"yokacspkw\"},{\"properties\":{\"provisioningState\":\"Updating\",\"referedBy\":[\"pxjmflbvvnchr\",\"cciw\"]},\"identity\":{\"principalId\":\"uqkhrsajiwku\",\"tenantId\":\"oskg\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ugidyjrr\":{\"principalId\":\"imjm\",\"clientId\":\"ied\"},\"slkevle\":{\"principalId\":\"y\",\"clientId\":\"svexcsonpclhoco\"},\"hl\":{\"principalId\":\"zfbuhf\",\"clientId\":\"faxkffeii\"},\"burvjxxjnspy\":{\"principalId\":\"ez\",\"clientId\":\"shxmzsbbzoggigrx\"}}},\"location\":\"tko\",\"tags\":{\"nvudwtiukb\":\"ou\",\"pocipazyxoegu\":\"dng\",\"npiucgygevqznty\":\"g\"},\"id\":\"mrbpizcdrqj\",\"name\":\"dpydn\",\"type\":\"yhxdeoejzicwi\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"referedBy\":[\"zfbishcbkhaj\",\"eyeam\",\"p\"]},\"identity\":{\"principalId\":\"alpbuxwgipwhon\",\"tenantId\":\"kgshwa\",\"type\":\"None\",\"userAssignedIdentities\":{\"tmryw\":{\"principalId\":\"bin\",\"clientId\":\"pu\"},\"nwvlryavwhheunmm\":{\"principalId\":\"zoqftiyqzrnkcqvy\",\"clientId\":\"whzlsicohoq\"},\"conuqszfkbeype\":{\"principalId\":\"gyxzk\",\"clientId\":\"ocukoklyax\"}}},\"location\":\"mjmwvvjektcx\",\"tags\":{\"rzpwvlqdqgbiq\":\"hwlrsf\",\"vf\":\"lihkaetcktvfc\",\"xerf\":\"nkymuctqhjfbebrj\",\"phxepcyvahf\":\"wutttxfvjrbi\"},\"id\":\"ljkyqxjvuuj\",\"name\":\"gidokgjljyoxgvcl\",\"type\":\"bgsncghkjeszzhb\"}],\"nextLink\":\"htxfvgxbfsmxnehm\"}") .toObject(AccessConnectorListResult.class); - Assertions.assertEquals("hzls", model.value().get(0).location()); - Assertions.assertEquals("hoqqnwvlr", model.value().get(0).tags().get("avwhheunm")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("hvgyuguosvmk", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessConnectorListResult model = new AccessConnectorListResult().withValue(Arrays.asList( - new AccessConnectorInner().withLocation("hzls") - .withTags(mapOf("avwhheunm", "hoqqnwvlr", "yaxuconuqszfkb", "qhgyxzkonocukok", "xsenhwlr", - "ypewrmjmwvvjekt", "ihkaetcktvfc", "ffrzpwvlqdqgbiqy")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("injep", new UserAssignedIdentity(), "mryw", - new UserAssignedIdentity(), "oqftiyqzrnkcq", new UserAssignedIdentity()))) - .withProperties(new AccessConnectorProperties()), - new AccessConnectorInner().withLocation("gjljyoxgvc") - .withTags(mapOf("bijhtxfvgxbf", "gsncghkjeszz", "ec", "mxnehmp", "gr", "godebfqkkrbmpu", - "ispnqzahmgkbrp", "wflzlfbxzpuzy")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("jrbirphxepcyv", new UserAssignedIdentity(), "nljky", - new UserAssignedIdentity(), "vuujq", new UserAssignedIdentity()))) - .withProperties(new AccessConnectorProperties()), - new AccessConnectorInner().withLocation("kcxywnyt") - .withTags(mapOf("qidybyx", "yn", "aaxdbabphlwrq", "zfcl", "hsucoc", "fkts", "ckzywbiexzfeyue", - "nyyazttbtwwrqpue")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("gmebfsiarbutrcv", new UserAssignedIdentity(), "zzmhjrunmpxttd", - new UserAssignedIdentity(), "bnlankxmyskpb", new UserAssignedIdentity()))) - .withProperties(new AccessConnectorProperties()), - new AccessConnectorInner().withLocation("pgn") - .withTags(mapOf("pzxbz", "x")) - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("niwdjsw", new UserAssignedIdentity()))) - .withProperties(new AccessConnectorProperties()))) - .withNextLink("hvgyuguosvmk"); - model = BinaryData.fromObject(model).toObject(AccessConnectorListResult.class); - Assertions.assertEquals("hzls", model.value().get(0).location()); - Assertions.assertEquals("hoqqnwvlr", model.value().get(0).tags().get("avwhheunm")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("hvgyuguosvmk", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("qrvkdv", model.value().get(0).location()); + Assertions.assertEquals("lrmv", model.value().get(0).tags().get("d")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("htxfvgxbfsmxnehm", model.nextLink()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorPropertiesTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorPropertiesTests.java index 0adae102bdc4..7ef3bfe777ef 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorPropertiesTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -10,8 +10,9 @@ public final class AccessConnectorPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AccessConnectorProperties model - = BinaryData.fromString("{\"provisioningState\":\"Succeeded\"}").toObject(AccessConnectorProperties.class); + AccessConnectorProperties model = BinaryData + .fromString("{\"provisioningState\":\"Creating\",\"referedBy\":[\"wooc\",\"cbonqvpk\",\"lrxnjeaseiphe\"]}") + .toObject(AccessConnectorProperties.class); } @org.junit.jupiter.api.Test diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorUpdateTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorUpdateTests.java index fc75ff143b1b..92eb41bacfa5 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorUpdateTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -17,21 +17,21 @@ public final class AccessConnectorUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessConnectorUpdate model = BinaryData.fromString( - "{\"tags\":{\"evqzntypmrbp\":\"xoegukgjnpiucgy\",\"eoejzic\":\"zcdrqjsdpydnfyhx\",\"hajdeyeamdpha\":\"ifsjttgzfbishcb\"},\"identity\":{\"principalId\":\"db644181-c674-4dd8-9ef0-70992c573c70\",\"tenantId\":\"fb911635-4744-40e4-9417-c0da951cf5cd\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ipwhonowk\":{\"principalId\":\"4fd75a31-c5f7-4cd3-a921-831b547c61d9\",\"clientId\":\"7871b1f7-9bff-4c01-96dc-d94d54500c19\"}}}}") + "{\"tags\":{\"tbqvudw\":\"dmoh\",\"ujjugwdkcglh\":\"dndnvow\",\"ofqweykhmenevfye\":\"lazjdyggdtjixhbk\"},\"identity\":{\"principalId\":\"hybcibv\",\"tenantId\":\"dcsi\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ezrkgqhcjrefo\":{\"principalId\":\"amdecte\",\"clientId\":\"iqscjeypv\"},\"zsqpjhvmdajvny\":{\"principalId\":\"mkqsleyyv\",\"clientId\":\"qjpkcattpngjcrc\"}}}}") .toObject(AccessConnectorUpdate.class); - Assertions.assertEquals("xoegukgjnpiucgy", model.tags().get("evqzntypmrbp")); + Assertions.assertEquals("dmoh", model.tags().get("tbqvudw")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AccessConnectorUpdate model = new AccessConnectorUpdate() - .withTags(mapOf("evqzntypmrbp", "xoegukgjnpiucgy", "eoejzic", "zcdrqjsdpydnfyhx", "hajdeyeamdpha", - "ifsjttgzfbishcb")) + .withTags(mapOf("tbqvudw", "dmoh", "ujjugwdkcglh", "dndnvow", "ofqweykhmenevfye", "lazjdyggdtjixhbk")) .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("ipwhonowk", new UserAssignedIdentity()))); + .withUserAssignedIdentities( + mapOf("ezrkgqhcjrefo", new UserAssignedIdentity(), "zsqpjhvmdajvny", new UserAssignedIdentity()))); model = BinaryData.fromObject(model).toObject(AccessConnectorUpdate.class); - Assertions.assertEquals("xoegukgjnpiucgy", model.tags().get("evqzntypmrbp")); + Assertions.assertEquals("dmoh", model.tags().get("tbqvudw")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsCreateOrUpdateMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsCreateOrUpdateMockTests.java index eb5304ebe365..c7f6e1ad3214 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsCreateOrUpdateMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.AccessConnector; @@ -27,28 +27,27 @@ public final class AccessConnectorsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"identity\":{\"principalId\":\"6d4f1e30-df02-4842-874e-2fc64049b994\",\"tenantId\":\"18569f88-2179-477f-818d-8e1465ea306b\",\"type\":\"None\",\"userAssignedIdentities\":{\"healmfmtda\":{\"principalId\":\"045623bd-f6ef-436f-9eff-af57813c5b74\",\"clientId\":\"9039b7f2-d689-4bd8-b853-414cc83ae41a\"}}},\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"wvgpiohg\",\"tags\":{\"yqagvrvm\":\"tfudxepx\",\"dblx\":\"pkukghi\",\"fnjhfjxwmszkkfo\":\"wi\"},\"id\":\"rey\",\"name\":\"kzikfjawneaivxwc\",\"type\":\"elpcirelsfeaenwa\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"referedBy\":[\"rvxaglrvimjwosy\",\"xitc\",\"kfcktqum\"]},\"identity\":{\"principalId\":\"ke\",\"tenantId\":\"ikh\",\"type\":\"None\",\"userAssignedIdentities\":{\"eqidbqfatpx\":{\"principalId\":\"dgqggebdu\",\"clientId\":\"g\"},\"jqbjhhy\":{\"principalId\":\"rxcyjmoad\",\"clientId\":\"varmywdmj\"},\"uhpkxkgymar\":{\"principalId\":\"rw\",\"clientId\":\"co\"},\"ssofwqmzqa\":{\"principalId\":\"n\",\"clientId\":\"xqugjhkycubedd\"}}},\"location\":\"rmnjijpx\",\"tags\":{\"byxbaaabjy\":\"qudf\"},\"id\":\"ayffim\",\"name\":\"zrtuzq\",\"type\":\"gsexne\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AccessConnector response = manager.accessConnectors() - .define("abikns") - .withRegion("gjltdtbnnhado") - .withExistingResourceGroup("mwzn") - .withTags(mapOf("hnvpamqgxq", "kvci", "zikywgg", "u", "uipiccjzk", "kallatmel")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf("tlwwrlk", new UserAssignedIdentity(), "ncvokotllxdyhg", new UserAssignedIdentity()))) + .define("z") + .withRegion("npkukghimdblx") + .withExistingResourceGroup("melwuipiccjz") + .withTags(mapOf("j", "mfnjh", "oqreyfkzikfjawn", "wmszkk", "vxwc", "a")) .withProperties(new AccessConnectorProperties()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("epxgyqagvr", new UserAssignedIdentity()))) .create(); - Assertions.assertEquals("wvgpiohg", response.location()); - Assertions.assertEquals("tfudxepx", response.tags().get("yqagvrvm")); + Assertions.assertEquals("rmnjijpx", response.location()); + Assertions.assertEquals("qudf", response.tags().get("byxbaaabjy")); Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsDeleteMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsDeleteMockTests.java index 219313f42a71..b24a1afdb44c 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsDeleteMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.accessConnectors().delete("wo", "nwashrtd", com.azure.core.util.Context.NONE); + manager.accessConnectors().delete("sdqrhzoymibmrq", "ibahwflus", com.azure.core.util.Context.NONE); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsGetByResourceGroupWithResponseMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsGetByResourceGroupWithResponseMockTests.java index ed96b17b0691..b1c56990f33e 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsGetByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.AccessConnector; @@ -22,21 +22,21 @@ public final class AccessConnectorsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"identity\":{\"principalId\":\"69c7cc86-abaa-4998-b57f-787d236d504b\",\"tenantId\":\"83e61623-b38d-440b-9ed7-6adc3db3a914\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"yat\":{\"principalId\":\"1cd6f544-de95-4fca-a4a6-b6a73362e3a2\",\"clientId\":\"30ea4e13-6e5d-4fc6-a435-20d58b0f4392\"}}},\"properties\":{\"provisioningState\":\"Deleting\"},\"location\":\"bcuejrjxgci\",\"tags\":{\"sdqrhzoymibmrq\":\"rhos\"},\"id\":\"ibahwflus\",\"name\":\"dtmhrkwofyyvoqa\",\"type\":\"piexpbtgiw\"}"; + = "{\"properties\":{\"provisioningState\":\"Deleted\",\"referedBy\":[\"wvnhdldwmgx\"]},\"identity\":{\"principalId\":\"slpmutwuo\",\"tenantId\":\"rpkhjwn\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"uefywsbpfvmwy\":{\"principalId\":\"uicpd\",\"clientId\":\"kzzlvmbmpaxmodf\"},\"iyzvqtmnub\":{\"principalId\":\"fouyf\",\"clientId\":\"akcp\"},\"v\":{\"principalId\":\"kpzksmondjmq\",\"clientId\":\"vypomgkopkwho\"}}},\"location\":\"jqg\",\"tags\":{\"xozap\":\"mocmbqfqvmk\",\"dd\":\"helxprglya\"},\"id\":\"kcbcue\",\"name\":\"rjxgciqib\",\"type\":\"hos\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AccessConnector response = manager.accessConnectors() - .getByResourceGroupWithResponse("mocmbqfqvmk", "xozap", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("pkeqdcvdrhvoo", "sotbob", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("bcuejrjxgci", response.location()); - Assertions.assertEquals("rhos", response.tags().get("sdqrhzoymibmrq")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("jqg", response.location()); + Assertions.assertEquals("mocmbqfqvmk", response.tags().get("xozap")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListByResourceGroupMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListByResourceGroupMockTests.java index 36ff48002605..3c8ac0f965fa 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListByResourceGroupMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListByResourceGroupMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.AccessConnector; @@ -23,21 +23,21 @@ public final class AccessConnectorsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"03aa4afc-d8d8-4b82-974d-59fcce3bb77b\",\"tenantId\":\"a523e2ac-411e-4f32-bfff-2bf5ab57c277\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"asipqiio\":{\"principalId\":\"c80297e7-916d-4796-baa1-c003b8c385f6\",\"clientId\":\"8fb275c6-ce17-4b21-8f9f-ff77929e570f\"}}},\"properties\":{\"provisioningState\":\"Creating\"},\"location\":\"rpqlp\",\"tags\":{\"t\":\"ciuqgbdb\",\"mhykojoxafnndl\":\"uvfbtkuwh\",\"kkpwdreqnovvq\":\"ichkoymkcdyhb\",\"syrsndsytgadgvra\":\"ovljxywsu\"},\"id\":\"aeneqnzarrwl\",\"name\":\"uu\",\"type\":\"jfqka\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"referedBy\":[\"btgiwbwoenwas\"]},\"identity\":{\"principalId\":\"dtkcnqxwbpokulp\",\"tenantId\":\"jwaa\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"wcciuqgbdbu\":{\"principalId\":\"iobyu\",\"clientId\":\"rpqlp\"},\"koymkcd\":{\"principalId\":\"uvfbtkuwh\",\"clientId\":\"hykojoxafnndlpic\"},\"syrsndsytgadgvra\":{\"principalId\":\"bpkkpwdre\",\"clientId\":\"ovvqfovljxywsu\"}}},\"location\":\"en\",\"tags\":{\"wlquuijfqkace\":\"zar\"},\"id\":\"iipfpubj\",\"name\":\"bwwift\",\"type\":\"hqkvpuvksgplsak\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.accessConnectors().listByResourceGroup("kcnqxwbpo", com.azure.core.util.Context.NONE); + = manager.accessConnectors().listByResourceGroup("dtmhrkwofyyvoqa", com.azure.core.util.Context.NONE); - Assertions.assertEquals("rpqlp", response.iterator().next().location()); - Assertions.assertEquals("ciuqgbdb", response.iterator().next().tags().get("t")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, + Assertions.assertEquals("en", response.iterator().next().location()); + Assertions.assertEquals("zar", response.iterator().next().tags().get("wlquuijfqkace")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.iterator().next().identity().type()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListMockTests.java index 9d774301101b..bce58353ecc1 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AccessConnectorsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.AccessConnector; @@ -23,19 +23,19 @@ public final class AccessConnectorsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"84724bba-b831-4962-9d08-c70e75f32a96\",\"tenantId\":\"15838318-ce67-4d1a-b506-971e706c0977\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"bjibwwiftohq\":{\"principalId\":\"4bc2055d-78f0-4c3c-af22-6f9ef249dfda\",\"clientId\":\"5e42d2a1-0b72-476e-b2e9-6e96049b7a04\"},\"uvksgplsaknynfsy\":{\"principalId\":\"86b9c61f-8aa8-4847-8310-90c683c94161\",\"clientId\":\"f3632105-e22e-4d4b-a802-bd2bd327a04d\"},\"ph\":{\"principalId\":\"330d7797-b306-4a0a-aa42-ecc5d7624823\",\"clientId\":\"e667275c-dfdc-40b9-8cf9-7f4398fa5a7c\"}}},\"properties\":{\"provisioningState\":\"Accepted\"},\"location\":\"dlqiyntorzih\",\"tags\":{\"yzrpzbchckqqzq\":\"sjswsrms\",\"ysuiizynkedya\":\"ox\"},\"id\":\"rwyhqmibzyhwitsm\",\"name\":\"pyy\",\"type\":\"pcdpumnz\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Created\",\"referedBy\":[\"n\"]},\"identity\":{\"principalId\":\"huopxodlqiynto\",\"tenantId\":\"ihleos\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ysuiizynkedya\":{\"principalId\":\"mslyzrpzbchckqqz\",\"clientId\":\"ox\"},\"pcdpumnz\":{\"principalId\":\"wyhqmibzyhwits\",\"clientId\":\"pyy\"}}},\"location\":\"wznm\",\"tags\":{\"gj\":\"knso\",\"vokotllxdyh\":\"xbldtlwwrlkdmtn\",\"oocrkvcikhnv\":\"syocogjltdtbnnha\"},\"id\":\"amqgxqquezikyw\",\"name\":\"gxk\",\"type\":\"lla\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.accessConnectors().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("dlqiyntorzih", response.iterator().next().location()); - Assertions.assertEquals("sjswsrms", response.iterator().next().tags().get("yzrpzbchckqqzq")); + Assertions.assertEquals("wznm", response.iterator().next().location()); + Assertions.assertEquals("knso", response.iterator().next().tags().get("gj")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AddressSpaceTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AddressSpaceTests.java index a8d2856b176c..671aa8ff9e22 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AddressSpaceTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AddressSpaceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -13,16 +13,16 @@ public final class AddressSpaceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddressSpace model - = BinaryData.fromString("{\"addressPrefixes\":[\"xhbkuofq\",\"e\",\"kh\",\"enevfyexfwhybci\"]}") + = BinaryData.fromString("{\"addressPrefixes\":[\"py\",\"gklwn\",\"nhjdauw\",\"vylwzbtdhxuj\"]}") .toObject(AddressSpace.class); - Assertions.assertEquals("xhbkuofq", model.addressPrefixes().get(0)); + Assertions.assertEquals("py", model.addressPrefixes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AddressSpace model - = new AddressSpace().withAddressPrefixes(Arrays.asList("xhbkuofq", "e", "kh", "enevfyexfwhybci")); + = new AddressSpace().withAddressPrefixes(Arrays.asList("py", "gklwn", "nhjdauw", "vylwzbtdhxuj")); model = BinaryData.fromObject(model).toObject(AddressSpace.class); - Assertions.assertEquals("xhbkuofq", model.addressPrefixes().get(0)); + Assertions.assertEquals("py", model.addressPrefixes().get(0)); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AutomaticClusterUpdateDefinitionTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AutomaticClusterUpdateDefinitionTests.java new file mode 100644 index 000000000000..16d309101bfe --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/AutomaticClusterUpdateDefinitionTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.databricks.models.AutomaticClusterUpdateDefinition; +import com.azure.resourcemanager.databricks.models.AutomaticClusterUpdateValue; +import org.junit.jupiter.api.Assertions; + +public final class AutomaticClusterUpdateDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AutomaticClusterUpdateDefinition model + = BinaryData.fromString("{\"value\":\"Enabled\"}").toObject(AutomaticClusterUpdateDefinition.class); + Assertions.assertEquals(AutomaticClusterUpdateValue.ENABLED, model.value()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AutomaticClusterUpdateDefinition model + = new AutomaticClusterUpdateDefinition().withValue(AutomaticClusterUpdateValue.ENABLED); + model = BinaryData.fromObject(model).toObject(AutomaticClusterUpdateDefinition.class); + Assertions.assertEquals(AutomaticClusterUpdateValue.ENABLED, model.value()); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/ComplianceSecurityProfileDefinitionTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/ComplianceSecurityProfileDefinitionTests.java new file mode 100644 index 000000000000..1419ae809457 --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/ComplianceSecurityProfileDefinitionTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.databricks.models.ComplianceSecurityProfileDefinition; +import com.azure.resourcemanager.databricks.models.ComplianceSecurityProfileValue; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ComplianceSecurityProfileDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ComplianceSecurityProfileDefinition model = BinaryData + .fromString("{\"complianceStandards\":[\"usnhutje\",\"tmrldhugjzzdatq\"],\"value\":\"Enabled\"}") + .toObject(ComplianceSecurityProfileDefinition.class); + Assertions.assertEquals("usnhutje", model.complianceStandards().get(0)); + Assertions.assertEquals(ComplianceSecurityProfileValue.ENABLED, model.value()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ComplianceSecurityProfileDefinition model = new ComplianceSecurityProfileDefinition() + .withComplianceStandards(Arrays.asList("usnhutje", "tmrldhugjzzdatq")) + .withValue(ComplianceSecurityProfileValue.ENABLED); + model = BinaryData.fromObject(model).toObject(ComplianceSecurityProfileDefinition.class); + Assertions.assertEquals("usnhutje", model.complianceStandards().get(0)); + Assertions.assertEquals(ComplianceSecurityProfileValue.ENABLED, model.value()); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/CreatedByTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/CreatedByTests.java index ff68c046213b..1e5fb8066026 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/CreatedByTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/CreatedByTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -10,9 +10,9 @@ public final class CreatedByTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CreatedBy model = BinaryData.fromString( - "{\"oid\":\"99765cdf-87c8-4cc6-8d6a-b4093fcd481a\",\"puid\":\"ybrk\",\"applicationId\":\"c50a5e68-ae5f-45f9-8823-f286713b0c47\"}") - .toObject(CreatedBy.class); + CreatedBy model + = BinaryData.fromString("{\"oid\":\"ubljofxqe\",\"puid\":\"jaeq\",\"applicationId\":\"qjbasvms\"}") + .toObject(CreatedBy.class); } @org.junit.jupiter.api.Test diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/DefaultCatalogPropertiesTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/DefaultCatalogPropertiesTests.java new file mode 100644 index 000000000000..9c80c35d462a --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/DefaultCatalogPropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.databricks.models.DefaultCatalogProperties; +import com.azure.resourcemanager.databricks.models.InitialType; +import org.junit.jupiter.api.Assertions; + +public final class DefaultCatalogPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DefaultCatalogProperties model + = BinaryData.fromString("{\"initialType\":\"HiveMetastore\",\"initialName\":\"cuertu\"}") + .toObject(DefaultCatalogProperties.class); + Assertions.assertEquals(InitialType.HIVE_METASTORE, model.initialType()); + Assertions.assertEquals("cuertu", model.initialName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DefaultCatalogProperties model + = new DefaultCatalogProperties().withInitialType(InitialType.HIVE_METASTORE).withInitialName("cuertu"); + model = BinaryData.fromObject(model).toObject(DefaultCatalogProperties.class); + Assertions.assertEquals(InitialType.HIVE_METASTORE, model.initialType()); + Assertions.assertEquals("cuertu", model.initialName()); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EndpointDependencyTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EndpointDependencyTests.java index 13ce8d3cfa1a..5fb252c2e923 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EndpointDependencyTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EndpointDependencyTests.java @@ -1,45 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.databricks.models.EndpointDependency; -import com.azure.resourcemanager.databricks.models.EndpointDetail; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class EndpointDependencyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EndpointDependency model = BinaryData.fromString( - "{\"domainName\":\"nlebxetqgtzxd\",\"endpointDetails\":[{\"ipAddress\":\"qqwx\",\"port\":19464895,\"latency\":7.9074598312850135,\"isAccessible\":true},{\"ipAddress\":\"sub\",\"port\":1455725061,\"latency\":48.13331797377744,\"isAccessible\":true}]}") + "{\"domainName\":\"d\",\"endpointDetails\":[{\"ipAddress\":\"xbniwdjs\",\"port\":1721819579,\"latency\":65.61442634194685,\"isAccessible\":true},{\"ipAddress\":\"xytxhpzxbz\",\"port\":686718071,\"latency\":6.118039421372123,\"isAccessible\":false},{\"ipAddress\":\"hxw\",\"port\":767485321,\"latency\":15.904583861119981,\"isAccessible\":false},{\"ipAddress\":\"bovpl\",\"port\":1271650742,\"latency\":48.96845238437485,\"isAccessible\":false}]}") .toObject(EndpointDependency.class); - Assertions.assertEquals("nlebxetqgtzxd", model.domainName()); - Assertions.assertEquals("qqwx", model.endpointDetails().get(0).ipAddress()); - Assertions.assertEquals(19464895, model.endpointDetails().get(0).port()); - Assertions.assertEquals(7.9074598312850135D, model.endpointDetails().get(0).latency()); - Assertions.assertEquals(true, model.endpointDetails().get(0).isAccessible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndpointDependency model = new EndpointDependency().withDomainName("nlebxetqgtzxd") - .withEndpointDetails(Arrays.asList( - new EndpointDetail().withIpAddress("qqwx") - .withPort(19464895) - .withLatency(7.9074598312850135D) - .withIsAccessible(true), - new EndpointDetail().withIpAddress("sub") - .withPort(1455725061) - .withLatency(48.13331797377744D) - .withIsAccessible(true))); - model = BinaryData.fromObject(model).toObject(EndpointDependency.class); - Assertions.assertEquals("nlebxetqgtzxd", model.domainName()); - Assertions.assertEquals("qqwx", model.endpointDetails().get(0).ipAddress()); - Assertions.assertEquals(19464895, model.endpointDetails().get(0).port()); - Assertions.assertEquals(7.9074598312850135D, model.endpointDetails().get(0).latency()); - Assertions.assertEquals(true, model.endpointDetails().get(0).isAccessible()); + Assertions.assertEquals("d", model.domainName()); + Assertions.assertEquals("xbniwdjs", model.endpointDetails().get(0).ipAddress()); + Assertions.assertEquals(1721819579, model.endpointDetails().get(0).port()); + Assertions.assertEquals(65.61442634194685D, model.endpointDetails().get(0).latency()); + Assertions.assertTrue(model.endpointDetails().get(0).isAccessible()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EndpointDetailTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EndpointDetailTests.java index 5d3b75bfd9c8..b5c452ab02d5 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EndpointDetailTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EndpointDetailTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -12,24 +12,11 @@ public final class EndpointDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EndpointDetail model = BinaryData.fromString( - "{\"ipAddress\":\"gnzscxaqwo\",\"port\":1004687873,\"latency\":96.31729302894911,\"isAccessible\":true}") + "{\"ipAddress\":\"uosvmkfssxqukk\",\"port\":89011603,\"latency\":10.120872880774323,\"isAccessible\":true}") .toObject(EndpointDetail.class); - Assertions.assertEquals("gnzscxaqwo", model.ipAddress()); - Assertions.assertEquals(1004687873, model.port()); - Assertions.assertEquals(96.31729302894911D, model.latency()); - Assertions.assertEquals(true, model.isAccessible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndpointDetail model = new EndpointDetail().withIpAddress("gnzscxaqwo") - .withPort(1004687873) - .withLatency(96.31729302894911D) - .withIsAccessible(true); - model = BinaryData.fromObject(model).toObject(EndpointDetail.class); - Assertions.assertEquals("gnzscxaqwo", model.ipAddress()); - Assertions.assertEquals(1004687873, model.port()); - Assertions.assertEquals(96.31729302894911D, model.latency()); - Assertions.assertEquals(true, model.isAccessible()); + Assertions.assertEquals("uosvmkfssxqukk", model.ipAddress()); + Assertions.assertEquals(89011603, model.port()); + Assertions.assertEquals(10.120872880774323D, model.latency()); + Assertions.assertTrue(model.isAccessible()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EnhancedSecurityComplianceDefinitionTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EnhancedSecurityComplianceDefinitionTests.java new file mode 100644 index 000000000000..4ba16b25dbd7 --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EnhancedSecurityComplianceDefinitionTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.databricks.models.AutomaticClusterUpdateDefinition; +import com.azure.resourcemanager.databricks.models.AutomaticClusterUpdateValue; +import com.azure.resourcemanager.databricks.models.ComplianceSecurityProfileDefinition; +import com.azure.resourcemanager.databricks.models.ComplianceSecurityProfileValue; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityComplianceDefinition; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityMonitoringDefinition; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityMonitoringValue; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class EnhancedSecurityComplianceDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EnhancedSecurityComplianceDefinition model = BinaryData.fromString( + "{\"automaticClusterUpdate\":{\"value\":\"Disabled\"},\"complianceSecurityProfile\":{\"complianceStandards\":[\"ebvmgxsabkyqd\",\"ujitcjcz\",\"zevndhkrwpdappds\"],\"value\":\"Disabled\"},\"enhancedSecurityMonitoring\":{\"value\":\"Enabled\"}}") + .toObject(EnhancedSecurityComplianceDefinition.class); + Assertions.assertEquals(AutomaticClusterUpdateValue.DISABLED, model.automaticClusterUpdate().value()); + Assertions.assertEquals("ebvmgxsabkyqd", model.complianceSecurityProfile().complianceStandards().get(0)); + Assertions.assertEquals(ComplianceSecurityProfileValue.DISABLED, model.complianceSecurityProfile().value()); + Assertions.assertEquals(EnhancedSecurityMonitoringValue.ENABLED, model.enhancedSecurityMonitoring().value()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EnhancedSecurityComplianceDefinition model = new EnhancedSecurityComplianceDefinition() + .withAutomaticClusterUpdate( + new AutomaticClusterUpdateDefinition().withValue(AutomaticClusterUpdateValue.DISABLED)) + .withComplianceSecurityProfile(new ComplianceSecurityProfileDefinition() + .withComplianceStandards(Arrays.asList("ebvmgxsabkyqd", "ujitcjcz", "zevndhkrwpdappds")) + .withValue(ComplianceSecurityProfileValue.DISABLED)) + .withEnhancedSecurityMonitoring( + new EnhancedSecurityMonitoringDefinition().withValue(EnhancedSecurityMonitoringValue.ENABLED)); + model = BinaryData.fromObject(model).toObject(EnhancedSecurityComplianceDefinition.class); + Assertions.assertEquals(AutomaticClusterUpdateValue.DISABLED, model.automaticClusterUpdate().value()); + Assertions.assertEquals("ebvmgxsabkyqd", model.complianceSecurityProfile().complianceStandards().get(0)); + Assertions.assertEquals(ComplianceSecurityProfileValue.DISABLED, model.complianceSecurityProfile().value()); + Assertions.assertEquals(EnhancedSecurityMonitoringValue.ENABLED, model.enhancedSecurityMonitoring().value()); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EnhancedSecurityMonitoringDefinitionTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EnhancedSecurityMonitoringDefinitionTests.java new file mode 100644 index 000000000000..26f0eaf06b3c --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/EnhancedSecurityMonitoringDefinitionTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityMonitoringDefinition; +import com.azure.resourcemanager.databricks.models.EnhancedSecurityMonitoringValue; +import org.junit.jupiter.api.Assertions; + +public final class EnhancedSecurityMonitoringDefinitionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EnhancedSecurityMonitoringDefinition model + = BinaryData.fromString("{\"value\":\"Disabled\"}").toObject(EnhancedSecurityMonitoringDefinition.class); + Assertions.assertEquals(EnhancedSecurityMonitoringValue.DISABLED, model.value()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EnhancedSecurityMonitoringDefinition model + = new EnhancedSecurityMonitoringDefinition().withValue(EnhancedSecurityMonitoringValue.DISABLED); + model = BinaryData.fromObject(model).toObject(EnhancedSecurityMonitoringDefinition.class); + Assertions.assertEquals(EnhancedSecurityMonitoringValue.DISABLED, model.value()); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/GroupIdInformationInnerTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/GroupIdInformationInnerTests.java index 544bc4e5e297..32523a6fc055 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/GroupIdInformationInnerTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/GroupIdInformationInnerTests.java @@ -1,35 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.databricks.fluent.models.GroupIdInformationInner; -import com.azure.resourcemanager.databricks.models.GroupIdInformationProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class GroupIdInformationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GroupIdInformationInner model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"erhhbcsglumm\",\"requiredMembers\":[\"j\",\"odxobnbdxkqpxok\",\"jionpimexgstxgc\"],\"requiredZoneNames\":[\"gmaajrm\"]},\"id\":\"djwzrlov\",\"name\":\"clwhijcoejctbz\",\"type\":\"qsqsy\"}") + "{\"properties\":{\"groupId\":\"kjz\",\"requiredMembers\":[\"slpvlop\"],\"requiredZoneNames\":[\"ighxpk\",\"wzbaiue\"]},\"id\":\"a\",\"name\":\"m\",\"type\":\"yqupedeojnabckh\"}") .toObject(GroupIdInformationInner.class); - Assertions.assertEquals("erhhbcsglumm", model.properties().groupId()); - Assertions.assertEquals("j", model.properties().requiredMembers().get(0)); - Assertions.assertEquals("gmaajrm", model.properties().requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupIdInformationInner model = new GroupIdInformationInner() - .withProperties(new GroupIdInformationProperties().withGroupId("erhhbcsglumm") - .withRequiredMembers(Arrays.asList("j", "odxobnbdxkqpxok", "jionpimexgstxgc")) - .withRequiredZoneNames(Arrays.asList("gmaajrm"))); - model = BinaryData.fromObject(model).toObject(GroupIdInformationInner.class); - Assertions.assertEquals("erhhbcsglumm", model.properties().groupId()); - Assertions.assertEquals("j", model.properties().requiredMembers().get(0)); - Assertions.assertEquals("gmaajrm", model.properties().requiredZoneNames().get(0)); + Assertions.assertEquals("kjz", model.properties().groupId()); + Assertions.assertEquals("slpvlop", model.properties().requiredMembers().get(0)); + Assertions.assertEquals("ighxpk", model.properties().requiredZoneNames().get(0)); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/GroupIdInformationPropertiesTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/GroupIdInformationPropertiesTests.java index e6aff76db8e7..e070e4eaad44 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/GroupIdInformationPropertiesTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/GroupIdInformationPropertiesTests.java @@ -1,33 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.databricks.models.GroupIdInformationProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class GroupIdInformationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GroupIdInformationProperties model = BinaryData.fromString( - "{\"groupId\":\"kbfkg\",\"requiredMembers\":[\"kexxppof\",\"xaxcfjpgddtocjjx\",\"vpmouexhdzxib\"],\"requiredZoneNames\":[\"jnxqbzvddntwn\",\"eic\",\"twnpzaoqvuhrhcf\"]}") + "{\"groupId\":\"txp\",\"requiredMembers\":[\"btfhvpesaps\",\"rdqmhjjdhtldwkyz\",\"uutkncw\"],\"requiredZoneNames\":[\"svlxotogtwrup\",\"sx\",\"nmic\",\"kvceoveilovnotyf\"]}") .toObject(GroupIdInformationProperties.class); - Assertions.assertEquals("kbfkg", model.groupId()); - Assertions.assertEquals("kexxppof", model.requiredMembers().get(0)); - Assertions.assertEquals("jnxqbzvddntwn", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupIdInformationProperties model = new GroupIdInformationProperties().withGroupId("kbfkg") - .withRequiredMembers(Arrays.asList("kexxppof", "xaxcfjpgddtocjjx", "vpmouexhdzxib")) - .withRequiredZoneNames(Arrays.asList("jnxqbzvddntwn", "eic", "twnpzaoqvuhrhcf")); - model = BinaryData.fromObject(model).toObject(GroupIdInformationProperties.class); - Assertions.assertEquals("kbfkg", model.groupId()); - Assertions.assertEquals("kexxppof", model.requiredMembers().get(0)); - Assertions.assertEquals("jnxqbzvddntwn", model.requiredZoneNames().get(0)); + Assertions.assertEquals("txp", model.groupId()); + Assertions.assertEquals("btfhvpesaps", model.requiredMembers().get(0)); + Assertions.assertEquals("svlxotogtwrup", model.requiredZoneNames().get(0)); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/ManagedIdentityConfigurationTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/ManagedIdentityConfigurationTests.java index c8d2bd07078d..d359983a4d71 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/ManagedIdentityConfigurationTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/ManagedIdentityConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -10,8 +10,8 @@ public final class ManagedIdentityConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ManagedIdentityConfiguration model = BinaryData.fromString( - "{\"principalId\":\"ff14a289-c859-4292-9e42-36a170013d84\",\"tenantId\":\"befb2ce0-41c1-45dd-9820-ad3e7e7286eb\",\"type\":\"jgrtfwvukxga\"}") + ManagedIdentityConfiguration model = BinaryData + .fromString("{\"principalId\":\"qulngsntnbybkzgc\",\"tenantId\":\"wclxxwrl\",\"type\":\"ouskcqvkocrc\"}") .toObject(ManagedIdentityConfiguration.class); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/ManagedServiceIdentityTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/ManagedServiceIdentityTests.java index 3bf040c7e369..4c164dde5b19 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/ManagedServiceIdentityTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/ManagedServiceIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -16,7 +16,7 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"b2d3bdaf-61de-4288-97e3-c1928434e39b\",\"tenantId\":\"a16c2cf7-7145-41f0-9d14-3f99ed435bc0\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"igrxwburvjxxjn\":{\"principalId\":\"53e3940b-6451-401b-8e5c-ea315025ffff\",\"clientId\":\"28988c3f-2d61-45c0-ab9f-fb4de085c211\"},\"dptkoenkouk\":{\"principalId\":\"0e9927f2-3a00-4bb1-bb82-88d174bbb1b7\",\"clientId\":\"aa01eeec-4aa7-4463-8aff-5e00c0ab0d74\"},\"dwtiukbldngkp\":{\"principalId\":\"a51ae139-0adf-47b3-a835-ac364b122eca\",\"clientId\":\"e8b774f2-55b8-4b7a-99ae-18defb55cf3f\"}}}") + "{\"principalId\":\"lokeyy\",\"tenantId\":\"nj\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"e\":{\"principalId\":\"grhpdjpju\",\"clientId\":\"sxazjpq\"},\"jzzvdud\":{\"principalId\":\"alhbx\",\"clientId\":\"e\"},\"xnltyfsoppu\":{\"principalId\":\"dslfhotwmcy\",\"clientId\":\"wlbjnpgacftade\"}}}") .toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } @@ -24,8 +24,8 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("igrxwburvjxxjn", new UserAssignedIdentity(), "dptkoenkouk", - new UserAssignedIdentity(), "dwtiukbldngkp", new UserAssignedIdentity())); + .withUserAssignedIdentities(mapOf("e", new UserAssignedIdentity(), "jzzvdud", new UserAssignedIdentity(), + "xnltyfsoppu", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationDisplayTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationDisplayTests.java index 2f0fa39186c1..c532d65afb30 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationDisplayTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationDisplayTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -12,24 +12,11 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"kujysvlejuvfq\",\"resource\":\"rlyxwjkcprbnw\",\"operation\":\"gjvtbv\",\"description\":\"sszdnru\"}") + "{\"provider\":\"lx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"}") .toObject(OperationDisplay.class); - Assertions.assertEquals("kujysvlejuvfq", model.provider()); - Assertions.assertEquals("rlyxwjkcprbnw", model.resource()); - Assertions.assertEquals("gjvtbv", model.operation()); - Assertions.assertEquals("sszdnru", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("kujysvlejuvfq") - .withResource("rlyxwjkcprbnw") - .withOperation("gjvtbv") - .withDescription("sszdnru"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("kujysvlejuvfq", model.provider()); - Assertions.assertEquals("rlyxwjkcprbnw", model.resource()); - Assertions.assertEquals("gjvtbv", model.operation()); - Assertions.assertEquals("sszdnru", model.description()); + Assertions.assertEquals("lx", model.provider()); + Assertions.assertEquals("kuksjtxukcdm", model.resource()); + Assertions.assertEquals("rcryuanzwuxzdxta", model.operation()); + Assertions.assertEquals("lhmwhfpmrqobm", model.description()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationInnerTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationInnerTests.java index 39dd0348c597..3d1082c80b26 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationInnerTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationInnerTests.java @@ -1,39 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.databricks.fluent.models.OperationInner; -import com.azure.resourcemanager.databricks.models.OperationDisplay; import org.junit.jupiter.api.Assertions; public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"gmbmbexppbh\",\"display\":{\"provider\":\"rolfpfp\",\"resource\":\"lgbquxig\",\"operation\":\"jgzjaoyfhrtx\",\"description\":\"n\"}}") + "{\"name\":\"nygj\",\"display\":{\"provider\":\"ddeqsrdeupewnwre\",\"resource\":\"jzyflu\",\"operation\":\"rh\",\"description\":\"fcqhsmyurkd\"}}") .toObject(OperationInner.class); - Assertions.assertEquals("gmbmbexppbh", model.name()); - Assertions.assertEquals("rolfpfp", model.display().provider()); - Assertions.assertEquals("lgbquxig", model.display().resource()); - Assertions.assertEquals("jgzjaoyfhrtx", model.display().operation()); - Assertions.assertEquals("n", model.display().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withName("gmbmbexppbh") - .withDisplay(new OperationDisplay().withProvider("rolfpfp") - .withResource("lgbquxig") - .withOperation("jgzjaoyfhrtx") - .withDescription("n")); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("gmbmbexppbh", model.name()); - Assertions.assertEquals("rolfpfp", model.display().provider()); - Assertions.assertEquals("lgbquxig", model.display().resource()); - Assertions.assertEquals("jgzjaoyfhrtx", model.display().operation()); - Assertions.assertEquals("n", model.display().description()); + Assertions.assertEquals("nygj", model.name()); + Assertions.assertEquals("ddeqsrdeupewnwre", model.display().provider()); + Assertions.assertEquals("jzyflu", model.display().resource()); + Assertions.assertEquals("rh", model.display().operation()); + Assertions.assertEquals("fcqhsmyurkd", model.display().description()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationListResultTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationListResultTests.java index b18f43630c79..4f3c336ad9ee 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationListResultTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationListResultTests.java @@ -1,55 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databricks.fluent.models.OperationInner; -import com.azure.resourcemanager.databricks.models.OperationDisplay; -import com.azure.resourcemanager.databricks.models.OperationListResult; -import java.util.Arrays; +import com.azure.resourcemanager.databricks.implementation.models.OperationListResult; import org.junit.jupiter.api.Assertions; public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"xolniwpwcukjfk\",\"display\":{\"provider\":\"w\",\"resource\":\"lryplwckbasyy\",\"operation\":\"ddhsgcbacphe\",\"description\":\"ot\"}},{\"name\":\"qgoulznd\",\"display\":{\"provider\":\"wyqkgfgibm\",\"resource\":\"gakeqsr\",\"operation\":\"bzqqedqytbciq\",\"description\":\"uflmm\"}},{\"name\":\"zsm\",\"display\":{\"provider\":\"glougpbk\",\"resource\":\"mutduqktaps\",\"operation\":\"gcue\",\"description\":\"umkdosvqwhbmd\"}}],\"nextLink\":\"bjf\"}") + "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"}},{\"name\":\"ownoizhw\",\"display\":{\"provider\":\"ybqsoqijg\",\"resource\":\"mbpazlobcufpdzn\",\"operation\":\"t\",\"description\":\"qjnqglhqgnufoooj\"}},{\"name\":\"ifsqesaagdfmg\",\"display\":{\"provider\":\"hjxri\",\"resource\":\"wmrvktsizntocipa\",\"operation\":\"ajpsquc\",\"description\":\"o\"}}],\"nextLink\":\"dkfo\"}") .toObject(OperationListResult.class); - Assertions.assertEquals("xolniwpwcukjfk", model.value().get(0).name()); - Assertions.assertEquals("w", model.value().get(0).display().provider()); - Assertions.assertEquals("lryplwckbasyy", model.value().get(0).display().resource()); - Assertions.assertEquals("ddhsgcbacphe", model.value().get(0).display().operation()); - Assertions.assertEquals("ot", model.value().get(0).display().description()); - Assertions.assertEquals("bjf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult().withValue(Arrays.asList( - new OperationInner().withName("xolniwpwcukjfk") - .withDisplay(new OperationDisplay().withProvider("w") - .withResource("lryplwckbasyy") - .withOperation("ddhsgcbacphe") - .withDescription("ot")), - new OperationInner().withName("qgoulznd") - .withDisplay(new OperationDisplay().withProvider("wyqkgfgibm") - .withResource("gakeqsr") - .withOperation("bzqqedqytbciq") - .withDescription("uflmm")), - new OperationInner().withName("zsm") - .withDisplay(new OperationDisplay().withProvider("glougpbk") - .withResource("mutduqktaps") - .withOperation("gcue") - .withDescription("umkdosvqwhbmd")))) - .withNextLink("bjf"); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("xolniwpwcukjfk", model.value().get(0).name()); - Assertions.assertEquals("w", model.value().get(0).display().provider()); - Assertions.assertEquals("lryplwckbasyy", model.value().get(0).display().resource()); - Assertions.assertEquals("ddhsgcbacphe", model.value().get(0).display().operation()); - Assertions.assertEquals("ot", model.value().get(0).display().description()); - Assertions.assertEquals("bjf", model.nextLink()); + Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); + Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); + Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); + Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); + Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationsListMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationsListMockTests.java index d69a2463a728..56545eb78b78 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationsListMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OperationsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.Operation; @@ -22,21 +22,21 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"jznb\",\"display\":{\"provider\":\"wuwprzqlv\",\"resource\":\"alupjm\",\"operation\":\"fxobbcsws\",\"description\":\"jriplrbpbewtghf\"}}]}"; + = "{\"value\":[{\"name\":\"xrmcqibycnojvk\",\"display\":{\"provider\":\"fqsgzvahapjy\",\"resource\":\"pvgqzcjrvxdjzlm\",\"operation\":\"xkvugfhzov\",\"description\":\"jvzunluthnnp\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("jznb", response.iterator().next().name()); - Assertions.assertEquals("wuwprzqlv", response.iterator().next().display().provider()); - Assertions.assertEquals("alupjm", response.iterator().next().display().resource()); - Assertions.assertEquals("fxobbcsws", response.iterator().next().display().operation()); - Assertions.assertEquals("jriplrbpbewtghf", response.iterator().next().display().description()); + Assertions.assertEquals("xrmcqibycnojvk", response.iterator().next().name()); + Assertions.assertEquals("fqsgzvahapjy", response.iterator().next().display().provider()); + Assertions.assertEquals("pvgqzcjrvxdjzlm", response.iterator().next().display().resource()); + Assertions.assertEquals("xkvugfhzov", response.iterator().next().display().operation()); + Assertions.assertEquals("jvzunluthnnp", response.iterator().next().display().description()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OutboundEnvironmentEndpointInnerTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OutboundEnvironmentEndpointInnerTests.java index 57218f6a2d1b..e68c9d3da0b4 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OutboundEnvironmentEndpointInnerTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OutboundEnvironmentEndpointInnerTests.java @@ -1,68 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.databricks.fluent.models.OutboundEnvironmentEndpointInner; -import com.azure.resourcemanager.databricks.models.EndpointDependency; -import com.azure.resourcemanager.databricks.models.EndpointDetail; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class OutboundEnvironmentEndpointInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OutboundEnvironmentEndpointInner model = BinaryData.fromString( - "{\"category\":\"fgugnxkrxdqmid\",\"endpoints\":[{\"domainName\":\"rvqdra\",\"endpointDetails\":[{\"ipAddress\":\"big\",\"port\":823373191,\"latency\":58.94817902536062,\"isAccessible\":false},{\"ipAddress\":\"kanyktzlcuiywg\",\"port\":1328534140,\"latency\":50.55224788485616,\"isAccessible\":true}]},{\"domainName\":\"nhzgpphrcgyn\",\"endpointDetails\":[{\"ipAddress\":\"ecfvmm\",\"port\":946201596,\"latency\":67.10017753544727,\"isAccessible\":false},{\"ipAddress\":\"v\",\"port\":11463195,\"latency\":96.68564264290794,\"isAccessible\":false},{\"ipAddress\":\"y\",\"port\":1896643633,\"latency\":79.70230134472271,\"isAccessible\":true},{\"ipAddress\":\"vccfw\",\"port\":1351999022,\"latency\":23.64338541823554,\"isAccessible\":false}]}]}") + "{\"category\":\"ec\",\"endpoints\":[{\"domainName\":\"ebfqkkrbm\",\"endpointDetails\":[{\"ipAddress\":\"riwflzlfb\",\"port\":599393599,\"latency\":40.24979296557362,\"isAccessible\":true},{\"ipAddress\":\"pnq\",\"port\":64383308,\"latency\":45.96843241376628,\"isAccessible\":false},{\"ipAddress\":\"yydhibnuqqk\",\"port\":1850827957,\"latency\":52.96609609141011,\"isAccessible\":false}]},{\"domainName\":\"qagnbuyn\",\"endpointDetails\":[{\"ipAddress\":\"gmebfsiarbutrcv\",\"port\":1106278422,\"latency\":54.05952318243248,\"isAccessible\":true},{\"ipAddress\":\"unmpxttd\",\"port\":1333512274,\"latency\":69.24458595882761,\"isAccessible\":true},{\"ipAddress\":\"xmyskp\",\"port\":743667383,\"latency\":92.23311663976891,\"isAccessible\":false},{\"ipAddress\":\"ywn\",\"port\":782555579,\"latency\":93.39418422317056,\"isAccessible\":false}]},{\"domainName\":\"idybyxczf\",\"endpointDetails\":[{\"ipAddress\":\"axdbabph\",\"port\":2118768153,\"latency\":49.89188490883186,\"isAccessible\":true},{\"ipAddress\":\"thsu\",\"port\":296949281,\"latency\":98.78118258064285,\"isAccessible\":false},{\"ipAddress\":\"t\",\"port\":1372436938,\"latency\":32.52217332270636,\"isAccessible\":true}]},{\"domainName\":\"edckzywbiexzfey\",\"endpointDetails\":[{\"ipAddress\":\"ibx\",\"port\":1757218598,\"latency\":22.23001848159821,\"isAccessible\":true},{\"ipAddress\":\"muzyoxaepdk\",\"port\":2111181142,\"latency\":62.55231809841534,\"isAccessible\":true}]}]}") .toObject(OutboundEnvironmentEndpointInner.class); - Assertions.assertEquals("fgugnxkrxdqmid", model.category()); - Assertions.assertEquals("rvqdra", model.endpoints().get(0).domainName()); - Assertions.assertEquals("big", model.endpoints().get(0).endpointDetails().get(0).ipAddress()); - Assertions.assertEquals(823373191, model.endpoints().get(0).endpointDetails().get(0).port()); - Assertions.assertEquals(58.94817902536062D, model.endpoints().get(0).endpointDetails().get(0).latency()); - Assertions.assertEquals(false, model.endpoints().get(0).endpointDetails().get(0).isAccessible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundEnvironmentEndpointInner model = new OutboundEnvironmentEndpointInner().withCategory("fgugnxkrxdqmid") - .withEndpoints(Arrays.asList( - new EndpointDependency().withDomainName("rvqdra") - .withEndpointDetails(Arrays.asList( - new EndpointDetail().withIpAddress("big") - .withPort(823373191) - .withLatency(58.94817902536062D) - .withIsAccessible(false), - new EndpointDetail().withIpAddress("kanyktzlcuiywg") - .withPort(1328534140) - .withLatency(50.55224788485616D) - .withIsAccessible(true))), - new EndpointDependency().withDomainName("nhzgpphrcgyn") - .withEndpointDetails(Arrays.asList( - new EndpointDetail().withIpAddress("ecfvmm") - .withPort(946201596) - .withLatency(67.10017753544727D) - .withIsAccessible(false), - new EndpointDetail().withIpAddress("v") - .withPort(11463195) - .withLatency(96.68564264290794D) - .withIsAccessible(false), - new EndpointDetail().withIpAddress("y") - .withPort(1896643633) - .withLatency(79.70230134472271D) - .withIsAccessible(true), - new EndpointDetail().withIpAddress("vccfw") - .withPort(1351999022) - .withLatency(23.64338541823554D) - .withIsAccessible(false))))); - model = BinaryData.fromObject(model).toObject(OutboundEnvironmentEndpointInner.class); - Assertions.assertEquals("fgugnxkrxdqmid", model.category()); - Assertions.assertEquals("rvqdra", model.endpoints().get(0).domainName()); - Assertions.assertEquals("big", model.endpoints().get(0).endpointDetails().get(0).ipAddress()); - Assertions.assertEquals(823373191, model.endpoints().get(0).endpointDetails().get(0).port()); - Assertions.assertEquals(58.94817902536062D, model.endpoints().get(0).endpointDetails().get(0).latency()); - Assertions.assertEquals(false, model.endpoints().get(0).endpointDetails().get(0).isAccessible()); + Assertions.assertEquals("ec", model.category()); + Assertions.assertEquals("ebfqkkrbm", model.endpoints().get(0).domainName()); + Assertions.assertEquals("riwflzlfb", model.endpoints().get(0).endpointDetails().get(0).ipAddress()); + Assertions.assertEquals(599393599, model.endpoints().get(0).endpointDetails().get(0).port()); + Assertions.assertEquals(40.24979296557362D, model.endpoints().get(0).endpointDetails().get(0).latency()); + Assertions.assertTrue(model.endpoints().get(0).endpointDetails().get(0).isAccessible()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OutboundNetworkDependenciesEndpointsListWithResponseMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OutboundNetworkDependenciesEndpointsListWithResponseMockTests.java index e95047437bfe..16b49883cdad 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OutboundNetworkDependenciesEndpointsListWithResponseMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/OutboundNetworkDependenciesEndpointsListWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.OutboundEnvironmentEndpoint; @@ -22,20 +22,20 @@ public final class OutboundNetworkDependenciesEndpointsListWithResponseMockTests @Test public void testListWithResponse() throws Exception { String responseStr - = "[{\"category\":\"gnayqigynduh\",\"endpoints\":[{\"domainName\":\"lkthu\",\"endpointDetails\":[{},{}]},{\"domainName\":\"lbg\",\"endpointDetails\":[{},{},{}]},{\"domainName\":\"iertgccymvaolp\",\"endpointDetails\":[{},{}]}]}]"; + = "[{\"category\":\"zsoibjudpfrxtr\",\"endpoints\":[{\"domainName\":\"aytdwkqbrq\",\"endpointDetails\":[{}]},{\"domainName\":\"xhexiilivpdti\",\"endpointDetails\":[{}]},{\"domainName\":\"d\",\"endpointDetails\":[{},{},{}]}]},{\"category\":\"oruzfgsquyfxrxx\",\"endpoints\":[{\"domainName\":\"ramxjezwlwnw\",\"endpointDetails\":[{},{}]},{\"domainName\":\"cvydypatdoo\",\"endpointDetails\":[{},{}]}]}]"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); List response = manager.outboundNetworkDependenciesEndpoints() - .listWithResponse("pehindoygm", "fthnzdn", com.azure.core.util.Context.NONE) + .listWithResponse("fdnw", "wmewzsyy", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gnayqigynduh", response.get(0).category()); - Assertions.assertEquals("lkthu", response.get(0).endpoints().get(0).domainName()); + Assertions.assertEquals("zsoibjudpfrxtr", response.get(0).category()); + Assertions.assertEquals("aytdwkqbrq", response.get(0).endpoints().get(0).domainName()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionInnerTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionInnerTests.java index 85c1e4b6f7af..83e3a7a7fcdb 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionInnerTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -17,32 +17,31 @@ public final class PrivateEndpointConnectionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionInner model = BinaryData.fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"kjyemkk\"},\"groupIds\":[\"pjoxzjnch\",\"ejspodmail\",\"ydehoj\",\"yahux\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"mqnjaqw\",\"actionsRequired\":\"jsprozvcpute\"},\"provisioningState\":\"Succeeded\"},\"id\":\"wmfdatscmdvpjhul\",\"name\":\"uuvmkjozkrwfnd\",\"type\":\"odjpslwejd\"}") + "{\"properties\":{\"privateEndpoint\":{\"id\":\"ablgphuticndvk\"},\"groupIds\":[\"wyiftyhxhur\",\"k\",\"tyxolniwpwc\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"fkgiawxk\",\"actionsRequired\":\"ypl\"},\"provisioningState\":\"Deleting\"},\"id\":\"asy\",\"name\":\"pnddhsgcbacphejk\",\"type\":\"tynqgoul\"}") .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("pjoxzjnch", model.properties().groupIds().get(0)); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, + Assertions.assertEquals("wyiftyhxhur", model.properties().groupIds().get(0)); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("mqnjaqw", model.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jsprozvcpute", - model.properties().privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("fkgiawxk", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("ypl", model.properties().privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateEndpointConnectionInner model = new PrivateEndpointConnectionInner() - .withProperties(new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) - .withGroupIds(Arrays.asList("pjoxzjnch", "ejspodmail", "ydehoj", "yahux")) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED) - .withDescription("mqnjaqw") - .withActionsRequired("jsprozvcpute"))); + .withProperties( + new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) + .withGroupIds(Arrays.asList("wyiftyhxhur", "k", "tyxolniwpwc")) + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() + .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) + .withDescription("fkgiawxk") + .withActionsRequired("ypl"))); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("pjoxzjnch", model.properties().groupIds().get(0)); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, + Assertions.assertEquals("wyiftyhxhur", model.properties().groupIds().get(0)); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("mqnjaqw", model.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jsprozvcpute", - model.properties().privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("fkgiawxk", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("ypl", model.properties().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionPropertiesTests.java index f5b7a1a17090..4b70ef9d9d1b 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionPropertiesTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -16,29 +16,29 @@ public final class PrivateEndpointConnectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"privateEndpoint\":{\"id\":\"ryo\"},\"groupIds\":[\"oacctaza\",\"ljlahbcryf\",\"dfdosygexp\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"akhmsbzjhcrz\",\"actionsRequired\":\"dphlxaolt\"},\"provisioningState\":\"Failed\"}") + "{\"privateEndpoint\":{\"id\":\"likwyqkgfgib\"},\"groupIds\":[\"gakeqsr\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"zqqedq\",\"actionsRequired\":\"bciqfouflm\"},\"provisioningState\":\"Deleting\"}") .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("oacctaza", model.groupIds().get(0)); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, + Assertions.assertEquals("gakeqsr", model.groupIds().get(0)); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("akhmsbzjhcrz", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dphlxaolt", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("zqqedq", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("bciqfouflm", model.privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateEndpointConnectionProperties model = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) - .withGroupIds(Arrays.asList("oacctaza", "ljlahbcryf", "dfdosygexp")) + .withGroupIds(Arrays.asList("gakeqsr")) .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED) - .withDescription("akhmsbzjhcrz") - .withActionsRequired("dphlxaolt")); + new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.PENDING) + .withDescription("zqqedq") + .withActionsRequired("bciqfouflm")); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("oacctaza", model.groupIds().get(0)); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, + Assertions.assertEquals("gakeqsr", model.groupIds().get(0)); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("akhmsbzjhcrz", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dphlxaolt", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("zqqedq", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("bciqfouflm", model.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsCreateMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsCreateMockTests.java index edbcfe2b104b..6a45b9914143 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsCreateMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsCreateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.PrivateEndpoint; @@ -26,33 +26,32 @@ public final class PrivateEndpointConnectionsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"rxbpyb\"},\"groupIds\":[\"bjf\",\"twss\",\"t\",\"tpvjzbexilzznfqq\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"pmqtaru\",\"actionsRequired\":\"jmkcjhwqytj\"},\"provisioningState\":\"Succeeded\"},\"id\":\"n\",\"name\":\"jewgdrjerv\",\"type\":\"aen\"}"; + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"xclvit\"},\"groupIds\":[\"zonosgg\",\"hcohfwdsjnk\",\"ljuti\",\"swacffgdkzz\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"fvhqc\",\"actionsRequired\":\"ilvpnppfuflrwd\"},\"provisioningState\":\"Succeeded\"},\"id\":\"xyjrxsagafcnih\",\"name\":\"wqapnedgfbcvk\",\"type\":\"vq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .define("qzvszjf") - .withExistingWorkspace("xjyngudivk", "tswb") - .withProperties( - new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) - .withGroupIds(Arrays.asList("xivetvt", "qaqtdoqmcbxvwvxy")) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("bhsfxob") - .withActionsRequired("tkblmpewww"))) + .define("l") + .withExistingWorkspace("lrb", "tkoievseotgq") + .withProperties(new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) + .withGroupIds(Arrays.asList("uwz", "zxb", "pgcjefuzmuvp")) + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() + .withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED) + .withDescription("d") + .withActionsRequired("orppxebmnzbtb"))) .create(); - Assertions.assertEquals("bjf", response.properties().groupIds().get(0)); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, + Assertions.assertEquals("zonosgg", response.properties().groupIds().get(0)); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("pmqtaru", response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jmkcjhwqytj", + Assertions.assertEquals("fvhqc", response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("ilvpnppfuflrwd", response.properties().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsDeleteMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsDeleteMockTests.java index dbd832a76197..186b47ee71c3 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsDeleteMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDelete() throws Exception { AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.privateEndpointConnections() - .delete("mgrcfbu", "rmfqjhhkxbpvj", "mjh", com.azure.core.util.Context.NONE); + .delete("tshhszhedp", "vwiwubmwmbesld", "k", com.azure.core.util.Context.NONE); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java index 284153581ff4..4ce7ee97e643 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.PrivateEndpointConnection; @@ -22,25 +22,23 @@ public final class PrivateEndpointConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"wwncwzzhxgk\"},\"groupIds\":[\"gucnapkte\",\"ellwptfdy\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"qbuaceopzfqr\",\"actionsRequired\":\"uaopppcqeq\"},\"provisioningState\":\"Creating\"},\"id\":\"z\",\"name\":\"ahzxctobgbk\",\"type\":\"moizpos\"}"; + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"cwyhzdxssa\"},\"groupIds\":[\"mnvdfzn\",\"daodvxzbncblyl\",\"stdbhhxsrzdzu\",\"erscdntne\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"wjmy\",\"actionsRequired\":\"dsslswt\"},\"provisioningState\":\"Updating\"},\"id\":\"iofz\",\"name\":\"yqsemwa\",\"type\":\"n\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("dtpnapnyiropuhp", "gvpgy", "gqgitxmedjvcsl", com.azure.core.util.Context.NONE) + .getWithResponse("r", "gccymvaolpssl", "lfmmdnbbglzpswi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gucnapkte", response.properties().groupIds().get(0)); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.REJECTED, + Assertions.assertEquals("mnvdfzn", response.properties().groupIds().get(0)); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("qbuaceopzfqr", - response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("uaopppcqeq", - response.properties().privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("wjmy", response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("dsslswt", response.properties().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsListMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsListMockTests.java index 2bc6b761f697..ec852b6d3330 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsListMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.PrivateEndpointConnection; @@ -23,24 +23,24 @@ public final class PrivateEndpointConnectionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"ouwaboekqvkeln\"},\"groupIds\":[\"bxwyjsflhhcaa\",\"n\",\"ixisxyawjoy\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"slyjpkiid\",\"actionsRequired\":\"exznelixhnr\"},\"provisioningState\":\"Creating\"},\"id\":\"o\",\"name\":\"hb\",\"type\":\"xknalaulppg\"}]}"; + = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"ikvmkqzeqqk\"},\"groupIds\":[\"fzxmhhvhgureodkw\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"agxti\",\"actionsRequired\":\"dxbx\"},\"provisioningState\":\"Failed\"},\"id\":\"ogqxndlkzgxhuri\",\"name\":\"lbpodxunk\",\"type\":\"ebxmubyynt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.privateEndpointConnections().list("fpbsjyofdxl", "us", com.azure.core.util.Context.NONE); + = manager.privateEndpointConnections().list("wtppjflcxogaoko", "z", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bxwyjsflhhcaa", response.iterator().next().properties().groupIds().get(0)); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.REJECTED, + Assertions.assertEquals("fzxmhhvhgureodkw", response.iterator().next().properties().groupIds().get(0)); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, response.iterator().next().properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("slyjpkiid", + Assertions.assertEquals("agxti", response.iterator().next().properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("exznelixhnr", + Assertions.assertEquals("dxbx", response.iterator().next().properties().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsListTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsListTests.java index 3b7a144afa22..b972a90f5fca 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsListTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointConnectionsListTests.java @@ -1,55 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databricks.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.databricks.models.PrivateEndpoint; -import com.azure.resourcemanager.databricks.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.databricks.models.PrivateEndpointConnectionsList; -import com.azure.resourcemanager.databricks.models.PrivateLinkServiceConnectionState; +import com.azure.resourcemanager.databricks.implementation.models.PrivateEndpointConnectionsList; import com.azure.resourcemanager.databricks.models.PrivateLinkServiceConnectionStatus; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class PrivateEndpointConnectionsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"glmjth\"},\"groupIds\":[\"wpyeicxmqciwqvh\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"xuigdtopbobj\",\"actionsRequired\":\"hm\"},\"provisioningState\":\"Creating\"},\"id\":\"a\",\"name\":\"a\",\"type\":\"hrzayvvtpgvdf\"}],\"nextLink\":\"otkftutqxlngx\"}") + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"od\"},\"groupIds\":[\"crmnohjtckwhds\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"iy\",\"actionsRequired\":\"jxsqwpgrjbz\"},\"provisioningState\":\"Deleting\"},\"id\":\"jxvsnbyxqabn\",\"name\":\"ocpcy\",\"type\":\"hurzafblj\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"btoqcjmkljavbqid\"},\"groupIds\":[\"jzyulpk\",\"dj\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"khbzhfepgzg\",\"actionsRequired\":\"xzlocxscp\"},\"provisioningState\":\"Deleting\"},\"id\":\"hhbcsglummajtjao\",\"name\":\"xobnbdxkqpxok\",\"type\":\"jionpimexgstxgc\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"gmaajrm\"},\"groupIds\":[\"wzrlovmclwhij\",\"oejctbzaqsqsy\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"bfkgukdkex\",\"actionsRequired\":\"pofm\"},\"provisioningState\":\"Failed\"},\"id\":\"fjpgddtocjjxhvp\",\"name\":\"o\",\"type\":\"exhd\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"bqe\"},\"groupIds\":[\"xqbzvddntwnd\",\"icbtwnpzao\",\"vuhrhcffcyddgl\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"hjq\",\"actionsRequired\":\"pyeicxm\"},\"provisioningState\":\"Failed\"},\"id\":\"q\",\"name\":\"hkh\",\"type\":\"xuigdtopbobj\"}],\"nextLink\":\"hm\"}") .toObject(PrivateEndpointConnectionsList.class); - Assertions.assertEquals("wpyeicxmqciwqvh", model.value().get(0).properties().groupIds().get(0)); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, + Assertions.assertEquals("crmnohjtckwhds", model.value().get(0).properties().groupIds().get(0)); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, model.value().get(0).properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("xuigdtopbobj", + Assertions.assertEquals("iy", model.value().get(0).properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("hm", + Assertions.assertEquals("jxsqwpgrjbz", model.value().get(0).properties().privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("otkftutqxlngx", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionsList model - = new PrivateEndpointConnectionsList() - .withValue(Arrays.asList(new PrivateEndpointConnectionInner() - .withProperties(new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) - .withGroupIds(Arrays.asList("wpyeicxmqciwqvh")) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.PENDING) - .withDescription("xuigdtopbobj") - .withActionsRequired("hm"))))) - .withNextLink("otkftutqxlngx"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionsList.class); - Assertions.assertEquals("wpyeicxmqciwqvh", model.value().get(0).properties().groupIds().get(0)); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, - model.value().get(0).properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("xuigdtopbobj", - model.value().get(0).properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("hm", - model.value().get(0).properties().privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("otkftutqxlngx", model.nextLink()); + Assertions.assertEquals("hm", model.nextLink()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointTests.java index 73585e17fc68..f7b82f481ba6 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateEndpointTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -10,7 +10,7 @@ public final class PrivateEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"gqjbpfzfsin\"}").toObject(PrivateEndpoint.class); + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"smodmgloug\"}").toObject(PrivateEndpoint.class); } @org.junit.jupiter.api.Test diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesGetWithResponseMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesGetWithResponseMockTests.java index f01ce8f0031f..823861a6383d 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesGetWithResponseMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.GroupIdInformation; @@ -21,21 +21,21 @@ public final class PrivateLinkResourcesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupId\":\"fqsgzvahapjy\",\"requiredMembers\":[\"vgqzcjrvxd\",\"zlmwlxkvugfhz\",\"vawjvzunlu\",\"hnnpr\"],\"requiredZoneNames\":[\"peilpjzuaejxdu\"]},\"id\":\"tskzbbtdzumveek\",\"name\":\"pwo\",\"type\":\"uh\"}"; + = "{\"properties\":{\"groupId\":\"jhemms\",\"requiredMembers\":[\"kcrodtjinfw\",\"lfltka\"],\"requiredZoneNames\":[\"efkdlf\",\"akggkfpag\",\"owpulpq\",\"lyls\"]},\"id\":\"k\",\"name\":\"jnsjervtiagxsd\",\"type\":\"zuempsbzkf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); GroupIdInformation response = manager.privateLinkResources() - .getWithResponse("yvxqtayriwwroy", "bexrmcq", "bycnojvkn", com.azure.core.util.Context.NONE) + .getWithResponse("kniod", "oo", "bw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("fqsgzvahapjy", response.properties().groupId()); - Assertions.assertEquals("vgqzcjrvxd", response.properties().requiredMembers().get(0)); - Assertions.assertEquals("peilpjzuaejxdu", response.properties().requiredZoneNames().get(0)); + Assertions.assertEquals("jhemms", response.properties().groupId()); + Assertions.assertEquals("kcrodtjinfw", response.properties().requiredMembers().get(0)); + Assertions.assertEquals("efkdlf", response.properties().requiredZoneNames().get(0)); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesListMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesListMockTests.java index f0ae54d401cb..813c5ac859dd 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesListMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.GroupIdInformation; @@ -22,20 +22,20 @@ public final class PrivateLinkResourcesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"mxiebw\",\"requiredMembers\":[\"oayqc\",\"wrtz\"],\"requiredZoneNames\":[\"gwyzm\"]},\"id\":\"txon\",\"name\":\"mtsavjcbpwxqp\",\"type\":\"rknftguvriuhprwm\"}]}"; + = "{\"value\":[{\"properties\":{\"groupId\":\"hmlwpaztzpo\",\"requiredMembers\":[\"ckw\",\"fz\",\"whxxbuyqax\",\"feqztppriol\"],\"requiredZoneNames\":[\"jaltolmnc\",\"sobqw\",\"sdbnwdcfhucqdpf\"]},\"id\":\"glsbjjc\",\"name\":\"nvxbvt\",\"type\":\"udutnco\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.privateLinkResources().list("blcg", "xzvlvqhjkbegib", com.azure.core.util.Context.NONE); + = manager.privateLinkResources().list("beyvpnqicvinvkjj", "dxrbuukzcle", com.azure.core.util.Context.NONE); - Assertions.assertEquals("mxiebw", response.iterator().next().properties().groupId()); - Assertions.assertEquals("oayqc", response.iterator().next().properties().requiredMembers().get(0)); - Assertions.assertEquals("gwyzm", response.iterator().next().properties().requiredZoneNames().get(0)); + Assertions.assertEquals("hmlwpaztzpo", response.iterator().next().properties().groupId()); + Assertions.assertEquals("ckw", response.iterator().next().properties().requiredMembers().get(0)); + Assertions.assertEquals("jaltolmnc", response.iterator().next().properties().requiredZoneNames().get(0)); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesListTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesListTests.java index 780c54301d41..2df0bf0bdea0 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesListTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkResourcesListTests.java @@ -1,46 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databricks.fluent.models.GroupIdInformationInner; -import com.azure.resourcemanager.databricks.models.GroupIdInformationProperties; -import com.azure.resourcemanager.databricks.models.PrivateLinkResourcesList; -import java.util.Arrays; +import com.azure.resourcemanager.databricks.implementation.models.PrivateLinkResourcesList; import org.junit.jupiter.api.Assertions; public final class PrivateLinkResourcesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourcesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"hmuouqfprwzwbn\",\"requiredMembers\":[\"tnwu\",\"zga\",\"x\",\"fizuckyf\"],\"requiredZoneNames\":[\"fidfvzw\",\"zuhtymwisdkfthwx\",\"nteiwaopv\"]},\"id\":\"mijcmmxdcufufs\",\"name\":\"pymzidnsezcxtbzs\",\"type\":\"fycc\"},{\"properties\":{\"groupId\":\"ewmdw\",\"requiredMembers\":[\"iachbo\",\"sflnrosfqp\",\"eeh\",\"zvypyqrimzinp\"],\"requiredZoneNames\":[\"jdkirsoodqx\"]},\"id\":\"crmnohjtckwhds\",\"name\":\"ifiyipjxsqwpgrj\",\"type\":\"znorcj\"},{\"properties\":{\"groupId\":\"snb\",\"requiredMembers\":[\"abnmocpcyshu\",\"zafb\"],\"requiredZoneNames\":[\"gpbtoqcjmklj\"]},\"id\":\"vbqid\",\"name\":\"qajzyulpkudjkr\",\"type\":\"khbzhfepgzg\"}],\"nextLink\":\"xzlocxscp\"}") + "{\"value\":[{\"properties\":{\"groupId\":\"njbkcnxdhbttkph\",\"requiredMembers\":[\"nv\",\"t\",\"qnermclfplphoxu\",\"crpab\"],\"requiredZoneNames\":[\"psbjta\",\"qugxywpmueefjzwf\",\"kqujidsuyono\"]},\"id\":\"laocqxtccmg\",\"name\":\"udxytlmoyrx\",\"type\":\"wfudwpzntxhdzhl\"}],\"nextLink\":\"jbhckfrlhr\"}") .toObject(PrivateLinkResourcesList.class); - Assertions.assertEquals("hmuouqfprwzwbn", model.value().get(0).properties().groupId()); - Assertions.assertEquals("tnwu", model.value().get(0).properties().requiredMembers().get(0)); - Assertions.assertEquals("fidfvzw", model.value().get(0).properties().requiredZoneNames().get(0)); - Assertions.assertEquals("xzlocxscp", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourcesList model = new PrivateLinkResourcesList().withValue(Arrays.asList( - new GroupIdInformationInner() - .withProperties(new GroupIdInformationProperties().withGroupId("hmuouqfprwzwbn") - .withRequiredMembers(Arrays.asList("tnwu", "zga", "x", "fizuckyf")) - .withRequiredZoneNames(Arrays.asList("fidfvzw", "zuhtymwisdkfthwx", "nteiwaopv"))), - new GroupIdInformationInner().withProperties(new GroupIdInformationProperties().withGroupId("ewmdw") - .withRequiredMembers(Arrays.asList("iachbo", "sflnrosfqp", "eeh", "zvypyqrimzinp")) - .withRequiredZoneNames(Arrays.asList("jdkirsoodqx"))), - new GroupIdInformationInner().withProperties(new GroupIdInformationProperties().withGroupId("snb") - .withRequiredMembers(Arrays.asList("abnmocpcyshu", "zafb")) - .withRequiredZoneNames(Arrays.asList("gpbtoqcjmklj"))))) - .withNextLink("xzlocxscp"); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourcesList.class); - Assertions.assertEquals("hmuouqfprwzwbn", model.value().get(0).properties().groupId()); - Assertions.assertEquals("tnwu", model.value().get(0).properties().requiredMembers().get(0)); - Assertions.assertEquals("fidfvzw", model.value().get(0).properties().requiredZoneNames().get(0)); - Assertions.assertEquals("xzlocxscp", model.nextLink()); + Assertions.assertEquals("njbkcnxdhbttkph", model.value().get(0).properties().groupId()); + Assertions.assertEquals("nv", model.value().get(0).properties().requiredMembers().get(0)); + Assertions.assertEquals("psbjta", model.value().get(0).properties().requiredZoneNames().get(0)); + Assertions.assertEquals("jbhckfrlhr", model.nextLink()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkServiceConnectionStateTests.java index 7eebdb53b62b..8cf508b13cfb 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkServiceConnectionStateTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/PrivateLinkServiceConnectionStateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -12,23 +12,23 @@ public final class PrivateLinkServiceConnectionStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = BinaryData - .fromString("{\"status\":\"Approved\",\"description\":\"f\",\"actionsRequired\":\"rwzoxxjtfelluwf\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("f", model.description()); - Assertions.assertEquals("rwzoxxjtfelluwf", model.actionsRequired()); + PrivateLinkServiceConnectionState model + = BinaryData.fromString("{\"status\":\"Pending\",\"description\":\"wtmutduq\",\"actionsRequired\":\"ap\"}") + .toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, model.status()); + Assertions.assertEquals("wtmutduq", model.description()); + Assertions.assertEquals("ap", model.actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("f") - .withActionsRequired("rwzoxxjtfelluwf"); + = new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.PENDING) + .withDescription("wtmutduq") + .withActionsRequired("ap"); model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("f", model.description()); - Assertions.assertEquals("rwzoxxjtfelluwf", model.actionsRequired()); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, model.status()); + Assertions.assertEquals("wtmutduq", model.description()); + Assertions.assertEquals("ap", model.actionsRequired()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/SkuTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/SkuTests.java index 47b361a918e2..696f8655ee54 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/SkuTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/SkuTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -11,16 +11,16 @@ public final class SkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Sku model = BinaryData.fromString("{\"name\":\"it\",\"tier\":\"peqfpjkjl\"}").toObject(Sku.class); - Assertions.assertEquals("it", model.name()); - Assertions.assertEquals("peqfpjkjl", model.tier()); + Sku model = BinaryData.fromString("{\"name\":\"f\",\"tier\":\"gmbmbexppbh\"}").toObject(Sku.class); + Assertions.assertEquals("f", model.name()); + Assertions.assertEquals("gmbmbexppbh", model.tier()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Sku model = new Sku().withName("it").withTier("peqfpjkjl"); + Sku model = new Sku().withName("f").withTier("gmbmbexppbh"); model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("it", model.name()); - Assertions.assertEquals("peqfpjkjl", model.tier()); + Assertions.assertEquals("f", model.name()); + Assertions.assertEquals("gmbmbexppbh", model.tier()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/UserAssignedIdentityTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/UserAssignedIdentityTests.java index 3eb4b5c632a9..519a76e165c7 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/UserAssignedIdentityTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/UserAssignedIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -10,8 +10,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"4f164415-8001-4d8a-a4db-f05806af11a2\",\"clientId\":\"a4c5d992-25e1-46b9-a8ac-aa8269ecf157\"}") + UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"esnzwde\",\"clientId\":\"avo\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsCreateOrUpdateMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsCreateOrUpdateMockTests.java index 2a5013d7827a..592d2ac10cfc 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsCreateOrUpdateMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.AddressSpace; @@ -25,39 +25,39 @@ public final class VNetPeeringsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"allowVirtualNetworkAccess\":true,\"allowForwardedTraffic\":false,\"allowGatewayTransit\":true,\"useRemoteGateways\":false,\"databricksVirtualNetwork\":{\"id\":\"efyw\"},\"databricksAddressSpace\":{\"addressPrefixes\":[\"vmwy\",\"rfouyftaakcpw\"]},\"remoteVirtualNetwork\":{\"id\":\"zvqtmnubexkp\"},\"remoteAddressSpace\":{\"addressPrefixes\":[\"ondjmq\"]},\"peeringState\":\"Connected\",\"provisioningState\":\"Succeeded\"},\"id\":\"omgkopkwho\",\"name\":\"v\",\"type\":\"ajqgxy\"}"; + = "{\"properties\":{\"allowVirtualNetworkAccess\":true,\"allowForwardedTraffic\":false,\"allowGatewayTransit\":true,\"useRemoteGateways\":true,\"databricksVirtualNetwork\":{\"id\":\"uhczbwemh\"},\"databricksAddressSpace\":{\"addressPrefixes\":[\"brgz\",\"wmsweypqwd\"]},\"remoteVirtualNetwork\":{\"id\":\"gicccnxqhuex\"},\"remoteAddressSpace\":{\"addressPrefixes\":[\"lstvlzywe\",\"hz\",\"ncsdtclusiyp\"]},\"peeringState\":\"Initiated\",\"provisioningState\":\"Succeeded\"},\"id\":\"gusl\",\"name\":\"eadcygqukyhejhz\",\"type\":\"sx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VirtualNetworkPeering response = manager.vNetPeerings() - .define("kfvhqcrailvpn") - .withExistingWorkspace("wdsjnkalju", "iiswacffgdkzze") + .define("kkze") + .withExistingWorkspace("r", "kdsnfdsdoakgtdl") .withRemoteVirtualNetwork( - new VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork().withId("cvdrhvoodsot")) - .withAllowVirtualNetworkAccess(true) - .withAllowForwardedTraffic(false) - .withAllowGatewayTransit(true) + new VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork().withId("nuuzkopbm")) + .withAllowVirtualNetworkAccess(false) + .withAllowForwardedTraffic(true) + .withAllowGatewayTransit(false) .withUseRemoteGateways(true) .withDatabricksVirtualNetwork( - new VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork().withId("dlxyjrxs")) + new VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork().withId("ttwvogvbbe")) .withDatabricksAddressSpace( - new AddressSpace().withAddressPrefixes(Arrays.asList("cnihgwqapnedgfbc", "kcvqvpke"))) + new AddressSpace().withAddressPrefixes(Arrays.asList("gqqmoakufgm", "zr", "rdgrtw"))) .withRemoteAddressSpace( - new AddressSpace().withAddressPrefixes(Arrays.asList("dopcjwvnh", "ld", "mgxcxrslpm"))) + new AddressSpace().withAddressPrefixes(Arrays.asList("dwoyuhhziuiefoz", "hdmsmlmzqhoftrm"))) .create(); - Assertions.assertEquals(true, response.allowVirtualNetworkAccess()); - Assertions.assertEquals(false, response.allowForwardedTraffic()); - Assertions.assertEquals(true, response.allowGatewayTransit()); - Assertions.assertEquals(false, response.useRemoteGateways()); - Assertions.assertEquals("efyw", response.databricksVirtualNetwork().id()); - Assertions.assertEquals("vmwy", response.databricksAddressSpace().addressPrefixes().get(0)); - Assertions.assertEquals("zvqtmnubexkp", response.remoteVirtualNetwork().id()); - Assertions.assertEquals("ondjmq", response.remoteAddressSpace().addressPrefixes().get(0)); + Assertions.assertTrue(response.allowVirtualNetworkAccess()); + Assertions.assertFalse(response.allowForwardedTraffic()); + Assertions.assertTrue(response.allowGatewayTransit()); + Assertions.assertTrue(response.useRemoteGateways()); + Assertions.assertEquals("uhczbwemh", response.databricksVirtualNetwork().id()); + Assertions.assertEquals("brgz", response.databricksAddressSpace().addressPrefixes().get(0)); + Assertions.assertEquals("gicccnxqhuex", response.remoteVirtualNetwork().id()); + Assertions.assertEquals("lstvlzywe", response.remoteAddressSpace().addressPrefixes().get(0)); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsDeleteMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsDeleteMockTests.java index ba15a0e9901a..6d02d1636971 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsDeleteMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,9 @@ public void testDelete() throws Exception { AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.vNetPeerings() - .delete("okonzmnsikvmkqz", "qqkdltfzxmhhvhgu", "eodkwobda", com.azure.core.util.Context.NONE); + manager.vNetPeerings().delete("bjcntujitc", "ed", "twwaezkojvdcpzf", com.azure.core.util.Context.NONE); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsGetWithResponseMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsGetWithResponseMockTests.java index 81a69f7347a2..c2a491db001d 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsGetWithResponseMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.VirtualNetworkPeering; @@ -21,26 +21,26 @@ public final class VNetPeeringsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"allowVirtualNetworkAccess\":true,\"allowForwardedTraffic\":true,\"allowGatewayTransit\":false,\"useRemoteGateways\":true,\"databricksVirtualNetwork\":{\"id\":\"znud\"},\"databricksAddressSpace\":{\"addressPrefixes\":[\"xzb\",\"cblylpstdbhhxsr\"]},\"remoteVirtualNetwork\":{\"id\":\"zucerscdntnev\"},\"remoteAddressSpace\":{\"addressPrefixes\":[\"mygtdssls\",\"tmweriofzpyq\",\"emwabnet\",\"hhszh\"]},\"peeringState\":\"Disconnected\",\"provisioningState\":\"Failed\"},\"id\":\"wiwubm\",\"name\":\"mbes\",\"type\":\"dnkwwtppjflcxog\"}"; + = "{\"properties\":{\"allowVirtualNetworkAccess\":true,\"allowForwardedTraffic\":false,\"allowGatewayTransit\":false,\"useRemoteGateways\":true,\"databricksVirtualNetwork\":{\"id\":\"nqvsaznqnto\"},\"databricksAddressSpace\":{\"addressPrefixes\":[\"gsahmkycgrauw\",\"uetae\",\"uruv\"]},\"remoteVirtualNetwork\":{\"id\":\"ovsm\"},\"remoteAddressSpace\":{\"addressPrefixes\":[\"ab\"]},\"peeringState\":\"Initiated\",\"provisioningState\":\"Updating\"},\"id\":\"ifrvtpu\",\"name\":\"ujmqlgkfbtndoa\",\"type\":\"n\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VirtualNetworkPeering response = manager.vNetPeerings() - .getWithResponse("qlfmmdnbb", "lzpswiydm", "wyhzdx", com.azure.core.util.Context.NONE) + .getWithResponse("mr", "xqtvcofu", "f", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(true, response.allowVirtualNetworkAccess()); - Assertions.assertEquals(true, response.allowForwardedTraffic()); - Assertions.assertEquals(false, response.allowGatewayTransit()); - Assertions.assertEquals(true, response.useRemoteGateways()); - Assertions.assertEquals("znud", response.databricksVirtualNetwork().id()); - Assertions.assertEquals("xzb", response.databricksAddressSpace().addressPrefixes().get(0)); - Assertions.assertEquals("zucerscdntnev", response.remoteVirtualNetwork().id()); - Assertions.assertEquals("mygtdssls", response.remoteAddressSpace().addressPrefixes().get(0)); + Assertions.assertTrue(response.allowVirtualNetworkAccess()); + Assertions.assertFalse(response.allowForwardedTraffic()); + Assertions.assertFalse(response.allowGatewayTransit()); + Assertions.assertTrue(response.useRemoteGateways()); + Assertions.assertEquals("nqvsaznqnto", response.databricksVirtualNetwork().id()); + Assertions.assertEquals("gsahmkycgrauw", response.databricksAddressSpace().addressPrefixes().get(0)); + Assertions.assertEquals("ovsm", response.remoteVirtualNetwork().id()); + Assertions.assertEquals("ab", response.remoteAddressSpace().addressPrefixes().get(0)); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsListByWorkspaceMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsListByWorkspaceMockTests.java index a7a16f811a87..3c50793cc11d 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsListByWorkspaceMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VNetPeeringsListByWorkspaceMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import com.azure.resourcemanager.databricks.models.VirtualNetworkPeering; @@ -22,26 +22,26 @@ public final class VNetPeeringsListByWorkspaceMockTests { @Test public void testListByWorkspace() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"allowVirtualNetworkAccess\":true,\"allowForwardedTraffic\":true,\"allowGatewayTransit\":false,\"useRemoteGateways\":true,\"databricksVirtualNetwork\":{\"id\":\"kbebxmubyyntwlrb\"},\"databricksAddressSpace\":{\"addressPrefixes\":[\"ievseotgqrllt\",\"u\",\"lauwzizxbmpgcjef\",\"zmuvpbttdumorppx\"]},\"remoteVirtualNetwork\":{\"id\":\"mnzb\"},\"remoteAddressSpace\":{\"addressPrefixes\":[\"pglkf\",\"ohdneuel\",\"phsdyhto\"]},\"peeringState\":\"Disconnected\",\"provisioningState\":\"Failed\"},\"id\":\"owwquuvxz\",\"name\":\"clvit\",\"type\":\"hqzonosggbhcoh\"}]}"; + = "{\"value\":[{\"properties\":{\"allowVirtualNetworkAccess\":true,\"allowForwardedTraffic\":false,\"allowGatewayTransit\":true,\"useRemoteGateways\":true,\"databricksVirtualNetwork\":{\"id\":\"hkh\"},\"databricksAddressSpace\":{\"addressPrefixes\":[\"hnzbonl\",\"ntoe\",\"okdwb\"]},\"remoteVirtualNetwork\":{\"id\":\"kszzcmrvexztv\"},\"remoteAddressSpace\":{\"addressPrefixes\":[\"sfraoyzko\",\"wtl\",\"nguxawqaldsy\"]},\"peeringState\":\"Disconnected\",\"provisioningState\":\"Failed\"},\"id\":\"rqf\",\"name\":\"bw\",\"type\":\"znkbykutwpfhpagm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.vNetPeerings().listByWorkspace("xtibqdxbxwakbog", "xndlkzgxhu", com.azure.core.util.Context.NONE); + = manager.vNetPeerings().listByWorkspace("qouicybxarzgsz", "foxciq", com.azure.core.util.Context.NONE); - Assertions.assertEquals(true, response.iterator().next().allowVirtualNetworkAccess()); - Assertions.assertEquals(true, response.iterator().next().allowForwardedTraffic()); - Assertions.assertEquals(false, response.iterator().next().allowGatewayTransit()); - Assertions.assertEquals(true, response.iterator().next().useRemoteGateways()); - Assertions.assertEquals("kbebxmubyyntwlrb", response.iterator().next().databricksVirtualNetwork().id()); - Assertions.assertEquals("ievseotgqrllt", + Assertions.assertTrue(response.iterator().next().allowVirtualNetworkAccess()); + Assertions.assertFalse(response.iterator().next().allowForwardedTraffic()); + Assertions.assertTrue(response.iterator().next().allowGatewayTransit()); + Assertions.assertTrue(response.iterator().next().useRemoteGateways()); + Assertions.assertEquals("hkh", response.iterator().next().databricksVirtualNetwork().id()); + Assertions.assertEquals("hnzbonl", response.iterator().next().databricksAddressSpace().addressPrefixes().get(0)); - Assertions.assertEquals("mnzb", response.iterator().next().remoteVirtualNetwork().id()); - Assertions.assertEquals("pglkf", response.iterator().next().remoteAddressSpace().addressPrefixes().get(0)); + Assertions.assertEquals("kszzcmrvexztv", response.iterator().next().remoteVirtualNetwork().id()); + Assertions.assertEquals("sfraoyzko", response.iterator().next().remoteAddressSpace().addressPrefixes().get(0)); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringInnerTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringInnerTests.java index 8e8dc136fa2e..5d0643eaac08 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringInnerTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -16,16 +16,16 @@ public final class VirtualNetworkPeeringInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualNetworkPeeringInner model = BinaryData.fromString( - "{\"properties\":{\"allowVirtualNetworkAccess\":false,\"allowForwardedTraffic\":true,\"allowGatewayTransit\":true,\"useRemoteGateways\":true,\"databricksVirtualNetwork\":{\"id\":\"ase\"},\"databricksAddressSpace\":{\"addressPrefixes\":[\"oflokey\"]},\"remoteVirtualNetwork\":{\"id\":\"enjbdlwtgrhp\"},\"remoteAddressSpace\":{\"addressPrefixes\":[\"umasxazjpq\",\"e\"]},\"peeringState\":\"Disconnected\",\"provisioningState\":\"Succeeded\"},\"id\":\"b\",\"name\":\"xhejjzzvdud\",\"type\":\"wdslfhotwmcy\"}") + "{\"properties\":{\"allowVirtualNetworkAccess\":false,\"allowForwardedTraffic\":true,\"allowGatewayTransit\":true,\"useRemoteGateways\":false,\"databricksVirtualNetwork\":{\"id\":\"uzbpzkafku\"},\"databricksAddressSpace\":{\"addressPrefixes\":[\"nwbmeh\"]},\"remoteVirtualNetwork\":{\"id\":\"eyvjusrtslhspkde\"},\"remoteAddressSpace\":{\"addressPrefixes\":[\"fm\",\"ag\",\"vt\",\"elmqk\"]},\"peeringState\":\"Connected\",\"provisioningState\":\"Updating\"},\"id\":\"juahaquhcdhmdual\",\"name\":\"exq\",\"type\":\"vfadmws\"}") .toObject(VirtualNetworkPeeringInner.class); - Assertions.assertEquals(false, model.allowVirtualNetworkAccess()); - Assertions.assertEquals(true, model.allowForwardedTraffic()); - Assertions.assertEquals(true, model.allowGatewayTransit()); - Assertions.assertEquals(true, model.useRemoteGateways()); - Assertions.assertEquals("ase", model.databricksVirtualNetwork().id()); - Assertions.assertEquals("oflokey", model.databricksAddressSpace().addressPrefixes().get(0)); - Assertions.assertEquals("enjbdlwtgrhp", model.remoteVirtualNetwork().id()); - Assertions.assertEquals("umasxazjpq", model.remoteAddressSpace().addressPrefixes().get(0)); + Assertions.assertFalse(model.allowVirtualNetworkAccess()); + Assertions.assertTrue(model.allowForwardedTraffic()); + Assertions.assertTrue(model.allowGatewayTransit()); + Assertions.assertFalse(model.useRemoteGateways()); + Assertions.assertEquals("uzbpzkafku", model.databricksVirtualNetwork().id()); + Assertions.assertEquals("nwbmeh", model.databricksAddressSpace().addressPrefixes().get(0)); + Assertions.assertEquals("eyvjusrtslhspkde", model.remoteVirtualNetwork().id()); + Assertions.assertEquals("fm", model.remoteAddressSpace().addressPrefixes().get(0)); } @org.junit.jupiter.api.Test @@ -33,21 +33,21 @@ public void testSerialize() throws Exception { VirtualNetworkPeeringInner model = new VirtualNetworkPeeringInner().withAllowVirtualNetworkAccess(false) .withAllowForwardedTraffic(true) .withAllowGatewayTransit(true) - .withUseRemoteGateways(true) + .withUseRemoteGateways(false) .withDatabricksVirtualNetwork( - new VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork().withId("ase")) - .withDatabricksAddressSpace(new AddressSpace().withAddressPrefixes(Arrays.asList("oflokey"))) + new VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork().withId("uzbpzkafku")) + .withDatabricksAddressSpace(new AddressSpace().withAddressPrefixes(Arrays.asList("nwbmeh"))) .withRemoteVirtualNetwork( - new VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork().withId("enjbdlwtgrhp")) - .withRemoteAddressSpace(new AddressSpace().withAddressPrefixes(Arrays.asList("umasxazjpq", "e"))); + new VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork().withId("eyvjusrtslhspkde")) + .withRemoteAddressSpace(new AddressSpace().withAddressPrefixes(Arrays.asList("fm", "ag", "vt", "elmqk"))); model = BinaryData.fromObject(model).toObject(VirtualNetworkPeeringInner.class); - Assertions.assertEquals(false, model.allowVirtualNetworkAccess()); - Assertions.assertEquals(true, model.allowForwardedTraffic()); - Assertions.assertEquals(true, model.allowGatewayTransit()); - Assertions.assertEquals(true, model.useRemoteGateways()); - Assertions.assertEquals("ase", model.databricksVirtualNetwork().id()); - Assertions.assertEquals("oflokey", model.databricksAddressSpace().addressPrefixes().get(0)); - Assertions.assertEquals("enjbdlwtgrhp", model.remoteVirtualNetwork().id()); - Assertions.assertEquals("umasxazjpq", model.remoteAddressSpace().addressPrefixes().get(0)); + Assertions.assertFalse(model.allowVirtualNetworkAccess()); + Assertions.assertTrue(model.allowForwardedTraffic()); + Assertions.assertTrue(model.allowGatewayTransit()); + Assertions.assertFalse(model.useRemoteGateways()); + Assertions.assertEquals("uzbpzkafku", model.databricksVirtualNetwork().id()); + Assertions.assertEquals("nwbmeh", model.databricksAddressSpace().addressPrefixes().get(0)); + Assertions.assertEquals("eyvjusrtslhspkde", model.remoteVirtualNetwork().id()); + Assertions.assertEquals("fm", model.remoteAddressSpace().addressPrefixes().get(0)); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringListTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringListTests.java index 807212808970..6d8fa42447d1 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringListTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringListTests.java @@ -1,74 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databricks.fluent.models.VirtualNetworkPeeringInner; -import com.azure.resourcemanager.databricks.models.AddressSpace; -import com.azure.resourcemanager.databricks.models.VirtualNetworkPeeringList; -import com.azure.resourcemanager.databricks.models.VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork; -import com.azure.resourcemanager.databricks.models.VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork; -import java.util.Arrays; +import com.azure.resourcemanager.databricks.implementation.models.VirtualNetworkPeeringList; import org.junit.jupiter.api.Assertions; public final class VirtualNetworkPeeringListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualNetworkPeeringList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"allowVirtualNetworkAccess\":true,\"allowForwardedTraffic\":true,\"allowGatewayTransit\":true,\"useRemoteGateways\":false,\"databricksVirtualNetwork\":{\"id\":\"eypvhezrkg\"},\"databricksAddressSpace\":{\"addressPrefixes\":[\"refovgmkqsleyyvx\",\"qjpkcattpngjcrc\",\"zsqpjhvmdajvny\",\"ounqecano\"]},\"remoteVirtualNetwork\":{\"id\":\"upfh\"},\"remoteAddressSpace\":{\"addressPrefixes\":[\"rpmopjmc\",\"atuokthfuiu\"]},\"peeringState\":\"Initiated\",\"provisioningState\":\"Succeeded\"},\"id\":\"cpkvxodp\",\"name\":\"ozmyzydagfu\",\"type\":\"xbezyiuokktwh\"},{\"properties\":{\"allowVirtualNetworkAccess\":false,\"allowForwardedTraffic\":true,\"allowGatewayTransit\":false,\"useRemoteGateways\":false,\"databricksVirtualNetwork\":{\"id\":\"surex\"},\"databricksAddressSpace\":{\"addressPrefixes\":[\"yocf\",\"fksymddystki\",\"uxh\",\"yudxorrqnbp\"]},\"remoteVirtualNetwork\":{\"id\":\"zvyifqrvkdvj\"},\"remoteAddressSpace\":{\"addressPrefixes\":[\"mvvd\"]},\"peeringState\":\"Disconnected\",\"provisioningState\":\"Failed\"},\"id\":\"pnpulexxbczwtru\",\"name\":\"iqzbq\",\"type\":\"vsovmyokac\"}],\"nextLink\":\"kwlhzdo\"}") + "{\"value\":[{\"properties\":{\"allowVirtualNetworkAccess\":false,\"allowForwardedTraffic\":false,\"allowGatewayTransit\":true,\"useRemoteGateways\":false,\"databricksVirtualNetwork\":{\"id\":\"ualupjmkh\"},\"databricksAddressSpace\":{\"addressPrefixes\":[\"bcswsrt\",\"riplrbpbewtg\",\"fgb\"]},\"remoteVirtualNetwork\":{\"id\":\"gw\"},\"remoteAddressSpace\":{\"addressPrefixes\":[\"v\",\"hjkbegibtnmxieb\",\"waloayqcgwr\",\"zjuzgwyz\"]},\"peeringState\":\"Disconnected\",\"provisioningState\":\"Updating\"},\"id\":\"gmtsavjcbpwxqpsr\",\"name\":\"nftguvriuhpr\",\"type\":\"mdyvxqtayriw\"}],\"nextLink\":\"oyq\"}") .toObject(VirtualNetworkPeeringList.class); - Assertions.assertEquals(true, model.value().get(0).allowVirtualNetworkAccess()); - Assertions.assertEquals(true, model.value().get(0).allowForwardedTraffic()); - Assertions.assertEquals(true, model.value().get(0).allowGatewayTransit()); - Assertions.assertEquals(false, model.value().get(0).useRemoteGateways()); - Assertions.assertEquals("eypvhezrkg", model.value().get(0).databricksVirtualNetwork().id()); - Assertions.assertEquals("refovgmkqsleyyvx", - model.value().get(0).databricksAddressSpace().addressPrefixes().get(0)); - Assertions.assertEquals("upfh", model.value().get(0).remoteVirtualNetwork().id()); - Assertions.assertEquals("rpmopjmc", model.value().get(0).remoteAddressSpace().addressPrefixes().get(0)); - Assertions.assertEquals("kwlhzdo", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualNetworkPeeringList model = new VirtualNetworkPeeringList() - .withValue(Arrays.asList( - new VirtualNetworkPeeringInner().withAllowVirtualNetworkAccess(true) - .withAllowForwardedTraffic(true) - .withAllowGatewayTransit(true) - .withUseRemoteGateways(false) - .withDatabricksVirtualNetwork( - new VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork().withId("eypvhezrkg")) - .withDatabricksAddressSpace(new AddressSpace().withAddressPrefixes( - Arrays.asList("refovgmkqsleyyvx", "qjpkcattpngjcrc", "zsqpjhvmdajvny", "ounqecano"))) - .withRemoteVirtualNetwork( - new VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork().withId("upfh")) - .withRemoteAddressSpace( - new AddressSpace().withAddressPrefixes(Arrays.asList("rpmopjmc", "atuokthfuiu"))), - new VirtualNetworkPeeringInner().withAllowVirtualNetworkAccess(false) - .withAllowForwardedTraffic(true) - .withAllowGatewayTransit(false) - .withUseRemoteGateways(false) - .withDatabricksVirtualNetwork( - new VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork().withId("surex")) - .withDatabricksAddressSpace(new AddressSpace() - .withAddressPrefixes(Arrays.asList("yocf", "fksymddystki", "uxh", "yudxorrqnbp"))) - .withRemoteVirtualNetwork( - new VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork().withId("zvyifqrvkdvj")) - .withRemoteAddressSpace(new AddressSpace().withAddressPrefixes(Arrays.asList("mvvd"))))) - .withNextLink("kwlhzdo"); - model = BinaryData.fromObject(model).toObject(VirtualNetworkPeeringList.class); - Assertions.assertEquals(true, model.value().get(0).allowVirtualNetworkAccess()); - Assertions.assertEquals(true, model.value().get(0).allowForwardedTraffic()); - Assertions.assertEquals(true, model.value().get(0).allowGatewayTransit()); - Assertions.assertEquals(false, model.value().get(0).useRemoteGateways()); - Assertions.assertEquals("eypvhezrkg", model.value().get(0).databricksVirtualNetwork().id()); - Assertions.assertEquals("refovgmkqsleyyvx", - model.value().get(0).databricksAddressSpace().addressPrefixes().get(0)); - Assertions.assertEquals("upfh", model.value().get(0).remoteVirtualNetwork().id()); - Assertions.assertEquals("rpmopjmc", model.value().get(0).remoteAddressSpace().addressPrefixes().get(0)); - Assertions.assertEquals("kwlhzdo", model.nextLink()); + Assertions.assertFalse(model.value().get(0).allowVirtualNetworkAccess()); + Assertions.assertFalse(model.value().get(0).allowForwardedTraffic()); + Assertions.assertTrue(model.value().get(0).allowGatewayTransit()); + Assertions.assertFalse(model.value().get(0).useRemoteGateways()); + Assertions.assertEquals("ualupjmkh", model.value().get(0).databricksVirtualNetwork().id()); + Assertions.assertEquals("bcswsrt", model.value().get(0).databricksAddressSpace().addressPrefixes().get(0)); + Assertions.assertEquals("gw", model.value().get(0).remoteVirtualNetwork().id()); + Assertions.assertEquals("v", model.value().get(0).remoteAddressSpace().addressPrefixes().get(0)); + Assertions.assertEquals("oyq", model.nextLink()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetworkTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetworkTests.java index 00b54491dbdd..4a3fecabd079 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetworkTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetworkTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -11,17 +11,17 @@ public final class VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetworkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork model = BinaryData.fromString("{\"id\":\"ggd\"}") + VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork model = BinaryData.fromString("{\"id\":\"x\"}") .toObject(VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork.class); - Assertions.assertEquals("ggd", model.id()); + Assertions.assertEquals("x", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork model - = new VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork().withId("ggd"); + = new VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork().withId("x"); model = BinaryData.fromObject(model) .toObject(VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork.class); - Assertions.assertEquals("ggd", model.id()); + Assertions.assertEquals("x", model.id()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetworkTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetworkTests.java index 1bbc65a4ebbd..347d10a940d7 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetworkTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetworkTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -11,17 +11,16 @@ public final class VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetworkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork model - = BinaryData.fromString("{\"id\":\"yvdcsitynnaa\"}") - .toObject(VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork.class); - Assertions.assertEquals("yvdcsitynnaa", model.id()); + VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork model = BinaryData.fromString("{\"id\":\"bm\"}") + .toObject(VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork.class); + Assertions.assertEquals("bm", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork model - = new VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork().withId("yvdcsitynnaa"); + = new VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork().withId("bm"); model = BinaryData.fromObject(model).toObject(VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork.class); - Assertions.assertEquals("yvdcsitynnaa", model.id()); + Assertions.assertEquals("bm", model.id()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringPropertiesFormatTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringPropertiesFormatTests.java index ffa078766bb6..cfbf3d39cfa2 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringPropertiesFormatTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/VirtualNetworkPeeringPropertiesFormatTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -16,40 +16,40 @@ public final class VirtualNetworkPeeringPropertiesFormatTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualNetworkPeeringPropertiesFormat model = BinaryData.fromString( - "{\"allowVirtualNetworkAccess\":true,\"allowForwardedTraffic\":false,\"allowGatewayTransit\":true,\"useRemoteGateways\":true,\"databricksVirtualNetwork\":{\"id\":\"ftadehxnltyfs\"},\"databricksAddressSpace\":{\"addressPrefixes\":[\"suesnzw\"]},\"remoteVirtualNetwork\":{\"id\":\"jbavorxzdm\"},\"remoteAddressSpace\":{\"addressPrefixes\":[\"bqvudwxdndn\",\"owgujjugwdkcglhs\"]},\"peeringState\":\"Disconnected\",\"provisioningState\":\"Failed\"}") + "{\"allowVirtualNetworkAccess\":false,\"allowForwardedTraffic\":false,\"allowGatewayTransit\":false,\"useRemoteGateways\":false,\"databricksVirtualNetwork\":{\"id\":\"zlfmisgwbnbbeld\"},\"databricksAddressSpace\":{\"addressPrefixes\":[\"baliourqhakauha\",\"hsfwxosowzxcug\",\"cjooxdjebwpucwwf\"]},\"remoteVirtualNetwork\":{\"id\":\"vbvmeu\"},\"remoteAddressSpace\":{\"addressPrefixes\":[\"yhz\",\"euojgjrwju\",\"iotwmcdytdxwit\",\"nrjawgqwg\"]},\"peeringState\":\"Disconnected\",\"provisioningState\":\"Updating\"}") .toObject(VirtualNetworkPeeringPropertiesFormat.class); - Assertions.assertEquals(true, model.allowVirtualNetworkAccess()); - Assertions.assertEquals(false, model.allowForwardedTraffic()); - Assertions.assertEquals(true, model.allowGatewayTransit()); - Assertions.assertEquals(true, model.useRemoteGateways()); - Assertions.assertEquals("ftadehxnltyfs", model.databricksVirtualNetwork().id()); - Assertions.assertEquals("suesnzw", model.databricksAddressSpace().addressPrefixes().get(0)); - Assertions.assertEquals("jbavorxzdm", model.remoteVirtualNetwork().id()); - Assertions.assertEquals("bqvudwxdndn", model.remoteAddressSpace().addressPrefixes().get(0)); + Assertions.assertFalse(model.allowVirtualNetworkAccess()); + Assertions.assertFalse(model.allowForwardedTraffic()); + Assertions.assertFalse(model.allowGatewayTransit()); + Assertions.assertFalse(model.useRemoteGateways()); + Assertions.assertEquals("zlfmisgwbnbbeld", model.databricksVirtualNetwork().id()); + Assertions.assertEquals("baliourqhakauha", model.databricksAddressSpace().addressPrefixes().get(0)); + Assertions.assertEquals("vbvmeu", model.remoteVirtualNetwork().id()); + Assertions.assertEquals("yhz", model.remoteAddressSpace().addressPrefixes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualNetworkPeeringPropertiesFormat model - = new VirtualNetworkPeeringPropertiesFormat().withAllowVirtualNetworkAccess(true) - .withAllowForwardedTraffic(false) - .withAllowGatewayTransit(true) - .withUseRemoteGateways(true) - .withDatabricksVirtualNetwork( - new VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork().withId("ftadehxnltyfs")) - .withDatabricksAddressSpace(new AddressSpace().withAddressPrefixes(Arrays.asList("suesnzw"))) - .withRemoteVirtualNetwork( - new VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork().withId("jbavorxzdm")) - .withRemoteAddressSpace( - new AddressSpace().withAddressPrefixes(Arrays.asList("bqvudwxdndn", "owgujjugwdkcglhs"))); + VirtualNetworkPeeringPropertiesFormat model = new VirtualNetworkPeeringPropertiesFormat() + .withAllowVirtualNetworkAccess(false) + .withAllowForwardedTraffic(false) + .withAllowGatewayTransit(false) + .withUseRemoteGateways(false) + .withDatabricksVirtualNetwork( + new VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork().withId("zlfmisgwbnbbeld")) + .withDatabricksAddressSpace(new AddressSpace() + .withAddressPrefixes(Arrays.asList("baliourqhakauha", "hsfwxosowzxcug", "cjooxdjebwpucwwf"))) + .withRemoteVirtualNetwork(new VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork().withId("vbvmeu")) + .withRemoteAddressSpace(new AddressSpace() + .withAddressPrefixes(Arrays.asList("yhz", "euojgjrwju", "iotwmcdytdxwit", "nrjawgqwg"))); model = BinaryData.fromObject(model).toObject(VirtualNetworkPeeringPropertiesFormat.class); - Assertions.assertEquals(true, model.allowVirtualNetworkAccess()); - Assertions.assertEquals(false, model.allowForwardedTraffic()); - Assertions.assertEquals(true, model.allowGatewayTransit()); - Assertions.assertEquals(true, model.useRemoteGateways()); - Assertions.assertEquals("ftadehxnltyfs", model.databricksVirtualNetwork().id()); - Assertions.assertEquals("suesnzw", model.databricksAddressSpace().addressPrefixes().get(0)); - Assertions.assertEquals("jbavorxzdm", model.remoteVirtualNetwork().id()); - Assertions.assertEquals("bqvudwxdndn", model.remoteAddressSpace().addressPrefixes().get(0)); + Assertions.assertFalse(model.allowVirtualNetworkAccess()); + Assertions.assertFalse(model.allowForwardedTraffic()); + Assertions.assertFalse(model.allowGatewayTransit()); + Assertions.assertFalse(model.useRemoteGateways()); + Assertions.assertEquals("zlfmisgwbnbbeld", model.databricksVirtualNetwork().id()); + Assertions.assertEquals("baliourqhakauha", model.databricksAddressSpace().addressPrefixes().get(0)); + Assertions.assertEquals("vbvmeu", model.remoteVirtualNetwork().id()); + Assertions.assertEquals("yhz", model.remoteAddressSpace().addressPrefixes().get(0)); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceCustomBooleanParameterTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceCustomBooleanParameterTests.java index 290a68f47608..97acd3b7252f 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceCustomBooleanParameterTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceCustomBooleanParameterTests.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.databricks.models.CustomParameterType; import com.azure.resourcemanager.databricks.models.WorkspaceCustomBooleanParameter; import org.junit.jupiter.api.Assertions; @@ -13,13 +14,16 @@ public final class WorkspaceCustomBooleanParameterTests { public void testDeserialize() throws Exception { WorkspaceCustomBooleanParameter model = BinaryData.fromString("{\"type\":\"String\",\"value\":false}") .toObject(WorkspaceCustomBooleanParameter.class); - Assertions.assertEquals(false, model.value()); + Assertions.assertEquals(CustomParameterType.STRING, model.type()); + Assertions.assertFalse(model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkspaceCustomBooleanParameter model = new WorkspaceCustomBooleanParameter().withValue(false); + WorkspaceCustomBooleanParameter model + = new WorkspaceCustomBooleanParameter().withType(CustomParameterType.STRING).withValue(false); model = BinaryData.fromObject(model).toObject(WorkspaceCustomBooleanParameter.class); - Assertions.assertEquals(false, model.value()); + Assertions.assertEquals(CustomParameterType.STRING, model.type()); + Assertions.assertFalse(model.value()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceCustomObjectParameterTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceCustomObjectParameterTests.java index e161c4714fc4..124459765c3f 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceCustomObjectParameterTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceCustomObjectParameterTests.java @@ -1,22 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.databricks.models.CustomParameterType; import com.azure.resourcemanager.databricks.models.WorkspaceCustomObjectParameter; +import org.junit.jupiter.api.Assertions; public final class WorkspaceCustomObjectParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkspaceCustomObjectParameter model = BinaryData.fromString("{\"type\":\"Object\",\"value\":\"datan\"}") - .toObject(WorkspaceCustomObjectParameter.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceCustomObjectParameter model = new WorkspaceCustomObjectParameter().withValue("datan"); - model = BinaryData.fromObject(model).toObject(WorkspaceCustomObjectParameter.class); + WorkspaceCustomObjectParameter model + = BinaryData.fromString("{\"type\":\"Object\",\"value\":\"\\\"datajzrnf\\\"\"}") + .toObject(WorkspaceCustomObjectParameter.class); + Assertions.assertEquals(CustomParameterType.OBJECT, model.type()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceCustomStringParameterTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceCustomStringParameterTests.java index fb81bbe61bc6..586c28fd63fb 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceCustomStringParameterTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceCustomStringParameterTests.java @@ -1,25 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.databricks.models.CustomParameterType; import com.azure.resourcemanager.databricks.models.WorkspaceCustomStringParameter; import org.junit.jupiter.api.Assertions; public final class WorkspaceCustomStringParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkspaceCustomStringParameter model = BinaryData.fromString("{\"type\":\"Bool\",\"value\":\"zb\"}") + WorkspaceCustomStringParameter model = BinaryData.fromString("{\"type\":\"String\",\"value\":\"theotusiv\"}") .toObject(WorkspaceCustomStringParameter.class); - Assertions.assertEquals("zb", model.value()); + Assertions.assertEquals(CustomParameterType.STRING, model.type()); + Assertions.assertEquals("theotusiv", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkspaceCustomStringParameter model = new WorkspaceCustomStringParameter().withValue("zb"); + WorkspaceCustomStringParameter model + = new WorkspaceCustomStringParameter().withType(CustomParameterType.STRING).withValue("theotusiv"); model = BinaryData.fromObject(model).toObject(WorkspaceCustomStringParameter.class); - Assertions.assertEquals("zb", model.value()); + Assertions.assertEquals(CustomParameterType.STRING, model.type()); + Assertions.assertEquals("theotusiv", model.value()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceNoPublicIpBooleanParameterTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceNoPublicIpBooleanParameterTests.java new file mode 100644 index 000000000000..721ad8b461bb --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceNoPublicIpBooleanParameterTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.databricks.models.CustomParameterType; +import com.azure.resourcemanager.databricks.models.WorkspaceNoPublicIpBooleanParameter; +import org.junit.jupiter.api.Assertions; + +public final class WorkspaceNoPublicIpBooleanParameterTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkspaceNoPublicIpBooleanParameter model = BinaryData.fromString("{\"type\":\"Bool\",\"value\":true}") + .toObject(WorkspaceNoPublicIpBooleanParameter.class); + Assertions.assertEquals(CustomParameterType.BOOL, model.type()); + Assertions.assertTrue(model.value()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WorkspaceNoPublicIpBooleanParameter model + = new WorkspaceNoPublicIpBooleanParameter().withType(CustomParameterType.BOOL).withValue(true); + model = BinaryData.fromObject(model).toObject(WorkspaceNoPublicIpBooleanParameter.class); + Assertions.assertEquals(CustomParameterType.BOOL, model.type()); + Assertions.assertTrue(model.value()); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspacePropertiesAccessConnectorTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspacePropertiesAccessConnectorTests.java new file mode 100644 index 000000000000..33eee8e64208 --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspacePropertiesAccessConnectorTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databricks.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.databricks.models.IdentityType; +import com.azure.resourcemanager.databricks.models.WorkspacePropertiesAccessConnector; +import org.junit.jupiter.api.Assertions; + +public final class WorkspacePropertiesAccessConnectorTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkspacePropertiesAccessConnector model = BinaryData + .fromString("{\"id\":\"kdosvqw\",\"identityType\":\"SystemAssigned\",\"userAssignedIdentityId\":\"dgbb\"}") + .toObject(WorkspacePropertiesAccessConnector.class); + Assertions.assertEquals("kdosvqw", model.id()); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identityType()); + Assertions.assertEquals("dgbb", model.userAssignedIdentityId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WorkspacePropertiesAccessConnector model = new WorkspacePropertiesAccessConnector().withId("kdosvqw") + .withIdentityType(IdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentityId("dgbb"); + model = BinaryData.fromObject(model).toObject(WorkspacePropertiesAccessConnector.class); + Assertions.assertEquals("kdosvqw", model.id()); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.identityType()); + Assertions.assertEquals("dgbb", model.userAssignedIdentityId()); + } +} diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceProviderAuthorizationTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceProviderAuthorizationTests.java index bd6cf95b90e0..08205cf3ef66 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceProviderAuthorizationTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceProviderAuthorizationTests.java @@ -1,31 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.databricks.models.WorkspaceProviderAuthorization; -import java.util.UUID; import org.junit.jupiter.api.Assertions; public final class WorkspaceProviderAuthorizationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkspaceProviderAuthorization model = BinaryData.fromString( - "{\"principalId\":\"d6e0aaeb-d8f1-4869-b3c9-29269dd9f78c\",\"roleDefinitionId\":\"f6b20eeb-d309-43ca-835a-864257ff0a62\"}") - .toObject(WorkspaceProviderAuthorization.class); - Assertions.assertEquals(UUID.fromString("d6e0aaeb-d8f1-4869-b3c9-29269dd9f78c"), model.principalId()); - Assertions.assertEquals(UUID.fromString("f6b20eeb-d309-43ca-835a-864257ff0a62"), model.roleDefinitionId()); + WorkspaceProviderAuthorization model + = BinaryData.fromString("{\"principalId\":\"gxg\",\"roleDefinitionId\":\"spemvtzfk\"}") + .toObject(WorkspaceProviderAuthorization.class); + Assertions.assertEquals("gxg", model.principalId()); + Assertions.assertEquals("spemvtzfk", model.roleDefinitionId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkspaceProviderAuthorization model = new WorkspaceProviderAuthorization() - .withPrincipalId(UUID.fromString("d6e0aaeb-d8f1-4869-b3c9-29269dd9f78c")) - .withRoleDefinitionId(UUID.fromString("f6b20eeb-d309-43ca-835a-864257ff0a62")); + WorkspaceProviderAuthorization model + = new WorkspaceProviderAuthorization().withPrincipalId("gxg").withRoleDefinitionId("spemvtzfk"); model = BinaryData.fromObject(model).toObject(WorkspaceProviderAuthorization.class); - Assertions.assertEquals(UUID.fromString("d6e0aaeb-d8f1-4869-b3c9-29269dd9f78c"), model.principalId()); - Assertions.assertEquals(UUID.fromString("f6b20eeb-d309-43ca-835a-864257ff0a62"), model.roleDefinitionId()); + Assertions.assertEquals("gxg", model.principalId()); + Assertions.assertEquals("spemvtzfk", model.roleDefinitionId()); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceUpdateTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceUpdateTests.java index 052385107c73..3ca302a17346 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceUpdateTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspaceUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; @@ -13,18 +13,18 @@ public final class WorkspaceUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkspaceUpdate model = BinaryData.fromString( - "{\"tags\":{\"nuvamiheogna\":\"depoog\",\"usivye\":\"xzxtheo\",\"nfygxgispemvtz\":\"cciqihnhungbwjz\"}}") - .toObject(WorkspaceUpdate.class); - Assertions.assertEquals("depoog", model.tags().get("nuvamiheogna")); + WorkspaceUpdate model + = BinaryData.fromString("{\"tags\":{\"algbquxigjyjg\":\"rolfpfp\",\"lnerkujysvleju\":\"jaoyfhrtx\"}}") + .toObject(WorkspaceUpdate.class); + Assertions.assertEquals("rolfpfp", model.tags().get("algbquxigjyjg")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkspaceUpdate model = new WorkspaceUpdate() - .withTags(mapOf("nuvamiheogna", "depoog", "usivye", "xzxtheo", "nfygxgispemvtz", "cciqihnhungbwjz")); + WorkspaceUpdate model + = new WorkspaceUpdate().withTags(mapOf("algbquxigjyjg", "rolfpfp", "lnerkujysvleju", "jaoyfhrtx")); model = BinaryData.fromObject(model).toObject(WorkspaceUpdate.class); - Assertions.assertEquals("depoog", model.tags().get("nuvamiheogna")); + Assertions.assertEquals("rolfpfp", model.tags().get("algbquxigjyjg")); } // Use "Map.of" if available diff --git a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspacesDeleteMockTests.java b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspacesDeleteMockTests.java index f26bc7eff6e1..453c3af19f5e 100644 --- a/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspacesDeleteMockTests.java +++ b/sdk/databricks/azure-resourcemanager-databricks/src/test/java/com/azure/resourcemanager/databricks/generated/WorkspacesDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databricks.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.databricks.AzureDatabricksManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { AzureDatabricksManager manager = AzureDatabricksManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.workspaces().delete("i", "ykvceoveil", com.azure.core.util.Context.NONE); + manager.workspaces().delete("p", "gdtpnapnyiro", false, com.azure.core.util.Context.NONE); } } diff --git a/sdk/databricks/azure-resourcemanager-databricks/tsp-location.yaml b/sdk/databricks/azure-resourcemanager-databricks/tsp-location.yaml new file mode 100644 index 000000000000..8d005e6416ba --- /dev/null +++ b/sdk/databricks/azure-resourcemanager-databricks/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/databricks/resource-manager/Microsoft.Databricks/Databricks +commit: 89ff93230e6905243555531544a94f85f48b5dac +repo: Azure/azure-rest-api-specs +additionalDirectories: