diff --git a/sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md b/sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md index 1ce3f81270f7..3c312c6f0ba8 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md +++ b/sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.8 (Unreleased) +## 1.0.0-beta.1 (2023-08-29) + +- Azure Resource Manager Kusto client library for Java. This package contains Microsoft Azure SDK for Kusto Management SDK. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2023-08. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/kusto/azure-resourcemanager-kusto/README.md b/sdk/kusto/azure-resourcemanager-kusto/README.md index dbc0c0c4afa4..fa5833795ba3 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/README.md +++ b/sdk/kusto/azure-resourcemanager-kusto/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Kusto client library for Java. -This package contains Microsoft Azure SDK for Kusto Management SDK. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2023-05. 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 Kusto Management SDK. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2023-08. 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 @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-kusto - 1.0.0-beta.7 + 1.0.0-beta.8 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/kusto/azure-resourcemanager-kusto/SAMPLE.md b/sdk/kusto/azure-resourcemanager-kusto/SAMPLE.md index 41280e8d100f..6f0ab56f03cc 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/SAMPLE.md +++ b/sdk/kusto/azure-resourcemanager-kusto/SAMPLE.md @@ -106,6 +106,15 @@ - [Get](#privatelinkresources_get) - [List](#privatelinkresources_list) +## SandboxCustomImages + +- [CheckNameAvailability](#sandboxcustomimages_checknameavailability) +- [CreateOrUpdate](#sandboxcustomimages_createorupdate) +- [Delete](#sandboxcustomimages_delete) +- [Get](#sandboxcustomimages_get) +- [ListByCluster](#sandboxcustomimages_listbycluster) +- [Update](#sandboxcustomimages_update) + ## Scripts - [CheckNameAvailability](#scripts_checknameavailability) @@ -126,7 +135,7 @@ import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfigurationsChec /** Samples for AttachedDatabaseConfigurations CheckNameAvailability. */ public final class AttachedDatabaseConfigurationsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationCheckNameAvailability.json */ /** * Sample code: KustoAttachedDatabaseConfigurationCheckNameAvailability. @@ -156,7 +165,7 @@ import java.util.Arrays; /** Samples for AttachedDatabaseConfigurations CreateOrUpdate. */ public final class AttachedDatabaseConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationsCreateOrUpdate.json */ /** * Sample code: AttachedDatabaseConfigurationsCreateOrUpdate. @@ -194,7 +203,7 @@ public final class AttachedDatabaseConfigurationsCreateOrUpdateSamples { /** Samples for AttachedDatabaseConfigurations Delete. */ public final class AttachedDatabaseConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationsDelete.json */ /** * Sample code: AttachedDatabaseConfigurationsDelete. @@ -216,7 +225,7 @@ public final class AttachedDatabaseConfigurationsDeleteSamples { /** Samples for AttachedDatabaseConfigurations Get. */ public final class AttachedDatabaseConfigurationsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationsGet.json */ /** * Sample code: AttachedDatabaseConfigurationsGet. @@ -238,7 +247,7 @@ public final class AttachedDatabaseConfigurationsGetSamples { /** Samples for AttachedDatabaseConfigurations ListByCluster. */ public final class AttachedDatabaseConfigurationsListByClusterSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsListByCluster.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationsListByCluster.json */ /** * Sample code: KustoAttachedDatabaseConfigurationsListByCluster. @@ -262,7 +271,7 @@ import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignmentCheckNam /** Samples for ClusterPrincipalAssignments CheckNameAvailability. */ public final class ClusterPrincipalAssignmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsCheckNameAvailability.json */ /** * Sample code: KustoClusterPrincipalAssignmentsCheckNameAvailability. @@ -291,7 +300,7 @@ import com.azure.resourcemanager.kusto.models.PrincipalType; /** Samples for ClusterPrincipalAssignments CreateOrUpdate. */ public final class ClusterPrincipalAssignmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsCreateOrUpdate.json */ /** * Sample code: KustoClusterPrincipalAssignmentsCreateOrUpdate. @@ -319,7 +328,7 @@ public final class ClusterPrincipalAssignmentsCreateOrUpdateSamples { /** Samples for ClusterPrincipalAssignments Delete. */ public final class ClusterPrincipalAssignmentsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsDelete.json */ /** * Sample code: KustoClusterPrincipalAssignmentsDelete. @@ -340,7 +349,7 @@ public final class ClusterPrincipalAssignmentsDeleteSamples { /** Samples for ClusterPrincipalAssignments Get. */ public final class ClusterPrincipalAssignmentsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsGet.json */ /** * Sample code: KustoClusterPrincipalAssignmentsGet. @@ -361,7 +370,7 @@ public final class ClusterPrincipalAssignmentsGetSamples { /** Samples for ClusterPrincipalAssignments List. */ public final class ClusterPrincipalAssignmentsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsList.json */ /** * Sample code: KustoPrincipalAssignmentsList. @@ -385,7 +394,7 @@ import java.util.Arrays; /** Samples for Clusters AddLanguageExtensions. */ public final class ClustersAddLanguageExtensionsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterAddLanguageExtensions.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterAddLanguageExtensions.json */ /** * Sample code: KustoClusterAddLanguageExtensions. @@ -417,7 +426,7 @@ import com.azure.resourcemanager.kusto.models.ClusterCheckNameRequest; /** Samples for Clusters CheckNameAvailability. */ public final class ClustersCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersCheckNameAvailability.json */ /** * Sample code: KustoClustersCheckNameAvailability. @@ -452,7 +461,7 @@ import java.util.Arrays; /** Samples for Clusters CreateOrUpdate. */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersCreateOrUpdate.json */ /** * Sample code: KustoClustersCreateOrUpdate. @@ -477,7 +486,9 @@ public final class ClustersCreateOrUpdateSamples { .asList( new LanguageExtensionInner() .withLanguageExtensionName(LanguageExtensionName.PYTHON) - .withLanguageExtensionImageName(LanguageExtensionImageName.PYTHON3_10_8), + .withLanguageExtensionImageName( + LanguageExtensionImageName.fromString("Python_Custom_Image")) + .withLanguageExtensionCustomImageName("customImage8"), new LanguageExtensionInner() .withLanguageExtensionName(LanguageExtensionName.R) .withLanguageExtensionImageName(LanguageExtensionImageName.R)))) @@ -497,7 +508,7 @@ public final class ClustersCreateOrUpdateSamples { /** Samples for Clusters Delete. */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersDelete.json */ /** * Sample code: KustoClustersDelete. @@ -518,7 +529,7 @@ import com.azure.resourcemanager.kusto.fluent.models.FollowerDatabaseDefinitionI /** Samples for Clusters DetachFollowerDatabases. */ public final class ClustersDetachFollowerDatabasesSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterDetachFollowerDatabases.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterDetachFollowerDatabases.json */ /** * Sample code: KustoClusterDetachFollowerDatabases. @@ -546,7 +557,7 @@ public final class ClustersDetachFollowerDatabasesSamples { /** Samples for Clusters DiagnoseVirtualNetwork. */ public final class ClustersDiagnoseVirtualNetworkSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersDiagnoseVirtualNetwork.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersDiagnoseVirtualNetwork.json */ /** * Sample code: KustoClusterDiagnoseVirtualNetwork. @@ -565,7 +576,7 @@ public final class ClustersDiagnoseVirtualNetworkSamples { /** Samples for Clusters GetByResourceGroup. */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersGet.json */ /** * Sample code: KustoClustersGet. @@ -586,7 +597,7 @@ public final class ClustersGetByResourceGroupSamples { /** Samples for Clusters List. */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersList.json */ /** * Sample code: KustoClustersList. @@ -605,7 +616,7 @@ public final class ClustersListSamples { /** Samples for Clusters ListByResourceGroup. */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersListByResourceGroup.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersListByResourceGroup.json */ /** * Sample code: KustoClustersListByResourceGroup. @@ -624,7 +635,7 @@ public final class ClustersListByResourceGroupSamples { /** Samples for Clusters ListFollowerDatabases. */ public final class ClustersListFollowerDatabasesSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterListFollowerDatabases.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterListFollowerDatabases.json */ /** * Sample code: KustoClusterListFollowerDatabases. @@ -643,7 +654,7 @@ public final class ClustersListFollowerDatabasesSamples { /** Samples for Clusters ListLanguageExtensions. */ public final class ClustersListLanguageExtensionsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterListLanguageExtensions.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterListLanguageExtensions.json */ /** * Sample code: KustoClusterListLanguageExtensions. @@ -662,7 +673,7 @@ public final class ClustersListLanguageExtensionsSamples { /** Samples for Clusters ListOutboundNetworkDependenciesEndpoints. */ public final class ClustersListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOutboundNetworkDependenciesList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoOutboundNetworkDependenciesList.json */ /** * Sample code: Get Kusto cluster outbound network dependencies. @@ -684,7 +695,7 @@ public final class ClustersListOutboundNetworkDependenciesEndpointsSamples { /** Samples for Clusters ListSkus. */ public final class ClustersListSkusSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersListSkus.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersListSkus.json */ /** * Sample code: KustoClustersListSkus. @@ -703,7 +714,7 @@ public final class ClustersListSkusSamples { /** Samples for Clusters ListSkusByResource. */ public final class ClustersListSkusByResourceSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersListResourceSkus.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersListResourceSkus.json */ /** * Sample code: KustoClustersListResourceSkus. @@ -724,7 +735,7 @@ import com.azure.resourcemanager.kusto.models.ClusterMigrateRequest; /** Samples for Clusters Migrate. */ public final class ClustersMigrateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterMigrate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterMigrate.json */ /** * Sample code: KustoClusterMigrate. @@ -756,7 +767,7 @@ import java.util.Arrays; /** Samples for Clusters RemoveLanguageExtensions. */ public final class ClustersRemoveLanguageExtensionsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterRemoveLanguageExtensions.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterRemoveLanguageExtensions.json */ /** * Sample code: KustoClusterRemoveLanguageExtensions. @@ -786,7 +797,7 @@ public final class ClustersRemoveLanguageExtensionsSamples { /** Samples for Clusters Start. */ public final class ClustersStartSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersStart.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersStart.json */ /** * Sample code: KustoClustersStart. @@ -805,7 +816,7 @@ public final class ClustersStartSamples { /** Samples for Clusters Stop. */ public final class ClustersStopSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersStop.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersStop.json */ /** * Sample code: KustoClustersStop. @@ -826,7 +837,7 @@ import com.azure.resourcemanager.kusto.models.Cluster; /** Samples for Clusters Update. */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersUpdate.json */ /** * Sample code: KustoClustersUpdate. @@ -852,7 +863,7 @@ import com.azure.resourcemanager.kusto.models.DataConnectionCheckNameRequest; /** Samples for DataConnections CheckNameAvailability. */ public final class DataConnectionsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCheckNameAvailability.json */ /** * Sample code: KustoDataConnectionsCheckNameAvailability. @@ -886,7 +897,7 @@ import java.time.OffsetDateTime; /** Samples for DataConnections CreateOrUpdate. */ public final class DataConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsEventGridCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsEventGridCreateOrUpdate.json */ /** * Sample code: KustoDataConnectionsEventGridCreateOrUpdate. @@ -923,7 +934,7 @@ public final class DataConnectionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCosmosDbCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCosmosDbCreateOrUpdate.json */ /** * Sample code: KustoDataConnectionsCosmosDbCreateOrUpdate. @@ -954,7 +965,7 @@ public final class DataConnectionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCreateOrUpdate.json */ /** * Sample code: KustoDataConnectionsCreateOrUpdate. @@ -996,7 +1007,7 @@ import com.azure.resourcemanager.kusto.models.EventHubDataFormat; /** Samples for DataConnections DataConnectionValidation. */ public final class DataConnectionsDataConnectionValidationSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionValidationAsync.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionValidationAsync.json */ /** * Sample code: KustoDataConnectionValidation. @@ -1027,7 +1038,7 @@ public final class DataConnectionsDataConnectionValidationSamples { } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionEventGridValidationAsync.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionEventGridValidationAsync.json */ /** * Sample code: KustoDataConnectionEventGridValidation. @@ -1071,7 +1082,7 @@ public final class DataConnectionsDataConnectionValidationSamples { /** Samples for DataConnections Delete. */ public final class DataConnectionsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsDelete.json */ /** * Sample code: KustoDataConnectionsDelete. @@ -1097,7 +1108,7 @@ public final class DataConnectionsDeleteSamples { /** Samples for DataConnections Get. */ public final class DataConnectionsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsEventGridGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsEventGridGet.json */ /** * Sample code: KustoDataConnectionsEventGridGet. @@ -1116,7 +1127,7 @@ public final class DataConnectionsGetSamples { } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCosmosDbGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCosmosDbGet.json */ /** * Sample code: KustoDataConnectionsCosmosDbGet. @@ -1135,7 +1146,7 @@ public final class DataConnectionsGetSamples { } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsGet.json */ /** * Sample code: KustoDataConnectionsGet. @@ -1161,7 +1172,7 @@ public final class DataConnectionsGetSamples { /** Samples for DataConnections ListByDatabase. */ public final class DataConnectionsListByDatabaseSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsListByDatabase.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsListByDatabase.json */ /** * Sample code: KustoDatabasesListByCluster. @@ -1190,7 +1201,7 @@ import java.time.OffsetDateTime; /** Samples for DataConnections Update. */ public final class DataConnectionsUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCosmosDbUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCosmosDbUpdate.json */ /** * Sample code: KustoDataConnectionsCosmosDbUpdate. @@ -1220,7 +1231,7 @@ public final class DataConnectionsUpdateSamples { } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsUpdate.json */ /** * Sample code: KustoDataConnectionsUpdate. @@ -1246,7 +1257,7 @@ public final class DataConnectionsUpdateSamples { } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsEventGridUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsEventGridUpdate.json */ /** * Sample code: KustoDataConnectionsEventGridUpdate. @@ -1293,7 +1304,7 @@ import java.util.Arrays; /** Samples for DatabaseOperation InviteFollower. */ public final class DatabaseOperationInviteFollowerSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseInviteFollower.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseInviteFollower.json */ /** * Sample code: KustoDatabaseInviteFollower. @@ -1332,7 +1343,7 @@ import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignmentCheckNa /** Samples for DatabasePrincipalAssignments CheckNameAvailability. */ public final class DatabasePrincipalAssignmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsCheckNameAvailability.json */ /** * Sample code: KustoDatabaseCheckNameAvailability. @@ -1361,7 +1372,7 @@ import com.azure.resourcemanager.kusto.models.PrincipalType; /** Samples for DatabasePrincipalAssignments CreateOrUpdate. */ public final class DatabasePrincipalAssignmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsCreateOrUpdate.json */ /** * Sample code: KustoDatabasePrincipalAssignmentsCreateOrUpdate. @@ -1389,7 +1400,7 @@ public final class DatabasePrincipalAssignmentsCreateOrUpdateSamples { /** Samples for DatabasePrincipalAssignments Delete. */ public final class DatabasePrincipalAssignmentsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsDelete.json */ /** * Sample code: KustoDatabasePrincipalAssignmentsDelete. @@ -1411,7 +1422,7 @@ public final class DatabasePrincipalAssignmentsDeleteSamples { /** Samples for DatabasePrincipalAssignments Get. */ public final class DatabasePrincipalAssignmentsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsGet.json */ /** * Sample code: KustoDatabasePrincipalAssignmentsGet. @@ -1433,7 +1444,7 @@ public final class DatabasePrincipalAssignmentsGetSamples { /** Samples for DatabasePrincipalAssignments List. */ public final class DatabasePrincipalAssignmentsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsList.json */ /** * Sample code: KustoPrincipalAssignmentsList. @@ -1460,7 +1471,7 @@ import java.util.Arrays; /** Samples for Databases AddPrincipals. */ public final class DatabasesAddPrincipalsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseAddPrincipals.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseAddPrincipals.json */ /** * Sample code: KustoDatabaseAddPrincipals. @@ -1513,7 +1524,7 @@ import com.azure.resourcemanager.kusto.models.Type; /** Samples for Databases CheckNameAvailability. */ public final class DatabasesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesCheckNameAvailability.json */ /** * Sample code: KustoDatabasesCheckNameAvailability. @@ -1543,7 +1554,7 @@ import java.time.Duration; /** Samples for Databases CreateOrUpdate. */ public final class DatabasesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseReadonlyUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseReadonlyUpdate.json */ /** * Sample code: Kusto ReadOnly database update. @@ -1563,7 +1574,7 @@ public final class DatabasesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesCreateOrUpdate.json */ /** * Sample code: Kusto ReadWrite database create or update. @@ -1590,7 +1601,7 @@ public final class DatabasesCreateOrUpdateSamples { /** Samples for Databases Delete. */ public final class DatabasesDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesDelete.json */ /** * Sample code: KustoDatabasesDelete. @@ -1609,7 +1620,7 @@ public final class DatabasesDeleteSamples { /** Samples for Databases Get. */ public final class DatabasesGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoSuspendedDatabasesGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSuspendedDatabasesGet.json */ /** * Sample code: KustoSuspendedDatabasesGet. @@ -1623,7 +1634,7 @@ public final class DatabasesGetSamples { } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesGet.json */ /** * Sample code: KustoDatabasesGet. @@ -1644,7 +1655,7 @@ public final class DatabasesGetSamples { /** Samples for Databases ListByCluster. */ public final class DatabasesListByClusterSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesListByCluster.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesListByCluster.json */ /** * Sample code: KustoDatabasesListByCluster. @@ -1663,7 +1674,7 @@ public final class DatabasesListByClusterSamples { /** Samples for Databases ListPrincipals. */ public final class DatabasesListPrincipalsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseListPrincipals.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseListPrincipals.json */ /** * Sample code: KustoDatabaseListPrincipals. @@ -1690,7 +1701,7 @@ import java.util.Arrays; /** Samples for Databases RemovePrincipals. */ public final class DatabasesRemovePrincipalsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseRemovePrincipals.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseRemovePrincipals.json */ /** * Sample code: KustoDatabaseRemovePrincipals. @@ -1743,7 +1754,7 @@ import java.time.Duration; /** Samples for Databases Update. */ public final class DatabasesUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesUpdate.json */ /** * Sample code: KustoDatabasesUpdate. @@ -1772,7 +1783,7 @@ import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpointsCheckNameRe /** Samples for ManagedPrivateEndpoints CheckNameAvailability. */ public final class ManagedPrivateEndpointsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsCheckNameAvailability.json */ /** * Sample code: KustoManagedPrivateEndpointsCheckNameAvailability. @@ -1798,7 +1809,7 @@ public final class ManagedPrivateEndpointsCheckNameAvailabilitySamples { /** Samples for ManagedPrivateEndpoints CreateOrUpdate. */ public final class ManagedPrivateEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsCreateOrUpdate.json */ /** * Sample code: KustoManagedPrivateEndpointsCreateOrUpdate. @@ -1826,7 +1837,7 @@ public final class ManagedPrivateEndpointsCreateOrUpdateSamples { /** Samples for ManagedPrivateEndpoints Delete. */ public final class ManagedPrivateEndpointsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsDelete.json */ /** * Sample code: ManagedPrivateEndpointsDelete. @@ -1847,7 +1858,7 @@ public final class ManagedPrivateEndpointsDeleteSamples { /** Samples for ManagedPrivateEndpoints Get. */ public final class ManagedPrivateEndpointsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsGet.json */ /** * Sample code: KustoManagedPrivateEndpointsGet. @@ -1869,7 +1880,7 @@ public final class ManagedPrivateEndpointsGetSamples { /** Samples for ManagedPrivateEndpoints List. */ public final class ManagedPrivateEndpointsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsList.json */ /** * Sample code: KustoManagedPrivateEndpointsList. @@ -1890,7 +1901,7 @@ import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpoint; /** Samples for ManagedPrivateEndpoints Update. */ public final class ManagedPrivateEndpointsUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsUpdate.json */ /** * Sample code: KustoManagedPrivateEndpointsUpdate. @@ -1921,7 +1932,7 @@ public final class ManagedPrivateEndpointsUpdateSamples { /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOperationsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoOperationsList.json */ /** * Sample code: KustoOperationsList. @@ -1940,7 +1951,7 @@ public final class OperationsListSamples { /** Samples for OperationsResults Get. */ public final class OperationsResultsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOperationResultsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoOperationResultsGet.json */ /** * Sample code: KustoOperationResultsGet. @@ -1961,7 +1972,7 @@ public final class OperationsResultsGetSamples { /** Samples for OperationsResultsLocation Get. */ public final class OperationsResultsLocationGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOperationResultsOperationResultResponseTypeGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoOperationResultsOperationResultResponseTypeGet.json */ /** * Sample code: KustoOperationsResultsLocationGet. @@ -1984,7 +1995,7 @@ import com.azure.resourcemanager.kusto.models.PrivateLinkServiceConnectionStateP /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateEndpointConnectionsCreateOrUpdate.json */ /** * Sample code: Approve or reject a private endpoint connection with a given name. @@ -2012,7 +2023,7 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateEndpointConnectionsDelete.json */ /** * Sample code: Deletes a private endpoint connection with a given name. @@ -2034,7 +2045,7 @@ public final class PrivateEndpointConnectionsDeleteSamples { /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateEndpointConnectionsGet.json */ /** * Sample code: Gets private endpoint connection. @@ -2055,7 +2066,7 @@ public final class PrivateEndpointConnectionsGetSamples { /** Samples for PrivateEndpointConnections List. */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateEndpointConnectionsList.json */ /** * Sample code: KustoPrivateEndpointConnectionsList. @@ -2074,7 +2085,7 @@ public final class PrivateEndpointConnectionsListSamples { /** Samples for PrivateLinkResources Get. */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateLinkResourcesGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateLinkResourcesGet.json */ /** * Sample code: Gets private endpoint connection. @@ -2095,7 +2106,7 @@ public final class PrivateLinkResourcesGetSamples { /** Samples for PrivateLinkResources List. */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateLinkResourcesList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateLinkResourcesList.json */ /** * Sample code: Gets private endpoint connections. @@ -2108,6 +2119,155 @@ public final class PrivateLinkResourcesListSamples { } ``` +### SandboxCustomImages_CheckNameAvailability + +```java +import com.azure.resourcemanager.kusto.models.SandboxCustomImagesCheckNameRequest; + +/** Samples for SandboxCustomImages CheckNameAvailability. */ +public final class SandboxCustomImagesCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImagesCheckNameAvailability.json + */ + /** + * Sample code: KustoSandboxCustomImagesCheckNameAvailability. + * + * @param manager Entry point to KustoManager. + */ + public static void kustoSandboxCustomImagesCheckNameAvailability( + com.azure.resourcemanager.kusto.KustoManager manager) { + manager + .sandboxCustomImages() + .checkNameAvailabilityWithResponse( + "kustorptest", + "kustoCluster", + new SandboxCustomImagesCheckNameRequest().withName("sandboxCustomImage1"), + com.azure.core.util.Context.NONE); + } +} +``` + +### SandboxCustomImages_CreateOrUpdate + +```java +import com.azure.resourcemanager.kusto.models.Language; + +/** Samples for SandboxCustomImages CreateOrUpdate. */ +public final class SandboxCustomImagesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImagesCreateOrUpdate.json + */ + /** + * Sample code: KustoSandboxCustomImagesCreateOrUpdate. + * + * @param manager Entry point to KustoManager. + */ + public static void kustoSandboxCustomImagesCreateOrUpdate(com.azure.resourcemanager.kusto.KustoManager manager) { + manager + .sandboxCustomImages() + .define("customImage8") + .withExistingCluster("kustorptest", "kustoCluster") + .withLanguage(Language.PYTHON) + .withLanguageVersion("3.10.8") + .withRequirementsFileContent("Requests") + .create(); + } +} +``` + +### SandboxCustomImages_Delete + +```java +/** Samples for SandboxCustomImages Delete. */ +public final class SandboxCustomImagesDeleteSamples { + /* + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImageDelete.json + */ + /** + * Sample code: SandboxCustomImagesDelete. + * + * @param manager Entry point to KustoManager. + */ + public static void sandboxCustomImagesDelete(com.azure.resourcemanager.kusto.KustoManager manager) { + manager + .sandboxCustomImages() + .delete("kustorptest", "kustoCluster", "customImage8", com.azure.core.util.Context.NONE); + } +} +``` + +### SandboxCustomImages_Get + +```java +/** Samples for SandboxCustomImages Get. */ +public final class SandboxCustomImagesGetSamples { + /* + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImagesGet.json + */ + /** + * Sample code: KustoSandboxCustomImagesGet. + * + * @param manager Entry point to KustoManager. + */ + public static void kustoSandboxCustomImagesGet(com.azure.resourcemanager.kusto.KustoManager manager) { + manager + .sandboxCustomImages() + .getWithResponse("kustorptest", "kustoCluster", "customImage8", com.azure.core.util.Context.NONE); + } +} +``` + +### SandboxCustomImages_ListByCluster + +```java +/** Samples for SandboxCustomImages ListByCluster. */ +public final class SandboxCustomImagesListByClusterSamples { + /* + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImagesList.json + */ + /** + * Sample code: KustoSandboxCustomImagesListByCluster. + * + * @param manager Entry point to KustoManager. + */ + public static void kustoSandboxCustomImagesListByCluster(com.azure.resourcemanager.kusto.KustoManager manager) { + manager.sandboxCustomImages().listByCluster("kustorptest", "kustoCluster", com.azure.core.util.Context.NONE); + } +} +``` + +### SandboxCustomImages_Update + +```java +import com.azure.resourcemanager.kusto.models.Language; +import com.azure.resourcemanager.kusto.models.SandboxCustomImage; + +/** Samples for SandboxCustomImages Update. */ +public final class SandboxCustomImagesUpdateSamples { + /* + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImageUpdate.json + */ + /** + * Sample code: KustoSandboxCustomImagesUpdate. + * + * @param manager Entry point to KustoManager. + */ + public static void kustoSandboxCustomImagesUpdate(com.azure.resourcemanager.kusto.KustoManager manager) { + SandboxCustomImage resource = + manager + .sandboxCustomImages() + .getWithResponse("kustorptest", "kustoCluster", "customImage8", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withLanguage(Language.PYTHON) + .withLanguageVersion("3.10.8") + .withRequirementsFileContent("Requests") + .apply(); + } +} +``` + ### Scripts_CheckNameAvailability ```java @@ -2116,7 +2276,7 @@ import com.azure.resourcemanager.kusto.models.ScriptCheckNameRequest; /** Samples for Scripts CheckNameAvailability. */ public final class ScriptsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsCheckNameAvailability.json */ /** * Sample code: KustoScriptsCheckNameAvailability. @@ -2142,7 +2302,7 @@ public final class ScriptsCheckNameAvailabilitySamples { /** Samples for Scripts CreateOrUpdate. */ public final class ScriptsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsCreateOrUpdate.json */ /** * Sample code: KustoScriptsCreateOrUpdate. @@ -2170,7 +2330,7 @@ public final class ScriptsCreateOrUpdateSamples { /** Samples for Scripts Delete. */ public final class ScriptsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsDelete.json */ /** * Sample code: KustoScriptsDelete. @@ -2191,7 +2351,7 @@ public final class ScriptsDeleteSamples { /** Samples for Scripts Get. */ public final class ScriptsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsGet.json */ /** * Sample code: KustoScriptsGet. @@ -2213,7 +2373,7 @@ public final class ScriptsGetSamples { /** Samples for Scripts ListByDatabase. */ public final class ScriptsListByDatabaseSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsListByDatabase.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsListByDatabase.json */ /** * Sample code: KustoScriptsList. @@ -2236,7 +2396,7 @@ import com.azure.resourcemanager.kusto.models.Script; /** Samples for Scripts Update. */ public final class ScriptsUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsUpdate.json */ /** * Sample code: KustoScriptsUpdate. @@ -2266,7 +2426,7 @@ public final class ScriptsUpdateSamples { /** Samples for Skus List. */ public final class SkusListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoSkus.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSkus.json */ /** * Sample code: KustoListRegionSkus. diff --git a/sdk/kusto/azure-resourcemanager-kusto/pom.xml b/sdk/kusto/azure-resourcemanager-kusto/pom.xml index ea08b4101014..9d74604b7fd8 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/pom.xml +++ b/sdk/kusto/azure-resourcemanager-kusto/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for Kusto Management - This package contains Microsoft Azure SDK for Kusto Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2023-05. + This package contains Microsoft Azure SDK for Kusto Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2023-08. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/KustoManager.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/KustoManager.java index 568ce8830a44..7e2011add826 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/KustoManager.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/KustoManager.java @@ -38,6 +38,7 @@ import com.azure.resourcemanager.kusto.implementation.OperationsResultsLocationsImpl; import com.azure.resourcemanager.kusto.implementation.PrivateEndpointConnectionsImpl; import com.azure.resourcemanager.kusto.implementation.PrivateLinkResourcesImpl; +import com.azure.resourcemanager.kusto.implementation.SandboxCustomImagesImpl; import com.azure.resourcemanager.kusto.implementation.ScriptsImpl; import com.azure.resourcemanager.kusto.implementation.SkusImpl; import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfigurations; @@ -53,6 +54,7 @@ import com.azure.resourcemanager.kusto.models.OperationsResultsLocations; import com.azure.resourcemanager.kusto.models.PrivateEndpointConnections; import com.azure.resourcemanager.kusto.models.PrivateLinkResources; +import com.azure.resourcemanager.kusto.models.SandboxCustomImages; import com.azure.resourcemanager.kusto.models.Scripts; import com.azure.resourcemanager.kusto.models.Skus; import java.time.Duration; @@ -86,6 +88,8 @@ public final class KustoManager { private Scripts scripts; + private SandboxCustomImages sandboxCustomImages; + private PrivateEndpointConnections privateEndpointConnections; private PrivateLinkResources privateLinkResources; @@ -263,7 +267,7 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil .append("-") .append("com.azure.resourcemanager.kusto") .append("/") - .append("1.0.0-beta.7"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -432,6 +436,18 @@ public Scripts scripts() { return scripts; } + /** + * Gets the resource collection API of SandboxCustomImages. It manages SandboxCustomImage. + * + * @return Resource collection API of SandboxCustomImages. + */ + public SandboxCustomImages sandboxCustomImages() { + if (this.sandboxCustomImages == null) { + this.sandboxCustomImages = new SandboxCustomImagesImpl(clientObject.getSandboxCustomImages(), this); + } + return sandboxCustomImages; + } + /** * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. * @@ -507,8 +523,10 @@ public OperationsResultsLocations operationsResultsLocations() { } /** - * @return Wrapped service client KustoManagementClient providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. + * Gets wrapped service client KustoManagementClient providing direct access to the underlying auto-generated API + * implementation, based on Azure REST API. + * + * @return Wrapped service client KustoManagementClient. */ public KustoManagementClient serviceClient() { return this.clientObject; diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/KustoManagementClient.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/KustoManagementClient.java index ec929506d4c2..aa4d164ba220 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/KustoManagementClient.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/KustoManagementClient.java @@ -107,6 +107,13 @@ public interface KustoManagementClient { */ ScriptsClient getScripts(); + /** + * Gets the SandboxCustomImagesClient object to access its operations. + * + * @return the SandboxCustomImagesClient object. + */ + SandboxCustomImagesClient getSandboxCustomImages(); + /** * Gets the PrivateEndpointConnectionsClient object to access its operations. * diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/SandboxCustomImagesClient.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/SandboxCustomImagesClient.java new file mode 100644 index 000000000000..4253197dd215 --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/SandboxCustomImagesClient.java @@ -0,0 +1,328 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.kusto.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.kusto.fluent.models.SandboxCustomImageInner; +import com.azure.resourcemanager.kusto.models.SandboxCustomImagesCheckNameRequest; + +/** An instance of this class provides access to all the operations defined in SandboxCustomImagesClient. */ +public interface SandboxCustomImagesClient { + /** + * Returns the list of the existing sandbox custom images of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Kusto sandbox custom images operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName); + + /** + * Returns the list of the existing sandbox custom images of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Kusto sandbox custom images operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); + + /** + * Returns a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String clusterName, String sandboxCustomImageName, Context context); + + /** + * Returns a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SandboxCustomImageInner get(String resourceGroupName, String clusterName, String sandboxCustomImageName); + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SandboxCustomImageInner> beginCreateOrUpdate( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters); + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SandboxCustomImageInner> beginCreateOrUpdate( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + Context context); + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SandboxCustomImageInner createOrUpdate( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters); + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SandboxCustomImageInner createOrUpdate( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + Context context); + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SandboxCustomImageInner> beginUpdate( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters); + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SandboxCustomImageInner> beginUpdate( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + Context context); + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SandboxCustomImageInner update( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters); + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SandboxCustomImageInner update( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + Context context); + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String clusterName, String sandboxCustomImageName); + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String clusterName, String sandboxCustomImageName, Context context); + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + void delete(String resourceGroupName, String clusterName, String sandboxCustomImageName); + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + void delete(String resourceGroupName, String clusterName, String sandboxCustomImageName, Context context); + + /** + * Checks that the sandbox custom image resource name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkNameAvailabilityWithResponse( + String resourceGroupName, + String clusterName, + SandboxCustomImagesCheckNameRequest resourceName, + Context context); + + /** + * Checks that the sandbox custom image resource name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CheckNameResultInner checkNameAvailability( + String resourceGroupName, String clusterName, SandboxCustomImagesCheckNameRequest resourceName); +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/LanguageExtensionInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/LanguageExtensionInner.java index f6fb5892121d..8e3481471e36 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/LanguageExtensionInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/LanguageExtensionInner.java @@ -24,6 +24,12 @@ public final class LanguageExtensionInner { @JsonProperty(value = "languageExtensionImageName") private LanguageExtensionImageName languageExtensionImageName; + /* + * The language extension custom image name. + */ + @JsonProperty(value = "languageExtensionCustomImageName") + private String languageExtensionCustomImageName; + /** Creates an instance of LanguageExtensionInner class. */ public LanguageExtensionInner() { } @@ -69,6 +75,26 @@ public LanguageExtensionInner withLanguageExtensionImageName( return this; } + /** + * Get the languageExtensionCustomImageName property: The language extension custom image name. + * + * @return the languageExtensionCustomImageName value. + */ + public String languageExtensionCustomImageName() { + return this.languageExtensionCustomImageName; + } + + /** + * Set the languageExtensionCustomImageName property: The language extension custom image name. + * + * @param languageExtensionCustomImageName the languageExtensionCustomImageName value to set. + * @return the LanguageExtensionInner object itself. + */ + public LanguageExtensionInner withLanguageExtensionCustomImageName(String languageExtensionCustomImageName) { + this.languageExtensionCustomImageName = languageExtensionCustomImageName; + return this; + } + /** * Validates the instance. * diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/SandboxCustomImageInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/SandboxCustomImageInner.java new file mode 100644 index 000000000000..aa6623121570 --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/SandboxCustomImageInner.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.resourcemanager.kusto.models.Language; +import com.azure.resourcemanager.kusto.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Class representing a Kusto sandbox custom image. */ +@Fluent +public final class SandboxCustomImageInner extends ProxyResource { + /* + * A sandbox custom image. + */ + @JsonProperty(value = "properties") + private SandboxCustomImageProperties innerProperties; + + /** Creates an instance of SandboxCustomImageInner class. */ + public SandboxCustomImageInner() { + } + + /** + * Get the innerProperties property: A sandbox custom image. + * + * @return the innerProperties value. + */ + private SandboxCustomImageProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the language property: The language name, for example Python. + * + * @return the language value. + */ + public Language language() { + return this.innerProperties() == null ? null : this.innerProperties().language(); + } + + /** + * Set the language property: The language name, for example Python. + * + * @param language the language value to set. + * @return the SandboxCustomImageInner object itself. + */ + public SandboxCustomImageInner withLanguage(Language language) { + if (this.innerProperties() == null) { + this.innerProperties = new SandboxCustomImageProperties(); + } + this.innerProperties().withLanguage(language); + return this; + } + + /** + * Get the languageVersion property: The version of the language. + * + * @return the languageVersion value. + */ + public String languageVersion() { + return this.innerProperties() == null ? null : this.innerProperties().languageVersion(); + } + + /** + * Set the languageVersion property: The version of the language. + * + * @param languageVersion the languageVersion value to set. + * @return the SandboxCustomImageInner object itself. + */ + public SandboxCustomImageInner withLanguageVersion(String languageVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SandboxCustomImageProperties(); + } + this.innerProperties().withLanguageVersion(languageVersion); + return this; + } + + /** + * Get the requirementsFileContent property: The requirements file content. + * + * @return the requirementsFileContent value. + */ + public String requirementsFileContent() { + return this.innerProperties() == null ? null : this.innerProperties().requirementsFileContent(); + } + + /** + * Set the requirementsFileContent property: The requirements file content. + * + * @param requirementsFileContent the requirementsFileContent value to set. + * @return the SandboxCustomImageInner object itself. + */ + public SandboxCustomImageInner withRequirementsFileContent(String requirementsFileContent) { + if (this.innerProperties() == null) { + this.innerProperties = new SandboxCustomImageProperties(); + } + this.innerProperties().withRequirementsFileContent(requirementsFileContent); + return this; + } + + /** + * Get the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState 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) { + innerProperties().validate(); + } + } +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/SandboxCustomImageProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/SandboxCustomImageProperties.java new file mode 100644 index 000000000000..809f1faacef9 --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/SandboxCustomImageProperties.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kusto.models.Language; +import com.azure.resourcemanager.kusto.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A class representing the properties of a sandbox custom image object. */ +@Fluent +public final class SandboxCustomImageProperties { + /* + * The language name, for example Python. + */ + @JsonProperty(value = "language", required = true) + private Language language; + + /* + * The version of the language. + */ + @JsonProperty(value = "languageVersion", required = true) + private String languageVersion; + + /* + * The requirements file content. + */ + @JsonProperty(value = "requirementsFileContent") + private String requirementsFileContent; + + /* + * The provisioned state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** Creates an instance of SandboxCustomImageProperties class. */ + public SandboxCustomImageProperties() { + } + + /** + * Get the language property: The language name, for example Python. + * + * @return the language value. + */ + public Language language() { + return this.language; + } + + /** + * Set the language property: The language name, for example Python. + * + * @param language the language value to set. + * @return the SandboxCustomImageProperties object itself. + */ + public SandboxCustomImageProperties withLanguage(Language language) { + this.language = language; + return this; + } + + /** + * Get the languageVersion property: The version of the language. + * + * @return the languageVersion value. + */ + public String languageVersion() { + return this.languageVersion; + } + + /** + * Set the languageVersion property: The version of the language. + * + * @param languageVersion the languageVersion value to set. + * @return the SandboxCustomImageProperties object itself. + */ + public SandboxCustomImageProperties withLanguageVersion(String languageVersion) { + this.languageVersion = languageVersion; + return this; + } + + /** + * Get the requirementsFileContent property: The requirements file content. + * + * @return the requirementsFileContent value. + */ + public String requirementsFileContent() { + return this.requirementsFileContent; + } + + /** + * Set the requirementsFileContent property: The requirements file content. + * + * @param requirementsFileContent the requirementsFileContent value to set. + * @return the SandboxCustomImageProperties object itself. + */ + public SandboxCustomImageProperties withRequirementsFileContent(String requirementsFileContent) { + this.requirementsFileContent = requirementsFileContent; + return this; + } + + /** + * Get the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (language() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property language in model SandboxCustomImageProperties")); + } + if (languageVersion() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property languageVersion in model SandboxCustomImageProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SandboxCustomImageProperties.class); +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterImpl.java index 9b8a03d1f06d..cd615278886e 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterImpl.java @@ -448,8 +448,13 @@ public ClusterImpl withTags(Map tags) { } public ClusterImpl withZones(List zones) { - this.innerModel().withZones(zones); - return this; + if (isInCreateMode()) { + this.innerModel().withZones(zones); + return this; + } else { + this.updateParameters.withZones(zones); + return this; + } } public ClusterImpl withIdentity(Identity identity) { diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientBuilder.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientBuilder.java index bef1498f8a7e..66188cd136f9 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientBuilder.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientBuilder.java @@ -137,7 +137,7 @@ public KustoManagementClientImpl buildClient() { localSerializerAdapter, localDefaultPollInterval, localEnvironment, - subscriptionId, + this.subscriptionId, localEndpoint); return client; } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientImpl.java index f42508be9a17..7d5254f3f049 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientImpl.java @@ -36,6 +36,7 @@ import com.azure.resourcemanager.kusto.fluent.OperationsResultsLocationsClient; import com.azure.resourcemanager.kusto.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.kusto.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.kusto.fluent.SandboxCustomImagesClient; import com.azure.resourcemanager.kusto.fluent.ScriptsClient; import com.azure.resourcemanager.kusto.fluent.SkusClient; import java.io.IOException; @@ -230,6 +231,18 @@ public ScriptsClient getScripts() { return this.scripts; } + /** The SandboxCustomImagesClient object to access its operations. */ + private final SandboxCustomImagesClient sandboxCustomImages; + + /** + * Gets the SandboxCustomImagesClient object to access its operations. + * + * @return the SandboxCustomImagesClient object. + */ + public SandboxCustomImagesClient getSandboxCustomImages() { + return this.sandboxCustomImages; + } + /** The PrivateEndpointConnectionsClient object to access its operations. */ private final PrivateEndpointConnectionsClient privateEndpointConnections; @@ -324,7 +337,7 @@ public OperationsResultsLocationsClient getOperationsResultsLocations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-05-02"; + this.apiVersion = "2023-08-15"; this.clusters = new ClustersClientImpl(this); this.clusterPrincipalAssignments = new ClusterPrincipalAssignmentsClientImpl(this); this.skus = new SkusClientImpl(this); @@ -334,6 +347,7 @@ public OperationsResultsLocationsClient getOperationsResultsLocations() { this.databaseOperations = new DatabaseOperationsClientImpl(this); this.databasePrincipalAssignments = new DatabasePrincipalAssignmentsClientImpl(this); this.scripts = new ScriptsClientImpl(this); + this.sandboxCustomImages = new SandboxCustomImagesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.dataConnections = new DataConnectionsClientImpl(this); diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/LanguageExtensionImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/LanguageExtensionImpl.java index 5020b0dc2b79..29971b911fdf 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/LanguageExtensionImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/LanguageExtensionImpl.java @@ -28,6 +28,10 @@ public LanguageExtensionImageName languageExtensionImageName() { return this.innerModel().languageExtensionImageName(); } + public String languageExtensionCustomImageName() { + return this.innerModel().languageExtensionCustomImageName(); + } + public LanguageExtensionInner innerModel() { return this.innerObject; } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/SandboxCustomImageImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/SandboxCustomImageImpl.java new file mode 100644 index 000000000000..b97b54d69520 --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/SandboxCustomImageImpl.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.kusto.fluent.models.SandboxCustomImageInner; +import com.azure.resourcemanager.kusto.models.Language; +import com.azure.resourcemanager.kusto.models.ProvisioningState; +import com.azure.resourcemanager.kusto.models.SandboxCustomImage; + +public final class SandboxCustomImageImpl + implements SandboxCustomImage, SandboxCustomImage.Definition, SandboxCustomImage.Update { + private SandboxCustomImageInner innerObject; + + private final com.azure.resourcemanager.kusto.KustoManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public Language language() { + return this.innerModel().language(); + } + + public String languageVersion() { + return this.innerModel().languageVersion(); + } + + public String requirementsFileContent() { + return this.innerModel().requirementsFileContent(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public SandboxCustomImageInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.kusto.KustoManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private String sandboxCustomImageName; + + public SandboxCustomImageImpl withExistingCluster(String resourceGroupName, String clusterName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + return this; + } + + public SandboxCustomImage create() { + this.innerObject = + serviceManager + .serviceClient() + .getSandboxCustomImages() + .createOrUpdate( + resourceGroupName, clusterName, sandboxCustomImageName, this.innerModel(), Context.NONE); + return this; + } + + public SandboxCustomImage create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getSandboxCustomImages() + .createOrUpdate(resourceGroupName, clusterName, sandboxCustomImageName, this.innerModel(), context); + return this; + } + + SandboxCustomImageImpl(String name, com.azure.resourcemanager.kusto.KustoManager serviceManager) { + this.innerObject = new SandboxCustomImageInner(); + this.serviceManager = serviceManager; + this.sandboxCustomImageName = name; + } + + public SandboxCustomImageImpl update() { + return this; + } + + public SandboxCustomImage apply() { + this.innerObject = + serviceManager + .serviceClient() + .getSandboxCustomImages() + .update(resourceGroupName, clusterName, sandboxCustomImageName, this.innerModel(), Context.NONE); + return this; + } + + public SandboxCustomImage apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getSandboxCustomImages() + .update(resourceGroupName, clusterName, sandboxCustomImageName, this.innerModel(), context); + return this; + } + + SandboxCustomImageImpl( + SandboxCustomImageInner innerObject, com.azure.resourcemanager.kusto.KustoManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters"); + this.sandboxCustomImageName = Utils.getValueFromIdByName(innerObject.id(), "sandboxCustomImages"); + } + + public SandboxCustomImage refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getSandboxCustomImages() + .getWithResponse(resourceGroupName, clusterName, sandboxCustomImageName, Context.NONE) + .getValue(); + return this; + } + + public SandboxCustomImage refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getSandboxCustomImages() + .getWithResponse(resourceGroupName, clusterName, sandboxCustomImageName, context) + .getValue(); + return this; + } + + public SandboxCustomImageImpl withLanguage(Language language) { + this.innerModel().withLanguage(language); + return this; + } + + public SandboxCustomImageImpl withLanguageVersion(String languageVersion) { + this.innerModel().withLanguageVersion(languageVersion); + return this; + } + + public SandboxCustomImageImpl withRequirementsFileContent(String requirementsFileContent) { + this.innerModel().withRequirementsFileContent(requirementsFileContent); + return this; + } +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/SandboxCustomImagesClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/SandboxCustomImagesClientImpl.java new file mode 100644 index 000000000000..257be5d93cbd --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/SandboxCustomImagesClientImpl.java @@ -0,0 +1,1587 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +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.kusto.fluent.SandboxCustomImagesClient; +import com.azure.resourcemanager.kusto.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.kusto.fluent.models.SandboxCustomImageInner; +import com.azure.resourcemanager.kusto.models.SandboxCustomImagesCheckNameRequest; +import com.azure.resourcemanager.kusto.models.SandboxCustomImagesListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in SandboxCustomImagesClient. */ +public final class SandboxCustomImagesClientImpl implements SandboxCustomImagesClient { + /** The proxy service used to perform REST calls. */ + private final SandboxCustomImagesService service; + + /** The service client containing this operation class. */ + private final KustoManagementClientImpl client; + + /** + * Initializes an instance of SandboxCustomImagesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SandboxCustomImagesClientImpl(KustoManagementClientImpl client) { + this.service = + RestProxy.create(SandboxCustomImagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for KustoManagementClientSandboxCustomImages to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "KustoManagementClien") + public interface SandboxCustomImagesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCluster( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterName") String clusterName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterName") String clusterName, + @PathParam("sandboxCustomImageName") String sandboxCustomImageName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterName") String clusterName, + @PathParam("sandboxCustomImageName") String sandboxCustomImageName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SandboxCustomImageInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterName") String clusterName, + @PathParam("sandboxCustomImageName") String sandboxCustomImageName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SandboxCustomImageInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterName") String clusterName, + @PathParam("sandboxCustomImageName") String sandboxCustomImageName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImagesCheckNameAvailability") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") SandboxCustomImagesCheckNameRequest resourceName, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Returns the list of the existing sandbox custom images of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Kusto sandbox custom images operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterSinglePageAsync( + String resourceGroupName, String clusterName) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName 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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByCluster( + this.client.getEndpoint(), + resourceGroupName, + clusterName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns the list of the existing sandbox custom images of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Kusto sandbox custom images operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterSinglePageAsync( + String resourceGroupName, String clusterName, 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName 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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByCluster( + this.client.getEndpoint(), + resourceGroupName, + clusterName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Returns the list of the existing sandbox custom images of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Kusto sandbox custom images operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName)); + } + + /** + * Returns the list of the existing sandbox custom images of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Kusto sandbox custom images operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync( + String resourceGroupName, String clusterName, Context context) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context)); + } + + /** + * Returns the list of the existing sandbox custom images of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Kusto sandbox custom images operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName)); + } + + /** + * Returns the list of the existing sandbox custom images of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Kusto sandbox custom images operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster( + String resourceGroupName, String clusterName, Context context) { + return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context)); + } + + /** + * Returns a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String clusterName, String sandboxCustomImageName) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (sandboxCustomImageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sandboxCustomImageName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + sandboxCustomImageName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String clusterName, String sandboxCustomImageName, 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (sandboxCustomImageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sandboxCustomImageName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + sandboxCustomImageName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Returns a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String clusterName, String sandboxCustomImageName) { + return getWithResponseAsync(resourceGroupName, clusterName, sandboxCustomImageName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String clusterName, String sandboxCustomImageName, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, sandboxCustomImageName, context).block(); + } + + /** + * Returns a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SandboxCustomImageInner get(String resourceGroupName, String clusterName, String sandboxCustomImageName) { + return getWithResponse(resourceGroupName, clusterName, sandboxCustomImageName, Context.NONE).getValue(); + } + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (sandboxCustomImageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sandboxCustomImageName 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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + sandboxCustomImageName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (sandboxCustomImageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sandboxCustomImageName 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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + sandboxCustomImageName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SandboxCustomImageInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SandboxCustomImageInner.class, + SandboxCustomImageInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SandboxCustomImageInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, clusterName, sandboxCustomImageName, parameters, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SandboxCustomImageInner.class, + SandboxCustomImageInner.class, + context); + } + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SandboxCustomImageInner> beginCreateOrUpdate( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SandboxCustomImageInner> beginCreateOrUpdate( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SandboxCustomImageInner createOrUpdate( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters) { + return createOrUpdateAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters).block(); + } + + /** + * Creates or updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SandboxCustomImageInner createOrUpdate( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters, context).block(); + } + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (sandboxCustomImageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sandboxCustomImageName 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 accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + sandboxCustomImageName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (sandboxCustomImageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sandboxCustomImageName 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 accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + sandboxCustomImageName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SandboxCustomImageInner> beginUpdateAsync( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SandboxCustomImageInner.class, + SandboxCustomImageInner.class, + this.client.getContext()); + } + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SandboxCustomImageInner> beginUpdateAsync( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SandboxCustomImageInner.class, + SandboxCustomImageInner.class, + context); + } + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SandboxCustomImageInner> beginUpdate( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters) { + return this + .beginUpdateAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters) + .getSyncPoller(); + } + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SandboxCustomImageInner> beginUpdate( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + Context context) { + return this + .beginUpdateAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters, context) + .getSyncPoller(); + } + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters) { + return beginUpdateAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + Context context) { + return beginUpdateAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SandboxCustomImageInner update( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters) { + return updateAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters).block(); + } + + /** + * Updates a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param parameters The sandbox custom image parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SandboxCustomImageInner update( + String resourceGroupName, + String clusterName, + String sandboxCustomImageName, + SandboxCustomImageInner parameters, + Context context) { + return updateAsync(resourceGroupName, clusterName, sandboxCustomImageName, parameters, context).block(); + } + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String clusterName, String sandboxCustomImageName) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (sandboxCustomImageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sandboxCustomImageName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + sandboxCustomImageName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String clusterName, String sandboxCustomImageName, 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (sandboxCustomImageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter sandboxCustomImageName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterName, + sandboxCustomImageName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 clusterName, String sandboxCustomImageName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, clusterName, sandboxCustomImageName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 clusterName, String sandboxCustomImageName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, clusterName, sandboxCustomImageName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String clusterName, String sandboxCustomImageName) { + return this.beginDeleteAsync(resourceGroupName, clusterName, sandboxCustomImageName).getSyncPoller(); + } + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String clusterName, String sandboxCustomImageName, Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, sandboxCustomImageName, context).getSyncPoller(); + } + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 clusterName, String sandboxCustomImageName) { + return beginDeleteAsync(resourceGroupName, clusterName, sandboxCustomImageName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 clusterName, String sandboxCustomImageName, Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, sandboxCustomImageName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 clusterName, String sandboxCustomImageName) { + deleteAsync(resourceGroupName, clusterName, sandboxCustomImageName).block(); + } + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 clusterName, String sandboxCustomImageName, Context context) { + deleteAsync(resourceGroupName, clusterName, sandboxCustomImageName, context).block(); + } + + /** + * Checks that the sandbox custom image resource name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + String resourceGroupName, String clusterName, SandboxCustomImagesCheckNameRequest resourceName) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } else { + resourceName.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .checkNameAvailability( + this.client.getEndpoint(), + resourceGroupName, + clusterName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks that the sandbox custom image resource name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + String resourceGroupName, + String clusterName, + SandboxCustomImagesCheckNameRequest resourceName, + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } else { + resourceName.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .checkNameAvailability( + this.client.getEndpoint(), + resourceGroupName, + clusterName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceName, + accept, + context); + } + + /** + * Checks that the sandbox custom image resource name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkNameAvailabilityAsync( + String resourceGroupName, String clusterName, SandboxCustomImagesCheckNameRequest resourceName) { + return checkNameAvailabilityWithResponseAsync(resourceGroupName, clusterName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Checks that the sandbox custom image resource name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkNameAvailabilityWithResponse( + String resourceGroupName, + String clusterName, + SandboxCustomImagesCheckNameRequest resourceName, + Context context) { + return checkNameAvailabilityWithResponseAsync(resourceGroupName, clusterName, resourceName, context).block(); + } + + /** + * Checks that the sandbox custom image resource name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameResultInner checkNameAvailability( + String resourceGroupName, String clusterName, SandboxCustomImagesCheckNameRequest resourceName) { + return checkNameAvailabilityWithResponse(resourceGroupName, clusterName, resourceName, Context.NONE).getValue(); + } +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/SandboxCustomImagesImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/SandboxCustomImagesImpl.java new file mode 100644 index 000000000000..02e5378620fe --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/SandboxCustomImagesImpl.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kusto.fluent.SandboxCustomImagesClient; +import com.azure.resourcemanager.kusto.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.kusto.fluent.models.SandboxCustomImageInner; +import com.azure.resourcemanager.kusto.models.CheckNameResult; +import com.azure.resourcemanager.kusto.models.SandboxCustomImage; +import com.azure.resourcemanager.kusto.models.SandboxCustomImages; +import com.azure.resourcemanager.kusto.models.SandboxCustomImagesCheckNameRequest; + +public final class SandboxCustomImagesImpl implements SandboxCustomImages { + private static final ClientLogger LOGGER = new ClientLogger(SandboxCustomImagesImpl.class); + + private final SandboxCustomImagesClient innerClient; + + private final com.azure.resourcemanager.kusto.KustoManager serviceManager; + + public SandboxCustomImagesImpl( + SandboxCustomImagesClient innerClient, com.azure.resourcemanager.kusto.KustoManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + PagedIterable inner = + this.serviceClient().listByCluster(resourceGroupName, clusterName); + return Utils.mapPage(inner, inner1 -> new SandboxCustomImageImpl(inner1, this.manager())); + } + + public PagedIterable listByCluster( + String resourceGroupName, String clusterName, Context context) { + PagedIterable inner = + this.serviceClient().listByCluster(resourceGroupName, clusterName, context); + return Utils.mapPage(inner, inner1 -> new SandboxCustomImageImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String clusterName, String sandboxCustomImageName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, clusterName, sandboxCustomImageName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SandboxCustomImageImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SandboxCustomImage get(String resourceGroupName, String clusterName, String sandboxCustomImageName) { + SandboxCustomImageInner inner = + this.serviceClient().get(resourceGroupName, clusterName, sandboxCustomImageName); + if (inner != null) { + return new SandboxCustomImageImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String clusterName, String sandboxCustomImageName) { + this.serviceClient().delete(resourceGroupName, clusterName, sandboxCustomImageName); + } + + public void delete(String resourceGroupName, String clusterName, String sandboxCustomImageName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, sandboxCustomImageName, context); + } + + public Response checkNameAvailabilityWithResponse( + String resourceGroupName, + String clusterName, + SandboxCustomImagesCheckNameRequest resourceName, + Context context) { + Response inner = + this + .serviceClient() + .checkNameAvailabilityWithResponse(resourceGroupName, clusterName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CheckNameResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CheckNameResult checkNameAvailability( + String resourceGroupName, String clusterName, SandboxCustomImagesCheckNameRequest resourceName) { + CheckNameResultInner inner = + this.serviceClient().checkNameAvailability(resourceGroupName, clusterName, resourceName); + if (inner != null) { + return new CheckNameResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public SandboxCustomImage getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = Utils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String sandboxCustomImageName = Utils.getValueFromIdByName(id, "sandboxCustomImages"); + if (sandboxCustomImageName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'sandboxCustomImages'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, sandboxCustomImageName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = Utils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String sandboxCustomImageName = Utils.getValueFromIdByName(id, "sandboxCustomImages"); + if (sandboxCustomImageName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'sandboxCustomImages'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, sandboxCustomImageName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = Utils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String sandboxCustomImageName = Utils.getValueFromIdByName(id, "sandboxCustomImages"); + if (sandboxCustomImageName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'sandboxCustomImages'.", id))); + } + this.delete(resourceGroupName, clusterName, sandboxCustomImageName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = Utils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String sandboxCustomImageName = Utils.getValueFromIdByName(id, "sandboxCustomImages"); + if (sandboxCustomImageName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'sandboxCustomImages'.", id))); + } + this.delete(resourceGroupName, clusterName, sandboxCustomImageName, context); + } + + private SandboxCustomImagesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.kusto.KustoManager manager() { + return this.serviceManager; + } + + public SandboxCustomImageImpl define(String name) { + return new SandboxCustomImageImpl(name, this.manager()); + } +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/Cluster.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/Cluster.java index cac53457c8ba..aaf9c87b5146 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/Cluster.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/Cluster.java @@ -674,6 +674,7 @@ interface WithIfNoneMatch { interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, + UpdateStages.WithZones, UpdateStages.WithIdentity, UpdateStages.WithTrustedExternalTenants, UpdateStages.WithOptimizedAutoscale, @@ -733,6 +734,17 @@ interface WithSku { Update withSku(AzureSku sku); } + /** The stage of the Cluster update allowing to specify zones. */ + interface WithZones { + /** + * Specifies the zones property: The availability zones of the cluster.. + * + * @param zones The availability zones of the cluster. + * @return the next definition stage. + */ + Update withZones(List zones); + } + /** The stage of the Cluster update allowing to specify identity. */ interface WithIdentity { /** diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/ClusterUpdate.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/ClusterUpdate.java index 0aa45e4f3544..bce5a5725f36 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/ClusterUpdate.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/ClusterUpdate.java @@ -35,6 +35,12 @@ public final class ClusterUpdate extends ProxyResource { @JsonProperty(value = "sku") private AzureSku sku; + /* + * The availability zones of the cluster. + */ + @JsonProperty(value = "zones") + private List zones; + /* * The identity of the cluster, if configured. */ @@ -111,6 +117,26 @@ public ClusterUpdate withSku(AzureSku sku) { return this; } + /** + * Get the zones property: The availability zones of the cluster. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones of the cluster. + * + * @param zones the zones value to set. + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withZones(List zones) { + this.zones = zones; + return this; + } + /** * Get the identity property: The identity of the cluster, if configured. * diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/EndpointDetail.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/EndpointDetail.java index e83eb2e4f974..5c206d10ff7b 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/EndpointDetail.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/EndpointDetail.java @@ -16,6 +16,12 @@ public final class EndpointDetail { @JsonProperty(value = "port") private Integer port; + /* + * The ip address of the endpoint. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + /** Creates an instance of EndpointDetail class. */ public EndpointDetail() { } @@ -40,6 +46,26 @@ public EndpointDetail withPort(Integer port) { return this; } + /** + * Get the ipAddress property: The ip address of the endpoint. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: The ip address of the endpoint. + * + * @param ipAddress the ipAddress value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + /** * Validates the instance. * diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/Language.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/Language.java new file mode 100644 index 000000000000..1bce40cd3d46 --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/Language.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The language name, for example Python. */ +public final class Language extends ExpandableStringEnum { + /** Static value Python for Language. */ + public static final Language PYTHON = fromString("Python"); + + /** + * Creates a new instance of Language value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Language() { + } + + /** + * Creates or finds a Language from its string representation. + * + * @param name a name to look for. + * @return the corresponding Language. + */ + @JsonCreator + public static Language fromString(String name) { + return fromString(name, Language.class); + } + + /** + * Gets known Language values. + * + * @return known Language values. + */ + public static Collection values() { + return values(Language.class); + } +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/LanguageExtension.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/LanguageExtension.java index 56ae5fb4edf0..4790940fb511 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/LanguageExtension.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/LanguageExtension.java @@ -22,6 +22,13 @@ public interface LanguageExtension { */ LanguageExtensionImageName languageExtensionImageName(); + /** + * Gets the languageExtensionCustomImageName property: The language extension custom image name. + * + * @return the languageExtensionCustomImageName value. + */ + String languageExtensionCustomImageName(); + /** * Gets the inner com.azure.resourcemanager.kusto.fluent.models.LanguageExtensionInner object. * diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/LanguageExtensionImageName.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/LanguageExtensionImageName.java index ea98b43af7fb..24db63341b65 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/LanguageExtensionImageName.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/LanguageExtensionImageName.java @@ -19,6 +19,12 @@ public final class LanguageExtensionImageName extends ExpandableStringEnum listByCluster(String resourceGroupName, String clusterName); + + /** + * Returns the list of the existing sandbox custom images of the given Kusto cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Kusto sandbox custom images operation response as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); + + /** + * Returns a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String clusterName, String sandboxCustomImageName, Context context); + + /** + * Returns a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image. + */ + SandboxCustomImage get(String resourceGroupName, String clusterName, String sandboxCustomImageName); + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 clusterName, String sandboxCustomImageName); + + /** + * Deletes a sandbox custom image. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param sandboxCustomImageName The name of the sandbox custom image. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 clusterName, String sandboxCustomImageName, Context context); + + /** + * Checks that the sandbox custom image resource name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request along with {@link Response}. + */ + Response checkNameAvailabilityWithResponse( + String resourceGroupName, + String clusterName, + SandboxCustomImagesCheckNameRequest resourceName, + Context context); + + /** + * Checks that the sandbox custom image resource name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Kusto cluster. + * @param resourceName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + CheckNameResult checkNameAvailability( + String resourceGroupName, String clusterName, SandboxCustomImagesCheckNameRequest resourceName); + + /** + * Returns a sandbox custom image. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image along with {@link Response}. + */ + SandboxCustomImage getById(String id); + + /** + * Returns a sandbox custom image. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto sandbox custom image along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a sandbox custom image. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a sandbox custom image. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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); + + /** + * Begins definition for a new SandboxCustomImage resource. + * + * @param name resource name. + * @return the first stage of the new SandboxCustomImage definition. + */ + SandboxCustomImage.DefinitionStages.Blank define(String name); +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/SandboxCustomImagesCheckNameRequest.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/SandboxCustomImagesCheckNameRequest.java new file mode 100644 index 000000000000..f19aab0b7f3c --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/SandboxCustomImagesCheckNameRequest.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The result returned from a sandboxCustomImage check name availability request. */ +@Fluent +public final class SandboxCustomImagesCheckNameRequest { + /* + * Sandbox custom image resource name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The type of resource, for instance Microsoft.Kusto/clusters/sandboxCustomImages. + */ + @JsonProperty(value = "type", required = true) + private String type = "Microsoft.Kusto/clusters/sandboxCustomImages"; + + /** Creates an instance of SandboxCustomImagesCheckNameRequest class. */ + public SandboxCustomImagesCheckNameRequest() { + type = "Microsoft.Kusto/clusters/sandboxCustomImages"; + } + + /** + * Get the name property: Sandbox custom image resource name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Sandbox custom image resource name. + * + * @param name the name value to set. + * @return the SandboxCustomImagesCheckNameRequest object itself. + */ + public SandboxCustomImagesCheckNameRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of resource, for instance Microsoft.Kusto/clusters/sandboxCustomImages. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type of resource, for instance Microsoft.Kusto/clusters/sandboxCustomImages. + * + * @param type the type value to set. + * @return the SandboxCustomImagesCheckNameRequest object itself. + */ + public SandboxCustomImagesCheckNameRequest withType(String type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model SandboxCustomImagesCheckNameRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SandboxCustomImagesCheckNameRequest.class); +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/SandboxCustomImagesListResult.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/SandboxCustomImagesListResult.java new file mode 100644 index 000000000000..7490d23c60bc --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/SandboxCustomImagesListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.kusto.fluent.models.SandboxCustomImageInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list Kusto sandbox custom images operation response. */ +@Fluent +public final class SandboxCustomImagesListResult { + /* + * Link to the next page of results + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * The list of Kusto sandbox custom images. + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of SandboxCustomImagesListResult class. */ + public SandboxCustomImagesListResult() { + } + + /** + * Get the nextLink property: Link to the next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link to the next page of results. + * + * @param nextLink the nextLink value to set. + * @return the SandboxCustomImagesListResult object itself. + */ + public SandboxCustomImagesListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: The list of Kusto sandbox custom images. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of Kusto sandbox custom images. + * + * @param value the value value to set. + * @return the SandboxCustomImagesListResult object itself. + */ + public SandboxCustomImagesListResult withValue(List value) { + this.value = value; + 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()); + } + } +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/VirtualNetworkConfiguration.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/VirtualNetworkConfiguration.java index 669984abebb2..3e70c657727f 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/VirtualNetworkConfiguration.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/VirtualNetworkConfiguration.java @@ -29,6 +29,13 @@ public final class VirtualNetworkConfiguration { @JsonProperty(value = "dataManagementPublicIpId", required = true) private String dataManagementPublicIpId; + /* + * When enabled, the cluster is deployed into the configured subnet, when disabled it will be removed from the + * subnet. + */ + @JsonProperty(value = "state") + private VnetState state; + /** Creates an instance of VirtualNetworkConfiguration class. */ public VirtualNetworkConfiguration() { } @@ -93,6 +100,28 @@ public VirtualNetworkConfiguration withDataManagementPublicIpId(String dataManag return this; } + /** + * Get the state property: When enabled, the cluster is deployed into the configured subnet, when disabled it will + * be removed from the subnet. + * + * @return the state value. + */ + public VnetState state() { + return this.state; + } + + /** + * Set the state property: When enabled, the cluster is deployed into the configured subnet, when disabled it will + * be removed from the subnet. + * + * @param state the state value to set. + * @return the VirtualNetworkConfiguration object itself. + */ + public VirtualNetworkConfiguration withState(VnetState state) { + this.state = state; + return this; + } + /** * Validates the instance. * diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/VnetState.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/VnetState.java new file mode 100644 index 000000000000..623247093871 --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/VnetState.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * When enabled, the cluster is deployed into the configured subnet, when disabled it will be removed from the subnet. + */ +public final class VnetState extends ExpandableStringEnum { + /** Static value Enabled for VnetState. */ + public static final VnetState ENABLED = fromString("Enabled"); + + /** Static value Disabled for VnetState. */ + public static final VnetState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of VnetState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VnetState() { + } + + /** + * Creates or finds a VnetState from its string representation. + * + * @param name a name to look for. + * @return the corresponding VnetState. + */ + @JsonCreator + public static VnetState fromString(String name) { + return fromString(name, VnetState.class); + } + + /** + * Gets known VnetState values. + * + * @return known VnetState values. + */ + public static Collection values() { + return values(VnetState.class); + } +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCheckNameAvailabilitySamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCheckNameAvailabilitySamples.java index c7104f74bf7e..6a66bfd9e183 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCheckNameAvailabilitySamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCheckNameAvailabilitySamples.java @@ -9,7 +9,7 @@ /** Samples for AttachedDatabaseConfigurations CheckNameAvailability. */ public final class AttachedDatabaseConfigurationsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationCheckNameAvailability.json */ /** * Sample code: KustoAttachedDatabaseConfigurationCheckNameAvailability. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCreateOrUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCreateOrUpdateSamples.java index 4af69db579c7..0763d35080d8 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCreateOrUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for AttachedDatabaseConfigurations CreateOrUpdate. */ public final class AttachedDatabaseConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationsCreateOrUpdate.json */ /** * Sample code: AttachedDatabaseConfigurationsCreateOrUpdate. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsDeleteSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsDeleteSamples.java index 51c8c74ca528..fac22a892d9d 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsDeleteSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for AttachedDatabaseConfigurations Delete. */ public final class AttachedDatabaseConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationsDelete.json */ /** * Sample code: AttachedDatabaseConfigurationsDelete. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsGetSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsGetSamples.java index 056f2a4e4efc..cce025cf8c31 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsGetSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for AttachedDatabaseConfigurations Get. */ public final class AttachedDatabaseConfigurationsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationsGet.json */ /** * Sample code: AttachedDatabaseConfigurationsGet. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsListByClusterSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsListByClusterSamples.java index d871694cba05..df54fa7ce5fc 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsListByClusterSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsListByClusterSamples.java @@ -7,7 +7,7 @@ /** Samples for AttachedDatabaseConfigurations ListByCluster. */ public final class AttachedDatabaseConfigurationsListByClusterSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoAttachedDatabaseConfigurationsListByCluster.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoAttachedDatabaseConfigurationsListByCluster.json */ /** * Sample code: KustoAttachedDatabaseConfigurationsListByCluster. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCheckNameAvailabilitySamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCheckNameAvailabilitySamples.java index 985b596b5f31..e1ff5ea91722 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCheckNameAvailabilitySamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCheckNameAvailabilitySamples.java @@ -9,7 +9,7 @@ /** Samples for ClusterPrincipalAssignments CheckNameAvailability. */ public final class ClusterPrincipalAssignmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsCheckNameAvailability.json */ /** * Sample code: KustoClusterPrincipalAssignmentsCheckNameAvailability. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCreateOrUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCreateOrUpdateSamples.java index 2560c3fcf13a..2b725f0c45b7 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCreateOrUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for ClusterPrincipalAssignments CreateOrUpdate. */ public final class ClusterPrincipalAssignmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsCreateOrUpdate.json */ /** * Sample code: KustoClusterPrincipalAssignmentsCreateOrUpdate. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsDeleteSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsDeleteSamples.java index 681ec16b3321..095537710764 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsDeleteSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ClusterPrincipalAssignments Delete. */ public final class ClusterPrincipalAssignmentsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsDelete.json */ /** * Sample code: KustoClusterPrincipalAssignmentsDelete. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsGetSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsGetSamples.java index a949d7adddec..a9f5da6fe3c5 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsGetSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ClusterPrincipalAssignments Get. */ public final class ClusterPrincipalAssignmentsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsGet.json */ /** * Sample code: KustoClusterPrincipalAssignmentsGet. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsListSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsListSamples.java index a77f4fba70a5..994b06cb130c 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsListSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsListSamples.java @@ -7,7 +7,7 @@ /** Samples for ClusterPrincipalAssignments List. */ public final class ClusterPrincipalAssignmentsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterPrincipalAssignmentsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterPrincipalAssignmentsList.json */ /** * Sample code: KustoPrincipalAssignmentsList. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersAddLanguageExtensionsSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersAddLanguageExtensionsSamples.java index d80bd5ad7e01..42bc09fd7b38 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersAddLanguageExtensionsSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersAddLanguageExtensionsSamples.java @@ -12,7 +12,7 @@ /** Samples for Clusters AddLanguageExtensions. */ public final class ClustersAddLanguageExtensionsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterAddLanguageExtensions.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterAddLanguageExtensions.json */ /** * Sample code: KustoClusterAddLanguageExtensions. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersCheckNameAvailabilitySamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersCheckNameAvailabilitySamples.java index a9915fbb8a6f..09cfa7025acd 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersCheckNameAvailabilitySamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersCheckNameAvailabilitySamples.java @@ -9,7 +9,7 @@ /** Samples for Clusters CheckNameAvailability. */ public final class ClustersCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersCheckNameAvailability.json */ /** * Sample code: KustoClustersCheckNameAvailability. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersCreateOrUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersCreateOrUpdateSamples.java index 387e853354af..20bb49fa4bd0 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersCreateOrUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersCreateOrUpdateSamples.java @@ -20,7 +20,7 @@ /** Samples for Clusters CreateOrUpdate. */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersCreateOrUpdate.json */ /** * Sample code: KustoClustersCreateOrUpdate. @@ -45,7 +45,9 @@ public static void kustoClustersCreateOrUpdate(com.azure.resourcemanager.kusto.K .asList( new LanguageExtensionInner() .withLanguageExtensionName(LanguageExtensionName.PYTHON) - .withLanguageExtensionImageName(LanguageExtensionImageName.PYTHON3_10_8), + .withLanguageExtensionImageName( + LanguageExtensionImageName.fromString("Python_Custom_Image")) + .withLanguageExtensionCustomImageName("customImage8"), new LanguageExtensionInner() .withLanguageExtensionName(LanguageExtensionName.R) .withLanguageExtensionImageName(LanguageExtensionImageName.R)))) diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersDeleteSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersDeleteSamples.java index 41f0fda67298..c93b1daeccda 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersDeleteSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Clusters Delete. */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersDelete.json */ /** * Sample code: KustoClustersDelete. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersDetachFollowerDatabasesSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersDetachFollowerDatabasesSamples.java index 90bcaeb88d2d..a802b3834d67 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersDetachFollowerDatabasesSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersDetachFollowerDatabasesSamples.java @@ -9,7 +9,7 @@ /** Samples for Clusters DetachFollowerDatabases. */ public final class ClustersDetachFollowerDatabasesSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterDetachFollowerDatabases.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterDetachFollowerDatabases.json */ /** * Sample code: KustoClusterDetachFollowerDatabases. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersDiagnoseVirtualNetworkSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersDiagnoseVirtualNetworkSamples.java index c4238a6451aa..b7b94f98288d 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersDiagnoseVirtualNetworkSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersDiagnoseVirtualNetworkSamples.java @@ -7,7 +7,7 @@ /** Samples for Clusters DiagnoseVirtualNetwork. */ public final class ClustersDiagnoseVirtualNetworkSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersDiagnoseVirtualNetwork.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersDiagnoseVirtualNetwork.json */ /** * Sample code: KustoClusterDiagnoseVirtualNetwork. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersGetByResourceGroupSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersGetByResourceGroupSamples.java index 9f863517be7f..e2b206b69fd0 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersGetByResourceGroupSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Clusters GetByResourceGroup. */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersGet.json */ /** * Sample code: KustoClustersGet. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListByResourceGroupSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListByResourceGroupSamples.java index 7c1debe3986d..270220b41fd8 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListByResourceGroupSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Clusters ListByResourceGroup. */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersListByResourceGroup.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersListByResourceGroup.json */ /** * Sample code: KustoClustersListByResourceGroup. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListFollowerDatabasesSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListFollowerDatabasesSamples.java index ab94d9df7bad..6c39f0a0e28e 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListFollowerDatabasesSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListFollowerDatabasesSamples.java @@ -7,7 +7,7 @@ /** Samples for Clusters ListFollowerDatabases. */ public final class ClustersListFollowerDatabasesSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterListFollowerDatabases.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterListFollowerDatabases.json */ /** * Sample code: KustoClusterListFollowerDatabases. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListLanguageExtensionsSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListLanguageExtensionsSamples.java index fe2ba902ed9a..e32569de2d23 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListLanguageExtensionsSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListLanguageExtensionsSamples.java @@ -7,7 +7,7 @@ /** Samples for Clusters ListLanguageExtensions. */ public final class ClustersListLanguageExtensionsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterListLanguageExtensions.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterListLanguageExtensions.json */ /** * Sample code: KustoClusterListLanguageExtensions. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListOutboundNetworkDependenciesEndpointsSamples.java index 7fe02ed53d9f..ff18cc4bd014 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListOutboundNetworkDependenciesEndpointsSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListOutboundNetworkDependenciesEndpointsSamples.java @@ -7,7 +7,7 @@ /** Samples for Clusters ListOutboundNetworkDependenciesEndpoints. */ public final class ClustersListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOutboundNetworkDependenciesList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoOutboundNetworkDependenciesList.json */ /** * Sample code: Get Kusto cluster outbound network dependencies. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListSamples.java index 35cc201becb6..1ff5d6ae3549 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListSamples.java @@ -7,7 +7,7 @@ /** Samples for Clusters List. */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersList.json */ /** * Sample code: KustoClustersList. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusByResourceSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusByResourceSamples.java index 1d6291a9fb30..64b35f897cca 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusByResourceSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusByResourceSamples.java @@ -7,7 +7,7 @@ /** Samples for Clusters ListSkusByResource. */ public final class ClustersListSkusByResourceSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersListResourceSkus.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersListResourceSkus.json */ /** * Sample code: KustoClustersListResourceSkus. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusSamples.java index 5e2366344387..f5ea79ce23f5 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusSamples.java @@ -7,7 +7,7 @@ /** Samples for Clusters ListSkus. */ public final class ClustersListSkusSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersListSkus.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersListSkus.json */ /** * Sample code: KustoClustersListSkus. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersMigrateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersMigrateSamples.java index cfb0fd9be0c1..63b2283b466b 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersMigrateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersMigrateSamples.java @@ -9,7 +9,7 @@ /** Samples for Clusters Migrate. */ public final class ClustersMigrateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterMigrate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterMigrate.json */ /** * Sample code: KustoClusterMigrate. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersRemoveLanguageExtensionsSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersRemoveLanguageExtensionsSamples.java index 0ea865ac0fb5..e03bcdec0d2b 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersRemoveLanguageExtensionsSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersRemoveLanguageExtensionsSamples.java @@ -12,7 +12,7 @@ /** Samples for Clusters RemoveLanguageExtensions. */ public final class ClustersRemoveLanguageExtensionsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClusterRemoveLanguageExtensions.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClusterRemoveLanguageExtensions.json */ /** * Sample code: KustoClusterRemoveLanguageExtensions. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersStartSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersStartSamples.java index 376a5cf81407..cb93ac867040 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersStartSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersStartSamples.java @@ -7,7 +7,7 @@ /** Samples for Clusters Start. */ public final class ClustersStartSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersStart.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersStart.json */ /** * Sample code: KustoClustersStart. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersStopSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersStopSamples.java index cf00d0236b20..117fc569a083 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersStopSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersStopSamples.java @@ -7,7 +7,7 @@ /** Samples for Clusters Stop. */ public final class ClustersStopSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersStop.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersStop.json */ /** * Sample code: KustoClustersStop. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersUpdateSamples.java index a6a406cc2714..badabc975470 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ClustersUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Clusters Update. */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoClustersUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoClustersUpdate.json */ /** * Sample code: KustoClustersUpdate. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCheckNameAvailabilitySamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCheckNameAvailabilitySamples.java index 25d479b4949a..6d73ae3b849e 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCheckNameAvailabilitySamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCheckNameAvailabilitySamples.java @@ -9,7 +9,7 @@ /** Samples for DataConnections CheckNameAvailability. */ public final class DataConnectionsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCheckNameAvailability.json */ /** * Sample code: KustoDataConnectionsCheckNameAvailability. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCreateOrUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCreateOrUpdateSamples.java index 60a8f47f2236..190c0eaa98bd 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCreateOrUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ /** Samples for DataConnections CreateOrUpdate. */ public final class DataConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsEventGridCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsEventGridCreateOrUpdate.json */ /** * Sample code: KustoDataConnectionsEventGridCreateOrUpdate. @@ -52,7 +52,7 @@ public static void kustoDataConnectionsEventGridCreateOrUpdate( } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCosmosDbCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCosmosDbCreateOrUpdate.json */ /** * Sample code: KustoDataConnectionsCosmosDbCreateOrUpdate. @@ -83,7 +83,7 @@ public static void kustoDataConnectionsCosmosDbCreateOrUpdate( } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCreateOrUpdate.json */ /** * Sample code: KustoDataConnectionsCreateOrUpdate. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDataConnectionValidationSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDataConnectionValidationSamples.java index 732b5f4b22f2..3f00092b1683 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDataConnectionValidationSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDataConnectionValidationSamples.java @@ -16,7 +16,7 @@ /** Samples for DataConnections DataConnectionValidation. */ public final class DataConnectionsDataConnectionValidationSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionValidationAsync.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionValidationAsync.json */ /** * Sample code: KustoDataConnectionValidation. @@ -47,7 +47,7 @@ public static void kustoDataConnectionValidation(com.azure.resourcemanager.kusto } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionEventGridValidationAsync.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionEventGridValidationAsync.json */ /** * Sample code: KustoDataConnectionEventGridValidation. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDeleteSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDeleteSamples.java index 4f2b00d61dd8..927c8da6f539 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDeleteSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for DataConnections Delete. */ public final class DataConnectionsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsDelete.json */ /** * Sample code: KustoDataConnectionsDelete. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsGetSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsGetSamples.java index 562fa655c305..3d9ad52ae0d8 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsGetSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for DataConnections Get. */ public final class DataConnectionsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsEventGridGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsEventGridGet.json */ /** * Sample code: KustoDataConnectionsEventGridGet. @@ -26,7 +26,7 @@ public static void kustoDataConnectionsEventGridGet(com.azure.resourcemanager.ku } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCosmosDbGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCosmosDbGet.json */ /** * Sample code: KustoDataConnectionsCosmosDbGet. @@ -45,7 +45,7 @@ public static void kustoDataConnectionsCosmosDbGet(com.azure.resourcemanager.kus } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsGet.json */ /** * Sample code: KustoDataConnectionsGet. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsListByDatabaseSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsListByDatabaseSamples.java index b163d25400ec..a14f43402a4f 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsListByDatabaseSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsListByDatabaseSamples.java @@ -7,7 +7,7 @@ /** Samples for DataConnections ListByDatabase. */ public final class DataConnectionsListByDatabaseSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsListByDatabase.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsListByDatabase.json */ /** * Sample code: KustoDatabasesListByCluster. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsUpdateSamples.java index 4824a5d5d448..64958af6369d 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DataConnectionsUpdateSamples.java @@ -15,7 +15,7 @@ /** Samples for DataConnections Update. */ public final class DataConnectionsUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsCosmosDbUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsCosmosDbUpdate.json */ /** * Sample code: KustoDataConnectionsCosmosDbUpdate. @@ -45,7 +45,7 @@ public static void kustoDataConnectionsCosmosDbUpdate(com.azure.resourcemanager. } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsUpdate.json */ /** * Sample code: KustoDataConnectionsUpdate. @@ -71,7 +71,7 @@ public static void kustoDataConnectionsUpdate(com.azure.resourcemanager.kusto.Ku } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDataConnectionsEventGridUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDataConnectionsEventGridUpdate.json */ /** * Sample code: KustoDataConnectionsEventGridUpdate. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabaseOperationInviteFollowerSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabaseOperationInviteFollowerSamples.java index 176e4dda6a0c..2476234b0b1b 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabaseOperationInviteFollowerSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabaseOperationInviteFollowerSamples.java @@ -11,7 +11,7 @@ /** Samples for DatabaseOperation InviteFollower. */ public final class DatabaseOperationInviteFollowerSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseInviteFollower.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseInviteFollower.json */ /** * Sample code: KustoDatabaseInviteFollower. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCheckNameAvailabilitySamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCheckNameAvailabilitySamples.java index 4f95f1296de1..dca1ea8ed46d 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCheckNameAvailabilitySamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCheckNameAvailabilitySamples.java @@ -9,7 +9,7 @@ /** Samples for DatabasePrincipalAssignments CheckNameAvailability. */ public final class DatabasePrincipalAssignmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsCheckNameAvailability.json */ /** * Sample code: KustoDatabaseCheckNameAvailability. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCreateOrUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCreateOrUpdateSamples.java index d005fcbf8f69..c097f708e6a2 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCreateOrUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for DatabasePrincipalAssignments CreateOrUpdate. */ public final class DatabasePrincipalAssignmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsCreateOrUpdate.json */ /** * Sample code: KustoDatabasePrincipalAssignmentsCreateOrUpdate. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsDeleteSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsDeleteSamples.java index 01d0b56d41fe..1cbbbc8d673b 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsDeleteSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for DatabasePrincipalAssignments Delete. */ public final class DatabasePrincipalAssignmentsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsDelete.json */ /** * Sample code: KustoDatabasePrincipalAssignmentsDelete. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsGetSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsGetSamples.java index 6829d30e99d6..c1bb799fdb86 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsGetSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for DatabasePrincipalAssignments Get. */ public final class DatabasePrincipalAssignmentsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsGet.json */ /** * Sample code: KustoDatabasePrincipalAssignmentsGet. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsListSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsListSamples.java index 3b59a39e284f..237dd02f1cf3 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsListSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsListSamples.java @@ -7,7 +7,7 @@ /** Samples for DatabasePrincipalAssignments List. */ public final class DatabasePrincipalAssignmentsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasePrincipalAssignmentsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasePrincipalAssignmentsList.json */ /** * Sample code: KustoPrincipalAssignmentsList. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesAddPrincipalsSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesAddPrincipalsSamples.java index b5035252d65e..a26ae560a58b 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesAddPrincipalsSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesAddPrincipalsSamples.java @@ -13,7 +13,7 @@ /** Samples for Databases AddPrincipals. */ public final class DatabasesAddPrincipalsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseAddPrincipals.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseAddPrincipals.json */ /** * Sample code: KustoDatabaseAddPrincipals. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesCheckNameAvailabilitySamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesCheckNameAvailabilitySamples.java index 714396926aa4..a2a480e6b65f 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesCheckNameAvailabilitySamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesCheckNameAvailabilitySamples.java @@ -10,7 +10,7 @@ /** Samples for Databases CheckNameAvailability. */ public final class DatabasesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesCheckNameAvailability.json */ /** * Sample code: KustoDatabasesCheckNameAvailability. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesCreateOrUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesCreateOrUpdateSamples.java index a749798b6196..d188932dcec1 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesCreateOrUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for Databases CreateOrUpdate. */ public final class DatabasesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseReadonlyUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseReadonlyUpdate.json */ /** * Sample code: Kusto ReadOnly database update. @@ -32,7 +32,7 @@ public static void kustoReadOnlyDatabaseUpdate(com.azure.resourcemanager.kusto.K } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesCreateOrUpdate.json */ /** * Sample code: Kusto ReadWrite database create or update. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesDeleteSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesDeleteSamples.java index c5110dfaabc8..4329a78e6990 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesDeleteSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Databases Delete. */ public final class DatabasesDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesDelete.json */ /** * Sample code: KustoDatabasesDelete. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesGetSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesGetSamples.java index 501118688447..bdd42974175d 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesGetSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Databases Get. */ public final class DatabasesGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoSuspendedDatabasesGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSuspendedDatabasesGet.json */ /** * Sample code: KustoSuspendedDatabasesGet. @@ -21,7 +21,7 @@ public static void kustoSuspendedDatabasesGet(com.azure.resourcemanager.kusto.Ku } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesGet.json */ /** * Sample code: KustoDatabasesGet. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesListByClusterSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesListByClusterSamples.java index 424c2cbd7ae8..d14337a1ec46 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesListByClusterSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesListByClusterSamples.java @@ -7,7 +7,7 @@ /** Samples for Databases ListByCluster. */ public final class DatabasesListByClusterSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesListByCluster.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesListByCluster.json */ /** * Sample code: KustoDatabasesListByCluster. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesListPrincipalsSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesListPrincipalsSamples.java index da9e6c394a51..e9441cbc99a2 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesListPrincipalsSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesListPrincipalsSamples.java @@ -7,7 +7,7 @@ /** Samples for Databases ListPrincipals. */ public final class DatabasesListPrincipalsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseListPrincipals.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseListPrincipals.json */ /** * Sample code: KustoDatabaseListPrincipals. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesRemovePrincipalsSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesRemovePrincipalsSamples.java index 541255cf06a2..cb27d688bbfa 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesRemovePrincipalsSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesRemovePrincipalsSamples.java @@ -13,7 +13,7 @@ /** Samples for Databases RemovePrincipals. */ public final class DatabasesRemovePrincipalsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabaseRemovePrincipals.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabaseRemovePrincipals.json */ /** * Sample code: KustoDatabaseRemovePrincipals. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesUpdateSamples.java index 5f9ae965a54e..e7c47f16ef64 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/DatabasesUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for Databases Update. */ public final class DatabasesUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoDatabasesUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoDatabasesUpdate.json */ /** * Sample code: KustoDatabasesUpdate. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCheckNameAvailabilitySamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCheckNameAvailabilitySamples.java index a57ed1042268..6429efecc29c 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCheckNameAvailabilitySamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCheckNameAvailabilitySamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedPrivateEndpoints CheckNameAvailability. */ public final class ManagedPrivateEndpointsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsCheckNameAvailability.json */ /** * Sample code: KustoManagedPrivateEndpointsCheckNameAvailability. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCreateOrUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCreateOrUpdateSamples.java index 40775e83ddcf..b071367b68be 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCreateOrUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedPrivateEndpoints CreateOrUpdate. */ public final class ManagedPrivateEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsCreateOrUpdate.json */ /** * Sample code: KustoManagedPrivateEndpointsCreateOrUpdate. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsDeleteSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsDeleteSamples.java index 6562aa6807f6..dd84f7ec65b7 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsDeleteSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedPrivateEndpoints Delete. */ public final class ManagedPrivateEndpointsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsDelete.json */ /** * Sample code: ManagedPrivateEndpointsDelete. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsGetSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsGetSamples.java index 6995320ef027..19b495babe22 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsGetSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedPrivateEndpoints Get. */ public final class ManagedPrivateEndpointsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsGet.json */ /** * Sample code: KustoManagedPrivateEndpointsGet. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsListSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsListSamples.java index ad359fae6ed0..52c0955d91e8 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsListSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsListSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedPrivateEndpoints List. */ public final class ManagedPrivateEndpointsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsList.json */ /** * Sample code: KustoManagedPrivateEndpointsList. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsUpdateSamples.java index 0edc7ef6e179..3364f35a4955 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedPrivateEndpoints Update. */ public final class ManagedPrivateEndpointsUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoManagedPrivateEndpointsUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoManagedPrivateEndpointsUpdate.json */ /** * Sample code: KustoManagedPrivateEndpointsUpdate. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/OperationsListSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/OperationsListSamples.java index 818571ad7b4f..dfd48c3bac3f 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/OperationsListSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/OperationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOperationsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoOperationsList.json */ /** * Sample code: KustoOperationsList. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/OperationsResultsGetSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/OperationsResultsGetSamples.java index 9c7d7371cb9a..f2dfb072c987 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/OperationsResultsGetSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/OperationsResultsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for OperationsResults Get. */ public final class OperationsResultsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOperationResultsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoOperationResultsGet.json */ /** * Sample code: KustoOperationResultsGet. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/OperationsResultsLocationGetSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/OperationsResultsLocationGetSamples.java index dc03d1be61d9..daf77cf46705 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/OperationsResultsLocationGetSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/OperationsResultsLocationGetSamples.java @@ -7,7 +7,7 @@ /** Samples for OperationsResultsLocation Get. */ public final class OperationsResultsLocationGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoOperationResultsOperationResultResponseTypeGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoOperationResultsOperationResultResponseTypeGet.json */ /** * Sample code: KustoOperationsResultsLocationGet. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index 0ad90a054553..f5fce398e431 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateEndpointConnectionsCreateOrUpdate.json */ /** * Sample code: Approve or reject a private endpoint connection with a given name. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsDeleteSamples.java index c294eabf69ca..5b403715aab0 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateEndpointConnectionsDelete.json */ /** * Sample code: Deletes a private endpoint connection with a given name. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsGetSamples.java index d6fe18b6ca4b..1b7db8ecbaa5 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateEndpointConnectionsGet.json */ /** * Sample code: Gets private endpoint connection. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsListSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsListSamples.java index 148cee1cf0e0..51a3209fd1bc 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsListSamples.java @@ -7,7 +7,7 @@ /** Samples for PrivateEndpointConnections List. */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateEndpointConnectionsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateEndpointConnectionsList.json */ /** * Sample code: KustoPrivateEndpointConnectionsList. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesGetSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesGetSamples.java index 8de0e5771c09..2b8e92299a67 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for PrivateLinkResources Get. */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateLinkResourcesGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateLinkResourcesGet.json */ /** * Sample code: Gets private endpoint connection. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesListSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesListSamples.java index 831ec32e8c4c..265ef281e1f3 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesListSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesListSamples.java @@ -7,7 +7,7 @@ /** Samples for PrivateLinkResources List. */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoPrivateLinkResourcesList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoPrivateLinkResourcesList.json */ /** * Sample code: Gets private endpoint connections. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesCheckNameAvailabilitySamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesCheckNameAvailabilitySamples.java new file mode 100644 index 000000000000..ca3ca513ae59 --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesCheckNameAvailabilitySamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.generated; + +import com.azure.resourcemanager.kusto.models.SandboxCustomImagesCheckNameRequest; + +/** Samples for SandboxCustomImages CheckNameAvailability. */ +public final class SandboxCustomImagesCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImagesCheckNameAvailability.json + */ + /** + * Sample code: KustoSandboxCustomImagesCheckNameAvailability. + * + * @param manager Entry point to KustoManager. + */ + public static void kustoSandboxCustomImagesCheckNameAvailability( + com.azure.resourcemanager.kusto.KustoManager manager) { + manager + .sandboxCustomImages() + .checkNameAvailabilityWithResponse( + "kustorptest", + "kustoCluster", + new SandboxCustomImagesCheckNameRequest().withName("sandboxCustomImage1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesCreateOrUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..5cab5970dd87 --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesCreateOrUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.generated; + +import com.azure.resourcemanager.kusto.models.Language; + +/** Samples for SandboxCustomImages CreateOrUpdate. */ +public final class SandboxCustomImagesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImagesCreateOrUpdate.json + */ + /** + * Sample code: KustoSandboxCustomImagesCreateOrUpdate. + * + * @param manager Entry point to KustoManager. + */ + public static void kustoSandboxCustomImagesCreateOrUpdate(com.azure.resourcemanager.kusto.KustoManager manager) { + manager + .sandboxCustomImages() + .define("customImage8") + .withExistingCluster("kustorptest", "kustoCluster") + .withLanguage(Language.PYTHON) + .withLanguageVersion("3.10.8") + .withRequirementsFileContent("Requests") + .create(); + } +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesDeleteSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesDeleteSamples.java new file mode 100644 index 000000000000..590cbf384a78 --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.generated; + +/** Samples for SandboxCustomImages Delete. */ +public final class SandboxCustomImagesDeleteSamples { + /* + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImageDelete.json + */ + /** + * Sample code: SandboxCustomImagesDelete. + * + * @param manager Entry point to KustoManager. + */ + public static void sandboxCustomImagesDelete(com.azure.resourcemanager.kusto.KustoManager manager) { + manager + .sandboxCustomImages() + .delete("kustorptest", "kustoCluster", "customImage8", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesGetSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesGetSamples.java new file mode 100644 index 000000000000..39d04da289d3 --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.generated; + +/** Samples for SandboxCustomImages Get. */ +public final class SandboxCustomImagesGetSamples { + /* + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImagesGet.json + */ + /** + * Sample code: KustoSandboxCustomImagesGet. + * + * @param manager Entry point to KustoManager. + */ + public static void kustoSandboxCustomImagesGet(com.azure.resourcemanager.kusto.KustoManager manager) { + manager + .sandboxCustomImages() + .getWithResponse("kustorptest", "kustoCluster", "customImage8", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesListByClusterSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesListByClusterSamples.java new file mode 100644 index 000000000000..ed902a0093f7 --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesListByClusterSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.generated; + +/** Samples for SandboxCustomImages ListByCluster. */ +public final class SandboxCustomImagesListByClusterSamples { + /* + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImagesList.json + */ + /** + * Sample code: KustoSandboxCustomImagesListByCluster. + * + * @param manager Entry point to KustoManager. + */ + public static void kustoSandboxCustomImagesListByCluster(com.azure.resourcemanager.kusto.KustoManager manager) { + manager.sandboxCustomImages().listByCluster("kustorptest", "kustoCluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesUpdateSamples.java new file mode 100644 index 000000000000..a868fce95882 --- /dev/null +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SandboxCustomImagesUpdateSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kusto.generated; + +import com.azure.resourcemanager.kusto.models.Language; +import com.azure.resourcemanager.kusto.models.SandboxCustomImage; + +/** Samples for SandboxCustomImages Update. */ +public final class SandboxCustomImagesUpdateSamples { + /* + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSandboxCustomImageUpdate.json + */ + /** + * Sample code: KustoSandboxCustomImagesUpdate. + * + * @param manager Entry point to KustoManager. + */ + public static void kustoSandboxCustomImagesUpdate(com.azure.resourcemanager.kusto.KustoManager manager) { + SandboxCustomImage resource = + manager + .sandboxCustomImages() + .getWithResponse("kustorptest", "kustoCluster", "customImage8", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withLanguage(Language.PYTHON) + .withLanguageVersion("3.10.8") + .withRequirementsFileContent("Requests") + .apply(); + } +} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsCheckNameAvailabilitySamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsCheckNameAvailabilitySamples.java index e0c435f7fa7b..08a8523b978d 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsCheckNameAvailabilitySamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsCheckNameAvailabilitySamples.java @@ -9,7 +9,7 @@ /** Samples for Scripts CheckNameAvailability. */ public final class ScriptsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsCheckNameAvailability.json */ /** * Sample code: KustoScriptsCheckNameAvailability. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsCreateOrUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsCreateOrUpdateSamples.java index 02e9cc4165d4..1debe4234e2a 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsCreateOrUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for Scripts CreateOrUpdate. */ public final class ScriptsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsCreateOrUpdate.json */ /** * Sample code: KustoScriptsCreateOrUpdate. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsDeleteSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsDeleteSamples.java index acf3d66a04d9..03ac290a9e26 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsDeleteSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Scripts Delete. */ public final class ScriptsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsDelete.json */ /** * Sample code: KustoScriptsDelete. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsGetSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsGetSamples.java index e53c4072752d..d6c8e3bebb6e 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsGetSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Scripts Get. */ public final class ScriptsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsGet.json */ /** * Sample code: KustoScriptsGet. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsListByDatabaseSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsListByDatabaseSamples.java index 86ec033fc301..2a4bbe1f73cd 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsListByDatabaseSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsListByDatabaseSamples.java @@ -7,7 +7,7 @@ /** Samples for Scripts ListByDatabase. */ public final class ScriptsListByDatabaseSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsListByDatabase.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsListByDatabase.json */ /** * Sample code: KustoScriptsList. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsUpdateSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsUpdateSamples.java index b82e0eef65c8..9c7a5e10ab4c 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsUpdateSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/ScriptsUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Scripts Update. */ public final class ScriptsUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoScriptsUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoScriptsUpdate.json */ /** * Sample code: KustoScriptsUpdate. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SkusListSamples.java b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SkusListSamples.java index f3f57a613ad6..7d883fdd9029 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SkusListSamples.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/samples/java/com/azure/resourcemanager/kusto/generated/SkusListSamples.java @@ -7,7 +7,7 @@ /** Samples for Skus List. */ public final class SkusListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-05-02/examples/KustoSkus.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/examples/KustoSkus.json */ /** * Sample code: KustoListRegionSkus. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AcceptedAudiencesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AcceptedAudiencesTests.java deleted file mode 100644 index 3b0d9ddaab40..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AcceptedAudiencesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.AcceptedAudiences; -import org.junit.jupiter.api.Assertions; - -public final class AcceptedAudiencesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AcceptedAudiences model = BinaryData.fromString("{\"value\":\"gvfcj\"}").toObject(AcceptedAudiences.class); - Assertions.assertEquals("gvfcj", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AcceptedAudiences model = new AcceptedAudiences().withValue("gvfcj"); - model = BinaryData.fromObject(model).toObject(AcceptedAudiences.class); - Assertions.assertEquals("gvfcj", model.value()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationInnerTests.java deleted file mode 100644 index 84d95ea9bab8..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationInnerTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.AttachedDatabaseConfigurationInner; -import com.azure.resourcemanager.kusto.models.DefaultPrincipalsModificationKind; -import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AttachedDatabaseConfigurationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AttachedDatabaseConfigurationInner model = - BinaryData - .fromString( - "{\"location\":\"tkzwpcnpwzc\",\"properties\":{\"provisioningState\":\"Canceled\",\"databaseName\":\"gvvs\",\"clusterResourceId\":\"cyajguqf\",\"attachedDatabaseNames\":[\"gzlvdnkfxu\"],\"defaultPrincipalsModificationKind\":\"Union\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"zrmuhapfcqdps\",\"xqv\"],\"tablesToExclude\":[\"uoymgccelvezry\"],\"externalTablesToInclude\":[\"mfe\",\"kerqwkyh\",\"ob\"],\"externalTablesToExclude\":[\"xedk\",\"wep\"],\"materializedViewsToInclude\":[\"cr\"],\"materializedViewsToExclude\":[\"wccsnjvcdwxlpqek\",\"tn\",\"htjsying\",\"fq\"],\"functionsToInclude\":[\"tdhtmdvyp\"],\"functionsToExclude\":[\"dgszywkbirryuzh\",\"hkjoqr\",\"qqaatjinrvgou\"]},\"databaseNameOverride\":\"fiibfggjioolvr\",\"databaseNamePrefix\":\"kvtkkg\"},\"id\":\"lqwjygvjayvblm\",\"name\":\"vkzuhbxvvyhgso\",\"type\":\"byrqufeg\"}") - .toObject(AttachedDatabaseConfigurationInner.class); - Assertions.assertEquals("tkzwpcnpwzc", model.location()); - Assertions.assertEquals("gvvs", model.databaseName()); - Assertions.assertEquals("cyajguqf", model.clusterResourceId()); - Assertions.assertEquals(DefaultPrincipalsModificationKind.UNION, model.defaultPrincipalsModificationKind()); - Assertions.assertEquals("zrmuhapfcqdps", model.tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions.assertEquals("uoymgccelvezry", model.tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions.assertEquals("mfe", model.tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions.assertEquals("xedk", model.tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions.assertEquals("cr", model.tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions - .assertEquals("wccsnjvcdwxlpqek", model.tableLevelSharingProperties().materializedViewsToExclude().get(0)); - Assertions.assertEquals("tdhtmdvyp", model.tableLevelSharingProperties().functionsToInclude().get(0)); - Assertions.assertEquals("dgszywkbirryuzh", model.tableLevelSharingProperties().functionsToExclude().get(0)); - Assertions.assertEquals("fiibfggjioolvr", model.databaseNameOverride()); - Assertions.assertEquals("kvtkkg", model.databaseNamePrefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AttachedDatabaseConfigurationInner model = - new AttachedDatabaseConfigurationInner() - .withLocation("tkzwpcnpwzc") - .withDatabaseName("gvvs") - .withClusterResourceId("cyajguqf") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.UNION) - .withTableLevelSharingProperties( - new TableLevelSharingProperties() - .withTablesToInclude(Arrays.asList("zrmuhapfcqdps", "xqv")) - .withTablesToExclude(Arrays.asList("uoymgccelvezry")) - .withExternalTablesToInclude(Arrays.asList("mfe", "kerqwkyh", "ob")) - .withExternalTablesToExclude(Arrays.asList("xedk", "wep")) - .withMaterializedViewsToInclude(Arrays.asList("cr")) - .withMaterializedViewsToExclude(Arrays.asList("wccsnjvcdwxlpqek", "tn", "htjsying", "fq")) - .withFunctionsToInclude(Arrays.asList("tdhtmdvyp")) - .withFunctionsToExclude(Arrays.asList("dgszywkbirryuzh", "hkjoqr", "qqaatjinrvgou"))) - .withDatabaseNameOverride("fiibfggjioolvr") - .withDatabaseNamePrefix("kvtkkg"); - model = BinaryData.fromObject(model).toObject(AttachedDatabaseConfigurationInner.class); - Assertions.assertEquals("tkzwpcnpwzc", model.location()); - Assertions.assertEquals("gvvs", model.databaseName()); - Assertions.assertEquals("cyajguqf", model.clusterResourceId()); - Assertions.assertEquals(DefaultPrincipalsModificationKind.UNION, model.defaultPrincipalsModificationKind()); - Assertions.assertEquals("zrmuhapfcqdps", model.tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions.assertEquals("uoymgccelvezry", model.tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions.assertEquals("mfe", model.tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions.assertEquals("xedk", model.tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions.assertEquals("cr", model.tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions - .assertEquals("wccsnjvcdwxlpqek", model.tableLevelSharingProperties().materializedViewsToExclude().get(0)); - Assertions.assertEquals("tdhtmdvyp", model.tableLevelSharingProperties().functionsToInclude().get(0)); - Assertions.assertEquals("dgszywkbirryuzh", model.tableLevelSharingProperties().functionsToExclude().get(0)); - Assertions.assertEquals("fiibfggjioolvr", model.databaseNameOverride()); - Assertions.assertEquals("kvtkkg", model.databaseNamePrefix()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationListResultTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationListResultTests.java deleted file mode 100644 index 1981a5c16010..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationListResultTests.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.AttachedDatabaseConfigurationInner; -import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfigurationListResult; -import com.azure.resourcemanager.kusto.models.DefaultPrincipalsModificationKind; -import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AttachedDatabaseConfigurationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AttachedDatabaseConfigurationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"uukzclewyhmlw\",\"properties\":{\"provisioningState\":\"Running\",\"databaseName\":\"zpof\",\"clusterResourceId\":\"cckwyfzqwhxxbu\",\"attachedDatabaseNames\":[\"xzfe\"],\"defaultPrincipalsModificationKind\":\"Replace\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"riolxorjalt\",\"lmncw\"],\"tablesToExclude\":[\"qwcsdbnwdcfhuc\",\"dpfuvg\",\"sbjjc\"],\"externalTablesToInclude\":[\"xbvtvudu\"],\"externalTablesToExclude\":[\"ormrlxqtvcofudfl\",\"kgjubgdknnqvsazn\"],\"materializedViewsToInclude\":[\"orudsgsa\"],\"materializedViewsToExclude\":[\"yc\",\"rauwjuetaebu\",\"u\"],\"functionsToInclude\":[\"ovsm\",\"l\",\"wabm\",\"oefki\"],\"functionsToExclude\":[\"tpuqujmq\",\"gkfbtndoaong\",\"jcntuj\"]},\"databaseNameOverride\":\"c\",\"databaseNamePrefix\":\"df\"},\"id\":\"wwa\",\"name\":\"zkoj\",\"type\":\"dcpzfoqo\"},{\"location\":\"cybxa\",\"properties\":{\"provisioningState\":\"Canceled\",\"databaseName\":\"zuf\",\"clusterResourceId\":\"x\",\"attachedDatabaseNames\":[\"opidoamciodh\"],\"defaultPrincipalsModificationKind\":\"Union\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"khnzbonlw\",\"toego\",\"dwbwhkszzcmrvexz\",\"vbtqgsfraoyzk\"],\"tablesToExclude\":[\"tlmngu\"],\"externalTablesToInclude\":[\"q\",\"ldsyuuximerqfob\"],\"externalTablesToExclude\":[\"nkbykutwpfhp\",\"gmhrskdsnfdsdoak\",\"tdlmkkzevd\",\"hewpusdsttwv\"],\"materializedViewsToInclude\":[\"bbejdcngqqm\",\"akufgmjz\",\"wr\"],\"materializedViewsToExclude\":[\"twaenuuzko\",\"bminrfdwoyuhhzi\",\"iefozbhdmsml\"],\"functionsToInclude\":[\"hoftr\",\"ae\",\"u\",\"ah\"],\"functionsToExclude\":[\"slfaoqzpiyyl\",\"alnswhccsphk\",\"ivwitqscywugg\",\"oluhczbwemh\"]},\"databaseNameOverride\":\"rsbrgzdwm\",\"databaseNamePrefix\":\"eypqwdxggicccn\"},\"id\":\"qhuexm\",\"name\":\"ttlstvlzywemhz\",\"type\":\"ncsdtclusiyp\"},{\"location\":\"fgytguslfeadcyg\",\"properties\":{\"provisioningState\":\"Succeeded\",\"databaseName\":\"hejhzisx\",\"clusterResourceId\":\"fpel\",\"attachedDatabaseNames\":[\"pv\"],\"defaultPrincipalsModificationKind\":\"Union\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"vu\",\"zraehtwd\",\"r\",\"tswiby\"],\"tablesToExclude\":[\"l\"],\"externalTablesToInclude\":[\"hfwpracstwit\",\"khevxccedc\",\"nmdyodnwzxl\",\"jc\"],\"externalTablesToExclude\":[\"ltiugcxnavv\"],\"materializedViewsToInclude\":[\"ibyqunyowxwlmdj\"],\"materializedViewsToExclude\":[\"fgbvfvpdbo\",\"acizsjqlhkrr\",\"bdeibqipqk\",\"hvxndzwmkrefajpj\"],\"functionsToInclude\":[\"kqnyh\",\"b\"],\"functionsToExclude\":[\"jivfxzsjabib\",\"ystawfsdjpvkvp\",\"jxbkzbzkdvn\",\"jabudurgkakmo\"]},\"databaseNameOverride\":\"hjjklff\",\"databaseNamePrefix\":\"ouw\"},\"id\":\"lgzrfzeeyeb\",\"name\":\"zi\",\"type\":\"ayuhqlbjbsy\"},{\"location\":\"qwrvtldgmfp\",\"properties\":{\"provisioningState\":\"Succeeded\",\"databaseName\":\"ipaslthaqfxssmwu\",\"clusterResourceId\":\"wbdsr\",\"attachedDatabaseNames\":[\"drhneuyow\",\"kdw\"],\"defaultPrincipalsModificationKind\":\"None\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"bi\"],\"tablesToExclude\":[\"pikpz\",\"mejzanlfzxia\",\"rmbzo\"],\"externalTablesToInclude\":[\"i\",\"rjqc\"],\"externalTablesToExclude\":[\"zpfrla\",\"szrnwo\"],\"materializedViewsToInclude\":[\"dfpwpjylwbtlhfls\",\"cdhszf\"],\"materializedViewsToExclude\":[\"bgofeljag\",\"qmqhldvriii\",\"jnalghf\",\"vtvsexsowueluq\"],\"functionsToInclude\":[\"hhxvrhmzkwpj\",\"wws\"],\"functionsToExclude\":[\"hftqsxhqxujxukn\",\"xdigrjg\",\"ufzdmsyq\",\"fi\"]},\"databaseNameOverride\":\"hbotzingamvppho\",\"databaseNamePrefix\":\"qzudphq\"},\"id\":\"mvdk\",\"name\":\"wynwcvtbvkayhm\",\"type\":\"nvyq\"}]}") - .toObject(AttachedDatabaseConfigurationListResult.class); - Assertions.assertEquals("uukzclewyhmlw", model.value().get(0).location()); - Assertions.assertEquals("zpof", model.value().get(0).databaseName()); - Assertions.assertEquals("cckwyfzqwhxxbu", model.value().get(0).clusterResourceId()); - Assertions - .assertEquals( - DefaultPrincipalsModificationKind.REPLACE, model.value().get(0).defaultPrincipalsModificationKind()); - Assertions - .assertEquals("riolxorjalt", model.value().get(0).tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions - .assertEquals( - "qwcsdbnwdcfhuc", model.value().get(0).tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions - .assertEquals( - "xbvtvudu", model.value().get(0).tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions - .assertEquals( - "ormrlxqtvcofudfl", - model.value().get(0).tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions - .assertEquals( - "orudsgsa", model.value().get(0).tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions - .assertEquals("yc", model.value().get(0).tableLevelSharingProperties().materializedViewsToExclude().get(0)); - Assertions.assertEquals("ovsm", model.value().get(0).tableLevelSharingProperties().functionsToInclude().get(0)); - Assertions - .assertEquals("tpuqujmq", model.value().get(0).tableLevelSharingProperties().functionsToExclude().get(0)); - Assertions.assertEquals("c", model.value().get(0).databaseNameOverride()); - Assertions.assertEquals("df", model.value().get(0).databaseNamePrefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AttachedDatabaseConfigurationListResult model = - new AttachedDatabaseConfigurationListResult() - .withValue( - Arrays - .asList( - new AttachedDatabaseConfigurationInner() - .withLocation("uukzclewyhmlw") - .withDatabaseName("zpof") - .withClusterResourceId("cckwyfzqwhxxbu") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.REPLACE) - .withTableLevelSharingProperties( - new TableLevelSharingProperties() - .withTablesToInclude(Arrays.asList("riolxorjalt", "lmncw")) - .withTablesToExclude(Arrays.asList("qwcsdbnwdcfhuc", "dpfuvg", "sbjjc")) - .withExternalTablesToInclude(Arrays.asList("xbvtvudu")) - .withExternalTablesToExclude( - Arrays.asList("ormrlxqtvcofudfl", "kgjubgdknnqvsazn")) - .withMaterializedViewsToInclude(Arrays.asList("orudsgsa")) - .withMaterializedViewsToExclude(Arrays.asList("yc", "rauwjuetaebu", "u")) - .withFunctionsToInclude(Arrays.asList("ovsm", "l", "wabm", "oefki")) - .withFunctionsToExclude(Arrays.asList("tpuqujmq", "gkfbtndoaong", "jcntuj"))) - .withDatabaseNameOverride("c") - .withDatabaseNamePrefix("df"), - new AttachedDatabaseConfigurationInner() - .withLocation("cybxa") - .withDatabaseName("zuf") - .withClusterResourceId("x") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.UNION) - .withTableLevelSharingProperties( - new TableLevelSharingProperties() - .withTablesToInclude( - Arrays.asList("khnzbonlw", "toego", "dwbwhkszzcmrvexz", "vbtqgsfraoyzk")) - .withTablesToExclude(Arrays.asList("tlmngu")) - .withExternalTablesToInclude(Arrays.asList("q", "ldsyuuximerqfob")) - .withExternalTablesToExclude( - Arrays - .asList( - "nkbykutwpfhp", "gmhrskdsnfdsdoak", "tdlmkkzevd", "hewpusdsttwv")) - .withMaterializedViewsToInclude(Arrays.asList("bbejdcngqqm", "akufgmjz", "wr")) - .withMaterializedViewsToExclude( - Arrays.asList("twaenuuzko", "bminrfdwoyuhhzi", "iefozbhdmsml")) - .withFunctionsToInclude(Arrays.asList("hoftr", "ae", "u", "ah")) - .withFunctionsToExclude( - Arrays - .asList( - "slfaoqzpiyyl", "alnswhccsphk", "ivwitqscywugg", "oluhczbwemh"))) - .withDatabaseNameOverride("rsbrgzdwm") - .withDatabaseNamePrefix("eypqwdxggicccn"), - new AttachedDatabaseConfigurationInner() - .withLocation("fgytguslfeadcyg") - .withDatabaseName("hejhzisx") - .withClusterResourceId("fpel") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.UNION) - .withTableLevelSharingProperties( - new TableLevelSharingProperties() - .withTablesToInclude(Arrays.asList("vu", "zraehtwd", "r", "tswiby")) - .withTablesToExclude(Arrays.asList("l")) - .withExternalTablesToInclude( - Arrays.asList("hfwpracstwit", "khevxccedc", "nmdyodnwzxl", "jc")) - .withExternalTablesToExclude(Arrays.asList("ltiugcxnavv")) - .withMaterializedViewsToInclude(Arrays.asList("ibyqunyowxwlmdj")) - .withMaterializedViewsToExclude( - Arrays - .asList("fgbvfvpdbo", "acizsjqlhkrr", "bdeibqipqk", "hvxndzwmkrefajpj")) - .withFunctionsToInclude(Arrays.asList("kqnyh", "b")) - .withFunctionsToExclude( - Arrays - .asList( - "jivfxzsjabib", "ystawfsdjpvkvp", "jxbkzbzkdvn", "jabudurgkakmo"))) - .withDatabaseNameOverride("hjjklff") - .withDatabaseNamePrefix("ouw"), - new AttachedDatabaseConfigurationInner() - .withLocation("qwrvtldgmfp") - .withDatabaseName("ipaslthaqfxssmwu") - .withClusterResourceId("wbdsr") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.NONE) - .withTableLevelSharingProperties( - new TableLevelSharingProperties() - .withTablesToInclude(Arrays.asList("bi")) - .withTablesToExclude(Arrays.asList("pikpz", "mejzanlfzxia", "rmbzo")) - .withExternalTablesToInclude(Arrays.asList("i", "rjqc")) - .withExternalTablesToExclude(Arrays.asList("zpfrla", "szrnwo")) - .withMaterializedViewsToInclude(Arrays.asList("dfpwpjylwbtlhfls", "cdhszf")) - .withMaterializedViewsToExclude( - Arrays.asList("bgofeljag", "qmqhldvriii", "jnalghf", "vtvsexsowueluq")) - .withFunctionsToInclude(Arrays.asList("hhxvrhmzkwpj", "wws")) - .withFunctionsToExclude( - Arrays.asList("hftqsxhqxujxukn", "xdigrjg", "ufzdmsyq", "fi"))) - .withDatabaseNameOverride("hbotzingamvppho") - .withDatabaseNamePrefix("qzudphq"))); - model = BinaryData.fromObject(model).toObject(AttachedDatabaseConfigurationListResult.class); - Assertions.assertEquals("uukzclewyhmlw", model.value().get(0).location()); - Assertions.assertEquals("zpof", model.value().get(0).databaseName()); - Assertions.assertEquals("cckwyfzqwhxxbu", model.value().get(0).clusterResourceId()); - Assertions - .assertEquals( - DefaultPrincipalsModificationKind.REPLACE, model.value().get(0).defaultPrincipalsModificationKind()); - Assertions - .assertEquals("riolxorjalt", model.value().get(0).tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions - .assertEquals( - "qwcsdbnwdcfhuc", model.value().get(0).tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions - .assertEquals( - "xbvtvudu", model.value().get(0).tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions - .assertEquals( - "ormrlxqtvcofudfl", - model.value().get(0).tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions - .assertEquals( - "orudsgsa", model.value().get(0).tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions - .assertEquals("yc", model.value().get(0).tableLevelSharingProperties().materializedViewsToExclude().get(0)); - Assertions.assertEquals("ovsm", model.value().get(0).tableLevelSharingProperties().functionsToInclude().get(0)); - Assertions - .assertEquals("tpuqujmq", model.value().get(0).tableLevelSharingProperties().functionsToExclude().get(0)); - Assertions.assertEquals("c", model.value().get(0).databaseNameOverride()); - Assertions.assertEquals("df", model.value().get(0).databaseNamePrefix()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationPropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationPropertiesTests.java deleted file mode 100644 index 720570023cd1..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationPropertiesTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.AttachedDatabaseConfigurationProperties; -import com.azure.resourcemanager.kusto.models.DefaultPrincipalsModificationKind; -import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AttachedDatabaseConfigurationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AttachedDatabaseConfigurationProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Moving\",\"databaseName\":\"wz\",\"clusterResourceId\":\"bnhlmc\",\"attachedDatabaseNames\":[\"dn\"],\"defaultPrincipalsModificationKind\":\"Replace\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"bmhrixkwmyijejv\",\"grhbpn\",\"ixexcc\"],\"tablesToExclude\":[\"eaxhcexdrrvqahqk\",\"htpwij\",\"hyjsvfycx\"],\"externalTablesToInclude\":[\"voowvr\",\"mtg\"],\"externalTablesToExclude\":[\"pyostronzmyhgfi\",\"nsxkmcwaekrrjr\",\"afxtsgum\",\"jglikkxwslolb\"],\"materializedViewsToInclude\":[\"uzlm\",\"felfktg\"],\"materializedViewsToExclude\":[\"rpw\"],\"functionsToInclude\":[\"znoigbrn\",\"w\"],\"functionsToExclude\":[\"pn\"]},\"databaseNameOverride\":\"azej\",\"databaseNamePrefix\":\"qkagfhsxt\"}") - .toObject(AttachedDatabaseConfigurationProperties.class); - Assertions.assertEquals("wz", model.databaseName()); - Assertions.assertEquals("bnhlmc", model.clusterResourceId()); - Assertions.assertEquals(DefaultPrincipalsModificationKind.REPLACE, model.defaultPrincipalsModificationKind()); - Assertions.assertEquals("bmhrixkwmyijejv", model.tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions.assertEquals("eaxhcexdrrvqahqk", model.tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions.assertEquals("voowvr", model.tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions - .assertEquals("pyostronzmyhgfi", model.tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions.assertEquals("uzlm", model.tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions.assertEquals("rpw", model.tableLevelSharingProperties().materializedViewsToExclude().get(0)); - Assertions.assertEquals("znoigbrn", model.tableLevelSharingProperties().functionsToInclude().get(0)); - Assertions.assertEquals("pn", model.tableLevelSharingProperties().functionsToExclude().get(0)); - Assertions.assertEquals("azej", model.databaseNameOverride()); - Assertions.assertEquals("qkagfhsxt", model.databaseNamePrefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AttachedDatabaseConfigurationProperties model = - new AttachedDatabaseConfigurationProperties() - .withDatabaseName("wz") - .withClusterResourceId("bnhlmc") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.REPLACE) - .withTableLevelSharingProperties( - new TableLevelSharingProperties() - .withTablesToInclude(Arrays.asList("bmhrixkwmyijejv", "grhbpn", "ixexcc")) - .withTablesToExclude(Arrays.asList("eaxhcexdrrvqahqk", "htpwij", "hyjsvfycx")) - .withExternalTablesToInclude(Arrays.asList("voowvr", "mtg")) - .withExternalTablesToExclude( - Arrays.asList("pyostronzmyhgfi", "nsxkmcwaekrrjr", "afxtsgum", "jglikkxwslolb")) - .withMaterializedViewsToInclude(Arrays.asList("uzlm", "felfktg")) - .withMaterializedViewsToExclude(Arrays.asList("rpw")) - .withFunctionsToInclude(Arrays.asList("znoigbrn", "w")) - .withFunctionsToExclude(Arrays.asList("pn"))) - .withDatabaseNameOverride("azej") - .withDatabaseNamePrefix("qkagfhsxt"); - model = BinaryData.fromObject(model).toObject(AttachedDatabaseConfigurationProperties.class); - Assertions.assertEquals("wz", model.databaseName()); - Assertions.assertEquals("bnhlmc", model.clusterResourceId()); - Assertions.assertEquals(DefaultPrincipalsModificationKind.REPLACE, model.defaultPrincipalsModificationKind()); - Assertions.assertEquals("bmhrixkwmyijejv", model.tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions.assertEquals("eaxhcexdrrvqahqk", model.tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions.assertEquals("voowvr", model.tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions - .assertEquals("pyostronzmyhgfi", model.tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions.assertEquals("uzlm", model.tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions.assertEquals("rpw", model.tableLevelSharingProperties().materializedViewsToExclude().get(0)); - Assertions.assertEquals("znoigbrn", model.tableLevelSharingProperties().functionsToInclude().get(0)); - Assertions.assertEquals("pn", model.tableLevelSharingProperties().functionsToExclude().get(0)); - Assertions.assertEquals("azej", model.databaseNameOverride()); - Assertions.assertEquals("qkagfhsxt", model.databaseNamePrefix()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCheckNameAvailabilityWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 491c491c436d..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfigurationsCheckNameRequest; -import com.azure.resourcemanager.kusto.models.CheckNameResult; -import com.azure.resourcemanager.kusto.models.Reason; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AttachedDatabaseConfigurationsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nameAvailable\":false,\"name\":\"sxjwwixz\",\"message\":\"mwmxqhndvnoamld\",\"reason\":\"AlreadyExists\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameResult response = - manager - .attachedDatabaseConfigurations() - .checkNameAvailabilityWithResponse( - "ziqgfuh", - "kzruswh", - new AttachedDatabaseConfigurationsCheckNameRequest().withName("hczznvf"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals("sxjwwixz", response.name()); - Assertions.assertEquals("mwmxqhndvnoamld", response.message()); - Assertions.assertEquals(Reason.ALREADY_EXISTS, response.reason()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCheckNameRequestTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCheckNameRequestTests.java deleted file mode 100644 index 8519c12b31a5..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCheckNameRequestTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfigurationsCheckNameRequest; -import org.junit.jupiter.api.Assertions; - -public final class AttachedDatabaseConfigurationsCheckNameRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AttachedDatabaseConfigurationsCheckNameRequest model = - BinaryData - .fromString("{\"name\":\"liourqhak\"}") - .toObject(AttachedDatabaseConfigurationsCheckNameRequest.class); - Assertions.assertEquals("liourqhak", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AttachedDatabaseConfigurationsCheckNameRequest model = - new AttachedDatabaseConfigurationsCheckNameRequest().withName("liourqhak"); - model = BinaryData.fromObject(model).toObject(AttachedDatabaseConfigurationsCheckNameRequest.class); - Assertions.assertEquals("liourqhak", model.name()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCreateOrUpdateMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCreateOrUpdateMockTests.java deleted file mode 100644 index 4710eb4be967..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfiguration; -import com.azure.resourcemanager.kusto.models.DefaultPrincipalsModificationKind; -import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AttachedDatabaseConfigurationsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"lfbcgwgcl\",\"properties\":{\"provisioningState\":\"Succeeded\",\"databaseName\":\"bqinjipnwjfu\",\"clusterResourceId\":\"qlafcbahhpzpofoi\",\"attachedDatabaseNames\":[\"p\"],\"defaultPrincipalsModificationKind\":\"Union\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"kkholvdndvia\",\"ogphuartvtiu\"],\"tablesToExclude\":[\"fchnmnah\",\"nxhkxjqi\"],\"externalTablesToInclude\":[\"weooxffifhxwrs\",\"ewmozqvbu\",\"qmamhsycxhxzga\"],\"externalTablesToExclude\":[\"abo\",\"dvmfqhppub\",\"w\"],\"materializedViewsToInclude\":[\"dfgkmtdh\",\"rngbtcjuahokqtob\",\"auxofshfph\",\"pnulaiywzej\"],\"materializedViewsToExclude\":[\"slwkojpl\"],\"functionsToInclude\":[\"npdwr\",\"qafgfugsnnfhyet\",\"fypococtfjgti\"],\"functionsToExclude\":[\"vzuyturmlmu\",\"wolba\"]},\"databaseNameOverride\":\"ropions\",\"databaseNamePrefix\":\"nw\"},\"id\":\"ngajinnixjawrtmj\",\"name\":\"jmyccxlzhcoxov\",\"type\":\"ekhenl\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AttachedDatabaseConfiguration response = - manager - .attachedDatabaseConfigurations() - .define("kqmhhaowjr") - .withExistingCluster("n", "hgovfgp") - .withRegion("vuporqzdfuydzv") - .withDatabaseName("cnqmxqpsw") - .withClusterResourceId("kmvkhl") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.NONE) - .withTableLevelSharingProperties( - new TableLevelSharingProperties() - .withTablesToInclude(Arrays.asList("mnzhrgmqg", "sxvpqcbfrmbodths")) - .withTablesToExclude(Arrays.asList("vriibakclacjfr", "xousxauzl", "vsg")) - .withExternalTablesToInclude(Arrays.asList("hqf", "izvu")) - .withExternalTablesToExclude(Arrays.asList("kjsvthnwpzteko")) - .withMaterializedViewsToInclude(Arrays.asList("ibiattg")) - .withMaterializedViewsToExclude(Arrays.asList("cfotangcfhnykzcu", "swvxwlmzqwmv", "xnjmxm")) - .withFunctionsToInclude(Arrays.asList("udtc", "clxyn", "dkvgfabuiyjibuzp")) - .withFunctionsToExclude(Arrays.asList("gneik", "pgoxgji"))) - .withDatabaseNameOverride("hibtozipqwjedmur") - .withDatabaseNamePrefix("x") - .create(); - - Assertions.assertEquals("lfbcgwgcl", response.location()); - Assertions.assertEquals("bqinjipnwjfu", response.databaseName()); - Assertions.assertEquals("qlafcbahhpzpofoi", response.clusterResourceId()); - Assertions.assertEquals(DefaultPrincipalsModificationKind.UNION, response.defaultPrincipalsModificationKind()); - Assertions.assertEquals("kkholvdndvia", response.tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions.assertEquals("fchnmnah", response.tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions - .assertEquals("weooxffifhxwrs", response.tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions.assertEquals("abo", response.tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions.assertEquals("dfgkmtdh", response.tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions.assertEquals("slwkojpl", response.tableLevelSharingProperties().materializedViewsToExclude().get(0)); - Assertions.assertEquals("npdwr", response.tableLevelSharingProperties().functionsToInclude().get(0)); - Assertions.assertEquals("vzuyturmlmu", response.tableLevelSharingProperties().functionsToExclude().get(0)); - Assertions.assertEquals("ropions", response.databaseNameOverride()); - Assertions.assertEquals("nw", response.databaseNamePrefix()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsDeleteMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsDeleteMockTests.java deleted file mode 100644 index 4f590bc6a34c..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AttachedDatabaseConfigurationsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.attachedDatabaseConfigurations().delete("xtiv", "j", "nidibgqjxg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsGetWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsGetWithResponseMockTests.java deleted file mode 100644 index e363488ed419..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsGetWithResponseMockTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfiguration; -import com.azure.resourcemanager.kusto.models.DefaultPrincipalsModificationKind; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AttachedDatabaseConfigurationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"pqxpx\",\"properties\":{\"provisioningState\":\"Deleting\",\"databaseName\":\"ngjsaasi\",\"clusterResourceId\":\"xtmkzjvkviir\",\"attachedDatabaseNames\":[\"grwsdp\",\"ra\",\"zvzbglbyv\",\"ctctbrxkjz\"],\"defaultPrincipalsModificationKind\":\"Replace\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"fmsh\"],\"tablesToExclude\":[\"bkgozxwopdbydpi\",\"qaclnapxbiy\",\"nugj\",\"nfsm\"],\"externalTablesToInclude\":[\"tuxuuyilflq\",\"iquvrehm\",\"njhvsujztc\",\"ytqj\"],\"externalTablesToExclude\":[\"auunfprnjletlx\"],\"materializedViewsToInclude\":[\"pddouifamowaziyn\",\"nlqwzdvpiwhx\",\"szdtmaajquh\"],\"materializedViewsToExclude\":[\"lrjvmtyg\"],\"functionsToInclude\":[\"zyos\",\"spshckfkyjp\",\"sp\"],\"functionsToExclude\":[\"sdfppyogtie\",\"ujtv\"]},\"databaseNameOverride\":\"kcnyx\",\"databaseNamePrefix\":\"munjdxvglnkvx\"},\"id\":\"xpaglqivbgkc\",\"name\":\"khpzvuqdflv\",\"type\":\"niypfpubcpzg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AttachedDatabaseConfiguration response = - manager - .attachedDatabaseConfigurations() - .getWithResponse("rdhlis", "gwflq", "mpizru", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("pqxpx", response.location()); - Assertions.assertEquals("ngjsaasi", response.databaseName()); - Assertions.assertEquals("xtmkzjvkviir", response.clusterResourceId()); - Assertions - .assertEquals(DefaultPrincipalsModificationKind.REPLACE, response.defaultPrincipalsModificationKind()); - Assertions.assertEquals("fmsh", response.tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions.assertEquals("bkgozxwopdbydpi", response.tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions.assertEquals("tuxuuyilflq", response.tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions - .assertEquals("auunfprnjletlx", response.tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions - .assertEquals( - "pddouifamowaziyn", response.tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions.assertEquals("lrjvmtyg", response.tableLevelSharingProperties().materializedViewsToExclude().get(0)); - Assertions.assertEquals("zyos", response.tableLevelSharingProperties().functionsToInclude().get(0)); - Assertions.assertEquals("sdfppyogtie", response.tableLevelSharingProperties().functionsToExclude().get(0)); - Assertions.assertEquals("kcnyx", response.databaseNameOverride()); - Assertions.assertEquals("munjdxvglnkvx", response.databaseNamePrefix()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsListByClusterMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsListByClusterMockTests.java deleted file mode 100644 index c3a260151d59..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AttachedDatabaseConfigurationsListByClusterMockTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfiguration; -import com.azure.resourcemanager.kusto.models.DefaultPrincipalsModificationKind; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AttachedDatabaseConfigurationsListByClusterMockTests { - @Test - public void testListByCluster() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"e\",\"properties\":{\"provisioningState\":\"Running\",\"databaseName\":\"tag\",\"clusterResourceId\":\"tsxoatftgz\",\"attachedDatabaseNames\":[\"bs\",\"vefloccsrmozihmi\",\"g\",\"wtxxpkyjcx\"],\"defaultPrincipalsModificationKind\":\"Union\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"ytfmpc\",\"cil\",\"mcayk\"],\"tablesToExclude\":[\"oxuztrksx\",\"pndfcpfnznt\",\"jtwkjaos\"],\"externalTablesToInclude\":[\"zvoamktc\",\"iosmgbzahgxqdly\",\"tlt\",\"ap\"],\"externalTablesToExclude\":[\"zkatb\"],\"materializedViewsToInclude\":[\"znnbsoqeqalarvl\",\"gunbtgfebwlnbm\",\"yreeudz\",\"av\"],\"materializedViewsToExclude\":[\"qmjxlyyzglgouwtl\",\"jjyuojqtobax\"],\"functionsToInclude\":[\"ytunlbfjkwr\"],\"functionsToExclude\":[\"kqbh\",\"y\",\"qunjqh\"]},\"databaseNameOverride\":\"nxaulk\",\"databaseNamePrefix\":\"kdk\"},\"id\":\"fmjnnawtqa\",\"name\":\"pxuckpggq\",\"type\":\"wey\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .attachedDatabaseConfigurations() - .listByCluster("aohdjh", "flzokxco", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("e", response.iterator().next().location()); - Assertions.assertEquals("tag", response.iterator().next().databaseName()); - Assertions.assertEquals("tsxoatftgz", response.iterator().next().clusterResourceId()); - Assertions - .assertEquals( - DefaultPrincipalsModificationKind.UNION, - response.iterator().next().defaultPrincipalsModificationKind()); - Assertions - .assertEquals("ytfmpc", response.iterator().next().tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions - .assertEquals( - "oxuztrksx", response.iterator().next().tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions - .assertEquals( - "zvoamktc", response.iterator().next().tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions - .assertEquals( - "zkatb", response.iterator().next().tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions - .assertEquals( - "znnbsoqeqalarvl", - response.iterator().next().tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions - .assertEquals( - "qmjxlyyzglgouwtl", - response.iterator().next().tableLevelSharingProperties().materializedViewsToExclude().get(0)); - Assertions - .assertEquals( - "ytunlbfjkwr", response.iterator().next().tableLevelSharingProperties().functionsToInclude().get(0)); - Assertions - .assertEquals("kqbh", response.iterator().next().tableLevelSharingProperties().functionsToExclude().get(0)); - Assertions.assertEquals("nxaulk", response.iterator().next().databaseNameOverride()); - Assertions.assertEquals("kdk", response.iterator().next().databaseNamePrefix()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AzureCapacityTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AzureCapacityTests.java deleted file mode 100644 index c9a1e450b1a4..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AzureCapacityTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.AzureCapacity; -import com.azure.resourcemanager.kusto.models.AzureScaleType; -import org.junit.jupiter.api.Assertions; - -public final class AzureCapacityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureCapacity model = - BinaryData - .fromString( - "{\"scaleType\":\"none\",\"minimum\":1561651714,\"maximum\":17080551,\"default\":663876246}") - .toObject(AzureCapacity.class); - Assertions.assertEquals(AzureScaleType.NONE, model.scaleType()); - Assertions.assertEquals(1561651714, model.minimum()); - Assertions.assertEquals(17080551, model.maximum()); - Assertions.assertEquals(663876246, model.defaultProperty()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureCapacity model = - new AzureCapacity() - .withScaleType(AzureScaleType.NONE) - .withMinimum(1561651714) - .withMaximum(17080551) - .withDefaultProperty(663876246); - model = BinaryData.fromObject(model).toObject(AzureCapacity.class); - Assertions.assertEquals(AzureScaleType.NONE, model.scaleType()); - Assertions.assertEquals(1561651714, model.minimum()); - Assertions.assertEquals(17080551, model.maximum()); - Assertions.assertEquals(663876246, model.defaultProperty()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AzureResourceSkuInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AzureResourceSkuInnerTests.java deleted file mode 100644 index f8134af96fc3..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AzureResourceSkuInnerTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.AzureResourceSkuInner; -import com.azure.resourcemanager.kusto.models.AzureCapacity; -import com.azure.resourcemanager.kusto.models.AzureScaleType; -import com.azure.resourcemanager.kusto.models.AzureSku; -import com.azure.resourcemanager.kusto.models.AzureSkuName; -import com.azure.resourcemanager.kusto.models.AzureSkuTier; -import org.junit.jupiter.api.Assertions; - -public final class AzureResourceSkuInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureResourceSkuInner model = - BinaryData - .fromString( - "{\"resourceType\":\"zceuojgjrw\",\"sku\":{\"name\":\"Standard_EC16ads_v5\",\"capacity\":1907813820,\"tier\":\"Basic\"},\"capacity\":{\"scaleType\":\"manual\",\"minimum\":1753683852,\"maximum\":54920560,\"default\":1848522994}}") - .toObject(AzureResourceSkuInner.class); - Assertions.assertEquals("zceuojgjrw", model.resourceType()); - Assertions.assertEquals(AzureSkuName.STANDARD_EC16ADS_V5, model.sku().name()); - Assertions.assertEquals(1907813820, model.sku().capacity()); - Assertions.assertEquals(AzureSkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals(AzureScaleType.MANUAL, model.capacity().scaleType()); - Assertions.assertEquals(1753683852, model.capacity().minimum()); - Assertions.assertEquals(54920560, model.capacity().maximum()); - Assertions.assertEquals(1848522994, model.capacity().defaultProperty()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureResourceSkuInner model = - new AzureResourceSkuInner() - .withResourceType("zceuojgjrw") - .withSku( - new AzureSku() - .withName(AzureSkuName.STANDARD_EC16ADS_V5) - .withCapacity(1907813820) - .withTier(AzureSkuTier.BASIC)) - .withCapacity( - new AzureCapacity() - .withScaleType(AzureScaleType.MANUAL) - .withMinimum(1753683852) - .withMaximum(54920560) - .withDefaultProperty(1848522994)); - model = BinaryData.fromObject(model).toObject(AzureResourceSkuInner.class); - Assertions.assertEquals("zceuojgjrw", model.resourceType()); - Assertions.assertEquals(AzureSkuName.STANDARD_EC16ADS_V5, model.sku().name()); - Assertions.assertEquals(1907813820, model.sku().capacity()); - Assertions.assertEquals(AzureSkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals(AzureScaleType.MANUAL, model.capacity().scaleType()); - Assertions.assertEquals(1753683852, model.capacity().minimum()); - Assertions.assertEquals(54920560, model.capacity().maximum()); - Assertions.assertEquals(1848522994, model.capacity().defaultProperty()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AzureSkuTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AzureSkuTests.java deleted file mode 100644 index 244174f92537..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/AzureSkuTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.AzureSku; -import com.azure.resourcemanager.kusto.models.AzureSkuName; -import com.azure.resourcemanager.kusto.models.AzureSkuTier; -import org.junit.jupiter.api.Assertions; - -public final class AzureSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureSku model = - BinaryData - .fromString("{\"name\":\"Standard_E4d_v5\",\"capacity\":743792160,\"tier\":\"Basic\"}") - .toObject(AzureSku.class); - Assertions.assertEquals(AzureSkuName.STANDARD_E4D_V5, model.name()); - Assertions.assertEquals(743792160, model.capacity()); - Assertions.assertEquals(AzureSkuTier.BASIC, model.tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureSku model = - new AzureSku().withName(AzureSkuName.STANDARD_E4D_V5).withCapacity(743792160).withTier(AzureSkuTier.BASIC); - model = BinaryData.fromObject(model).toObject(AzureSku.class); - Assertions.assertEquals(AzureSkuName.STANDARD_E4D_V5, model.name()); - Assertions.assertEquals(743792160, model.capacity()); - Assertions.assertEquals(AzureSkuTier.BASIC, model.tier()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/CheckNameRequestTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/CheckNameRequestTests.java deleted file mode 100644 index 8e106245e592..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/CheckNameRequestTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.CheckNameRequest; -import com.azure.resourcemanager.kusto.models.Type; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameRequest model = - BinaryData - .fromString("{\"name\":\"wkz\",\"type\":\"Microsoft.Kusto/clusters/databases\"}") - .toObject(CheckNameRequest.class); - Assertions.assertEquals("wkz", model.name()); - Assertions.assertEquals(Type.MICROSOFT_KUSTO_CLUSTERS_DATABASES, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameRequest model = - new CheckNameRequest().withName("wkz").withType(Type.MICROSOFT_KUSTO_CLUSTERS_DATABASES); - model = BinaryData.fromObject(model).toObject(CheckNameRequest.class); - Assertions.assertEquals("wkz", model.name()); - Assertions.assertEquals(Type.MICROSOFT_KUSTO_CLUSTERS_DATABASES, model.type()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/CheckNameResultInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/CheckNameResultInnerTests.java deleted file mode 100644 index e90885344791..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/CheckNameResultInnerTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.CheckNameResultInner; -import com.azure.resourcemanager.kusto.models.Reason; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameResultInner model = - BinaryData - .fromString( - "{\"nameAvailable\":false,\"name\":\"rkujy\",\"message\":\"l\",\"reason\":\"AlreadyExists\"}") - .toObject(CheckNameResultInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("rkujy", model.name()); - Assertions.assertEquals("l", model.message()); - Assertions.assertEquals(Reason.ALREADY_EXISTS, model.reason()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameResultInner model = - new CheckNameResultInner() - .withNameAvailable(false) - .withName("rkujy") - .withMessage("l") - .withReason(Reason.ALREADY_EXISTS); - model = BinaryData.fromObject(model).toObject(CheckNameResultInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("rkujy", model.name()); - Assertions.assertEquals("l", model.message()); - Assertions.assertEquals(Reason.ALREADY_EXISTS, model.reason()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterCheckNameRequestTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterCheckNameRequestTests.java deleted file mode 100644 index c99f74cedb49..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterCheckNameRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.ClusterCheckNameRequest; -import org.junit.jupiter.api.Assertions; - -public final class ClusterCheckNameRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterCheckNameRequest model = - BinaryData.fromString("{\"name\":\"zlfmisgwbnbbeld\"}").toObject(ClusterCheckNameRequest.class); - Assertions.assertEquals("zlfmisgwbnbbeld", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterCheckNameRequest model = new ClusterCheckNameRequest().withName("zlfmisgwbnbbeld"); - model = BinaryData.fromObject(model).toObject(ClusterCheckNameRequest.class); - Assertions.assertEquals("zlfmisgwbnbbeld", model.name()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterMigrateRequestTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterMigrateRequestTests.java deleted file mode 100644 index dd0a85573d37..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterMigrateRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.ClusterMigrateRequest; -import org.junit.jupiter.api.Assertions; - -public final class ClusterMigrateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterMigrateRequest model = - BinaryData.fromString("{\"clusterResourceId\":\"algbquxigjyjg\"}").toObject(ClusterMigrateRequest.class); - Assertions.assertEquals("algbquxigjyjg", model.clusterResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterMigrateRequest model = new ClusterMigrateRequest().withClusterResourceId("algbquxigjyjg"); - model = BinaryData.fromObject(model).toObject(ClusterMigrateRequest.class); - Assertions.assertEquals("algbquxigjyjg", model.clusterResourceId()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentCheckNameRequestTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentCheckNameRequestTests.java deleted file mode 100644 index 8431c7b34357..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentCheckNameRequestTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignmentCheckNameRequest; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPrincipalAssignmentCheckNameRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPrincipalAssignmentCheckNameRequest model = - BinaryData - .fromString("{\"name\":\"jaoyfhrtx\"}") - .toObject(ClusterPrincipalAssignmentCheckNameRequest.class); - Assertions.assertEquals("jaoyfhrtx", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPrincipalAssignmentCheckNameRequest model = - new ClusterPrincipalAssignmentCheckNameRequest().withName("jaoyfhrtx"); - model = BinaryData.fromObject(model).toObject(ClusterPrincipalAssignmentCheckNameRequest.class); - Assertions.assertEquals("jaoyfhrtx", model.name()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentInnerTests.java deleted file mode 100644 index 91c501c0aeba..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentInnerTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.ClusterPrincipalAssignmentInner; -import com.azure.resourcemanager.kusto.models.ClusterPrincipalRole; -import com.azure.resourcemanager.kusto.models.PrincipalType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPrincipalAssignmentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPrincipalAssignmentInner model = - BinaryData - .fromString( - "{\"properties\":{\"principalId\":\"fqawrlyxw\",\"role\":\"AllDatabasesAdmin\",\"tenantId\":\"prbnwbxgjvtbv\",\"principalType\":\"App\",\"tenantName\":\"szdnr\",\"principalName\":\"qguhmuo\",\"provisioningState\":\"Canceled\",\"aadObjectId\":\"rwzwbng\"},\"id\":\"itnwuizgazxufi\",\"name\":\"uckyf\",\"type\":\"hr\"}") - .toObject(ClusterPrincipalAssignmentInner.class); - Assertions.assertEquals("fqawrlyxw", model.principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, model.role()); - Assertions.assertEquals("prbnwbxgjvtbv", model.tenantId()); - Assertions.assertEquals(PrincipalType.APP, model.principalType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPrincipalAssignmentInner model = - new ClusterPrincipalAssignmentInner() - .withPrincipalId("fqawrlyxw") - .withRole(ClusterPrincipalRole.ALL_DATABASES_ADMIN) - .withTenantId("prbnwbxgjvtbv") - .withPrincipalType(PrincipalType.APP); - model = BinaryData.fromObject(model).toObject(ClusterPrincipalAssignmentInner.class); - Assertions.assertEquals("fqawrlyxw", model.principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, model.role()); - Assertions.assertEquals("prbnwbxgjvtbv", model.tenantId()); - Assertions.assertEquals(PrincipalType.APP, model.principalType()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentListResultTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentListResultTests.java deleted file mode 100644 index 6554832fdd77..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentListResultTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.ClusterPrincipalAssignmentInner; -import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignmentListResult; -import com.azure.resourcemanager.kusto.models.ClusterPrincipalRole; -import com.azure.resourcemanager.kusto.models.PrincipalType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPrincipalAssignmentListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPrincipalAssignmentListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"principalId\":\"cs\",\"role\":\"AllDatabasesAdmin\",\"tenantId\":\"mdwzjeiachboo\",\"principalType\":\"User\",\"tenantName\":\"nrosfqpte\",\"principalName\":\"zzvypyqrimzinp\",\"provisioningState\":\"Running\",\"aadObjectId\":\"dkirsoodqxhcr\"},\"id\":\"nohjt\",\"name\":\"kwh\",\"type\":\"soifiyipjxsqw\"}]}") - .toObject(ClusterPrincipalAssignmentListResult.class); - Assertions.assertEquals("cs", model.value().get(0).principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, model.value().get(0).role()); - Assertions.assertEquals("mdwzjeiachboo", model.value().get(0).tenantId()); - Assertions.assertEquals(PrincipalType.USER, model.value().get(0).principalType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPrincipalAssignmentListResult model = - new ClusterPrincipalAssignmentListResult() - .withValue( - Arrays - .asList( - new ClusterPrincipalAssignmentInner() - .withPrincipalId("cs") - .withRole(ClusterPrincipalRole.ALL_DATABASES_ADMIN) - .withTenantId("mdwzjeiachboo") - .withPrincipalType(PrincipalType.USER))); - model = BinaryData.fromObject(model).toObject(ClusterPrincipalAssignmentListResult.class); - Assertions.assertEquals("cs", model.value().get(0).principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, model.value().get(0).role()); - Assertions.assertEquals("mdwzjeiachboo", model.value().get(0).tenantId()); - Assertions.assertEquals(PrincipalType.USER, model.value().get(0).principalType()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index b9af38881efe..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.CheckNameResult; -import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignmentCheckNameRequest; -import com.azure.resourcemanager.kusto.models.Reason; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClusterPrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nameAvailable\":true,\"name\":\"zmlovuanash\",\"message\":\"lpmjerb\",\"reason\":\"AlreadyExists\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameResult response = - manager - .clusterPrincipalAssignments() - .checkNameAvailabilityWithResponse( - "z", - "ofizehtdhgbj", - new ClusterPrincipalAssignmentCheckNameRequest().withName("vreljea"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("zmlovuanash", response.name()); - Assertions.assertEquals("lpmjerb", response.message()); - Assertions.assertEquals(Reason.ALREADY_EXISTS, response.reason()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCreateOrUpdateMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCreateOrUpdateMockTests.java deleted file mode 100644 index ff832d74ff39..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignment; -import com.azure.resourcemanager.kusto.models.ClusterPrincipalRole; -import com.azure.resourcemanager.kusto.models.PrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClusterPrincipalAssignmentsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"principalId\":\"zojhpctfnmd\",\"role\":\"AllDatabasesAdmin\",\"tenantId\":\"ngfdgugeyzihgrky\",\"principalType\":\"Group\",\"tenantName\":\"absnmfpp\",\"principalName\":\"jee\",\"provisioningState\":\"Succeeded\",\"aadObjectId\":\"hsgz\"},\"id\":\"czbgomfgbeg\",\"name\":\"qgleohibetnluank\",\"type\":\"rfxeeebtij\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterPrincipalAssignment response = - manager - .clusterPrincipalAssignments() - .define("qspkcdqzhlctd") - .withExistingCluster("ttexoqqpwcyyufmh", "uncuw") - .withPrincipalId("nqndyfpchrqbn") - .withRole(ClusterPrincipalRole.ALL_DATABASES_ADMIN) - .withTenantId("cgegydcwbo") - .withPrincipalType(PrincipalType.GROUP) - .create(); - - Assertions.assertEquals("zojhpctfnmd", response.principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, response.role()); - Assertions.assertEquals("ngfdgugeyzihgrky", response.tenantId()); - Assertions.assertEquals(PrincipalType.GROUP, response.principalType()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsDeleteMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsDeleteMockTests.java deleted file mode 100644 index 58ac7f7767bf..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClusterPrincipalAssignmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .clusterPrincipalAssignments() - .delete("zab", "elawumu", "slzkwrrwoycqu", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsGetWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsGetWithResponseMockTests.java deleted file mode 100644 index 808e2f5148fe..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsGetWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignment; -import com.azure.resourcemanager.kusto.models.ClusterPrincipalRole; -import com.azure.resourcemanager.kusto.models.PrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClusterPrincipalAssignmentsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"principalId\":\"puuw\",\"role\":\"AllDatabasesAdmin\",\"tenantId\":\"v\",\"principalType\":\"App\",\"tenantName\":\"ctzenkeifzzhmkd\",\"principalName\":\"vflyhbxcu\",\"provisioningState\":\"Moving\",\"aadObjectId\":\"gsrboldforobw\"},\"id\":\"lvizb\",\"name\":\"hfovvacqpbtu\",\"type\":\"dxe\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterPrincipalAssignment response = - manager - .clusterPrincipalAssignments() - .getWithResponse("lvidizozs", "bccxjmonfdgn", "n", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("puuw", response.principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, response.role()); - Assertions.assertEquals("v", response.tenantId()); - Assertions.assertEquals(PrincipalType.APP, response.principalType()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsListMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsListMockTests.java deleted file mode 100644 index cc68ba08ada5..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalAssignmentsListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignment; -import com.azure.resourcemanager.kusto.models.ClusterPrincipalRole; -import com.azure.resourcemanager.kusto.models.PrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClusterPrincipalAssignmentsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"principalId\":\"vfuuru\",\"role\":\"AllDatabasesAdmin\",\"tenantId\":\"exxwlalniexzsrz\",\"principalType\":\"Group\",\"tenantName\":\"pqtybb\",\"principalName\":\"pgdakchzyvli\",\"provisioningState\":\"Running\",\"aadObjectId\":\"kcxk\"},\"id\":\"ibn\",\"name\":\"mysu\",\"type\":\"swqrntvlwijp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.clusterPrincipalAssignments().list("wyh", "hnomdrkywuh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vfuuru", response.iterator().next().principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, response.iterator().next().role()); - Assertions.assertEquals("exxwlalniexzsrz", response.iterator().next().tenantId()); - Assertions.assertEquals(PrincipalType.GROUP, response.iterator().next().principalType()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalPropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalPropertiesTests.java deleted file mode 100644 index 1e963daa0dfd..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClusterPrincipalPropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.ClusterPrincipalProperties; -import com.azure.resourcemanager.kusto.models.ClusterPrincipalRole; -import com.azure.resourcemanager.kusto.models.PrincipalType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPrincipalPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPrincipalProperties model = - BinaryData - .fromString( - "{\"principalId\":\"idf\",\"role\":\"AllDatabasesAdmin\",\"tenantId\":\"dzuhtymwi\",\"principalType\":\"Group\",\"tenantName\":\"fthwxmnteiwa\",\"principalName\":\"vkmijcmmxdcuf\",\"provisioningState\":\"Canceled\",\"aadObjectId\":\"pymzidnsezcxtbzs\"}") - .toObject(ClusterPrincipalProperties.class); - Assertions.assertEquals("idf", model.principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, model.role()); - Assertions.assertEquals("dzuhtymwi", model.tenantId()); - Assertions.assertEquals(PrincipalType.GROUP, model.principalType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPrincipalProperties model = - new ClusterPrincipalProperties() - .withPrincipalId("idf") - .withRole(ClusterPrincipalRole.ALL_DATABASES_ADMIN) - .withTenantId("dzuhtymwi") - .withPrincipalType(PrincipalType.GROUP); - model = BinaryData.fromObject(model).toObject(ClusterPrincipalProperties.class); - Assertions.assertEquals("idf", model.principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, model.role()); - Assertions.assertEquals("dzuhtymwi", model.tenantId()); - Assertions.assertEquals(PrincipalType.GROUP, model.principalType()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersAddLanguageExtensionsMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersAddLanguageExtensionsMockTests.java deleted file mode 100644 index 79ae47df86f6..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersAddLanguageExtensionsMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.fluent.models.LanguageExtensionInner; -import com.azure.resourcemanager.kusto.models.LanguageExtensionImageName; -import com.azure.resourcemanager.kusto.models.LanguageExtensionName; -import com.azure.resourcemanager.kusto.models.LanguageExtensionsList; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersAddLanguageExtensionsMockTests { - @Test - public void testAddLanguageExtensions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .clusters() - .addLanguageExtensions( - "p", - "n", - new LanguageExtensionsList() - .withValue( - Arrays - .asList( - new LanguageExtensionInner() - .withLanguageExtensionName(LanguageExtensionName.PYTHON) - .withLanguageExtensionImageName(LanguageExtensionImageName.R))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersCheckNameAvailabilityWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index d2da43f77aa2..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.CheckNameResult; -import com.azure.resourcemanager.kusto.models.ClusterCheckNameRequest; -import com.azure.resourcemanager.kusto.models.Reason; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nameAvailable\":true,\"name\":\"ccknfnwmbtmvp\",\"message\":\"jdhttzaefedxi\",\"reason\":\"AlreadyExists\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameResult response = - manager - .clusters() - .checkNameAvailabilityWithResponse( - "sfjbjsvg", new ClusterCheckNameRequest().withName("rwhryvycytd"), com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("ccknfnwmbtmvp", response.name()); - Assertions.assertEquals("jdhttzaefedxi", response.message()); - Assertions.assertEquals(Reason.ALREADY_EXISTS, response.reason()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersDeleteMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersDeleteMockTests.java deleted file mode 100644 index 5724dec76d76..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusters().delete("mlqtmldgxob", "irclnpk", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersDetachFollowerDatabasesMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersDetachFollowerDatabasesMockTests.java deleted file mode 100644 index aeaa60865fbb..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersDetachFollowerDatabasesMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.fluent.models.FollowerDatabaseDefinitionInner; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersDetachFollowerDatabasesMockTests { - @Test - public void testDetachFollowerDatabases() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .clusters() - .detachFollowerDatabases( - "r", - "fukiscvwmzhw", - new FollowerDatabaseDefinitionInner() - .withClusterResourceId("lefaxvxilcbtgn") - .withAttachedDatabaseConfigurationName("nzeyqxtjj"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersDiagnoseVirtualNetworkMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersDiagnoseVirtualNetworkMockTests.java deleted file mode 100644 index e98338e4882f..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersDiagnoseVirtualNetworkMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.DiagnoseVirtualNetworkResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersDiagnoseVirtualNetworkMockTests { - @Test - public void testDiagnoseVirtualNetwork() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"findings\":[\"yklxubyjaffmmfbl\",\"qcuubgqibrta\"]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DiagnoseVirtualNetworkResult response = - manager.clusters().diagnoseVirtualNetwork("xcvhrfs", "huagrttikteusqc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("yklxubyjaffmmfbl", response.findings().get(0)); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListFollowerDatabasesMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListFollowerDatabasesMockTests.java deleted file mode 100644 index e30a5621e149..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListFollowerDatabasesMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.FollowerDatabaseDefinition; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersListFollowerDatabasesMockTests { - @Test - public void testListFollowerDatabases() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"clusterResourceId\":\"wva\",\"attachedDatabaseConfigurationName\":\"qyuvvfonkp\",\"databaseName\":\"qyikvy\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"avluwmncs\",\"tijfybvp\",\"ekrsgs\"],\"tablesToExclude\":[\"huzqgn\",\"dgkynscliqhzvhxn\",\"omtkub\"],\"externalTablesToInclude\":[\"pnvdxz\",\"hihfrbbcevqagtlt\"],\"externalTablesToExclude\":[\"fkqojpy\",\"vgtrdcnifmzzs\"],\"materializedViewsToInclude\":[\"brn\"],\"materializedViewsToExclude\":[\"xmprafwg\"],\"functionsToInclude\":[\"ocxvdfffwafqr\",\"udaspavehh\",\"vkbunzozudh\",\"xg\"],\"functionsToExclude\":[\"yxcdyuibhmfdnbzy\",\"vfvfcj\",\"aeoisrvh\"]},\"databaseShareOrigin\":\"Direct\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.clusters().listFollowerDatabases("a", "ysdzhez", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wva", response.iterator().next().clusterResourceId()); - Assertions.assertEquals("qyuvvfonkp", response.iterator().next().attachedDatabaseConfigurationName()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListLanguageExtensionsMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListLanguageExtensionsMockTests.java deleted file mode 100644 index 33be7212b9dd..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListLanguageExtensionsMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.LanguageExtension; -import com.azure.resourcemanager.kusto.models.LanguageExtensionImageName; -import com.azure.resourcemanager.kusto.models.LanguageExtensionName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersListLanguageExtensionsMockTests { - @Test - public void testListLanguageExtensions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"languageExtensionName\":\"R\",\"languageExtensionImageName\":\"Python3_6_5\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.clusters().listLanguageExtensions("qzmiza", "a", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(LanguageExtensionName.R, response.iterator().next().languageExtensionName()); - Assertions - .assertEquals( - LanguageExtensionImageName.PYTHON3_6_5, response.iterator().next().languageExtensionImageName()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListOutboundNetworkDependenciesEndpointsMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListOutboundNetworkDependenciesEndpointsMockTests.java deleted file mode 100644 index 9a1d472f3c89..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListOutboundNetworkDependenciesEndpointsMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.OutboundNetworkDependenciesEndpoint; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersListOutboundNetworkDependenciesEndpointsMockTests { - @Test - public void testListOutboundNetworkDependenciesEndpoints() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"category\":\"hpfeoajvgcxtxjc\",\"endpoints\":[{\"domainName\":\"fidltug\",\"endpointDetails\":[{},{},{},{}]},{\"domainName\":\"mks\",\"endpointDetails\":[{}]},{\"domainName\":\"iftxfkf\",\"endpointDetails\":[{}]},{\"domainName\":\"rhptilluc\",\"endpointDetails\":[{},{},{}]}],\"provisioningState\":\"Moving\"},\"etag\":\"q\",\"id\":\"hm\",\"name\":\"wsldrizetpwbr\",\"type\":\"lllibph\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .clusters() - .listOutboundNetworkDependenciesEndpoints("hokvbwnh", "tqlgehgppi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hpfeoajvgcxtxjc", response.iterator().next().category()); - Assertions.assertEquals("fidltug", response.iterator().next().endpoints().get(0).domainName()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusByResourceMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusByResourceMockTests.java deleted file mode 100644 index c3e9e651b355..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusByResourceMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.AzureResourceSku; -import com.azure.resourcemanager.kusto.models.AzureScaleType; -import com.azure.resourcemanager.kusto.models.AzureSkuName; -import com.azure.resourcemanager.kusto.models.AzureSkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersListSkusByResourceMockTests { - @Test - public void testListSkusByResource() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"resourceType\":\"kylkdghrj\",\"sku\":{\"name\":\"Standard_EC16as_v5+3TB_PS\",\"capacity\":1782916526,\"tier\":\"Standard\"},\"capacity\":{\"scaleType\":\"manual\",\"minimum\":102339077,\"maximum\":234998658,\"default\":442898580}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.clusters().listSkusByResource("rphkmcrjdqnsdfz", "bg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kylkdghrj", response.iterator().next().resourceType()); - Assertions.assertEquals(AzureSkuName.STANDARD_EC16AS_V5_3TB_PS, response.iterator().next().sku().name()); - Assertions.assertEquals(1782916526, response.iterator().next().sku().capacity()); - Assertions.assertEquals(AzureSkuTier.STANDARD, response.iterator().next().sku().tier()); - Assertions.assertEquals(AzureScaleType.MANUAL, response.iterator().next().capacity().scaleType()); - Assertions.assertEquals(102339077, response.iterator().next().capacity().minimum()); - Assertions.assertEquals(234998658, response.iterator().next().capacity().maximum()); - Assertions.assertEquals(442898580, response.iterator().next().capacity().defaultProperty()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusMockTests.java deleted file mode 100644 index f5fc3555fd77..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersListSkusMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.SkuDescription; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersListSkusMockTests { - @Test - public void testListSkus() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"resourceType\":\"gqdnfwqzd\",\"name\":\"tilaxh\",\"tier\":\"hqlyvijo\",\"locations\":[\"vk\"],\"locationInfo\":[{\"location\":\"zunbixx\",\"zones\":[\"kvcpwpgclr\",\"ivtsoxfrkenxpm\"],\"zoneDetails\":[{\"name\":[\"pmpdn\",\"qskaw\",\"oqvm\"],\"capabilities\":[{},{},{},{}]}]},{\"location\":\"pqfrtqlkz\",\"zones\":[\"nitgvkxlz\",\"qdrfegcealzxwhc\",\"nsymoyqhlwigd\"],\"zoneDetails\":[{\"name\":[\"xgomfajuwa\",\"qvdaeyyguxakjsq\"],\"capabilities\":[{},{},{},{}]},{\"name\":[\"zkgimsid\",\"asi\"],\"capabilities\":[{},{},{},{}]},{\"name\":[\"vjskgfmoc\",\"ah\",\"qgatjeaahhvjhhn\",\"kzyb\"],\"capabilities\":[{}]}]},{\"location\":\"idjks\",\"zones\":[\"yxvxevblbjed\",\"ljlageuaulxu\",\"smjbnkppxyn\",\"nlsvxeiz\"],\"zoneDetails\":[{\"name\":[\"nsrmffeycx\",\"ktp\"],\"capabilities\":[{},{},{},{}]},{\"name\":[\"teeammxqiekkkzd\",\"rtkgdojbmxvavref\"],\"capabilities\":[{},{},{}]},{\"name\":[\"ecuijpxtxs\",\"wprtu\"],\"capabilities\":[{},{},{},{}]}]},{\"location\":\"awddjibab\",\"zones\":[\"titvtzeexavox\",\"fglecdmdqbwp\",\"pqtgsfjac\",\"slhhxudbxv\"],\"zoneDetails\":[{\"name\":[\"sirudhzmmesckdlp\",\"gzrcxfailcfxwmdb\"],\"capabilities\":[{},{},{},{}]},{\"name\":[\"sftufqobrjlna\",\"gcckknhxkizvytn\",\"zvulj\",\"aaeranokqgukk\"],\"capabilities\":[{},{},{}]}]}],\"restrictions\":[\"dataroylaxxu\",\"datacdisd\"]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusters().listSkus(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersMigrateMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersMigrateMockTests.java deleted file mode 100644 index f73f318032d6..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersMigrateMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.ClusterMigrateRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersMigrateMockTests { - @Test - public void testMigrate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .clusters() - .migrate( - "xqvkjlmxhomdyn", - "dwdigumb", - new ClusterMigrateRequest().withClusterResourceId("raauzzpt"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersRemoveLanguageExtensionsMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersRemoveLanguageExtensionsMockTests.java deleted file mode 100644 index 9bcfaa26d660..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersRemoveLanguageExtensionsMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.fluent.models.LanguageExtensionInner; -import com.azure.resourcemanager.kusto.models.LanguageExtensionImageName; -import com.azure.resourcemanager.kusto.models.LanguageExtensionName; -import com.azure.resourcemanager.kusto.models.LanguageExtensionsList; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersRemoveLanguageExtensionsMockTests { - @Test - public void testRemoveLanguageExtensions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .clusters() - .removeLanguageExtensions( - "lhjlmuoyxprimr", - "opteecj", - new LanguageExtensionsList() - .withValue( - Arrays - .asList( - new LanguageExtensionInner() - .withLanguageExtensionName(LanguageExtensionName.PYTHON) - .withLanguageExtensionImageName(LanguageExtensionImageName.R), - new LanguageExtensionInner() - .withLanguageExtensionName(LanguageExtensionName.PYTHON) - .withLanguageExtensionImageName(LanguageExtensionImageName.PYTHON3_6_5))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersStartMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersStartMockTests.java deleted file mode 100644 index 7afb2208741d..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersStartMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersStartMockTests { - @Test - public void testStart() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusters().start("wf", "jlb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersStopMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersStopMockTests.java deleted file mode 100644 index 148f1f14f9ea..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ClustersStopMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersStopMockTests { - @Test - public void testStop() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusters().stop("iayz", "iykhy", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/CosmosDbDataConnectionPropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/CosmosDbDataConnectionPropertiesTests.java deleted file mode 100644 index 9d4393014817..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/CosmosDbDataConnectionPropertiesTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.CosmosDbDataConnectionProperties; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class CosmosDbDataConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CosmosDbDataConnectionProperties model = - BinaryData - .fromString( - "{\"tableName\":\"behwagohb\",\"mappingRuleName\":\"fkmr\",\"managedIdentityResourceId\":\"emvvhm\",\"managedIdentityObjectId\":\"drjf\",\"cosmosDbAccountResourceId\":\"tac\",\"cosmosDbDatabase\":\"ebjvewzcjzn\",\"cosmosDbContainer\":\"wcpmguaadraufac\",\"retrievalStartDate\":\"2021-12-01T13:50:18Z\",\"provisioningState\":\"Creating\"}") - .toObject(CosmosDbDataConnectionProperties.class); - Assertions.assertEquals("behwagohb", model.tableName()); - Assertions.assertEquals("fkmr", model.mappingRuleName()); - Assertions.assertEquals("emvvhm", model.managedIdentityResourceId()); - Assertions.assertEquals("tac", model.cosmosDbAccountResourceId()); - Assertions.assertEquals("ebjvewzcjzn", model.cosmosDbDatabase()); - Assertions.assertEquals("wcpmguaadraufac", model.cosmosDbContainer()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-01T13:50:18Z"), model.retrievalStartDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CosmosDbDataConnectionProperties model = - new CosmosDbDataConnectionProperties() - .withTableName("behwagohb") - .withMappingRuleName("fkmr") - .withManagedIdentityResourceId("emvvhm") - .withCosmosDbAccountResourceId("tac") - .withCosmosDbDatabase("ebjvewzcjzn") - .withCosmosDbContainer("wcpmguaadraufac") - .withRetrievalStartDate(OffsetDateTime.parse("2021-12-01T13:50:18Z")); - model = BinaryData.fromObject(model).toObject(CosmosDbDataConnectionProperties.class); - Assertions.assertEquals("behwagohb", model.tableName()); - Assertions.assertEquals("fkmr", model.mappingRuleName()); - Assertions.assertEquals("emvvhm", model.managedIdentityResourceId()); - Assertions.assertEquals("tac", model.cosmosDbAccountResourceId()); - Assertions.assertEquals("ebjvewzcjzn", model.cosmosDbDatabase()); - Assertions.assertEquals("wcpmguaadraufac", model.cosmosDbContainer()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-01T13:50:18Z"), model.retrievalStartDate()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/CosmosDbDataConnectionTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/CosmosDbDataConnectionTests.java deleted file mode 100644 index 2c0a858f4d15..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/CosmosDbDataConnectionTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.CosmosDbDataConnection; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class CosmosDbDataConnectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CosmosDbDataConnection model = - BinaryData - .fromString( - "{\"kind\":\"CosmosDb\",\"properties\":{\"tableName\":\"obaiyhddviaceg\",\"mappingRuleName\":\"m\",\"managedIdentityResourceId\":\"tfpmvmemfnczdw\",\"managedIdentityObjectId\":\"b\",\"cosmosDbAccountResourceId\":\"lxlllchpo\",\"cosmosDbDatabase\":\"bzevwrd\",\"cosmosDbContainer\":\"hfuk\",\"retrievalStartDate\":\"2021-04-26T19:15:59Z\",\"provisioningState\":\"Moving\"},\"location\":\"wsmystuluqypf\",\"id\":\"vlerchpqbmfpjba\",\"name\":\"widf\",\"type\":\"xsspuunnoxyhk\"}") - .toObject(CosmosDbDataConnection.class); - Assertions.assertEquals("wsmystuluqypf", model.location()); - Assertions.assertEquals("obaiyhddviaceg", model.tableName()); - Assertions.assertEquals("m", model.mappingRuleName()); - Assertions.assertEquals("tfpmvmemfnczdw", model.managedIdentityResourceId()); - Assertions.assertEquals("lxlllchpo", model.cosmosDbAccountResourceId()); - Assertions.assertEquals("bzevwrd", model.cosmosDbDatabase()); - Assertions.assertEquals("hfuk", model.cosmosDbContainer()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T19:15:59Z"), model.retrievalStartDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CosmosDbDataConnection model = - new CosmosDbDataConnection() - .withLocation("wsmystuluqypf") - .withTableName("obaiyhddviaceg") - .withMappingRuleName("m") - .withManagedIdentityResourceId("tfpmvmemfnczdw") - .withCosmosDbAccountResourceId("lxlllchpo") - .withCosmosDbDatabase("bzevwrd") - .withCosmosDbContainer("hfuk") - .withRetrievalStartDate(OffsetDateTime.parse("2021-04-26T19:15:59Z")); - model = BinaryData.fromObject(model).toObject(CosmosDbDataConnection.class); - Assertions.assertEquals("wsmystuluqypf", model.location()); - Assertions.assertEquals("obaiyhddviaceg", model.tableName()); - Assertions.assertEquals("m", model.mappingRuleName()); - Assertions.assertEquals("tfpmvmemfnczdw", model.managedIdentityResourceId()); - Assertions.assertEquals("lxlllchpo", model.cosmosDbAccountResourceId()); - Assertions.assertEquals("bzevwrd", model.cosmosDbDatabase()); - Assertions.assertEquals("hfuk", model.cosmosDbContainer()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T19:15:59Z"), model.retrievalStartDate()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionCheckNameRequestTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionCheckNameRequestTests.java deleted file mode 100644 index bdcf8eb2c89d..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionCheckNameRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.DataConnectionCheckNameRequest; -import org.junit.jupiter.api.Assertions; - -public final class DataConnectionCheckNameRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataConnectionCheckNameRequest model = - BinaryData.fromString("{\"name\":\"wjchrdg\"}").toObject(DataConnectionCheckNameRequest.class); - Assertions.assertEquals("wjchrdg", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataConnectionCheckNameRequest model = new DataConnectionCheckNameRequest().withName("wjchrdg"); - model = BinaryData.fromObject(model).toObject(DataConnectionCheckNameRequest.class); - Assertions.assertEquals("wjchrdg", model.name()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionInnerTests.java deleted file mode 100644 index 2fc0f483b30c..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DataConnectionInner; -import org.junit.jupiter.api.Assertions; - -public final class DataConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataConnectionInner model = - BinaryData - .fromString( - "{\"kind\":\"DataConnection\",\"location\":\"ncyg\",\"id\":\"p\",\"name\":\"vipmdscwxqupevzh\",\"type\":\"stotxh\"}") - .toObject(DataConnectionInner.class); - Assertions.assertEquals("ncyg", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataConnectionInner model = new DataConnectionInner().withLocation("ncyg"); - model = BinaryData.fromObject(model).toObject(DataConnectionInner.class); - Assertions.assertEquals("ncyg", model.location()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionListResultTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionListResultTests.java deleted file mode 100644 index f5fea91db8a9..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionListResultTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DataConnectionInner; -import com.azure.resourcemanager.kusto.models.DataConnectionListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DataConnectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataConnectionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"kind\":\"DataConnection\",\"location\":\"zxnfaaz\",\"id\":\"xdtnkdmkqjjlw\",\"name\":\"envrkpyouaibrebq\",\"type\":\"aysjkixqtnqttez\"},{\"kind\":\"DataConnection\",\"location\":\"fffiak\",\"id\":\"jpqqmted\",\"name\":\"tmmjihyeozph\",\"type\":\"wau\"}]}") - .toObject(DataConnectionListResult.class); - Assertions.assertEquals("zxnfaaz", model.value().get(0).location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataConnectionListResult model = - new DataConnectionListResult() - .withValue( - Arrays - .asList( - new DataConnectionInner().withLocation("zxnfaaz"), - new DataConnectionInner().withLocation("fffiak"))); - model = BinaryData.fromObject(model).toObject(DataConnectionListResult.class); - Assertions.assertEquals("zxnfaaz", model.value().get(0).location()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionValidationInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionValidationInnerTests.java deleted file mode 100644 index 42afc0c10447..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionValidationInnerTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DataConnectionInner; -import com.azure.resourcemanager.kusto.fluent.models.DataConnectionValidationInner; -import org.junit.jupiter.api.Assertions; - -public final class DataConnectionValidationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataConnectionValidationInner model = - BinaryData - .fromString( - "{\"dataConnectionName\":\"ujbypelmcuvhixb\",\"properties\":{\"kind\":\"DataConnection\",\"location\":\"fw\",\"id\":\"yl\",\"name\":\"coolsttpkiwkkb\",\"type\":\"ujrywvtyl\"}}") - .toObject(DataConnectionValidationInner.class); - Assertions.assertEquals("ujbypelmcuvhixb", model.dataConnectionName()); - Assertions.assertEquals("fw", model.properties().location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataConnectionValidationInner model = - new DataConnectionValidationInner() - .withDataConnectionName("ujbypelmcuvhixb") - .withProperties(new DataConnectionInner().withLocation("fw")); - model = BinaryData.fromObject(model).toObject(DataConnectionValidationInner.class); - Assertions.assertEquals("ujbypelmcuvhixb", model.dataConnectionName()); - Assertions.assertEquals("fw", model.properties().location()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionValidationListResultInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionValidationListResultInnerTests.java deleted file mode 100644 index 48cd8c7ad1c0..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionValidationListResultInnerTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DataConnectionValidationListResultInner; -import com.azure.resourcemanager.kusto.models.DataConnectionValidationResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DataConnectionValidationListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataConnectionValidationListResultInner model = - BinaryData - .fromString("{\"value\":[{\"errorMessage\":\"curdoiwiitht\"},{\"errorMessage\":\"ubxcbihw\"}]}") - .toObject(DataConnectionValidationListResultInner.class); - Assertions.assertEquals("curdoiwiitht", model.value().get(0).errorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataConnectionValidationListResultInner model = - new DataConnectionValidationListResultInner() - .withValue( - Arrays - .asList( - new DataConnectionValidationResult().withErrorMessage("curdoiwiitht"), - new DataConnectionValidationResult().withErrorMessage("ubxcbihw"))); - model = BinaryData.fromObject(model).toObject(DataConnectionValidationListResultInner.class); - Assertions.assertEquals("curdoiwiitht", model.value().get(0).errorMessage()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionValidationResultTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionValidationResultTests.java deleted file mode 100644 index 86a9469dd0d1..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionValidationResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.DataConnectionValidationResult; -import org.junit.jupiter.api.Assertions; - -public final class DataConnectionValidationResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataConnectionValidationResult model = - BinaryData.fromString("{\"errorMessage\":\"nfdn\"}").toObject(DataConnectionValidationResult.class); - Assertions.assertEquals("nfdn", model.errorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataConnectionValidationResult model = new DataConnectionValidationResult().withErrorMessage("nfdn"); - model = BinaryData.fromObject(model).toObject(DataConnectionValidationResult.class); - Assertions.assertEquals("nfdn", model.errorMessage()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCheckNameAvailabilityWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 2d9040e5dd3a..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.CheckNameResult; -import com.azure.resourcemanager.kusto.models.DataConnectionCheckNameRequest; -import com.azure.resourcemanager.kusto.models.Reason; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataConnectionsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nameAvailable\":true,\"name\":\"qyzqedikdfrdb\",\"message\":\"mrjgeihfqlggwfi\",\"reason\":\"AlreadyExists\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameResult response = - manager - .dataConnections() - .checkNameAvailabilityWithResponse( - "jpmcub", - "mifoxxkub", - "phavpmhbrb", - new DataConnectionCheckNameRequest().withName("gvgovpbbttefjo"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("qyzqedikdfrdb", response.name()); - Assertions.assertEquals("mrjgeihfqlggwfi", response.message()); - Assertions.assertEquals(Reason.ALREADY_EXISTS, response.reason()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCreateOrUpdateMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCreateOrUpdateMockTests.java deleted file mode 100644 index ad6dec680823..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.fluent.models.DataConnectionInner; -import com.azure.resourcemanager.kusto.models.DataConnection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataConnectionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"DataConnection\",\"location\":\"msplzgaufcshhvn\",\"id\":\"wgnxkympqanxrj\",\"name\":\"ixt\",\"type\":\"bta\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataConnection response = - manager - .dataConnections() - .createOrUpdate( - "rxwtoaukhfkvc", - "sizmoae", - "sx", - "wuived", - new DataConnectionInner().withLocation("gyeewxeiq"), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("msplzgaufcshhvn", response.location()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDataConnectionValidationMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDataConnectionValidationMockTests.java deleted file mode 100644 index 140a5e068276..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDataConnectionValidationMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.fluent.models.DataConnectionInner; -import com.azure.resourcemanager.kusto.fluent.models.DataConnectionValidationInner; -import com.azure.resourcemanager.kusto.models.DataConnectionValidationListResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataConnectionsDataConnectionValidationMockTests { - @Test - public void testDataConnectionValidation() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"errorMessage\":\"qwahoi\"},{\"errorMessage\":\"wgniipr\"},{\"errorMessage\":\"vawuwzdufypivlsb\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataConnectionValidationListResult response = - manager - .dataConnections() - .dataConnectionValidation( - "emmucfxh", - "kkflrmymyincqlhr", - "s", - new DataConnectionValidationInner() - .withDataConnectionName("lmiiiovg") - .withProperties(new DataConnectionInner().withLocation("xuugqkc")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qwahoi", response.value().get(0).errorMessage()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDeleteMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDeleteMockTests.java deleted file mode 100644 index 61c6cfd45111..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.dataConnections().delete("rkihcirld", "fx", "dcoxnbk", "ja", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsGetWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsGetWithResponseMockTests.java deleted file mode 100644 index ce4120ef7e33..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.DataConnection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"DataConnection\",\"location\":\"xhnpo\",\"id\":\"yqwcabvnuil\",\"name\":\"ey\",\"type\":\"swlpaugmrmfj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataConnection response = - manager - .dataConnections() - .getWithResponse("xmjpbyep", "mgtvlj", "rc", "yfqi", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xhnpo", response.location()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsListByDatabaseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsListByDatabaseMockTests.java deleted file mode 100644 index cf2909451c2b..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsListByDatabaseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.DataConnection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataConnectionsListByDatabaseMockTests { - @Test - public void testListByDatabase() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"kind\":\"DataConnection\",\"location\":\"jdjltymkmvgui\",\"id\":\"ywart\",\"name\":\"pphkixkykxds\",\"type\":\"j\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .dataConnections() - .listByDatabase("piudeugfsxzecpa", "wkufykhvuhxepm", "utznabaobns", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jdjltymkmvgui", response.iterator().next().location()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsUpdateMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsUpdateMockTests.java deleted file mode 100644 index 6b8677fec825..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DataConnectionsUpdateMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.fluent.models.DataConnectionInner; -import com.azure.resourcemanager.kusto.models.DataConnection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataConnectionsUpdateMockTests { - @Test - public void testUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"DataConnection\",\"location\":\"p\",\"id\":\"bkdq\",\"name\":\"rdzsylollgtrczzy\",\"type\":\"mxzjijpvua\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataConnection response = - manager - .dataConnections() - .update( - "ypnyghshxc", - "lhkgmnsghp", - "ycphdrwjjkhvyo", - "ac", - new DataConnectionInner().withLocation("zvxnqmhrp"), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("p", response.location()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseInnerTests.java deleted file mode 100644 index 2743ae60fd53..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DatabaseInner; -import org.junit.jupiter.api.Assertions; - -public final class DatabaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabaseInner model = - BinaryData - .fromString( - "{\"kind\":\"Database\",\"location\":\"iplrbpbewtghfgb\",\"id\":\"c\",\"name\":\"wxzvlvqhjkb\",\"type\":\"gibtnm\"}") - .toObject(DatabaseInner.class); - Assertions.assertEquals("iplrbpbewtghfgb", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseInner model = new DatabaseInner().withLocation("iplrbpbewtghfgb"); - model = BinaryData.fromObject(model).toObject(DatabaseInner.class); - Assertions.assertEquals("iplrbpbewtghfgb", model.location()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseInviteFollowerRequestTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseInviteFollowerRequestTests.java deleted file mode 100644 index cc2c71961849..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseInviteFollowerRequestTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.DatabaseInviteFollowerRequest; -import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DatabaseInviteFollowerRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabaseInviteFollowerRequest model = - BinaryData - .fromString( - "{\"inviteeEmail\":\"iebwwaloayqcgwrt\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"gwyzm\"],\"tablesToExclude\":[\"ongmtsa\",\"jcbpwxqpsrknft\",\"uvriuhprwm\",\"yvxqtayriwwroy\"],\"externalTablesToInclude\":[\"xrmcqibycnojvk\",\"mefqsgzvahapjyzh\",\"vgqzcjrvxd\",\"zlmwlxkvugfhz\"],\"externalTablesToExclude\":[\"wjvzunluthnn\",\"rnxipei\",\"pjzu\",\"e\"],\"materializedViewsToInclude\":[\"ultskzbbtdz\",\"mv\"],\"materializedViewsToExclude\":[\"gpw\",\"zuhkfpbsjyof\"],\"functionsToInclude\":[\"uusdttouwa\"],\"functionsToExclude\":[\"kqvkelnsmvbxwyjs\",\"lh\"]}}") - .toObject(DatabaseInviteFollowerRequest.class); - Assertions.assertEquals("iebwwaloayqcgwrt", model.inviteeEmail()); - Assertions.assertEquals("gwyzm", model.tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions.assertEquals("ongmtsa", model.tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions.assertEquals("xrmcqibycnojvk", model.tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions.assertEquals("wjvzunluthnn", model.tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions.assertEquals("ultskzbbtdz", model.tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions.assertEquals("gpw", model.tableLevelSharingProperties().materializedViewsToExclude().get(0)); - Assertions.assertEquals("uusdttouwa", model.tableLevelSharingProperties().functionsToInclude().get(0)); - Assertions.assertEquals("kqvkelnsmvbxwyjs", model.tableLevelSharingProperties().functionsToExclude().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseInviteFollowerRequest model = - new DatabaseInviteFollowerRequest() - .withInviteeEmail("iebwwaloayqcgwrt") - .withTableLevelSharingProperties( - new TableLevelSharingProperties() - .withTablesToInclude(Arrays.asList("gwyzm")) - .withTablesToExclude(Arrays.asList("ongmtsa", "jcbpwxqpsrknft", "uvriuhprwm", "yvxqtayriwwroy")) - .withExternalTablesToInclude( - Arrays.asList("xrmcqibycnojvk", "mefqsgzvahapjyzh", "vgqzcjrvxd", "zlmwlxkvugfhz")) - .withExternalTablesToExclude(Arrays.asList("wjvzunluthnn", "rnxipei", "pjzu", "e")) - .withMaterializedViewsToInclude(Arrays.asList("ultskzbbtdz", "mv")) - .withMaterializedViewsToExclude(Arrays.asList("gpw", "zuhkfpbsjyof")) - .withFunctionsToInclude(Arrays.asList("uusdttouwa")) - .withFunctionsToExclude(Arrays.asList("kqvkelnsmvbxwyjs", "lh"))); - model = BinaryData.fromObject(model).toObject(DatabaseInviteFollowerRequest.class); - Assertions.assertEquals("iebwwaloayqcgwrt", model.inviteeEmail()); - Assertions.assertEquals("gwyzm", model.tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions.assertEquals("ongmtsa", model.tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions.assertEquals("xrmcqibycnojvk", model.tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions.assertEquals("wjvzunluthnn", model.tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions.assertEquals("ultskzbbtdz", model.tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions.assertEquals("gpw", model.tableLevelSharingProperties().materializedViewsToExclude().get(0)); - Assertions.assertEquals("uusdttouwa", model.tableLevelSharingProperties().functionsToInclude().get(0)); - Assertions.assertEquals("kqvkelnsmvbxwyjs", model.tableLevelSharingProperties().functionsToExclude().get(0)); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseInviteFollowerResultInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseInviteFollowerResultInnerTests.java deleted file mode 100644 index 0eb3464e50dc..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseInviteFollowerResultInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DatabaseInviteFollowerResultInner; -import org.junit.jupiter.api.Assertions; - -public final class DatabaseInviteFollowerResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabaseInviteFollowerResultInner model = - BinaryData - .fromString("{\"generatedInvitation\":\"aalnjixi\"}") - .toObject(DatabaseInviteFollowerResultInner.class); - Assertions.assertEquals("aalnjixi", model.generatedInvitation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseInviteFollowerResultInner model = - new DatabaseInviteFollowerResultInner().withGeneratedInvitation("aalnjixi"); - model = BinaryData.fromObject(model).toObject(DatabaseInviteFollowerResultInner.class); - Assertions.assertEquals("aalnjixi", model.generatedInvitation()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseListResultTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseListResultTests.java deleted file mode 100644 index 081f3eb4f67d..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseListResultTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DatabaseInner; -import com.azure.resourcemanager.kusto.models.DatabaseListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DatabaseListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabaseListResult model = - BinaryData - .fromString( - "{\"nextLink\":\"txnrjaw\",\"value\":[{\"kind\":\"Database\",\"location\":\"xhniskxfbkpycgk\",\"id\":\"wndnhj\",\"name\":\"auwhvylwzbtdhx\",\"type\":\"jznb\"},{\"kind\":\"Database\",\"location\":\"ow\",\"id\":\"wpr\",\"name\":\"qlveualupjmkh\",\"type\":\"xobbcswsrt\"}]}") - .toObject(DatabaseListResult.class); - Assertions.assertEquals("txnrjaw", model.nextLink()); - Assertions.assertEquals("xhniskxfbkpycgk", model.value().get(0).location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseListResult model = - new DatabaseListResult() - .withNextLink("txnrjaw") - .withValue( - Arrays - .asList( - new DatabaseInner().withLocation("xhniskxfbkpycgk"), - new DatabaseInner().withLocation("ow"))); - model = BinaryData.fromObject(model).toObject(DatabaseListResult.class); - Assertions.assertEquals("txnrjaw", model.nextLink()); - Assertions.assertEquals("xhniskxfbkpycgk", model.value().get(0).location()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseOperationsInviteFollowerWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseOperationsInviteFollowerWithResponseMockTests.java deleted file mode 100644 index e5f2b4ee1252..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseOperationsInviteFollowerWithResponseMockTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.DatabaseInviteFollowerRequest; -import com.azure.resourcemanager.kusto.models.DatabaseInviteFollowerResult; -import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabaseOperationsInviteFollowerWithResponseMockTests { - @Test - public void testInviteFollowerWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"generatedInvitation\":\"ntacn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DatabaseInviteFollowerResult response = - manager - .databaseOperations() - .inviteFollowerWithResponse( - "nlaxpunjqikcz", - "vitac", - "xmfcsserxhtv", - new DatabaseInviteFollowerRequest() - .withInviteeEmail("oxhlw") - .withTableLevelSharingProperties( - new TableLevelSharingProperties() - .withTablesToInclude(Arrays.asList("gqrsxypruuu")) - .withTablesToExclude(Arrays.asList("chrszi", "oyuelyetn", "nb")) - .withExternalTablesToInclude(Arrays.asList("ggagfln", "gm", "rwahzjmucftbyr")) - .withExternalTablesToExclude(Arrays.asList("ohkpigqfu", "u", "kzmkwklsnoxaxmqe")) - .withMaterializedViewsToInclude(Arrays.asList("h", "jnhgwydyyn")) - .withMaterializedViewsToExclude(Arrays.asList("khgb")) - .withFunctionsToInclude(Arrays.asList("anarfdlpukhpyrne")) - .withFunctionsToExclude(Arrays.asList("cpeogkhnmgbrou", "ddbhf", "pfpazjzoywjxhpdu"))), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ntacn", response.generatedInvitation()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentCheckNameRequestTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentCheckNameRequestTests.java deleted file mode 100644 index 42ebc0718ec3..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentCheckNameRequestTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignmentCheckNameRequest; -import org.junit.jupiter.api.Assertions; - -public final class DatabasePrincipalAssignmentCheckNameRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabasePrincipalAssignmentCheckNameRequest model = - BinaryData.fromString("{\"name\":\"xyawj\"}").toObject(DatabasePrincipalAssignmentCheckNameRequest.class); - Assertions.assertEquals("xyawj", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabasePrincipalAssignmentCheckNameRequest model = - new DatabasePrincipalAssignmentCheckNameRequest().withName("xyawj"); - model = BinaryData.fromObject(model).toObject(DatabasePrincipalAssignmentCheckNameRequest.class); - Assertions.assertEquals("xyawj", model.name()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentInnerTests.java deleted file mode 100644 index ecbe4be9fc18..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentInnerTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalAssignmentInner; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; -import com.azure.resourcemanager.kusto.models.PrincipalType; -import org.junit.jupiter.api.Assertions; - -public final class DatabasePrincipalAssignmentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabasePrincipalAssignmentInner model = - BinaryData - .fromString( - "{\"properties\":{\"principalId\":\"aq\",\"role\":\"UnrestrictedViewer\",\"tenantId\":\"yjpkiidzyexz\",\"principalType\":\"App\",\"tenantName\":\"ixhnrztf\",\"principalName\":\"hb\",\"provisioningState\":\"Canceled\",\"aadObjectId\":\"alaulppggdtpnapn\"},\"id\":\"iropuhpigvpgylg\",\"name\":\"git\",\"type\":\"medjvcslynqwwncw\"}") - .toObject(DatabasePrincipalAssignmentInner.class); - Assertions.assertEquals("aq", model.principalId()); - Assertions.assertEquals(DatabasePrincipalRole.UNRESTRICTED_VIEWER, model.role()); - Assertions.assertEquals("yjpkiidzyexz", model.tenantId()); - Assertions.assertEquals(PrincipalType.APP, model.principalType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabasePrincipalAssignmentInner model = - new DatabasePrincipalAssignmentInner() - .withPrincipalId("aq") - .withRole(DatabasePrincipalRole.UNRESTRICTED_VIEWER) - .withTenantId("yjpkiidzyexz") - .withPrincipalType(PrincipalType.APP); - model = BinaryData.fromObject(model).toObject(DatabasePrincipalAssignmentInner.class); - Assertions.assertEquals("aq", model.principalId()); - Assertions.assertEquals(DatabasePrincipalRole.UNRESTRICTED_VIEWER, model.role()); - Assertions.assertEquals("yjpkiidzyexz", model.tenantId()); - Assertions.assertEquals(PrincipalType.APP, model.principalType()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentListResultTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentListResultTests.java deleted file mode 100644 index dce07f703082..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentListResultTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalAssignmentInner; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignmentListResult; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; -import com.azure.resourcemanager.kusto.models.PrincipalType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DatabasePrincipalAssignmentListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabasePrincipalAssignmentListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"principalId\":\"dahzxctobg\",\"role\":\"Ingestor\",\"tenantId\":\"moizpos\",\"principalType\":\"Group\",\"tenantName\":\"rcfbunrm\",\"principalName\":\"jhhkxbp\",\"provisioningState\":\"Running\",\"aadObjectId\":\"jhxxjyn\"},\"id\":\"u\",\"name\":\"ivkrtsw\",\"type\":\"xqzvszjfa\"},{\"properties\":{\"principalId\":\"j\",\"role\":\"User\",\"tenantId\":\"xivetvt\",\"principalType\":\"User\",\"tenantName\":\"qtdo\",\"principalName\":\"cbxvwvxyslqbh\",\"provisioningState\":\"Succeeded\",\"aadObjectId\":\"blytk\"},\"id\":\"lmpewwwfbkr\",\"name\":\"rn\",\"type\":\"vshqjohxcr\"},{\"properties\":{\"principalId\":\"fovasr\",\"role\":\"Viewer\",\"tenantId\":\"wbhsqfsub\",\"principalType\":\"App\",\"tenantName\":\"birx\",\"principalName\":\"ybsrfbjfdtwss\",\"provisioningState\":\"Running\",\"aadObjectId\":\"pvjzbe\"},\"id\":\"ilzznfqqnvwp\",\"name\":\"qtaruoujmkcjhwq\",\"type\":\"tjrybnwjewgdr\"},{\"properties\":{\"principalId\":\"rvnaenqpeh\",\"role\":\"UnrestrictedViewer\",\"tenantId\":\"oygmift\",\"principalType\":\"Group\",\"tenantName\":\"d\",\"principalName\":\"sl\",\"provisioningState\":\"Canceled\",\"aadObjectId\":\"qig\"},\"id\":\"nduhavhqlkthum\",\"name\":\"qolbgyc\",\"type\":\"uie\"}]}") - .toObject(DatabasePrincipalAssignmentListResult.class); - Assertions.assertEquals("dahzxctobg", model.value().get(0).principalId()); - Assertions.assertEquals(DatabasePrincipalRole.INGESTOR, model.value().get(0).role()); - Assertions.assertEquals("moizpos", model.value().get(0).tenantId()); - Assertions.assertEquals(PrincipalType.GROUP, model.value().get(0).principalType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabasePrincipalAssignmentListResult model = - new DatabasePrincipalAssignmentListResult() - .withValue( - Arrays - .asList( - new DatabasePrincipalAssignmentInner() - .withPrincipalId("dahzxctobg") - .withRole(DatabasePrincipalRole.INGESTOR) - .withTenantId("moizpos") - .withPrincipalType(PrincipalType.GROUP), - new DatabasePrincipalAssignmentInner() - .withPrincipalId("j") - .withRole(DatabasePrincipalRole.USER) - .withTenantId("xivetvt") - .withPrincipalType(PrincipalType.USER), - new DatabasePrincipalAssignmentInner() - .withPrincipalId("fovasr") - .withRole(DatabasePrincipalRole.VIEWER) - .withTenantId("wbhsqfsub") - .withPrincipalType(PrincipalType.APP), - new DatabasePrincipalAssignmentInner() - .withPrincipalId("rvnaenqpeh") - .withRole(DatabasePrincipalRole.UNRESTRICTED_VIEWER) - .withTenantId("oygmift") - .withPrincipalType(PrincipalType.GROUP))); - model = BinaryData.fromObject(model).toObject(DatabasePrincipalAssignmentListResult.class); - Assertions.assertEquals("dahzxctobg", model.value().get(0).principalId()); - Assertions.assertEquals(DatabasePrincipalRole.INGESTOR, model.value().get(0).role()); - Assertions.assertEquals("moizpos", model.value().get(0).tenantId()); - Assertions.assertEquals(PrincipalType.GROUP, model.value().get(0).principalType()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index d3fbe449d877..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.CheckNameResult; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignmentCheckNameRequest; -import com.azure.resourcemanager.kusto.models.Reason; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasePrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nameAvailable\":true,\"name\":\"lnvnafvvkyfedev\",\"message\":\"oslc\",\"reason\":\"Invalid\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameResult response = - manager - .databasePrincipalAssignments() - .checkNameAvailabilityWithResponse( - "qwtehtuevr", - "rljyoogwxhnsdu", - "gwbsreurf", - new DatabasePrincipalAssignmentCheckNameRequest().withName("kfuarenlv"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("lnvnafvvkyfedev", response.name()); - Assertions.assertEquals("oslc", response.message()); - Assertions.assertEquals(Reason.INVALID, response.reason()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCreateOrUpdateMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCreateOrUpdateMockTests.java deleted file mode 100644 index 41b038fd1578..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignment; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; -import com.azure.resourcemanager.kusto.models.PrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasePrincipalAssignmentsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"principalId\":\"kcudfbsfarfsiowl\",\"role\":\"Monitor\",\"tenantId\":\"nqpvwgfstmhqykiz\",\"principalType\":\"Group\",\"tenantName\":\"saoafcluqvox\",\"principalName\":\"cjimryvwgcwwpbmz\",\"provisioningState\":\"Succeeded\",\"aadObjectId\":\"ydsx\"},\"id\":\"efoh\",\"name\":\"cbvopwndyqleallk\",\"type\":\"mtkhlowkxxpvbr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DatabasePrincipalAssignment response = - manager - .databasePrincipalAssignments() - .define("fdmmcpug") - .withExistingDatabase("yyrmfsvbp", "vbopfppdbwnu", "gahxkumasjcaa") - .withPrincipalId("hqepvufhbzehewh") - .withRole(DatabasePrincipalRole.ADMIN) - .withTenantId("nlbqnbldxeaclg") - .withPrincipalType(PrincipalType.USER) - .create(); - - Assertions.assertEquals("kcudfbsfarfsiowl", response.principalId()); - Assertions.assertEquals(DatabasePrincipalRole.MONITOR, response.role()); - Assertions.assertEquals("nqpvwgfstmhqykiz", response.tenantId()); - Assertions.assertEquals(PrincipalType.GROUP, response.principalType()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsDeleteMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsDeleteMockTests.java deleted file mode 100644 index f3b8eadcfac2..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasePrincipalAssignmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .databasePrincipalAssignments() - .delete("lobdxna", "pmkmlmvevfx", "op", "hbzxli", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsGetWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsGetWithResponseMockTests.java deleted file mode 100644 index 841367ea60a5..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsGetWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignment; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; -import com.azure.resourcemanager.kusto.models.PrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasePrincipalAssignmentsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"principalId\":\"aqdtvqecrqctmxxd\",\"role\":\"Ingestor\",\"tenantId\":\"mflhuytxzvtznapx\",\"principalType\":\"App\",\"tenantName\":\"novv\",\"principalName\":\"czytprwn\",\"provisioningState\":\"Canceled\",\"aadObjectId\":\"ev\"},\"id\":\"tlyo\",\"name\":\"rrrouuxvnsa\",\"type\":\"bcrymodizrx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DatabasePrincipalAssignment response = - manager - .databasePrincipalAssignments() - .getWithResponse("p", "kkhminqcymczngn", "dxxewuninv", "db", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("aqdtvqecrqctmxxd", response.principalId()); - Assertions.assertEquals(DatabasePrincipalRole.INGESTOR, response.role()); - Assertions.assertEquals("mflhuytxzvtznapx", response.tenantId()); - Assertions.assertEquals(PrincipalType.APP, response.principalType()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsListMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsListMockTests.java deleted file mode 100644 index 19fa89c176d4..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalAssignmentsListMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignment; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; -import com.azure.resourcemanager.kusto.models.PrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasePrincipalAssignmentsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"principalId\":\"apqofyuicdhz\",\"role\":\"Viewer\",\"tenantId\":\"bwwg\",\"principalType\":\"App\",\"tenantName\":\"ibidmhmwffp\",\"principalName\":\"muvapc\",\"provisioningState\":\"Deleting\",\"aadObjectId\":\"rv\"},\"id\":\"eyoxoyyukphai\",\"name\":\"moiroqb\",\"type\":\"shbraga\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .databasePrincipalAssignments() - .list("hrdd", "tfgxqbawpcb", "nzqcy", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("apqofyuicdhz", response.iterator().next().principalId()); - Assertions.assertEquals(DatabasePrincipalRole.VIEWER, response.iterator().next().role()); - Assertions.assertEquals("bwwg", response.iterator().next().tenantId()); - Assertions.assertEquals(PrincipalType.APP, response.iterator().next().principalType()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalInnerTests.java deleted file mode 100644 index 12d1df5b2d29..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalInnerTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalInner; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalType; -import org.junit.jupiter.api.Assertions; - -public final class DatabasePrincipalInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabasePrincipalInner model = - BinaryData - .fromString( - "{\"role\":\"Viewer\",\"name\":\"kqze\",\"type\":\"Group\",\"fqn\":\"dltfz\",\"email\":\"hhvh\",\"appId\":\"r\",\"tenantName\":\"dkwobdagx\"}") - .toObject(DatabasePrincipalInner.class); - Assertions.assertEquals(DatabasePrincipalRole.VIEWER, model.role()); - Assertions.assertEquals("kqze", model.name()); - Assertions.assertEquals(DatabasePrincipalType.GROUP, model.type()); - Assertions.assertEquals("dltfz", model.fqn()); - Assertions.assertEquals("hhvh", model.email()); - Assertions.assertEquals("r", model.appId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabasePrincipalInner model = - new DatabasePrincipalInner() - .withRole(DatabasePrincipalRole.VIEWER) - .withName("kqze") - .withType(DatabasePrincipalType.GROUP) - .withFqn("dltfz") - .withEmail("hhvh") - .withAppId("r"); - model = BinaryData.fromObject(model).toObject(DatabasePrincipalInner.class); - Assertions.assertEquals(DatabasePrincipalRole.VIEWER, model.role()); - Assertions.assertEquals("kqze", model.name()); - Assertions.assertEquals(DatabasePrincipalType.GROUP, model.type()); - Assertions.assertEquals("dltfz", model.fqn()); - Assertions.assertEquals("hhvh", model.email()); - Assertions.assertEquals("r", model.appId()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalListRequestTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalListRequestTests.java deleted file mode 100644 index 4c41a51a9a71..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalListRequestTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalInner; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalListRequest; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DatabasePrincipalListRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabasePrincipalListRequest model = - BinaryData - .fromString( - "{\"value\":[{\"role\":\"Viewer\",\"name\":\"dxbx\",\"type\":\"App\",\"fqn\":\"bogqxndlkzgxhu\",\"email\":\"plbpodxun\",\"appId\":\"ebxmubyynt\",\"tenantName\":\"rbqtkoie\"},{\"role\":\"User\",\"name\":\"eotg\",\"type\":\"User\",\"fqn\":\"ltmuwlauwzizx\",\"email\":\"pgcjefuzmuvp\",\"appId\":\"tdum\",\"tenantName\":\"p\"}]}") - .toObject(DatabasePrincipalListRequest.class); - Assertions.assertEquals(DatabasePrincipalRole.VIEWER, model.value().get(0).role()); - Assertions.assertEquals("dxbx", model.value().get(0).name()); - Assertions.assertEquals(DatabasePrincipalType.APP, model.value().get(0).type()); - Assertions.assertEquals("bogqxndlkzgxhu", model.value().get(0).fqn()); - Assertions.assertEquals("plbpodxun", model.value().get(0).email()); - Assertions.assertEquals("ebxmubyynt", model.value().get(0).appId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabasePrincipalListRequest model = - new DatabasePrincipalListRequest() - .withValue( - Arrays - .asList( - new DatabasePrincipalInner() - .withRole(DatabasePrincipalRole.VIEWER) - .withName("dxbx") - .withType(DatabasePrincipalType.APP) - .withFqn("bogqxndlkzgxhu") - .withEmail("plbpodxun") - .withAppId("ebxmubyynt"), - new DatabasePrincipalInner() - .withRole(DatabasePrincipalRole.USER) - .withName("eotg") - .withType(DatabasePrincipalType.USER) - .withFqn("ltmuwlauwzizx") - .withEmail("pgcjefuzmuvp") - .withAppId("tdum"))); - model = BinaryData.fromObject(model).toObject(DatabasePrincipalListRequest.class); - Assertions.assertEquals(DatabasePrincipalRole.VIEWER, model.value().get(0).role()); - Assertions.assertEquals("dxbx", model.value().get(0).name()); - Assertions.assertEquals(DatabasePrincipalType.APP, model.value().get(0).type()); - Assertions.assertEquals("bogqxndlkzgxhu", model.value().get(0).fqn()); - Assertions.assertEquals("plbpodxun", model.value().get(0).email()); - Assertions.assertEquals("ebxmubyynt", model.value().get(0).appId()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalListResultInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalListResultInnerTests.java deleted file mode 100644 index 0d38f0b781af..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalListResultInnerTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalInner; -import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalListResultInner; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DatabasePrincipalListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabasePrincipalListResultInner model = - BinaryData - .fromString( - "{\"value\":[{\"role\":\"Admin\",\"name\":\"cym\",\"type\":\"Group\",\"fqn\":\"l\",\"email\":\"slqlfmmdn\",\"appId\":\"glzpswiydm\",\"tenantName\":\"yhz\"},{\"role\":\"Ingestor\",\"name\":\"ss\",\"type\":\"Group\",\"fqn\":\"zmnvdfznudaod\",\"email\":\"zbn\",\"appId\":\"lylpstdb\",\"tenantName\":\"xsrz\"},{\"role\":\"User\",\"name\":\"ucerscdntnevfi\",\"type\":\"Group\",\"fqn\":\"ygtdsslswt\",\"email\":\"eriofzpyqs\",\"appId\":\"wab\",\"tenantName\":\"tshhszhedp\"},{\"role\":\"Viewer\",\"name\":\"wiwubm\",\"type\":\"User\",\"fqn\":\"esl\",\"email\":\"k\",\"appId\":\"tppjflcx\",\"tenantName\":\"aokonzmnsik\"}]}") - .toObject(DatabasePrincipalListResultInner.class); - Assertions.assertEquals(DatabasePrincipalRole.ADMIN, model.value().get(0).role()); - Assertions.assertEquals("cym", model.value().get(0).name()); - Assertions.assertEquals(DatabasePrincipalType.GROUP, model.value().get(0).type()); - Assertions.assertEquals("l", model.value().get(0).fqn()); - Assertions.assertEquals("slqlfmmdn", model.value().get(0).email()); - Assertions.assertEquals("glzpswiydm", model.value().get(0).appId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabasePrincipalListResultInner model = - new DatabasePrincipalListResultInner() - .withValue( - Arrays - .asList( - new DatabasePrincipalInner() - .withRole(DatabasePrincipalRole.ADMIN) - .withName("cym") - .withType(DatabasePrincipalType.GROUP) - .withFqn("l") - .withEmail("slqlfmmdn") - .withAppId("glzpswiydm"), - new DatabasePrincipalInner() - .withRole(DatabasePrincipalRole.INGESTOR) - .withName("ss") - .withType(DatabasePrincipalType.GROUP) - .withFqn("zmnvdfznudaod") - .withEmail("zbn") - .withAppId("lylpstdb"), - new DatabasePrincipalInner() - .withRole(DatabasePrincipalRole.USER) - .withName("ucerscdntnevfi") - .withType(DatabasePrincipalType.GROUP) - .withFqn("ygtdsslswt") - .withEmail("eriofzpyqs") - .withAppId("wab"), - new DatabasePrincipalInner() - .withRole(DatabasePrincipalRole.VIEWER) - .withName("wiwubm") - .withType(DatabasePrincipalType.USER) - .withFqn("esl") - .withEmail("k") - .withAppId("tppjflcx"))); - model = BinaryData.fromObject(model).toObject(DatabasePrincipalListResultInner.class); - Assertions.assertEquals(DatabasePrincipalRole.ADMIN, model.value().get(0).role()); - Assertions.assertEquals("cym", model.value().get(0).name()); - Assertions.assertEquals(DatabasePrincipalType.GROUP, model.value().get(0).type()); - Assertions.assertEquals("l", model.value().get(0).fqn()); - Assertions.assertEquals("slqlfmmdn", model.value().get(0).email()); - Assertions.assertEquals("glzpswiydm", model.value().get(0).appId()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalPropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalPropertiesTests.java deleted file mode 100644 index e2fe1b9b9488..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasePrincipalPropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalProperties; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; -import com.azure.resourcemanager.kusto.models.PrincipalType; -import org.junit.jupiter.api.Assertions; - -public final class DatabasePrincipalPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabasePrincipalProperties model = - BinaryData - .fromString( - "{\"principalId\":\"zhxgktrmgucn\",\"role\":\"UnrestrictedViewer\",\"tenantId\":\"t\",\"principalType\":\"App\",\"tenantName\":\"llwptfdy\",\"principalName\":\"fqbuaceopzf\",\"provisioningState\":\"Succeeded\",\"aadObjectId\":\"uaopppcqeq\"}") - .toObject(DatabasePrincipalProperties.class); - Assertions.assertEquals("zhxgktrmgucn", model.principalId()); - Assertions.assertEquals(DatabasePrincipalRole.UNRESTRICTED_VIEWER, model.role()); - Assertions.assertEquals("t", model.tenantId()); - Assertions.assertEquals(PrincipalType.APP, model.principalType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabasePrincipalProperties model = - new DatabasePrincipalProperties() - .withPrincipalId("zhxgktrmgucn") - .withRole(DatabasePrincipalRole.UNRESTRICTED_VIEWER) - .withTenantId("t") - .withPrincipalType(PrincipalType.APP); - model = BinaryData.fromObject(model).toObject(DatabasePrincipalProperties.class); - Assertions.assertEquals("zhxgktrmgucn", model.principalId()); - Assertions.assertEquals(DatabasePrincipalRole.UNRESTRICTED_VIEWER, model.role()); - Assertions.assertEquals("t", model.tenantId()); - Assertions.assertEquals(PrincipalType.APP, model.principalType()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseStatisticsTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseStatisticsTests.java deleted file mode 100644 index ee3b5bb7722a..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabaseStatisticsTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.DatabaseStatistics; -import org.junit.jupiter.api.Assertions; - -public final class DatabaseStatisticsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabaseStatistics model = BinaryData.fromString("{\"size\":23.999287}").toObject(DatabaseStatistics.class); - Assertions.assertEquals(23.999287F, model.size()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseStatistics model = new DatabaseStatistics().withSize(23.999287F); - model = BinaryData.fromObject(model).toObject(DatabaseStatistics.class); - Assertions.assertEquals(23.999287F, model.size()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesAddPrincipalsWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesAddPrincipalsWithResponseMockTests.java deleted file mode 100644 index 14243a3efef3..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesAddPrincipalsWithResponseMockTests.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalInner; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalListRequest; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalListResult; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasesAddPrincipalsWithResponseMockTests { - @Test - public void testAddPrincipalsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"role\":\"UnrestrictedViewer\",\"name\":\"vwbcblembnkbwv\",\"type\":\"Group\",\"fqn\":\"kdi\",\"email\":\"ihebwtsw\",\"appId\":\"uwfmduragegizvc\",\"tenantName\":\"elisdjub\"},{\"role\":\"Admin\",\"name\":\"bqigkx\",\"type\":\"Group\",\"fqn\":\"azgakg\",\"email\":\"yrcmjdmspofap\",\"appId\":\"hryl\",\"tenantName\":\"ofrzgb\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DatabasePrincipalListResult response = - manager - .databases() - .addPrincipalsWithResponse( - "zxrvxcus", - "sphaivmxyasflvg", - "gzwywak", - new DatabasePrincipalListRequest() - .withValue( - Arrays - .asList( - new DatabasePrincipalInner() - .withRole(DatabasePrincipalRole.USER) - .withName("nsmjbl") - .withType(DatabasePrincipalType.GROUP) - .withFqn("hlnymzotq") - .withEmail("yuzcbmqqvxmvw") - .withAppId("tayx"), - new DatabasePrincipalInner() - .withRole(DatabasePrincipalRole.MONITOR) - .withName("lzqnhcvs") - .withType(DatabasePrincipalType.USER) - .withFqn("nzoibgsxgnx") - .withEmail("qonmpqoxwdof") - .withAppId("xiqxeiiqbimh"))), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(DatabasePrincipalRole.UNRESTRICTED_VIEWER, response.value().get(0).role()); - Assertions.assertEquals("vwbcblembnkbwv", response.value().get(0).name()); - Assertions.assertEquals(DatabasePrincipalType.GROUP, response.value().get(0).type()); - Assertions.assertEquals("kdi", response.value().get(0).fqn()); - Assertions.assertEquals("ihebwtsw", response.value().get(0).email()); - Assertions.assertEquals("uwfmduragegizvc", response.value().get(0).appId()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesCheckNameAvailabilityWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 4029c70b14a5..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.CheckNameRequest; -import com.azure.resourcemanager.kusto.models.CheckNameResult; -import com.azure.resourcemanager.kusto.models.Reason; -import com.azure.resourcemanager.kusto.models.Type; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasesCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nameAvailable\":false,\"name\":\"kwv\",\"message\":\"nzvdfbzdixzmq\",\"reason\":\"AlreadyExists\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameResult response = - manager - .databases() - .checkNameAvailabilityWithResponse( - "vkzqk", - "jeokbzefezrxccz", - new CheckNameRequest() - .withName("rtle") - .withType(Type.MICROSOFT_KUSTO_CLUSTERS_ATTACHED_DATABASE_CONFIGURATIONS), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals("kwv", response.name()); - Assertions.assertEquals("nzvdfbzdixzmq", response.message()); - Assertions.assertEquals(Reason.ALREADY_EXISTS, response.reason()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesCreateOrUpdateMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesCreateOrUpdateMockTests.java deleted file mode 100644 index 91c681888f3e..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.fluent.models.DatabaseInner; -import com.azure.resourcemanager.kusto.models.CallerRole; -import com.azure.resourcemanager.kusto.models.Database; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"Database\",\"location\":\"nm\",\"id\":\"jng\",\"name\":\"qdqx\",\"type\":\"bjwgnyfus\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Database response = - manager - .databases() - .createOrUpdate( - "wexjkmfxapjwogq", - "nobpudcdabtqwpw", - "awbzasqb", - new DatabaseInner().withLocation("ljgkyex"), - CallerRole.ADMIN, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nm", response.location()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesDeleteMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesDeleteMockTests.java deleted file mode 100644 index c967312b7c00..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.databases().delete("lxecwcrojphslh", "awjutifd", "fmvigorqjbttzh", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesGetWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesGetWithResponseMockTests.java deleted file mode 100644 index 4d33938d54a1..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesGetWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.Database; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"Database\",\"location\":\"hzvechndbnwieho\",\"id\":\"ewjwiuubw\",\"name\":\"fqsfa\",\"type\":\"aqtferr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Database response = - manager - .databases() - .getWithResponse("mo", "ayzejnhlbkpbz", "cpilj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hzvechndbnwieho", response.location()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesListByClusterMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesListByClusterMockTests.java deleted file mode 100644 index 5aaa7f660b1c..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesListByClusterMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.Database; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasesListByClusterMockTests { - @Test - public void testListByCluster() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"kind\":\"Database\",\"location\":\"lbiojlvfhrb\",\"id\":\"pn\",\"name\":\"qvcww\",\"type\":\"yurmochpprprs\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .databases() - .listByCluster("d", "wopqhewjptmcgs", 888576031, "stzelndlatut", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lbiojlvfhrb", response.iterator().next().location()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesListPrincipalsMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesListPrincipalsMockTests.java deleted file mode 100644 index 1cb1a0cd5611..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesListPrincipalsMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.DatabasePrincipal; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasesListPrincipalsMockTests { - @Test - public void testListPrincipals() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"role\":\"Viewer\",\"name\":\"p\",\"type\":\"User\",\"fqn\":\"xelnwc\",\"email\":\"yjede\",\"appId\":\"mlfmkqs\",\"tenantName\":\"zuawxtzxpuamwa\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.databases().listPrincipals("aglkafhon", "juj", "ickpz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(DatabasePrincipalRole.VIEWER, response.iterator().next().role()); - Assertions.assertEquals("p", response.iterator().next().name()); - Assertions.assertEquals(DatabasePrincipalType.USER, response.iterator().next().type()); - Assertions.assertEquals("xelnwc", response.iterator().next().fqn()); - Assertions.assertEquals("yjede", response.iterator().next().email()); - Assertions.assertEquals("mlfmkqs", response.iterator().next().appId()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesRemovePrincipalsWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesRemovePrincipalsWithResponseMockTests.java deleted file mode 100644 index 5002b961257c..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesRemovePrincipalsWithResponseMockTests.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalInner; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalListRequest; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalListResult; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; -import com.azure.resourcemanager.kusto.models.DatabasePrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasesRemovePrincipalsWithResponseMockTests { - @Test - public void testRemovePrincipalsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"role\":\"Viewer\",\"name\":\"aqutdewemxswvruu\",\"type\":\"App\",\"fqn\":\"jgehkf\",\"email\":\"m\",\"appId\":\"ixokffqyin\",\"tenantName\":\"qepqwhixmon\"},{\"role\":\"Admin\",\"name\":\"shiy\",\"type\":\"App\",\"fqn\":\"elfclducc\",\"email\":\"rds\",\"appId\":\"wcobie\",\"tenantName\":\"tmninw\"},{\"role\":\"Ingestor\",\"name\":\"zcilnghg\",\"type\":\"Group\",\"fqn\":\"jjtbxqmuluxlxqz\",\"email\":\"ers\",\"appId\":\"cucrwnamikze\",\"tenantName\":\"qbsms\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DatabasePrincipalListResult response = - manager - .databases() - .removePrincipalsWithResponse( - "jed", - "st", - "vnlvxbcuiiznktwf", - new DatabasePrincipalListRequest() - .withValue( - Arrays - .asList( - new DatabasePrincipalInner() - .withRole(DatabasePrincipalRole.UNRESTRICTED_VIEWER) - .withName("v") - .withType(DatabasePrincipalType.USER) - .withFqn("bmikost") - .withEmail("bkiw") - .withAppId("qnyophzfyls"), - new DatabasePrincipalInner() - .withRole(DatabasePrincipalRole.ADMIN) - .withName("zelfwyfwl") - .withType(DatabasePrincipalType.APP) - .withFqn("wetnpsihc") - .withEmail("fzvaylptr") - .withAppId("qwztcmwqkc"), - new DatabasePrincipalInner() - .withRole(DatabasePrincipalRole.ADMIN) - .withName("fdeqvhpsyl") - .withType(DatabasePrincipalType.GROUP) - .withFqn("hkbffmbm") - .withEmail("jrgywwpgjxsn") - .withAppId("fujg"))), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(DatabasePrincipalRole.VIEWER, response.value().get(0).role()); - Assertions.assertEquals("aqutdewemxswvruu", response.value().get(0).name()); - Assertions.assertEquals(DatabasePrincipalType.APP, response.value().get(0).type()); - Assertions.assertEquals("jgehkf", response.value().get(0).fqn()); - Assertions.assertEquals("m", response.value().get(0).email()); - Assertions.assertEquals("ixokffqyin", response.value().get(0).appId()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesUpdateMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesUpdateMockTests.java deleted file mode 100644 index f489210e83d9..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DatabasesUpdateMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.fluent.models.DatabaseInner; -import com.azure.resourcemanager.kusto.models.CallerRole; -import com.azure.resourcemanager.kusto.models.Database; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatabasesUpdateMockTests { - @Test - public void testUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"Database\",\"location\":\"zid\",\"id\":\"xwaabzmifrygznmm\",\"name\":\"xrizkzobgop\",\"type\":\"lhslnelxieixyn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Database response = - manager - .databases() - .update( - "zsvtuikzhajqgl", - "fh", - "l", - new DatabaseInner().withLocation("ryxynqnzrd"), - CallerRole.ADMIN, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zid", response.location()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DiagnoseVirtualNetworkResultInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DiagnoseVirtualNetworkResultInnerTests.java deleted file mode 100644 index 732991ada6f3..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/DiagnoseVirtualNetworkResultInnerTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.DiagnoseVirtualNetworkResultInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnoseVirtualNetworkResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnoseVirtualNetworkResultInner model = - BinaryData - .fromString("{\"findings\":[\"zj\",\"yggdtjixh\"]}") - .toObject(DiagnoseVirtualNetworkResultInner.class); - Assertions.assertEquals("zj", model.findings().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnoseVirtualNetworkResultInner model = - new DiagnoseVirtualNetworkResultInner().withFindings(Arrays.asList("zj", "yggdtjixh")); - model = BinaryData.fromObject(model).toObject(DiagnoseVirtualNetworkResultInner.class); - Assertions.assertEquals("zj", model.findings().get(0)); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EndpointDependencyTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EndpointDependencyTests.java deleted file mode 100644 index 7aa5627b1428..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EndpointDependencyTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.EndpointDependency; -import com.azure.resourcemanager.kusto.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\":\"kfzbeyvpnqicvi\",\"endpointDetails\":[{\"port\":273661642}]}") - .toObject(EndpointDependency.class); - Assertions.assertEquals("kfzbeyvpnqicvi", model.domainName()); - Assertions.assertEquals(273661642, model.endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndpointDependency model = - new EndpointDependency() - .withDomainName("kfzbeyvpnqicvi") - .withEndpointDetails(Arrays.asList(new EndpointDetail().withPort(273661642))); - model = BinaryData.fromObject(model).toObject(EndpointDependency.class); - Assertions.assertEquals("kfzbeyvpnqicvi", model.domainName()); - Assertions.assertEquals(273661642, model.endpointDetails().get(0).port()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EndpointDetailTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EndpointDetailTests.java deleted file mode 100644 index c5cf56e1fc41..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EndpointDetailTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.EndpointDetail; -import org.junit.jupiter.api.Assertions; - -public final class EndpointDetailTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EndpointDetail model = BinaryData.fromString("{\"port\":611015935}").toObject(EndpointDetail.class); - Assertions.assertEquals(611015935, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndpointDetail model = new EndpointDetail().withPort(611015935); - model = BinaryData.fromObject(model).toObject(EndpointDetail.class); - Assertions.assertEquals(611015935, model.port()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EventGridConnectionPropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EventGridConnectionPropertiesTests.java deleted file mode 100644 index e85bba33a155..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EventGridConnectionPropertiesTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.EventGridConnectionProperties; -import com.azure.resourcemanager.kusto.models.BlobStorageEventType; -import com.azure.resourcemanager.kusto.models.DatabaseRouting; -import com.azure.resourcemanager.kusto.models.EventGridDataFormat; -import org.junit.jupiter.api.Assertions; - -public final class EventGridConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventGridConnectionProperties model = - BinaryData - .fromString( - "{\"storageAccountResourceId\":\"goo\",\"eventGridResourceId\":\"kqfqjbvl\",\"eventHubResourceId\":\"orfmluiqt\",\"consumerGroup\":\"zf\",\"tableName\":\"yvnqqybaryeuay\",\"mappingRuleName\":\"qabqgzslesjcb\",\"dataFormat\":\"AVRO\",\"ignoreFirstRecord\":false,\"blobStorageEventType\":\"Microsoft.Storage.BlobCreated\",\"managedIdentityResourceId\":\"w\",\"managedIdentityObjectId\":\"cv\",\"databaseRouting\":\"Multi\",\"provisioningState\":\"Succeeded\"}") - .toObject(EventGridConnectionProperties.class); - Assertions.assertEquals("goo", model.storageAccountResourceId()); - Assertions.assertEquals("kqfqjbvl", model.eventGridResourceId()); - Assertions.assertEquals("orfmluiqt", model.eventHubResourceId()); - Assertions.assertEquals("zf", model.consumerGroup()); - Assertions.assertEquals("yvnqqybaryeuay", model.tableName()); - Assertions.assertEquals("qabqgzslesjcb", model.mappingRuleName()); - Assertions.assertEquals(EventGridDataFormat.AVRO, model.dataFormat()); - Assertions.assertEquals(false, model.ignoreFirstRecord()); - Assertions.assertEquals(BlobStorageEventType.MICROSOFT_STORAGE_BLOB_CREATED, model.blobStorageEventType()); - Assertions.assertEquals("w", model.managedIdentityResourceId()); - Assertions.assertEquals(DatabaseRouting.MULTI, model.databaseRouting()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventGridConnectionProperties model = - new EventGridConnectionProperties() - .withStorageAccountResourceId("goo") - .withEventGridResourceId("kqfqjbvl") - .withEventHubResourceId("orfmluiqt") - .withConsumerGroup("zf") - .withTableName("yvnqqybaryeuay") - .withMappingRuleName("qabqgzslesjcb") - .withDataFormat(EventGridDataFormat.AVRO) - .withIgnoreFirstRecord(false) - .withBlobStorageEventType(BlobStorageEventType.MICROSOFT_STORAGE_BLOB_CREATED) - .withManagedIdentityResourceId("w") - .withDatabaseRouting(DatabaseRouting.MULTI); - model = BinaryData.fromObject(model).toObject(EventGridConnectionProperties.class); - Assertions.assertEquals("goo", model.storageAccountResourceId()); - Assertions.assertEquals("kqfqjbvl", model.eventGridResourceId()); - Assertions.assertEquals("orfmluiqt", model.eventHubResourceId()); - Assertions.assertEquals("zf", model.consumerGroup()); - Assertions.assertEquals("yvnqqybaryeuay", model.tableName()); - Assertions.assertEquals("qabqgzslesjcb", model.mappingRuleName()); - Assertions.assertEquals(EventGridDataFormat.AVRO, model.dataFormat()); - Assertions.assertEquals(false, model.ignoreFirstRecord()); - Assertions.assertEquals(BlobStorageEventType.MICROSOFT_STORAGE_BLOB_CREATED, model.blobStorageEventType()); - Assertions.assertEquals("w", model.managedIdentityResourceId()); - Assertions.assertEquals(DatabaseRouting.MULTI, model.databaseRouting()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EventGridDataConnectionTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EventGridDataConnectionTests.java deleted file mode 100644 index 12a8b4b9685d..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EventGridDataConnectionTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.BlobStorageEventType; -import com.azure.resourcemanager.kusto.models.DatabaseRouting; -import com.azure.resourcemanager.kusto.models.EventGridDataConnection; -import com.azure.resourcemanager.kusto.models.EventGridDataFormat; -import org.junit.jupiter.api.Assertions; - -public final class EventGridDataConnectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventGridDataConnection model = - BinaryData - .fromString( - "{\"kind\":\"EventGrid\",\"properties\":{\"storageAccountResourceId\":\"fhjxakvvjgs\",\"eventGridResourceId\":\"r\",\"eventHubResourceId\":\"il\",\"consumerGroup\":\"yw\",\"tableName\":\"kgkxn\",\"mappingRuleName\":\"dabg\",\"dataFormat\":\"RAW\",\"ignoreFirstRecord\":true,\"blobStorageEventType\":\"Microsoft.Storage.BlobCreated\",\"managedIdentityResourceId\":\"wbcihxuuwh\",\"managedIdentityObjectId\":\"yxccyb\",\"databaseRouting\":\"Multi\",\"provisioningState\":\"Succeeded\"},\"location\":\"kudzpxgwj\",\"id\":\"lma\",\"name\":\"stcyohpfkyrkdbd\",\"type\":\"iogsjkmnwq\"}") - .toObject(EventGridDataConnection.class); - Assertions.assertEquals("kudzpxgwj", model.location()); - Assertions.assertEquals("fhjxakvvjgs", model.storageAccountResourceId()); - Assertions.assertEquals("r", model.eventGridResourceId()); - Assertions.assertEquals("il", model.eventHubResourceId()); - Assertions.assertEquals("yw", model.consumerGroup()); - Assertions.assertEquals("kgkxn", model.tableName()); - Assertions.assertEquals("dabg", model.mappingRuleName()); - Assertions.assertEquals(EventGridDataFormat.RAW, model.dataFormat()); - Assertions.assertEquals(true, model.ignoreFirstRecord()); - Assertions.assertEquals(BlobStorageEventType.MICROSOFT_STORAGE_BLOB_CREATED, model.blobStorageEventType()); - Assertions.assertEquals("wbcihxuuwh", model.managedIdentityResourceId()); - Assertions.assertEquals(DatabaseRouting.MULTI, model.databaseRouting()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventGridDataConnection model = - new EventGridDataConnection() - .withLocation("kudzpxgwj") - .withStorageAccountResourceId("fhjxakvvjgs") - .withEventGridResourceId("r") - .withEventHubResourceId("il") - .withConsumerGroup("yw") - .withTableName("kgkxn") - .withMappingRuleName("dabg") - .withDataFormat(EventGridDataFormat.RAW) - .withIgnoreFirstRecord(true) - .withBlobStorageEventType(BlobStorageEventType.MICROSOFT_STORAGE_BLOB_CREATED) - .withManagedIdentityResourceId("wbcihxuuwh") - .withDatabaseRouting(DatabaseRouting.MULTI); - model = BinaryData.fromObject(model).toObject(EventGridDataConnection.class); - Assertions.assertEquals("kudzpxgwj", model.location()); - Assertions.assertEquals("fhjxakvvjgs", model.storageAccountResourceId()); - Assertions.assertEquals("r", model.eventGridResourceId()); - Assertions.assertEquals("il", model.eventHubResourceId()); - Assertions.assertEquals("yw", model.consumerGroup()); - Assertions.assertEquals("kgkxn", model.tableName()); - Assertions.assertEquals("dabg", model.mappingRuleName()); - Assertions.assertEquals(EventGridDataFormat.RAW, model.dataFormat()); - Assertions.assertEquals(true, model.ignoreFirstRecord()); - Assertions.assertEquals(BlobStorageEventType.MICROSOFT_STORAGE_BLOB_CREATED, model.blobStorageEventType()); - Assertions.assertEquals("wbcihxuuwh", model.managedIdentityResourceId()); - Assertions.assertEquals(DatabaseRouting.MULTI, model.databaseRouting()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EventHubConnectionPropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EventHubConnectionPropertiesTests.java deleted file mode 100644 index 343809d112e6..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EventHubConnectionPropertiesTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.EventHubConnectionProperties; -import com.azure.resourcemanager.kusto.models.Compression; -import com.azure.resourcemanager.kusto.models.DatabaseRouting; -import com.azure.resourcemanager.kusto.models.EventHubDataFormat; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EventHubConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventHubConnectionProperties model = - BinaryData - .fromString( - "{\"eventHubResourceId\":\"prvkwcfzqljyxgtc\",\"consumerGroup\":\"heyd\",\"tableName\":\"dshmkxmaehvbbx\",\"mappingRuleName\":\"iplt\",\"dataFormat\":\"TSV\",\"eventSystemProperties\":[\"axkgx\"],\"compression\":\"None\",\"provisioningState\":\"Succeeded\",\"managedIdentityResourceId\":\"yklyhpluodpvruud\",\"managedIdentityObjectId\":\"zibt\",\"databaseRouting\":\"Single\",\"retrievalStartDate\":\"2021-02-15T06:11:31Z\"}") - .toObject(EventHubConnectionProperties.class); - Assertions.assertEquals("prvkwcfzqljyxgtc", model.eventHubResourceId()); - Assertions.assertEquals("heyd", model.consumerGroup()); - Assertions.assertEquals("dshmkxmaehvbbx", model.tableName()); - Assertions.assertEquals("iplt", model.mappingRuleName()); - Assertions.assertEquals(EventHubDataFormat.TSV, model.dataFormat()); - Assertions.assertEquals("axkgx", model.eventSystemProperties().get(0)); - Assertions.assertEquals(Compression.NONE, model.compression()); - Assertions.assertEquals("yklyhpluodpvruud", model.managedIdentityResourceId()); - Assertions.assertEquals(DatabaseRouting.SINGLE, model.databaseRouting()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-15T06:11:31Z"), model.retrievalStartDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventHubConnectionProperties model = - new EventHubConnectionProperties() - .withEventHubResourceId("prvkwcfzqljyxgtc") - .withConsumerGroup("heyd") - .withTableName("dshmkxmaehvbbx") - .withMappingRuleName("iplt") - .withDataFormat(EventHubDataFormat.TSV) - .withEventSystemProperties(Arrays.asList("axkgx")) - .withCompression(Compression.NONE) - .withManagedIdentityResourceId("yklyhpluodpvruud") - .withDatabaseRouting(DatabaseRouting.SINGLE) - .withRetrievalStartDate(OffsetDateTime.parse("2021-02-15T06:11:31Z")); - model = BinaryData.fromObject(model).toObject(EventHubConnectionProperties.class); - Assertions.assertEquals("prvkwcfzqljyxgtc", model.eventHubResourceId()); - Assertions.assertEquals("heyd", model.consumerGroup()); - Assertions.assertEquals("dshmkxmaehvbbx", model.tableName()); - Assertions.assertEquals("iplt", model.mappingRuleName()); - Assertions.assertEquals(EventHubDataFormat.TSV, model.dataFormat()); - Assertions.assertEquals("axkgx", model.eventSystemProperties().get(0)); - Assertions.assertEquals(Compression.NONE, model.compression()); - Assertions.assertEquals("yklyhpluodpvruud", model.managedIdentityResourceId()); - Assertions.assertEquals(DatabaseRouting.SINGLE, model.databaseRouting()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-15T06:11:31Z"), model.retrievalStartDate()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EventHubDataConnectionTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EventHubDataConnectionTests.java deleted file mode 100644 index c99bed6b092c..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/EventHubDataConnectionTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.Compression; -import com.azure.resourcemanager.kusto.models.DatabaseRouting; -import com.azure.resourcemanager.kusto.models.EventHubDataConnection; -import com.azure.resourcemanager.kusto.models.EventHubDataFormat; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EventHubDataConnectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventHubDataConnection model = - BinaryData - .fromString( - "{\"kind\":\"EventHub\",\"properties\":{\"eventHubResourceId\":\"ywdxsmic\",\"consumerGroup\":\"wrwfscjfnyns\",\"tableName\":\"ujiz\",\"mappingRuleName\":\"oqytibyowbblgy\",\"dataFormat\":\"CSV\",\"eventSystemProperties\":[\"thjoxoism\",\"ksbpimlqoljx\"],\"compression\":\"GZip\",\"provisioningState\":\"Running\",\"managedIdentityResourceId\":\"xsffgcviz\",\"managedIdentityObjectId\":\"dwl\",\"databaseRouting\":\"Multi\",\"retrievalStartDate\":\"2021-03-22T22:39:30Z\"},\"location\":\"pfgfbkjub\",\"id\":\"yhgk\",\"name\":\"minsgowzf\",\"type\":\"tsttktlahbq\"}") - .toObject(EventHubDataConnection.class); - Assertions.assertEquals("pfgfbkjub", model.location()); - Assertions.assertEquals("ywdxsmic", model.eventHubResourceId()); - Assertions.assertEquals("wrwfscjfnyns", model.consumerGroup()); - Assertions.assertEquals("ujiz", model.tableName()); - Assertions.assertEquals("oqytibyowbblgy", model.mappingRuleName()); - Assertions.assertEquals(EventHubDataFormat.CSV, model.dataFormat()); - Assertions.assertEquals("thjoxoism", model.eventSystemProperties().get(0)); - Assertions.assertEquals(Compression.GZIP, model.compression()); - Assertions.assertEquals("xsffgcviz", model.managedIdentityResourceId()); - Assertions.assertEquals(DatabaseRouting.MULTI, model.databaseRouting()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-22T22:39:30Z"), model.retrievalStartDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventHubDataConnection model = - new EventHubDataConnection() - .withLocation("pfgfbkjub") - .withEventHubResourceId("ywdxsmic") - .withConsumerGroup("wrwfscjfnyns") - .withTableName("ujiz") - .withMappingRuleName("oqytibyowbblgy") - .withDataFormat(EventHubDataFormat.CSV) - .withEventSystemProperties(Arrays.asList("thjoxoism", "ksbpimlqoljx")) - .withCompression(Compression.GZIP) - .withManagedIdentityResourceId("xsffgcviz") - .withDatabaseRouting(DatabaseRouting.MULTI) - .withRetrievalStartDate(OffsetDateTime.parse("2021-03-22T22:39:30Z")); - model = BinaryData.fromObject(model).toObject(EventHubDataConnection.class); - Assertions.assertEquals("pfgfbkjub", model.location()); - Assertions.assertEquals("ywdxsmic", model.eventHubResourceId()); - Assertions.assertEquals("wrwfscjfnyns", model.consumerGroup()); - Assertions.assertEquals("ujiz", model.tableName()); - Assertions.assertEquals("oqytibyowbblgy", model.mappingRuleName()); - Assertions.assertEquals(EventHubDataFormat.CSV, model.dataFormat()); - Assertions.assertEquals("thjoxoism", model.eventSystemProperties().get(0)); - Assertions.assertEquals(Compression.GZIP, model.compression()); - Assertions.assertEquals("xsffgcviz", model.managedIdentityResourceId()); - Assertions.assertEquals(DatabaseRouting.MULTI, model.databaseRouting()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-22T22:39:30Z"), model.retrievalStartDate()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/FollowerDatabaseDefinitionInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/FollowerDatabaseDefinitionInnerTests.java deleted file mode 100644 index 57ca33c43c82..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/FollowerDatabaseDefinitionInnerTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.FollowerDatabaseDefinitionInner; -import org.junit.jupiter.api.Assertions; - -public final class FollowerDatabaseDefinitionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FollowerDatabaseDefinitionInner model = - BinaryData - .fromString( - "{\"clusterResourceId\":\"mouexhdzx\",\"attachedDatabaseConfigurationName\":\"bqe\",\"databaseName\":\"nxqbzvddn\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"eic\",\"twnpzaoqvuhrhcf\",\"cyddglmjthjqk\"],\"tablesToExclude\":[\"eicxmqciwqvhkhi\",\"uigdtopbobjog\",\"m\",\"w\"],\"externalTablesToInclude\":[\"a\"],\"externalTablesToExclude\":[\"z\",\"yvvtpgvdfgio\"],\"materializedViewsToInclude\":[\"tutqxlngxlefgug\",\"xkrxdqmi\",\"tthzrvqd\",\"abhjybi\"],\"materializedViewsToExclude\":[\"oqfbowskanyk\"],\"functionsToInclude\":[\"cuiywgqyw\",\"ndrvynhzg\",\"phrcgyncoc\",\"ecfvmm\"],\"functionsToExclude\":[\"fsxlzevgbmqjqa\"]},\"databaseShareOrigin\":\"Direct\"}") - .toObject(FollowerDatabaseDefinitionInner.class); - Assertions.assertEquals("mouexhdzx", model.clusterResourceId()); - Assertions.assertEquals("bqe", model.attachedDatabaseConfigurationName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FollowerDatabaseDefinitionInner model = - new FollowerDatabaseDefinitionInner() - .withClusterResourceId("mouexhdzx") - .withAttachedDatabaseConfigurationName("bqe"); - model = BinaryData.fromObject(model).toObject(FollowerDatabaseDefinitionInner.class); - Assertions.assertEquals("mouexhdzx", model.clusterResourceId()); - Assertions.assertEquals("bqe", model.attachedDatabaseConfigurationName()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/FollowerDatabaseListResultTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/FollowerDatabaseListResultTests.java deleted file mode 100644 index ba44d37fd21e..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/FollowerDatabaseListResultTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.FollowerDatabaseDefinitionInner; -import com.azure.resourcemanager.kusto.models.FollowerDatabaseListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FollowerDatabaseListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FollowerDatabaseListResult model = - BinaryData - .fromString( - "{\"value\":[{\"clusterResourceId\":\"jbznorc\",\"attachedDatabaseConfigurationName\":\"xv\",\"databaseName\":\"byxqabn\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"cyshurzafbljjgp\",\"toqcjmklja\"],\"tablesToExclude\":[\"idtqajzyu\",\"pku\",\"jkrlkhbzhfepg\"],\"externalTablesToInclude\":[\"e\"],\"externalTablesToExclude\":[\"ocxscpaierhhbcs\"],\"materializedViewsToInclude\":[\"mmajtjaodx\",\"bnbdxkqpxokajion\",\"imexgstxgcpodgma\"],\"materializedViewsToExclude\":[\"mvdjwzrlovmc\"],\"functionsToInclude\":[\"ijcoejctb\",\"aqsqsycbkbfk\"],\"functionsToExclude\":[\"dkexxppofm\",\"axcfjpgddtocjjx\"]},\"databaseShareOrigin\":\"DataShare\"}]}") - .toObject(FollowerDatabaseListResult.class); - Assertions.assertEquals("jbznorc", model.value().get(0).clusterResourceId()); - Assertions.assertEquals("xv", model.value().get(0).attachedDatabaseConfigurationName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FollowerDatabaseListResult model = - new FollowerDatabaseListResult() - .withValue( - Arrays - .asList( - new FollowerDatabaseDefinitionInner() - .withClusterResourceId("jbznorc") - .withAttachedDatabaseConfigurationName("xv"))); - model = BinaryData.fromObject(model).toObject(FollowerDatabaseListResult.class); - Assertions.assertEquals("jbznorc", model.value().get(0).clusterResourceId()); - Assertions.assertEquals("xv", model.value().get(0).attachedDatabaseConfigurationName()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/IdentityTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/IdentityTests.java deleted file mode 100644 index c8a913a425a7..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/IdentityTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.Identity; -import com.azure.resourcemanager.kusto.models.IdentityType; -import com.azure.resourcemanager.kusto.models.IdentityUserAssignedIdentities; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Identity model = - BinaryData - .fromString( - "{\"principalId\":\"parcry\",\"tenantId\":\"nzwuxzd\",\"type\":\"None\",\"userAssignedIdentities\":{\"tijbpzvgnwzsymgl\":{\"principalId\":\"lhmwhfpmrqobm\",\"clientId\":\"kknryrtihf\"},\"s\":{\"principalId\":\"fcyzkohdbihanufh\",\"clientId\":\"bj\"},\"npqxuh\":{\"principalId\":\"ithxqhabifpi\",\"clientId\":\"wczbys\"},\"tfwvukxgaudc\":{\"principalId\":\"y\",\"clientId\":\"iwbybrkxvdumjg\"}}}") - .toObject(Identity.class); - Assertions.assertEquals(IdentityType.NONE, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Identity model = - new Identity() - .withType(IdentityType.NONE) - .withUserAssignedIdentities( - mapOf( - "tijbpzvgnwzsymgl", - new IdentityUserAssignedIdentities(), - "s", - new IdentityUserAssignedIdentities(), - "npqxuh", - new IdentityUserAssignedIdentities(), - "tfwvukxgaudc", - new IdentityUserAssignedIdentities())); - model = BinaryData.fromObject(model).toObject(Identity.class); - Assertions.assertEquals(IdentityType.NONE, model.type()); - } - - @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; - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/IdentityUserAssignedIdentitiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/IdentityUserAssignedIdentitiesTests.java deleted file mode 100644 index 51a94d3aeeed..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/IdentityUserAssignedIdentitiesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.IdentityUserAssignedIdentities; - -public final class IdentityUserAssignedIdentitiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityUserAssignedIdentities model = - BinaryData - .fromString("{\"principalId\":\"nhsjcnyej\",\"clientId\":\"ryhtnapczwlokjy\"}") - .toObject(IdentityUserAssignedIdentities.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityUserAssignedIdentities model = new IdentityUserAssignedIdentities(); - model = BinaryData.fromObject(model).toObject(IdentityUserAssignedIdentities.class); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/IotHubConnectionPropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/IotHubConnectionPropertiesTests.java deleted file mode 100644 index 5efa9338306b..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/IotHubConnectionPropertiesTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.IotHubConnectionProperties; -import com.azure.resourcemanager.kusto.models.DatabaseRouting; -import com.azure.resourcemanager.kusto.models.IotHubDataFormat; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IotHubConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotHubConnectionProperties model = - BinaryData - .fromString( - "{\"iotHubResourceId\":\"ktst\",\"consumerGroup\":\"dxeclzedqbcvh\",\"tableName\":\"h\",\"mappingRuleName\":\"odqkdlwwqfb\",\"dataFormat\":\"TSV\",\"eventSystemProperties\":[\"trqjfsmlmbtx\",\"w\"],\"sharedAccessPolicyName\":\"fwsrtawcoezbrhu\",\"databaseRouting\":\"Single\",\"retrievalStartDate\":\"2021-02-17T00:43:35Z\",\"provisioningState\":\"Creating\"}") - .toObject(IotHubConnectionProperties.class); - Assertions.assertEquals("ktst", model.iotHubResourceId()); - Assertions.assertEquals("dxeclzedqbcvh", model.consumerGroup()); - Assertions.assertEquals("h", model.tableName()); - Assertions.assertEquals("odqkdlwwqfb", model.mappingRuleName()); - Assertions.assertEquals(IotHubDataFormat.TSV, model.dataFormat()); - Assertions.assertEquals("trqjfsmlmbtx", model.eventSystemProperties().get(0)); - Assertions.assertEquals("fwsrtawcoezbrhu", model.sharedAccessPolicyName()); - Assertions.assertEquals(DatabaseRouting.SINGLE, model.databaseRouting()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-17T00:43:35Z"), model.retrievalStartDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotHubConnectionProperties model = - new IotHubConnectionProperties() - .withIotHubResourceId("ktst") - .withConsumerGroup("dxeclzedqbcvh") - .withTableName("h") - .withMappingRuleName("odqkdlwwqfb") - .withDataFormat(IotHubDataFormat.TSV) - .withEventSystemProperties(Arrays.asList("trqjfsmlmbtx", "w")) - .withSharedAccessPolicyName("fwsrtawcoezbrhu") - .withDatabaseRouting(DatabaseRouting.SINGLE) - .withRetrievalStartDate(OffsetDateTime.parse("2021-02-17T00:43:35Z")); - model = BinaryData.fromObject(model).toObject(IotHubConnectionProperties.class); - Assertions.assertEquals("ktst", model.iotHubResourceId()); - Assertions.assertEquals("dxeclzedqbcvh", model.consumerGroup()); - Assertions.assertEquals("h", model.tableName()); - Assertions.assertEquals("odqkdlwwqfb", model.mappingRuleName()); - Assertions.assertEquals(IotHubDataFormat.TSV, model.dataFormat()); - Assertions.assertEquals("trqjfsmlmbtx", model.eventSystemProperties().get(0)); - Assertions.assertEquals("fwsrtawcoezbrhu", model.sharedAccessPolicyName()); - Assertions.assertEquals(DatabaseRouting.SINGLE, model.databaseRouting()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-17T00:43:35Z"), model.retrievalStartDate()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/IotHubDataConnectionTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/IotHubDataConnectionTests.java deleted file mode 100644 index 90a24558d63c..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/IotHubDataConnectionTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.DatabaseRouting; -import com.azure.resourcemanager.kusto.models.IotHubDataConnection; -import com.azure.resourcemanager.kusto.models.IotHubDataFormat; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IotHubDataConnectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotHubDataConnection model = - BinaryData - .fromString( - "{\"kind\":\"IotHub\",\"properties\":{\"iotHubResourceId\":\"tx\",\"consumerGroup\":\"gzukxitmm\",\"tableName\":\"gqqqxh\",\"mappingRuleName\":\"xrxc\",\"dataFormat\":\"TXT\",\"eventSystemProperties\":[\"av\",\"k\",\"dzf\"],\"sharedAccessPolicyName\":\"azivjlfrqttbajl\",\"databaseRouting\":\"Single\",\"retrievalStartDate\":\"2021-04-16T08:57:57Z\",\"provisioningState\":\"Succeeded\"},\"location\":\"opidkqqfkuv\",\"id\":\"cxkdmligovi\",\"name\":\"rxkpmloazuruoc\",\"type\":\"goorbteo\"}") - .toObject(IotHubDataConnection.class); - Assertions.assertEquals("opidkqqfkuv", model.location()); - Assertions.assertEquals("tx", model.iotHubResourceId()); - Assertions.assertEquals("gzukxitmm", model.consumerGroup()); - Assertions.assertEquals("gqqqxh", model.tableName()); - Assertions.assertEquals("xrxc", model.mappingRuleName()); - Assertions.assertEquals(IotHubDataFormat.TXT, model.dataFormat()); - Assertions.assertEquals("av", model.eventSystemProperties().get(0)); - Assertions.assertEquals("azivjlfrqttbajl", model.sharedAccessPolicyName()); - Assertions.assertEquals(DatabaseRouting.SINGLE, model.databaseRouting()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-16T08:57:57Z"), model.retrievalStartDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotHubDataConnection model = - new IotHubDataConnection() - .withLocation("opidkqqfkuv") - .withIotHubResourceId("tx") - .withConsumerGroup("gzukxitmm") - .withTableName("gqqqxh") - .withMappingRuleName("xrxc") - .withDataFormat(IotHubDataFormat.TXT) - .withEventSystemProperties(Arrays.asList("av", "k", "dzf")) - .withSharedAccessPolicyName("azivjlfrqttbajl") - .withDatabaseRouting(DatabaseRouting.SINGLE) - .withRetrievalStartDate(OffsetDateTime.parse("2021-04-16T08:57:57Z")); - model = BinaryData.fromObject(model).toObject(IotHubDataConnection.class); - Assertions.assertEquals("opidkqqfkuv", model.location()); - Assertions.assertEquals("tx", model.iotHubResourceId()); - Assertions.assertEquals("gzukxitmm", model.consumerGroup()); - Assertions.assertEquals("gqqqxh", model.tableName()); - Assertions.assertEquals("xrxc", model.mappingRuleName()); - Assertions.assertEquals(IotHubDataFormat.TXT, model.dataFormat()); - Assertions.assertEquals("av", model.eventSystemProperties().get(0)); - Assertions.assertEquals("azivjlfrqttbajl", model.sharedAccessPolicyName()); - Assertions.assertEquals(DatabaseRouting.SINGLE, model.databaseRouting()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-16T08:57:57Z"), model.retrievalStartDate()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/LanguageExtensionInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/LanguageExtensionInnerTests.java deleted file mode 100644 index 3d2f3d2d0b74..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/LanguageExtensionInnerTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.LanguageExtensionInner; -import com.azure.resourcemanager.kusto.models.LanguageExtensionImageName; -import com.azure.resourcemanager.kusto.models.LanguageExtensionName; -import org.junit.jupiter.api.Assertions; - -public final class LanguageExtensionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LanguageExtensionInner model = - BinaryData - .fromString("{\"languageExtensionName\":\"PYTHON\",\"languageExtensionImageName\":\"Python3_6_5\"}") - .toObject(LanguageExtensionInner.class); - Assertions.assertEquals(LanguageExtensionName.PYTHON, model.languageExtensionName()); - Assertions.assertEquals(LanguageExtensionImageName.PYTHON3_6_5, model.languageExtensionImageName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LanguageExtensionInner model = - new LanguageExtensionInner() - .withLanguageExtensionName(LanguageExtensionName.PYTHON) - .withLanguageExtensionImageName(LanguageExtensionImageName.PYTHON3_6_5); - model = BinaryData.fromObject(model).toObject(LanguageExtensionInner.class); - Assertions.assertEquals(LanguageExtensionName.PYTHON, model.languageExtensionName()); - Assertions.assertEquals(LanguageExtensionImageName.PYTHON3_6_5, model.languageExtensionImageName()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/LanguageExtensionsListTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/LanguageExtensionsListTests.java deleted file mode 100644 index dd56e63c433a..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/LanguageExtensionsListTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.LanguageExtensionInner; -import com.azure.resourcemanager.kusto.models.LanguageExtensionImageName; -import com.azure.resourcemanager.kusto.models.LanguageExtensionName; -import com.azure.resourcemanager.kusto.models.LanguageExtensionsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LanguageExtensionsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LanguageExtensionsList model = - BinaryData - .fromString( - "{\"value\":[{\"languageExtensionName\":\"R\",\"languageExtensionImageName\":\"R\"},{\"languageExtensionName\":\"R\",\"languageExtensionImageName\":\"R\"},{\"languageExtensionName\":\"R\",\"languageExtensionImageName\":\"Python3_10_8\"}]}") - .toObject(LanguageExtensionsList.class); - Assertions.assertEquals(LanguageExtensionName.R, model.value().get(0).languageExtensionName()); - Assertions.assertEquals(LanguageExtensionImageName.R, model.value().get(0).languageExtensionImageName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LanguageExtensionsList model = - new LanguageExtensionsList() - .withValue( - Arrays - .asList( - new LanguageExtensionInner() - .withLanguageExtensionName(LanguageExtensionName.R) - .withLanguageExtensionImageName(LanguageExtensionImageName.R), - new LanguageExtensionInner() - .withLanguageExtensionName(LanguageExtensionName.R) - .withLanguageExtensionImageName(LanguageExtensionImageName.R), - new LanguageExtensionInner() - .withLanguageExtensionName(LanguageExtensionName.R) - .withLanguageExtensionImageName(LanguageExtensionImageName.PYTHON3_10_8))); - model = BinaryData.fromObject(model).toObject(LanguageExtensionsList.class); - Assertions.assertEquals(LanguageExtensionName.R, model.value().get(0).languageExtensionName()); - Assertions.assertEquals(LanguageExtensionImageName.R, model.value().get(0).languageExtensionImageName()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ListResourceSkusResultTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ListResourceSkusResultTests.java deleted file mode 100644 index 57ef705960a6..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ListResourceSkusResultTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.AzureResourceSkuInner; -import com.azure.resourcemanager.kusto.models.AzureCapacity; -import com.azure.resourcemanager.kusto.models.AzureScaleType; -import com.azure.resourcemanager.kusto.models.AzureSku; -import com.azure.resourcemanager.kusto.models.AzureSkuName; -import com.azure.resourcemanager.kusto.models.AzureSkuTier; -import com.azure.resourcemanager.kusto.models.ListResourceSkusResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ListResourceSkusResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListResourceSkusResult model = - BinaryData - .fromString( - "{\"value\":[{\"resourceType\":\"z\",\"sku\":{\"name\":\"Standard_E8s_v4+2TB_PS\",\"capacity\":11356345,\"tier\":\"Standard\"},\"capacity\":{\"scaleType\":\"manual\",\"minimum\":302712597,\"maximum\":830056892,\"default\":834529223}},{\"resourceType\":\"ebwpucwwfvo\",\"sku\":{\"name\":\"Standard_E2a_v4\",\"capacity\":1386132644,\"tier\":\"Basic\"},\"capacity\":{\"scaleType\":\"manual\",\"minimum\":1911093580,\"maximum\":1542315989,\"default\":783632971}}]}") - .toObject(ListResourceSkusResult.class); - Assertions.assertEquals("z", model.value().get(0).resourceType()); - Assertions.assertEquals(AzureSkuName.STANDARD_E8S_V4_2TB_PS, model.value().get(0).sku().name()); - Assertions.assertEquals(11356345, model.value().get(0).sku().capacity()); - Assertions.assertEquals(AzureSkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals(AzureScaleType.MANUAL, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals(302712597, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(830056892, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(834529223, model.value().get(0).capacity().defaultProperty()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListResourceSkusResult model = - new ListResourceSkusResult() - .withValue( - Arrays - .asList( - new AzureResourceSkuInner() - .withResourceType("z") - .withSku( - new AzureSku() - .withName(AzureSkuName.STANDARD_E8S_V4_2TB_PS) - .withCapacity(11356345) - .withTier(AzureSkuTier.STANDARD)) - .withCapacity( - new AzureCapacity() - .withScaleType(AzureScaleType.MANUAL) - .withMinimum(302712597) - .withMaximum(830056892) - .withDefaultProperty(834529223)), - new AzureResourceSkuInner() - .withResourceType("ebwpucwwfvo") - .withSku( - new AzureSku() - .withName(AzureSkuName.STANDARD_E2A_V4) - .withCapacity(1386132644) - .withTier(AzureSkuTier.BASIC)) - .withCapacity( - new AzureCapacity() - .withScaleType(AzureScaleType.MANUAL) - .withMinimum(1911093580) - .withMaximum(1542315989) - .withDefaultProperty(783632971)))); - model = BinaryData.fromObject(model).toObject(ListResourceSkusResult.class); - Assertions.assertEquals("z", model.value().get(0).resourceType()); - Assertions.assertEquals(AzureSkuName.STANDARD_E8S_V4_2TB_PS, model.value().get(0).sku().name()); - Assertions.assertEquals(11356345, model.value().get(0).sku().capacity()); - Assertions.assertEquals(AzureSkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals(AzureScaleType.MANUAL, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals(302712597, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(830056892, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(834529223, model.value().get(0).capacity().defaultProperty()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointInnerTests.java deleted file mode 100644 index 3b5c742aaaec..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointInnerTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.ManagedPrivateEndpointInner; -import org.junit.jupiter.api.Assertions; - -public final class ManagedPrivateEndpointInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedPrivateEndpointInner model = - BinaryData - .fromString( - "{\"properties\":{\"privateLinkResourceId\":\"sluicpdggkzz\",\"privateLinkResourceRegion\":\"mbmpaxmodfvuefy\",\"groupId\":\"sbpfvmwyhr\",\"requestMessage\":\"uyfta\",\"provisioningState\":\"Creating\"},\"id\":\"wiyzvqtmnubexkp\",\"name\":\"ksmond\",\"type\":\"mquxvypo\"}") - .toObject(ManagedPrivateEndpointInner.class); - Assertions.assertEquals("sluicpdggkzz", model.privateLinkResourceId()); - Assertions.assertEquals("mbmpaxmodfvuefy", model.privateLinkResourceRegion()); - Assertions.assertEquals("sbpfvmwyhr", model.groupId()); - Assertions.assertEquals("uyfta", model.requestMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedPrivateEndpointInner model = - new ManagedPrivateEndpointInner() - .withPrivateLinkResourceId("sluicpdggkzz") - .withPrivateLinkResourceRegion("mbmpaxmodfvuefy") - .withGroupId("sbpfvmwyhr") - .withRequestMessage("uyfta"); - model = BinaryData.fromObject(model).toObject(ManagedPrivateEndpointInner.class); - Assertions.assertEquals("sluicpdggkzz", model.privateLinkResourceId()); - Assertions.assertEquals("mbmpaxmodfvuefy", model.privateLinkResourceRegion()); - Assertions.assertEquals("sbpfvmwyhr", model.groupId()); - Assertions.assertEquals("uyfta", model.requestMessage()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointListResultTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointListResultTests.java deleted file mode 100644 index 0fb8dc8df886..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointListResultTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.ManagedPrivateEndpointInner; -import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpointListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ManagedPrivateEndpointListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedPrivateEndpointListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"privateLinkResourceId\":\"lvithhqzonosgg\",\"privateLinkResourceRegion\":\"c\",\"groupId\":\"hfwdsjnkaljutiis\",\"requestMessage\":\"cffgdkzzewk\",\"provisioningState\":\"Canceled\"},\"id\":\"crailvpn\",\"name\":\"pfuflrw\",\"type\":\"mh\"},{\"properties\":{\"privateLinkResourceId\":\"xyjrxsagafcnih\",\"privateLinkResourceRegion\":\"qapnedgfbcv\",\"groupId\":\"cvqvpkeqdcv\",\"requestMessage\":\"hvoodsotbobzd\",\"provisioningState\":\"Canceled\"},\"id\":\"wvnhdldwmgx\",\"name\":\"xrslpm\",\"type\":\"twuoegrpkhjwni\"}]}") - .toObject(ManagedPrivateEndpointListResult.class); - Assertions.assertEquals("lvithhqzonosgg", model.value().get(0).privateLinkResourceId()); - Assertions.assertEquals("c", model.value().get(0).privateLinkResourceRegion()); - Assertions.assertEquals("hfwdsjnkaljutiis", model.value().get(0).groupId()); - Assertions.assertEquals("cffgdkzzewk", model.value().get(0).requestMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedPrivateEndpointListResult model = - new ManagedPrivateEndpointListResult() - .withValue( - Arrays - .asList( - new ManagedPrivateEndpointInner() - .withPrivateLinkResourceId("lvithhqzonosgg") - .withPrivateLinkResourceRegion("c") - .withGroupId("hfwdsjnkaljutiis") - .withRequestMessage("cffgdkzzewk"), - new ManagedPrivateEndpointInner() - .withPrivateLinkResourceId("xyjrxsagafcnih") - .withPrivateLinkResourceRegion("qapnedgfbcv") - .withGroupId("cvqvpkeqdcv") - .withRequestMessage("hvoodsotbobzd"))); - model = BinaryData.fromObject(model).toObject(ManagedPrivateEndpointListResult.class); - Assertions.assertEquals("lvithhqzonosgg", model.value().get(0).privateLinkResourceId()); - Assertions.assertEquals("c", model.value().get(0).privateLinkResourceRegion()); - Assertions.assertEquals("hfwdsjnkaljutiis", model.value().get(0).groupId()); - Assertions.assertEquals("cffgdkzzewk", model.value().get(0).requestMessage()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointPropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointPropertiesTests.java deleted file mode 100644 index d1f7066c30cb..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointPropertiesTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.ManagedPrivateEndpointProperties; -import org.junit.jupiter.api.Assertions; - -public final class ManagedPrivateEndpointPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedPrivateEndpointProperties model = - BinaryData - .fromString( - "{\"privateLinkResourceId\":\"gkopkwhojvpajqgx\",\"privateLinkResourceRegion\":\"mocmbqfqvmk\",\"groupId\":\"xozap\",\"requestMessage\":\"elxprglyatddck\",\"provisioningState\":\"Succeeded\"}") - .toObject(ManagedPrivateEndpointProperties.class); - Assertions.assertEquals("gkopkwhojvpajqgx", model.privateLinkResourceId()); - Assertions.assertEquals("mocmbqfqvmk", model.privateLinkResourceRegion()); - Assertions.assertEquals("xozap", model.groupId()); - Assertions.assertEquals("elxprglyatddck", model.requestMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedPrivateEndpointProperties model = - new ManagedPrivateEndpointProperties() - .withPrivateLinkResourceId("gkopkwhojvpajqgx") - .withPrivateLinkResourceRegion("mocmbqfqvmk") - .withGroupId("xozap") - .withRequestMessage("elxprglyatddck"); - model = BinaryData.fromObject(model).toObject(ManagedPrivateEndpointProperties.class); - Assertions.assertEquals("gkopkwhojvpajqgx", model.privateLinkResourceId()); - Assertions.assertEquals("mocmbqfqvmk", model.privateLinkResourceRegion()); - Assertions.assertEquals("xozap", model.groupId()); - Assertions.assertEquals("elxprglyatddck", model.requestMessage()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCheckNameAvailabilityWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 879934c7c491..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.CheckNameResult; -import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpointsCheckNameRequest; -import com.azure.resourcemanager.kusto.models.Reason; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedPrivateEndpointsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":true,\"name\":\"dt\",\"message\":\"epu\",\"reason\":\"Invalid\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameResult response = - manager - .managedPrivateEndpoints() - .checkNameAvailabilityWithResponse( - "sfnrdtjxt", - "r", - new ManagedPrivateEndpointsCheckNameRequest().withName("cq"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("dt", response.name()); - Assertions.assertEquals("epu", response.message()); - Assertions.assertEquals(Reason.INVALID, response.reason()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCheckNameRequestTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCheckNameRequestTests.java deleted file mode 100644 index f33a3bfec47b..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCheckNameRequestTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpointsCheckNameRequest; -import org.junit.jupiter.api.Assertions; - -public final class ManagedPrivateEndpointsCheckNameRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedPrivateEndpointsCheckNameRequest model = - BinaryData.fromString("{\"name\":\"uhashsfwx\"}").toObject(ManagedPrivateEndpointsCheckNameRequest.class); - Assertions.assertEquals("uhashsfwx", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedPrivateEndpointsCheckNameRequest model = - new ManagedPrivateEndpointsCheckNameRequest().withName("uhashsfwx"); - model = BinaryData.fromObject(model).toObject(ManagedPrivateEndpointsCheckNameRequest.class); - Assertions.assertEquals("uhashsfwx", model.name()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCreateOrUpdateMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCreateOrUpdateMockTests.java deleted file mode 100644 index 794b58aca1d4..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpoint; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedPrivateEndpointsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateLinkResourceId\":\"fuijtkbus\",\"privateLinkResourceRegion\":\"gsfikayiansha\",\"groupId\":\"ujtjiqxfz\",\"requestMessage\":\"qttv\",\"provisioningState\":\"Succeeded\"},\"id\":\"hjpenuygbq\",\"name\":\"qqekewvnqvcdlgu\",\"type\":\"ucmfdj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ManagedPrivateEndpoint response = - manager - .managedPrivateEndpoints() - .define("oebn") - .withExistingCluster("kjbsah", "tdtpdelqacslmo") - .withPrivateLinkResourceId("o") - .withPrivateLinkResourceRegion("cjkgdirazftxej") - .withGroupId("ab") - .withRequestMessage("ujtmvcopexcmjurb") - .create(); - - Assertions.assertEquals("fuijtkbus", response.privateLinkResourceId()); - Assertions.assertEquals("gsfikayiansha", response.privateLinkResourceRegion()); - Assertions.assertEquals("ujtjiqxfz", response.groupId()); - Assertions.assertEquals("qttv", response.requestMessage()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsDeleteMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsDeleteMockTests.java deleted file mode 100644 index cb9dc068a994..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedPrivateEndpointsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .managedPrivateEndpoints() - .delete("amlbnseqacjjvpil", "uooqjagmdit", "ueio", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsGetWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsGetWithResponseMockTests.java deleted file mode 100644 index 7870c5e4c8ac..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsGetWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpoint; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedPrivateEndpointsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateLinkResourceId\":\"gcgbjb\",\"privateLinkResourceRegion\":\"lfgtdysnaquflqbc\",\"groupId\":\"q\",\"requestMessage\":\"mzjr\",\"provisioningState\":\"Creating\"},\"id\":\"zeqyjleziun\",\"name\":\"xdfzantkw\",\"type\":\"eg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ManagedPrivateEndpoint response = - manager - .managedPrivateEndpoints() - .getWithResponse("jqatucoigebxn", "nwfepbnwg", "m", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("gcgbjb", response.privateLinkResourceId()); - Assertions.assertEquals("lfgtdysnaquflqbc", response.privateLinkResourceRegion()); - Assertions.assertEquals("q", response.groupId()); - Assertions.assertEquals("mzjr", response.requestMessage()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsListMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsListMockTests.java deleted file mode 100644 index e5ae8b5876e5..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ManagedPrivateEndpointsListMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpoint; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedPrivateEndpointsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"privateLinkResourceId\":\"iesfuug\",\"privateLinkResourceRegion\":\"uqfecj\",\"groupId\":\"ey\",\"requestMessage\":\"uhxu\",\"provisioningState\":\"Deleting\"},\"id\":\"ewmrswnjlxu\",\"name\":\"rhwpus\",\"type\":\"jbaqehgpdoh\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.managedPrivateEndpoints().list("yjtcvuwk", "s", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("iesfuug", response.iterator().next().privateLinkResourceId()); - Assertions.assertEquals("uqfecj", response.iterator().next().privateLinkResourceRegion()); - Assertions.assertEquals("ey", response.iterator().next().groupId()); - Assertions.assertEquals("uhxu", response.iterator().next().requestMessage()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/MigrationClusterPropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/MigrationClusterPropertiesTests.java deleted file mode 100644 index 39cd6ffbef17..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/MigrationClusterPropertiesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.MigrationClusterProperties; - -public final class MigrationClusterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MigrationClusterProperties model = - BinaryData - .fromString("{\"id\":\"xbnjbiksq\",\"uri\":\"lssai\",\"dataIngestionUri\":\"p\",\"role\":\"Source\"}") - .toObject(MigrationClusterProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MigrationClusterProperties model = new MigrationClusterProperties(); - model = BinaryData.fromObject(model).toObject(MigrationClusterProperties.class); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationDisplayTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationDisplayTests.java deleted file mode 100644 index 5cc1f3bf7f54..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationDisplayTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"ggufhyaomtb\",\"operation\":\"havgrvk\",\"resource\":\"ovjzhpjbibgjmfx\",\"description\":\"vfcluyovwxnbkfe\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("ggufhyaomtb", model.provider()); - Assertions.assertEquals("havgrvk", model.operation()); - Assertions.assertEquals("ovjzhpjbibgjmfx", model.resource()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("ggufhyaomtb") - .withOperation("havgrvk") - .withResource("ovjzhpjbibgjmfx") - .withDescription("vfcluyovwxnbkfe"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("ggufhyaomtb", model.provider()); - Assertions.assertEquals("havgrvk", model.operation()); - Assertions.assertEquals("ovjzhpjbibgjmfx", model.resource()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.description()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationInnerTests.java deleted file mode 100644 index 995db6d1ec8d..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.OperationInner; -import com.azure.resourcemanager.kusto.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\":\"dsofbshrns\",\"display\":{\"provider\":\"swdvzyybycnun\",\"operation\":\"srtkfa\",\"resource\":\"opqgikyzirtxdyux\",\"description\":\"jntpsewgioilqu\"},\"origin\":\"ydxtqm\",\"properties\":\"dataox\"}") - .toObject(OperationInner.class); - Assertions.assertEquals("dsofbshrns", model.name()); - Assertions.assertEquals("swdvzyybycnun", model.display().provider()); - Assertions.assertEquals("srtkfa", model.display().operation()); - Assertions.assertEquals("opqgikyzirtxdyux", model.display().resource()); - Assertions.assertEquals("jntpsewgioilqu", model.display().description()); - Assertions.assertEquals("ydxtqm", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = - new OperationInner() - .withName("dsofbshrns") - .withDisplay( - new OperationDisplay() - .withProvider("swdvzyybycnun") - .withOperation("srtkfa") - .withResource("opqgikyzirtxdyux") - .withDescription("jntpsewgioilqu")) - .withOrigin("ydxtqm") - .withProperties("dataox"); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("dsofbshrns", model.name()); - Assertions.assertEquals("swdvzyybycnun", model.display().provider()); - Assertions.assertEquals("srtkfa", model.display().operation()); - Assertions.assertEquals("opqgikyzirtxdyux", model.display().resource()); - Assertions.assertEquals("jntpsewgioilqu", model.display().description()); - Assertions.assertEquals("ydxtqm", model.origin()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationListResultTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationListResultTests.java deleted file mode 100644 index 4e36840f0f2e..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationListResultTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.OperationInner; -import com.azure.resourcemanager.kusto.models.OperationDisplay; -import com.azure.resourcemanager.kusto.models.OperationListResult; -import java.util.Arrays; -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\":\"fdlwg\",\"display\":{\"provider\":\"sb\",\"operation\":\"ovvtgseinqfiu\",\"resource\":\"qknp\",\"description\":\"gnepttwqmsni\"},\"origin\":\"cdm\",\"properties\":\"datar\"},{\"name\":\"lpijnkrxfrd\",\"display\":{\"provider\":\"ratiz\",\"operation\":\"onasxifto\",\"resource\":\"yzhftwesgogczh\",\"description\":\"nxkrlgnyhmossxkk\"},\"origin\":\"h\",\"properties\":\"datagh\"}],\"nextLink\":\"bdhqxvcxgf\"}") - .toObject(OperationListResult.class); - Assertions.assertEquals("fdlwg", model.value().get(0).name()); - Assertions.assertEquals("sb", model.value().get(0).display().provider()); - Assertions.assertEquals("ovvtgseinqfiu", model.value().get(0).display().operation()); - Assertions.assertEquals("qknp", model.value().get(0).display().resource()); - Assertions.assertEquals("gnepttwqmsni", model.value().get(0).display().description()); - Assertions.assertEquals("cdm", model.value().get(0).origin()); - Assertions.assertEquals("bdhqxvcxgf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = - new OperationListResult() - .withValue( - Arrays - .asList( - new OperationInner() - .withName("fdlwg") - .withDisplay( - new OperationDisplay() - .withProvider("sb") - .withOperation("ovvtgseinqfiu") - .withResource("qknp") - .withDescription("gnepttwqmsni")) - .withOrigin("cdm") - .withProperties("datar"), - new OperationInner() - .withName("lpijnkrxfrd") - .withDisplay( - new OperationDisplay() - .withProvider("ratiz") - .withOperation("onasxifto") - .withResource("yzhftwesgogczh") - .withDescription("nxkrlgnyhmossxkk")) - .withOrigin("h") - .withProperties("datagh"))) - .withNextLink("bdhqxvcxgf"); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("fdlwg", model.value().get(0).name()); - Assertions.assertEquals("sb", model.value().get(0).display().provider()); - Assertions.assertEquals("ovvtgseinqfiu", model.value().get(0).display().operation()); - Assertions.assertEquals("qknp", model.value().get(0).display().resource()); - Assertions.assertEquals("gnepttwqmsni", model.value().get(0).display().description()); - Assertions.assertEquals("cdm", model.value().get(0).origin()); - Assertions.assertEquals("bdhqxvcxgf", model.nextLink()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationResultPropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationResultPropertiesTests.java deleted file mode 100644 index 09098be24312..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationResultPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.OperationResultProperties; -import org.junit.jupiter.api.Assertions; - -public final class OperationResultPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationResultProperties model = - BinaryData - .fromString( - "{\"operationKind\":\"irctymoxoftpipiw\",\"provisioningState\":\"Canceled\",\"operationState\":\"hxacpqjlihhyu\"}") - .toObject(OperationResultProperties.class); - Assertions.assertEquals("irctymoxoftpipiw", model.operationKind()); - Assertions.assertEquals("hxacpqjlihhyu", model.operationState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationResultProperties model = - new OperationResultProperties().withOperationKind("irctymoxoftpipiw").withOperationState("hxacpqjlihhyu"); - model = BinaryData.fromObject(model).toObject(OperationResultProperties.class); - Assertions.assertEquals("irctymoxoftpipiw", model.operationKind()); - Assertions.assertEquals("hxacpqjlihhyu", model.operationState()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationsListMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationsListMockTests.java deleted file mode 100644 index f26cab8bdaaf..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationsListMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"rnnqb\",\"display\":{\"provider\":\"pizxqltgrdogyp\",\"operation\":\"x\",\"resource\":\"fihwu\",\"description\":\"ctafsrbxrblm\"},\"origin\":\"owxih\",\"properties\":\"datanxw\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("rnnqb", response.iterator().next().name()); - Assertions.assertEquals("pizxqltgrdogyp", response.iterator().next().display().provider()); - Assertions.assertEquals("x", response.iterator().next().display().operation()); - Assertions.assertEquals("fihwu", response.iterator().next().display().resource()); - Assertions.assertEquals("ctafsrbxrblm", response.iterator().next().display().description()); - Assertions.assertEquals("owxih", response.iterator().next().origin()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationsResultsLocationsGetWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationsResultsLocationsGetWithResponseMockTests.java deleted file mode 100644 index 6f7df219e14d..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OperationsResultsLocationsGetWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsResultsLocationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .operationsResultsLocations() - .getWithResponse("hxiidlopedb", "dpyqyybxubmd", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OptimizedAutoscaleTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OptimizedAutoscaleTests.java deleted file mode 100644 index 91d65edf67c5..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OptimizedAutoscaleTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.OptimizedAutoscale; -import org.junit.jupiter.api.Assertions; - -public final class OptimizedAutoscaleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OptimizedAutoscale model = - BinaryData - .fromString("{\"version\":246878783,\"isEnabled\":false,\"minimum\":1628568580,\"maximum\":88405242}") - .toObject(OptimizedAutoscale.class); - Assertions.assertEquals(246878783, model.version()); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals(1628568580, model.minimum()); - Assertions.assertEquals(88405242, model.maximum()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OptimizedAutoscale model = - new OptimizedAutoscale() - .withVersion(246878783) - .withIsEnabled(false) - .withMinimum(1628568580) - .withMaximum(88405242); - model = BinaryData.fromObject(model).toObject(OptimizedAutoscale.class); - Assertions.assertEquals(246878783, model.version()); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals(1628568580, model.minimum()); - Assertions.assertEquals(88405242, model.maximum()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OutboundNetworkDependenciesEndpointInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OutboundNetworkDependenciesEndpointInnerTests.java deleted file mode 100644 index 5cf9ea6901ec..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OutboundNetworkDependenciesEndpointInnerTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.OutboundNetworkDependenciesEndpointInner; -import com.azure.resourcemanager.kusto.models.EndpointDependency; -import com.azure.resourcemanager.kusto.models.EndpointDetail; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OutboundNetworkDependenciesEndpointInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutboundNetworkDependenciesEndpointInner model = - BinaryData - .fromString( - "{\"properties\":{\"category\":\"ewzsyyceuzsoib\",\"endpoints\":[{\"domainName\":\"frxtrthzvaytdwk\",\"endpointDetails\":[{\"port\":1729344688},{\"port\":965192802},{\"port\":1150856748},{\"port\":1389326915}]},{\"domainName\":\"iilivpdtiirqtd\",\"endpointDetails\":[{\"port\":1693357038},{\"port\":725255215},{\"port\":1201300359}]},{\"domainName\":\"squyfxrxxlep\",\"endpointDetails\":[{\"port\":699446772},{\"port\":767638110},{\"port\":576385447}]},{\"domainName\":\"wnwxuqlcvyd\",\"endpointDetails\":[{\"port\":1248229075},{\"port\":350928008},{\"port\":1607416981},{\"port\":1080524607}]}],\"provisioningState\":\"Deleting\"},\"etag\":\"dkooebwnu\",\"id\":\"hemms\",\"name\":\"vdkcrodtj\",\"type\":\"nfwjlfltkacjvefk\"}") - .toObject(OutboundNetworkDependenciesEndpointInner.class); - Assertions.assertEquals("ewzsyyceuzsoib", model.category()); - Assertions.assertEquals("frxtrthzvaytdwk", model.endpoints().get(0).domainName()); - Assertions.assertEquals(1729344688, model.endpoints().get(0).endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundNetworkDependenciesEndpointInner model = - new OutboundNetworkDependenciesEndpointInner() - .withCategory("ewzsyyceuzsoib") - .withEndpoints( - Arrays - .asList( - new EndpointDependency() - .withDomainName("frxtrthzvaytdwk") - .withEndpointDetails( - Arrays - .asList( - new EndpointDetail().withPort(1729344688), - new EndpointDetail().withPort(965192802), - new EndpointDetail().withPort(1150856748), - new EndpointDetail().withPort(1389326915))), - new EndpointDependency() - .withDomainName("iilivpdtiirqtd") - .withEndpointDetails( - Arrays - .asList( - new EndpointDetail().withPort(1693357038), - new EndpointDetail().withPort(725255215), - new EndpointDetail().withPort(1201300359))), - new EndpointDependency() - .withDomainName("squyfxrxxlep") - .withEndpointDetails( - Arrays - .asList( - new EndpointDetail().withPort(699446772), - new EndpointDetail().withPort(767638110), - new EndpointDetail().withPort(576385447))), - new EndpointDependency() - .withDomainName("wnwxuqlcvyd") - .withEndpointDetails( - Arrays - .asList( - new EndpointDetail().withPort(1248229075), - new EndpointDetail().withPort(350928008), - new EndpointDetail().withPort(1607416981), - new EndpointDetail().withPort(1080524607))))); - model = BinaryData.fromObject(model).toObject(OutboundNetworkDependenciesEndpointInner.class); - Assertions.assertEquals("ewzsyyceuzsoib", model.category()); - Assertions.assertEquals("frxtrthzvaytdwk", model.endpoints().get(0).domainName()); - Assertions.assertEquals(1729344688, model.endpoints().get(0).endpointDetails().get(0).port()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OutboundNetworkDependenciesEndpointListResultTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OutboundNetworkDependenciesEndpointListResultTests.java deleted file mode 100644 index 19c957de2e72..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OutboundNetworkDependenciesEndpointListResultTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.OutboundNetworkDependenciesEndpointInner; -import com.azure.resourcemanager.kusto.models.EndpointDependency; -import com.azure.resourcemanager.kusto.models.EndpointDetail; -import com.azure.resourcemanager.kusto.models.OutboundNetworkDependenciesEndpointListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OutboundNetworkDependenciesEndpointListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutboundNetworkDependenciesEndpointListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"category\":\"duhpk\",\"endpoints\":[{\"domainName\":\"mareqnajxqugj\",\"endpointDetails\":[{},{},{}]},{\"domainName\":\"ubeddg\",\"endpointDetails\":[{}]}],\"provisioningState\":\"Creating\"},\"etag\":\"mzqa\",\"id\":\"krmnjijpxacqqud\",\"name\":\"nbyxbaaabjyv\",\"type\":\"yffimrzrtuzqogs\"}],\"nextLink\":\"nevfdnw\"}") - .toObject(OutboundNetworkDependenciesEndpointListResult.class); - Assertions.assertEquals("duhpk", model.value().get(0).category()); - Assertions.assertEquals("mareqnajxqugj", model.value().get(0).endpoints().get(0).domainName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundNetworkDependenciesEndpointListResult model = - new OutboundNetworkDependenciesEndpointListResult() - .withValue( - Arrays - .asList( - new OutboundNetworkDependenciesEndpointInner() - .withCategory("duhpk") - .withEndpoints( - Arrays - .asList( - new EndpointDependency() - .withDomainName("mareqnajxqugj") - .withEndpointDetails( - Arrays - .asList( - new EndpointDetail(), - new EndpointDetail(), - new EndpointDetail())), - new EndpointDependency() - .withDomainName("ubeddg") - .withEndpointDetails(Arrays.asList(new EndpointDetail())))))); - model = BinaryData.fromObject(model).toObject(OutboundNetworkDependenciesEndpointListResult.class); - Assertions.assertEquals("duhpk", model.value().get(0).category()); - Assertions.assertEquals("mareqnajxqugj", model.value().get(0).endpoints().get(0).domainName()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OutboundNetworkDependenciesEndpointPropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OutboundNetworkDependenciesEndpointPropertiesTests.java deleted file mode 100644 index f82c741c4d97..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/OutboundNetworkDependenciesEndpointPropertiesTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.OutboundNetworkDependenciesEndpointProperties; -import com.azure.resourcemanager.kusto.models.EndpointDependency; -import com.azure.resourcemanager.kusto.models.EndpointDetail; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OutboundNetworkDependenciesEndpointPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutboundNetworkDependenciesEndpointProperties model = - BinaryData - .fromString( - "{\"category\":\"foakgg\",\"endpoints\":[{\"domainName\":\"gaowpulpqblylsyx\",\"endpointDetails\":[{\"port\":1714916710},{\"port\":262817355},{\"port\":560645314},{\"port\":1868480291}]},{\"domainName\":\"gxsds\",\"endpointDetails\":[{\"port\":1182322128}]}],\"provisioningState\":\"Deleting\"}") - .toObject(OutboundNetworkDependenciesEndpointProperties.class); - Assertions.assertEquals("foakgg", model.category()); - Assertions.assertEquals("gaowpulpqblylsyx", model.endpoints().get(0).domainName()); - Assertions.assertEquals(1714916710, model.endpoints().get(0).endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundNetworkDependenciesEndpointProperties model = - new OutboundNetworkDependenciesEndpointProperties() - .withCategory("foakgg") - .withEndpoints( - Arrays - .asList( - new EndpointDependency() - .withDomainName("gaowpulpqblylsyx") - .withEndpointDetails( - Arrays - .asList( - new EndpointDetail().withPort(1714916710), - new EndpointDetail().withPort(262817355), - new EndpointDetail().withPort(560645314), - new EndpointDetail().withPort(1868480291))), - new EndpointDependency() - .withDomainName("gxsds") - .withEndpointDetails(Arrays.asList(new EndpointDetail().withPort(1182322128))))); - model = BinaryData.fromObject(model).toObject(OutboundNetworkDependenciesEndpointProperties.class); - Assertions.assertEquals("foakgg", model.category()); - Assertions.assertEquals("gaowpulpqblylsyx", model.endpoints().get(0).domainName()); - Assertions.assertEquals(1714916710, model.endpoints().get(0).endpointDetails().get(0).port()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index 192312798935..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionInnerTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.kusto.models.PrivateLinkServiceConnectionStateProperty; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = - BinaryData - .fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"xxjtfe\"},\"privateLinkServiceConnectionState\":{\"status\":\"uwfzitonpe\",\"description\":\"pjkjlxofpdv\",\"actionsRequired\":\"fxxypininmayhuy\"},\"groupId\":\"kpode\",\"provisioningState\":\"oginuvamiheognar\"},\"id\":\"xth\",\"name\":\"o\",\"type\":\"usivye\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("uwfzitonpe", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("pjkjlxofpdv", model.privateLinkServiceConnectionState().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model = - new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty() - .withStatus("uwfzitonpe") - .withDescription("pjkjlxofpdv")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("uwfzitonpe", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("pjkjlxofpdv", model.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionListResultTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionListResultTests.java deleted file mode 100644 index 861615fc761c..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionListResultTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.kusto.models.PrivateEndpointConnectionListResult; -import com.azure.resourcemanager.kusto.models.PrivateLinkServiceConnectionStateProperty; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"xgc\"},\"privateLinkServiceConnectionState\":{\"status\":\"ibrhosxsdqr\",\"description\":\"o\",\"actionsRequired\":\"i\"},\"groupId\":\"rq\",\"provisioningState\":\"bahwfl\"},\"id\":\"zdtmhrkwofy\",\"name\":\"voqacpiexpbt\",\"type\":\"iwbwoenwashrtdtk\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"wbpokulpiujwaasi\"},\"privateLinkServiceConnectionState\":{\"status\":\"i\",\"description\":\"byuqerpqlp\",\"actionsRequired\":\"cciuqgbdbutau\"},\"groupId\":\"btkuwhh\",\"provisioningState\":\"ykojoxafnndlpic\"},\"id\":\"o\",\"name\":\"mkcdyhbpkkpwdre\",\"type\":\"novvqfovljxy\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"syrsndsytgadgvra\"},\"privateLinkServiceConnectionState\":{\"status\":\"en\",\"description\":\"nzar\",\"actionsRequired\":\"lquuijfqkacewii\"},\"groupId\":\"pubjibw\",\"provisioningState\":\"f\"},\"id\":\"hqkvpuvksgplsak\",\"name\":\"ynfs\",\"type\":\"n\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"uopxodlqiyntor\"},\"privateLinkServiceConnectionState\":{\"status\":\"hleosjsw\",\"description\":\"mslyzrpzbchckqqz\",\"actionsRequired\":\"ox\"},\"groupId\":\"suiizynkedyat\",\"provisioningState\":\"yhqmibzyhwi\"},\"id\":\"mypyynpcdpu\",\"name\":\"nzgmwznmabik\",\"type\":\"sorgj\"}]}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals("ibrhosxsdqr", model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("o", model.value().get(0).privateLinkServiceConnectionState().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionListResult model = - new PrivateEndpointConnectionListResult() - .withValue( - Arrays - .asList( - new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty() - .withStatus("ibrhosxsdqr") - .withDescription("o")), - new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty() - .withStatus("i") - .withDescription("byuqerpqlp")), - new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty() - .withStatus("en") - .withDescription("nzar")), - new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty() - .withStatus("hleosjsw") - .withDescription("mslyzrpzbchckqqz")))); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals("ibrhosxsdqr", model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("o", model.value().get(0).privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 24a5f38e8d6b..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionPropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.kusto.models.PrivateLinkServiceConnectionStateProperty; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = - BinaryData - .fromString( - "{\"privateEndpoint\":{\"id\":\"iqihn\"},\"privateLinkServiceConnectionState\":{\"status\":\"ngbwjz\",\"description\":\"fygxgispemvtzfk\",\"actionsRequired\":\"ubljofxqe\"},\"groupId\":\"jaeq\",\"provisioningState\":\"qjbasvms\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("ngbwjz", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("fygxgispemvtzfk", model.privateLinkServiceConnectionState().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = - new PrivateEndpointConnectionProperties() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty() - .withStatus("ngbwjz") - .withDescription("fygxgispemvtzfk")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("ngbwjz", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("fygxgispemvtzfk", model.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java deleted file mode 100644 index 279b4ddfb5cc..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.PrivateEndpointConnection; -import com.azure.resourcemanager.kusto.models.PrivateLinkServiceConnectionStateProperty; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"yslu\"},\"privateLinkServiceConnectionState\":{\"status\":\"pshhkvpedwqslsr\",\"description\":\"pq\",\"actionsRequired\":\"wskondcbrwimuvqe\"},\"groupId\":\"so\",\"provisioningState\":\"Succeeded\"},\"id\":\"qobbpihehcec\",\"name\":\"bmrqbrjbbmp\",\"type\":\"dlvykfrex\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .define("yulidwcwvm") - .withExistingCluster("qvlnnpxybafiqgea", "rbgjekglkl") - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty().withStatus("hj").withDescription("wgdnqzbr")) - .create(); - - Assertions.assertEquals("pshhkvpedwqslsr", response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("pq", response.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsDeleteMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsDeleteMockTests.java deleted file mode 100644 index f130fd3984a5..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .privateEndpointConnections() - .delete("hvthlaiwdcxsm", "zzhz", "txetlgydl", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index 826c3e9c0194..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.PrivateEndpointConnection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"nuchlgmltxdwhmo\"},\"privateLinkServiceConnectionState\":{\"status\":\"sgzv\",\"description\":\"snnjzfpafolpym\",\"actionsRequired\":\"mxq\"},\"groupId\":\"agpgdph\",\"provisioningState\":\"dulajvlejchcs\"},\"id\":\"zknmzlanrupd\",\"name\":\"vnphc\",\"type\":\"zqtpjhmq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .getWithResponse("rrkolawjmjs", "wro", "cdxfzzzwyjafitl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("sgzv", response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("snnjzfpafolpym", response.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsListMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsListMockTests.java deleted file mode 100644 index cb45a25043c0..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointConnectionsListMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.PrivateEndpointConnection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"f\"},\"privateLinkServiceConnectionState\":{\"status\":\"jmvl\",\"description\":\"z\",\"actionsRequired\":\"blkujrllfojuidjp\"},\"groupId\":\"yjucejikzoeo\",\"provisioningState\":\"tzejetjklnt\"},\"id\":\"yjuzkdb\",\"name\":\"zolxrzvhqjwtr\",\"type\":\"tgvgzp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.privateEndpointConnections().list("ztlvtmvagbwidqlv", "ukoveofi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jmvl", response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("z", response.iterator().next().privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointPropertyTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointPropertyTests.java deleted file mode 100644 index 42fb778475d8..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateEndpointPropertyTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.PrivateEndpointProperty; - -public final class PrivateEndpointPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointProperty model = - BinaryData.fromString("{\"id\":\"qulngsntnbybkzgc\"}").toObject(PrivateEndpointProperty.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointProperty model = new PrivateEndpointProperty(); - model = BinaryData.fromObject(model).toObject(PrivateEndpointProperty.class); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourceInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourceInnerTests.java deleted file mode 100644 index 909f43c8649a..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.PrivateLinkResourceInner; - -public final class PrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"fnjhfjxwmszkkfo\",\"requiredMembers\":[\"yfkzik\",\"jawneaiv\",\"wczelpci\"],\"requiredZoneNames\":[\"sfeaenwabfat\",\"lddxbjhwua\",\"nozj\",\"sphyoulpjrvxa\"]},\"id\":\"rvimjwosytxitcsk\",\"name\":\"cktqumiekkezzi\",\"type\":\"hlyfjhdgqgg\"}") - .toObject(PrivateLinkResourceInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceInner model = new PrivateLinkResourceInner(); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourceListResultTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourceListResultTests.java deleted file mode 100644 index e13e0ff51e6a..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourceListResultTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.kusto.models.PrivateLinkResourceListResult; -import java.util.Arrays; - -public final class PrivateLinkResourceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"tlwwrlk\",\"requiredMembers\":[\"ncvokotllxdyhg\",\"y\"],\"requiredZoneNames\":[\"gjltdtbnnhado\",\"crkvcikhnv\",\"amqgxqquezikyw\",\"gxk\"]},\"id\":\"la\",\"name\":\"melwuipiccjz\",\"type\":\"z\"},{\"properties\":{\"groupId\":\"vvcnayr\",\"requiredMembers\":[\"nxxmueedndrdv\",\"tkwqqtchealm\",\"mtdaa\"],\"requiredZoneNames\":[\"v\",\"vgpiohgwxrt\"]},\"id\":\"dxepxgyq\",\"name\":\"gvr\",\"type\":\"mnpkukghimdblxg\"}]}") - .toObject(PrivateLinkResourceListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceListResult model = - new PrivateLinkResourceListResult() - .withValue(Arrays.asList(new PrivateLinkResourceInner(), new PrivateLinkResourceInner())); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResult.class); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcePropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index a0ddcd538e3b..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.PrivateLinkResourceProperties; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"dunyg\",\"requiredMembers\":[\"idb\",\"fatpxllrxcyjmoa\",\"su\",\"arm\"],\"requiredZoneNames\":[\"mjsjqb\",\"hhyxxrw\"]}") - .toObject(PrivateLinkResourceProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model = new PrivateLinkResourceProperties(); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesGetWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesGetWithResponseMockTests.java deleted file mode 100644 index f4040b6f8486..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.PrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"groupId\":\"hdroznnh\",\"requiredMembers\":[\"ktgj\",\"sggux\"],\"requiredZoneNames\":[\"lwywae\",\"czg\",\"bukklels\"]},\"id\":\"blycsxzujksr\",\"name\":\"smdesqplpvmjcd\",\"type\":\"ewbidyvteowxv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResource response = - manager - .privateLinkResources() - .getWithResponse("pqthehnmnaoya", "kcoeqswank", "t", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesListMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesListMockTests.java deleted file mode 100644 index ba57f293cf7f..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkResourcesListMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.PrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"groupId\":\"svoujkxi\",\"requiredMembers\":[\"fhrkmdyom\",\"xfbvfb\",\"dy\"],\"requiredZoneNames\":[\"pwpgddei\",\"awzovgkk\",\"muikjcjcaztbws\",\"sqowxwc\"]},\"id\":\"likytwvczcswka\",\"name\":\"ve\",\"type\":\"yfdvlvhbwrnfxtgd\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.privateLinkResources().list("rseqwjksghudgz", "xog", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkServiceConnectionStatePropertyTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkServiceConnectionStatePropertyTests.java deleted file mode 100644 index 4e2e96903ce0..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/PrivateLinkServiceConnectionStatePropertyTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.PrivateLinkServiceConnectionStateProperty; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStatePropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionStateProperty model = - BinaryData - .fromString("{\"status\":\"wclxxwrl\",\"description\":\"ouskcqvkocrc\",\"actionsRequired\":\"kwt\"}") - .toObject(PrivateLinkServiceConnectionStateProperty.class); - Assertions.assertEquals("wclxxwrl", model.status()); - Assertions.assertEquals("ouskcqvkocrc", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionStateProperty model = - new PrivateLinkServiceConnectionStateProperty().withStatus("wclxxwrl").withDescription("ouskcqvkocrc"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionStateProperty.class); - Assertions.assertEquals("wclxxwrl", model.status()); - Assertions.assertEquals("ouskcqvkocrc", model.description()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ReadOnlyFollowingDatabasePropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ReadOnlyFollowingDatabasePropertiesTests.java deleted file mode 100644 index f302f4ae0a22..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ReadOnlyFollowingDatabasePropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.ReadOnlyFollowingDatabaseProperties; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ReadOnlyFollowingDatabasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReadOnlyFollowingDatabaseProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Failed\",\"softDeletePeriod\":\"PT16H20M50S\",\"hotCachePeriod\":\"PT105H24M9S\",\"statistics\":{\"size\":88.15698},\"leaderClusterResourceId\":\"utr\",\"attachedDatabaseConfigurationName\":\"upauut\",\"principalsModificationKind\":\"Replace\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"hej\"],\"tablesToExclude\":[\"zpnfqntcypsxj\"],\"externalTablesToInclude\":[\"imwkslircizj\",\"vydfceacvlhvygdy\",\"t\"],\"externalTablesToExclude\":[\"twnawjslbiwkojgc\",\"ztsfmznbaeqp\",\"chqnrnrpxehuwry\"],\"materializedViewsToInclude\":[\"aifmvikl\",\"ydv\"],\"materializedViewsToExclude\":[\"ejd\",\"nxcvds\",\"hnjivo\"],\"functionsToInclude\":[\"novqfzge\",\"jdftuljltd\",\"ceamtm\",\"zuo\"],\"functionsToExclude\":[\"wcw\"]},\"originalDatabaseName\":\"ioknssxmoj\",\"databaseShareOrigin\":\"Direct\",\"suspensionDetails\":{\"suspensionStartDate\":\"2021-02-27T14:03:02Z\"}}") - .toObject(ReadOnlyFollowingDatabaseProperties.class); - Assertions.assertEquals(Duration.parse("PT105H24M9S"), model.hotCachePeriod()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReadOnlyFollowingDatabaseProperties model = - new ReadOnlyFollowingDatabaseProperties().withHotCachePeriod(Duration.parse("PT105H24M9S")); - model = BinaryData.fromObject(model).toObject(ReadOnlyFollowingDatabaseProperties.class); - Assertions.assertEquals(Duration.parse("PT105H24M9S"), model.hotCachePeriod()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ReadOnlyFollowingDatabaseTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ReadOnlyFollowingDatabaseTests.java deleted file mode 100644 index 20ca415edcac..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ReadOnlyFollowingDatabaseTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.ReadOnlyFollowingDatabase; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ReadOnlyFollowingDatabaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReadOnlyFollowingDatabase model = - BinaryData - .fromString( - "{\"kind\":\"ReadOnlyFollowing\",\"properties\":{\"provisioningState\":\"Creating\",\"softDeletePeriod\":\"PT198H7M47S\",\"hotCachePeriod\":\"PT87H56M58S\",\"statistics\":{\"size\":60.990345},\"leaderClusterResourceId\":\"zpjuohminyfl\",\"attachedDatabaseConfigurationName\":\"rwm\",\"principalsModificationKind\":\"None\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"lvxwmyg\",\"xpgpq\"],\"tablesToExclude\":[\"sze\"],\"externalTablesToInclude\":[\"bjcrxgibbdaxco\"],\"externalTablesToExclude\":[\"zauorsuk\",\"kwbqplhlvnuu\",\"pzlrphw\",\"soldweyuqdunv\"],\"materializedViewsToInclude\":[\"rwrbi\",\"rk\",\"alywjhhgdn\"],\"materializedViewsToExclude\":[\"sivfomilo\"],\"functionsToInclude\":[\"dufiq\",\"dieuzaofj\"],\"functionsToExclude\":[\"cyyysfgdot\"]},\"originalDatabaseName\":\"biipuip\",\"databaseShareOrigin\":\"Other\",\"suspensionDetails\":{\"suspensionStartDate\":\"2021-04-29T06:53:37Z\"}},\"location\":\"cje\",\"id\":\"nizshqvcim\",\"name\":\"ev\",\"type\":\"gmblrri\"}") - .toObject(ReadOnlyFollowingDatabase.class); - Assertions.assertEquals("cje", model.location()); - Assertions.assertEquals(Duration.parse("PT87H56M58S"), model.hotCachePeriod()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReadOnlyFollowingDatabase model = - new ReadOnlyFollowingDatabase().withLocation("cje").withHotCachePeriod(Duration.parse("PT87H56M58S")); - model = BinaryData.fromObject(model).toObject(ReadOnlyFollowingDatabase.class); - Assertions.assertEquals("cje", model.location()); - Assertions.assertEquals(Duration.parse("PT87H56M58S"), model.hotCachePeriod()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ResourceSkuCapabilitiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ResourceSkuCapabilitiesTests.java deleted file mode 100644 index b776c8a61034..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ResourceSkuCapabilitiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.ResourceSkuCapabilities; - -public final class ResourceSkuCapabilitiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceSkuCapabilities model = - BinaryData.fromString("{\"name\":\"r\",\"value\":\"xpvgo\"}").toObject(ResourceSkuCapabilities.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceSkuCapabilities model = new ResourceSkuCapabilities(); - model = BinaryData.fromObject(model).toObject(ResourceSkuCapabilities.class); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ResourceSkuZoneDetailsTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ResourceSkuZoneDetailsTests.java deleted file mode 100644 index 7a64a8d02ac5..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ResourceSkuZoneDetailsTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.ResourceSkuZoneDetails; - -public final class ResourceSkuZoneDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceSkuZoneDetails model = - BinaryData - .fromString( - "{\"name\":[\"wbme\",\"hseyvju\"],\"capabilities\":[{\"name\":\"lhspkdee\",\"value\":\"ofmxagkvtmelmqkr\"},{\"name\":\"hvljuahaquh\",\"value\":\"hmdua\"},{\"name\":\"exq\",\"value\":\"fadmws\"}]}") - .toObject(ResourceSkuZoneDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceSkuZoneDetails model = new ResourceSkuZoneDetails(); - model = BinaryData.fromObject(model).toObject(ResourceSkuZoneDetails.class); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ScriptCheckNameRequestTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ScriptCheckNameRequestTests.java deleted file mode 100644 index 1b457eb05f4d..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ScriptCheckNameRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.ScriptCheckNameRequest; -import org.junit.jupiter.api.Assertions; - -public final class ScriptCheckNameRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptCheckNameRequest model = - BinaryData.fromString("{\"name\":\"ihxumwctondzj\"}").toObject(ScriptCheckNameRequest.class); - Assertions.assertEquals("ihxumwctondzj", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptCheckNameRequest model = new ScriptCheckNameRequest().withName("ihxumwctondzj"); - model = BinaryData.fromObject(model).toObject(ScriptCheckNameRequest.class); - Assertions.assertEquals("ihxumwctondzj", model.name()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ScriptsCheckNameAvailabilityWithResponseMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ScriptsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index c07b1e4efa30..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ScriptsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.CheckNameResult; -import com.azure.resourcemanager.kusto.models.Reason; -import com.azure.resourcemanager.kusto.models.ScriptCheckNameRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nameAvailable\":true,\"name\":\"lbmoichd\",\"message\":\"nfpubntnbatz\",\"reason\":\"Invalid\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameResult response = - manager - .scripts() - .checkNameAvailabilityWithResponse( - "qotoihiqakydiwfb", - "kwpzdqtvh", - "spodaqax", - new ScriptCheckNameRequest().withName("ipietgbe"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("lbmoichd", response.name()); - Assertions.assertEquals("nfpubntnbatz", response.message()); - Assertions.assertEquals(Reason.INVALID, response.reason()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ScriptsDeleteMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ScriptsDeleteMockTests.java deleted file mode 100644 index a00b4cbd74cf..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/ScriptsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .scripts() - .delete("lhsrrry", "jylmbkzudnigr", "ihotjewlpxuzzjg", "refqy", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SkuDescriptionInnerTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SkuDescriptionInnerTests.java deleted file mode 100644 index 1e98197459db..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SkuDescriptionInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.fluent.models.SkuDescriptionInner; - -public final class SkuDescriptionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuDescriptionInner model = - BinaryData - .fromString( - "{\"resourceType\":\"aaxdbabphlwrq\",\"name\":\"ktsthsucocmny\",\"tier\":\"zt\",\"locations\":[\"wwrq\",\"uedck\"],\"locationInfo\":[{\"location\":\"biexzfeyu\",\"zones\":[\"ibx\",\"jwbhqwalmuz\",\"oxaepd\",\"zjancuxr\"],\"zoneDetails\":[{\"name\":[\"v\",\"bniwdj\",\"wz\",\"s\"],\"capabilities\":[{}]},{\"name\":[\"xytxhpzxbz\",\"fzab\"],\"capabilities\":[{}]},{\"name\":[\"xwtctyqiklbbovpl\"],\"capabilities\":[{},{}]}]},{\"location\":\"hvgyuguosvmk\",\"zones\":[\"xquk\"],\"zoneDetails\":[{\"name\":[\"mg\",\"xnkjzkdesl\",\"vlopwiyighx\"],\"capabilities\":[{},{}]},{\"name\":[\"baiuebbaumny\"],\"capabilities\":[{}]},{\"name\":[\"eojnabc\"],\"capabilities\":[{},{},{}]}]},{\"location\":\"mtxpsiebtfh\",\"zones\":[\"sapskr\"],\"zoneDetails\":[{\"name\":[\"jdhtldwkyzxu\",\"tkncwsc\"],\"capabilities\":[{},{},{},{}]},{\"name\":[\"otogtwrupqs\",\"vnm\",\"cykvceo\",\"eil\"],\"capabilities\":[{},{},{},{}]},{\"name\":[\"yfjfcnjbkcn\",\"dhbt\",\"kphywpnvjto\",\"nermcl\"],\"capabilities\":[{},{}]},{\"name\":[\"oxuscrpabgyepsbj\",\"azqugxywpmueefj\"],\"capabilities\":[{},{}]}]}],\"restrictions\":[\"dataq\",\"datajidsuyonobglaoc\",\"dataxtccmg\"]}") - .toObject(SkuDescriptionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuDescriptionInner model = new SkuDescriptionInner(); - model = BinaryData.fromObject(model).toObject(SkuDescriptionInner.class); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SkuDescriptionListTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SkuDescriptionListTests.java deleted file mode 100644 index a5b0a408abd4..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SkuDescriptionListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.SkuDescriptionList; - -public final class SkuDescriptionListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuDescriptionList model = - BinaryData - .fromString( - "{\"value\":[{\"resourceType\":\"dxwzywqsmbsurexi\",\"name\":\"ryocfsfksymdd\",\"tier\":\"tki\",\"locations\":[\"hqyudxorrqnbpoc\",\"vyifqrvkdvjsl\",\"rm\",\"vdfwatkpn\"],\"locationInfo\":[{\"location\":\"exxbczwtr\",\"zones\":[\"qzbqjvsov\",\"yokacspkw\"],\"zoneDetails\":[{},{},{},{}]},{\"location\":\"dobpxjmflbvvn\",\"zones\":[\"kcciwwzjuqkhr\",\"ajiwkuo\",\"oskg\"],\"zoneDetails\":[{}]},{\"location\":\"uuimjmvxieduug\",\"zones\":[\"jrrfbyaosve\"],\"zoneDetails\":[{},{},{}]}],\"restrictions\":[\"datapclhocohslk\"]},{\"resourceType\":\"leggzfbu\",\"name\":\"mvfaxkffeiith\",\"tier\":\"m\",\"locations\":[\"v\",\"hxmzsbbzoggig\"],\"locationInfo\":[{\"location\":\"burvjxxjnspy\",\"zones\":[\"koen\"],\"zoneDetails\":[{},{},{}]},{\"location\":\"knvudwtiukb\",\"zones\":[\"gkpocipazyxoe\",\"ukgjnpiucgygevq\",\"ntypmrbpizcdrqj\"],\"zoneDetails\":[{}]},{\"location\":\"ydnfyhxdeoejz\",\"zones\":[\"ifsjttgzfbishcb\"],\"zoneDetails\":[{},{},{},{}]},{\"location\":\"jdeyeamdpha\",\"zones\":[\"pbuxwgipwhon\",\"wkgshwa\",\"kix\",\"bin\"],\"zoneDetails\":[{}]}],\"restrictions\":[\"datatmryw\",\"datauzoqft\",\"datayqzrnkcqvyxlw\"]},{\"resourceType\":\"lsicohoqqnwv\",\"name\":\"yav\",\"tier\":\"heun\",\"locations\":[\"hgyxzkonoc\",\"koklya\",\"uconuqszfkbey\",\"ewrmjmwvvjektc\"],\"locationInfo\":[{\"location\":\"nhwlrsffrzpwvl\",\"zones\":[\"gbiqylihkaet\"],\"zoneDetails\":[{},{},{}]},{\"location\":\"vfcivfsnkymuc\",\"zones\":[\"jf\",\"ebrjcxe\",\"fuwutttxf\"],\"zoneDetails\":[{},{}]}],\"restrictions\":[\"datarp\"]},{\"resourceType\":\"epcyvahfnlj\",\"name\":\"qxj\",\"tier\":\"ujqgidok\",\"locations\":[\"jyoxgvclt\",\"gsncghkjeszz\",\"bijhtxfvgxbf\"],\"locationInfo\":[{\"location\":\"nehmpvecx\",\"zones\":[\"ebfqkkrbm\",\"ukgri\",\"flz\",\"fbxzpuzycisp\"],\"zoneDetails\":[{},{},{},{}]},{\"location\":\"ahmgkbrp\",\"zones\":[\"hibnuqqkpika\",\"rgvtqag\"],\"zoneDetails\":[{},{}]},{\"location\":\"ynhijggme\",\"zones\":[\"iarbutrcvpna\",\"zmhjrunmp\",\"ttdbhrbnl\"],\"zoneDetails\":[{}]}],\"restrictions\":[\"datayskpbhen\",\"datatkcxywnytnrsy\",\"datalqidyby\",\"dataczfc\"]}]}") - .toObject(SkuDescriptionList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuDescriptionList model = new SkuDescriptionList(); - model = BinaryData.fromObject(model).toObject(SkuDescriptionList.class); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SkuLocationInfoItemTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SkuLocationInfoItemTests.java deleted file mode 100644 index be5c74f6e45a..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SkuLocationInfoItemTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.ResourceSkuZoneDetails; -import com.azure.resourcemanager.kusto.models.SkuLocationInfoItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SkuLocationInfoItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuLocationInfoItem model = - BinaryData - .fromString( - "{\"location\":\"udxytlmoyrx\",\"zones\":[\"u\",\"wpzntxhdzh\"],\"zoneDetails\":[{\"name\":[\"hckfrlhrx\"],\"capabilities\":[{\"name\":\"vpycanuzbp\",\"value\":\"afkuwb\"}]}]}") - .toObject(SkuLocationInfoItem.class); - Assertions.assertEquals("udxytlmoyrx", model.location()); - Assertions.assertEquals("u", model.zones().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuLocationInfoItem model = - new SkuLocationInfoItem() - .withLocation("udxytlmoyrx") - .withZones(Arrays.asList("u", "wpzntxhdzh")) - .withZoneDetails(Arrays.asList(new ResourceSkuZoneDetails())); - model = BinaryData.fromObject(model).toObject(SkuLocationInfoItem.class); - Assertions.assertEquals("udxytlmoyrx", model.location()); - Assertions.assertEquals("u", model.zones().get(0)); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SkusListMockTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SkusListMockTests.java deleted file mode 100644 index 1f518f85d096..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SkusListMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.kusto.KustoManager; -import com.azure.resourcemanager.kusto.models.SkuDescription; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SkusListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"resourceType\":\"q\",\"name\":\"aj\",\"tier\":\"wxacevehj\",\"locations\":[\"xoafgaoqltfae\",\"linmfgv\"],\"locationInfo\":[{\"location\":\"pghriypoqeyhl\",\"zones\":[\"kprlpyznuc\",\"qdsmexiit\",\"fuxtyasiibmiybnn\"],\"zoneDetails\":[{\"name\":[\"ljhnmgixhcmav\"],\"capabilities\":[{},{}]},{\"name\":[\"dorhcgyyp\",\"otwypundmb\"],\"capabilities\":[{},{},{},{}]},{\"name\":[\"mjkavlgorbmft\",\"mdtzfjltfvnzc\",\"jtotpvopvpbd\",\"zq\"],\"capabilities\":[{}]},{\"name\":[\"edsvqwthmk\",\"ibcysihsgqc\",\"dhohsdtmcdzsuf\",\"ohdxbzlmcmu\"],\"capabilities\":[{}]}]}],\"restrictions\":[\"datadbevwqqxeysko\",\"dataqzinkfkbg\",\"dataz\",\"dataowxeqocljmy\"]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - KustoManager manager = - KustoManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.skus().list("acvbmqz", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SuspensionDetailsTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SuspensionDetailsTests.java deleted file mode 100644 index b5f76a5f8cf0..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/SuspensionDetailsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.SuspensionDetails; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class SuspensionDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SuspensionDetails model = - BinaryData - .fromString("{\"suspensionStartDate\":\"2021-03-01T20:41:09Z\"}") - .toObject(SuspensionDetails.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T20:41:09Z"), model.suspensionStartDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SuspensionDetails model = - new SuspensionDetails().withSuspensionStartDate(OffsetDateTime.parse("2021-03-01T20:41:09Z")); - model = BinaryData.fromObject(model).toObject(SuspensionDetails.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T20:41:09Z"), model.suspensionStartDate()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/TableLevelSharingPropertiesTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/TableLevelSharingPropertiesTests.java deleted file mode 100644 index 850b60d7ec36..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/TableLevelSharingPropertiesTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TableLevelSharingPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TableLevelSharingProperties model = - BinaryData - .fromString( - "{\"tablesToInclude\":[\"ivkwlzuvccfwnfnb\",\"cfionl\",\"bxetqgtzxdpn\"],\"tablesToExclude\":[\"qwxrjfeallnw\"],\"externalTablesToInclude\":[\"isnjampmngnz\",\"c\"],\"externalTablesToExclude\":[\"wooc\",\"cbonqvpk\",\"lrxnjeaseiphe\"],\"materializedViewsToInclude\":[\"okeyyienj\",\"dlwtgrhpdj\"],\"materializedViewsToExclude\":[\"masxazjpqyegu\",\"lhbxxhejjzzvdud\",\"wdslfhotwmcy\"],\"functionsToInclude\":[\"lbjnpgacftadehx\",\"ltyfsop\",\"usue\",\"nzwdejba\"],\"functionsToExclude\":[\"xzdmohctb\",\"vudwx\",\"ndnvo\",\"gujjugwdkcglh\"]}") - .toObject(TableLevelSharingProperties.class); - Assertions.assertEquals("ivkwlzuvccfwnfnb", model.tablesToInclude().get(0)); - Assertions.assertEquals("qwxrjfeallnw", model.tablesToExclude().get(0)); - Assertions.assertEquals("isnjampmngnz", model.externalTablesToInclude().get(0)); - Assertions.assertEquals("wooc", model.externalTablesToExclude().get(0)); - Assertions.assertEquals("okeyyienj", model.materializedViewsToInclude().get(0)); - Assertions.assertEquals("masxazjpqyegu", model.materializedViewsToExclude().get(0)); - Assertions.assertEquals("lbjnpgacftadehx", model.functionsToInclude().get(0)); - Assertions.assertEquals("xzdmohctb", model.functionsToExclude().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableLevelSharingProperties model = - new TableLevelSharingProperties() - .withTablesToInclude(Arrays.asList("ivkwlzuvccfwnfnb", "cfionl", "bxetqgtzxdpn")) - .withTablesToExclude(Arrays.asList("qwxrjfeallnw")) - .withExternalTablesToInclude(Arrays.asList("isnjampmngnz", "c")) - .withExternalTablesToExclude(Arrays.asList("wooc", "cbonqvpk", "lrxnjeaseiphe")) - .withMaterializedViewsToInclude(Arrays.asList("okeyyienj", "dlwtgrhpdj")) - .withMaterializedViewsToExclude(Arrays.asList("masxazjpqyegu", "lhbxxhejjzzvdud", "wdslfhotwmcy")) - .withFunctionsToInclude(Arrays.asList("lbjnpgacftadehx", "ltyfsop", "usue", "nzwdejba")) - .withFunctionsToExclude(Arrays.asList("xzdmohctb", "vudwx", "ndnvo", "gujjugwdkcglh")); - model = BinaryData.fromObject(model).toObject(TableLevelSharingProperties.class); - Assertions.assertEquals("ivkwlzuvccfwnfnb", model.tablesToInclude().get(0)); - Assertions.assertEquals("qwxrjfeallnw", model.tablesToExclude().get(0)); - Assertions.assertEquals("isnjampmngnz", model.externalTablesToInclude().get(0)); - Assertions.assertEquals("wooc", model.externalTablesToExclude().get(0)); - Assertions.assertEquals("okeyyienj", model.materializedViewsToInclude().get(0)); - Assertions.assertEquals("masxazjpqyegu", model.materializedViewsToExclude().get(0)); - Assertions.assertEquals("lbjnpgacftadehx", model.functionsToInclude().get(0)); - Assertions.assertEquals("xzdmohctb", model.functionsToExclude().get(0)); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/TrustedExternalTenantTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/TrustedExternalTenantTests.java deleted file mode 100644 index 4b4e3f9b9d3a..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/TrustedExternalTenantTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.TrustedExternalTenant; -import org.junit.jupiter.api.Assertions; - -public final class TrustedExternalTenantTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrustedExternalTenant model = - BinaryData.fromString("{\"value\":\"soacctazakl\"}").toObject(TrustedExternalTenant.class); - Assertions.assertEquals("soacctazakl", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrustedExternalTenant model = new TrustedExternalTenant().withValue("soacctazakl"); - model = BinaryData.fromObject(model).toObject(TrustedExternalTenant.class); - Assertions.assertEquals("soacctazakl", model.value()); - } -} diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/VirtualNetworkConfigurationTests.java b/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/VirtualNetworkConfigurationTests.java deleted file mode 100644 index 86189d08fff3..000000000000 --- a/sdk/kusto/azure-resourcemanager-kusto/src/test/java/com/azure/resourcemanager/kusto/generated/VirtualNetworkConfigurationTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kusto.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.kusto.models.VirtualNetworkConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class VirtualNetworkConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualNetworkConfiguration model = - BinaryData - .fromString( - "{\"subnetId\":\"cr\",\"enginePublicIpId\":\"ffdfdosygexpa\",\"dataManagementPublicIpId\":\"jakhmsbzjh\"}") - .toObject(VirtualNetworkConfiguration.class); - Assertions.assertEquals("cr", model.subnetId()); - Assertions.assertEquals("ffdfdosygexpa", model.enginePublicIpId()); - Assertions.assertEquals("jakhmsbzjh", model.dataManagementPublicIpId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualNetworkConfiguration model = - new VirtualNetworkConfiguration() - .withSubnetId("cr") - .withEnginePublicIpId("ffdfdosygexpa") - .withDataManagementPublicIpId("jakhmsbzjh"); - model = BinaryData.fromObject(model).toObject(VirtualNetworkConfiguration.class); - Assertions.assertEquals("cr", model.subnetId()); - Assertions.assertEquals("ffdfdosygexpa", model.enginePublicIpId()); - Assertions.assertEquals("jakhmsbzjh", model.dataManagementPublicIpId()); - } -}