From 704aa94e43941646999543bada3bc3da1b4b8f7d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 30 Apr 2025 22:22:05 +0000 Subject: [PATCH] CodeGen from PR 32208 in Azure/azure-rest-api-specs Merge bbeec176d18040657dc631a5915da413bb018a6c into a9985de65f12da5676d41fc8b88cd1cae69907ac --- .../CHANGELOG.md | 21 +- .../README.md | 8 +- .../SAMPLE.md | 802 +++++++++--------- .../pom.xml | 4 +- .../AppConfigurationManager.java | 9 +- .../fluent/KeyValuesClient.java | 4 +- .../models/ConfigurationStoreInner.java | 32 + .../models/ConfigurationStoreProperties.java | 37 + ...rationStorePropertiesUpdateParameters.java | 37 + .../AppConfigurationManagementClientImpl.java | 2 +- .../ConfigurationStoreImpl.java | 17 + .../implementation/KeyValuesClientImpl.java | 19 +- .../models/ConfigurationStore.java | 65 +- .../ConfigurationStoreUpdateParameters.java | 32 + ...esourcemanager-appconfiguration.properties | 1 + .../ConfigurationStoresCreateSamples.java | 10 +- .../ConfigurationStoresDeleteSamples.java | 2 +- ...rationStoresGetByResourceGroupSamples.java | 2 +- .../ConfigurationStoresGetDeletedSamples.java | 2 +- ...ationStoresListByResourceGroupSamples.java | 2 +- ...ConfigurationStoresListDeletedSamples.java | 2 +- .../ConfigurationStoresListKeysSamples.java | 2 +- .../ConfigurationStoresListSamples.java | 2 +- ...onfigurationStoresPurgeDeletedSamples.java | 2 +- ...nfigurationStoresRegenerateKeySamples.java | 2 +- .../ConfigurationStoresUpdateSamples.java | 6 +- .../KeyValuesCreateOrUpdateSamples.java | 2 +- .../generated/KeyValuesDeleteSamples.java | 2 +- .../generated/KeyValuesGetSamples.java | 2 +- ...perationsCheckNameAvailabilitySamples.java | 4 +- .../generated/OperationsListSamples.java | 2 +- ...sRegionalCheckNameAvailabilitySamples.java | 4 +- ...pointConnectionsCreateOrUpdateSamples.java | 2 +- ...ivateEndpointConnectionsDeleteSamples.java | 2 +- .../PrivateEndpointConnectionsGetSamples.java | 2 +- ...ctionsListByConfigurationStoreSamples.java | 2 +- .../PrivateLinkResourcesGetSamples.java | 2 +- ...ourcesListByConfigurationStoreSamples.java | 2 +- .../generated/ReplicasCreateSamples.java | 2 +- .../generated/ReplicasDeleteSamples.java | 2 +- .../generated/ReplicasGetSamples.java | 2 +- ...plicasListByConfigurationStoreSamples.java | 2 +- .../generated/SnapshotsCreateSamples.java | 2 +- .../generated/SnapshotsGetSamples.java | 2 +- .../generated/ApiKeyInnerTests.java | 23 - .../generated/ApiKeyListResultTests.java | 30 - .../CheckNameAvailabilityParametersTests.java | 32 - .../ConfigurationStoresDeleteMockTests.java | 33 - ...StoresGetDeletedWithResponseMockTests.java | 37 - ...nfigurationStoresListDeletedMockTests.java | 37 - .../ConfigurationStoresListKeysMockTests.java | 37 - ...figurationStoresPurgeDeletedMockTests.java | 33 - ...resRegenerateKeyWithResponseMockTests.java | 39 - .../DataPlaneProxyPropertiesTests.java | 32 - .../DeletedConfigurationStoreInnerTests.java | 23 - ...etedConfigurationStoreListResultTests.java | 30 - ...etedConfigurationStorePropertiesTests.java | 23 - .../generated/KeyValuesDeleteMockTests.java | 33 - .../generated/LogSpecificationTests.java | 31 - .../generated/MetricDimensionTests.java | 32 - .../generated/MetricSpecificationTests.java | 58 -- .../NameAvailabilityStatusInnerTests.java | 23 - .../OperationDefinitionDisplayTests.java | 32 - .../OperationDefinitionInnerTests.java | 108 --- .../OperationDefinitionListResultTests.java | 77 -- .../generated/OperationPropertiesTests.java | 122 --- ...NameAvailabilityWithResponseMockTests.java | 41 - .../generated/OperationsListMockTests.java | 88 -- ...NameAvailabilityWithResponseMockTests.java | 41 - .../PrivateEndpointConnectionInnerTests.java | 37 - ...vateEndpointConnectionListResultTests.java | 56 -- ...vateEndpointConnectionPropertiesTests.java | 37 - ...ivateEndpointConnectionReferenceTests.java | 36 - ...intConnectionsCreateOrUpdateMockTests.java | 48 -- ...ateEndpointConnectionsDeleteMockTests.java | 34 - ...ntConnectionsGetWithResponseMockTests.java | 42 - ...ionsListByConfigurationStoreMockTests.java | 44 - .../generated/PrivateEndpointTests.java | 24 - .../PrivateLinkResourceInnerTests.java | 23 - .../PrivateLinkResourceListResultTests.java | 31 - .../PrivateLinkResourcePropertiesTests.java | 23 - ...LinkResourcesGetWithResponseMockTests.java | 37 - ...rcesListByConfigurationStoreMockTests.java | 37 - ...rivateLinkServiceConnectionStateTests.java | 31 - .../RegenerateKeyParametersTests.java | 25 - .../generated/ReplicaInnerTests.java | 26 - .../generated/ReplicaListResultTests.java | 33 - .../generated/ReplicaPropertiesTests.java | 22 - .../generated/ReplicasCreateMockTests.java | 41 - .../generated/ReplicasDeleteMockTests.java | 33 - .../ReplicasGetWithResponseMockTests.java | 39 - ...icasListByConfigurationStoreMockTests.java | 39 - .../generated/ResourceIdentityTests.java | 43 - .../generated/ServiceSpecificationTests.java | 130 --- .../appconfiguration/generated/SkuTests.java | 24 - .../generated/UserIdentityTests.java | 22 - 96 files changed, 700 insertions(+), 2576 deletions(-) create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/resources/azure-resourcemanager-appconfiguration.properties delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ApiKeyInnerTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ApiKeyListResultTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/CheckNameAvailabilityParametersTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresDeleteMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetDeletedWithResponseMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListDeletedMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListKeysMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresPurgeDeletedMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresRegenerateKeyWithResponseMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DataPlaneProxyPropertiesTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DeletedConfigurationStoreInnerTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DeletedConfigurationStoreListResultTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DeletedConfigurationStorePropertiesTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesDeleteMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/LogSpecificationTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/MetricDimensionTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/MetricSpecificationTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/NameAvailabilityStatusInnerTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationDefinitionDisplayTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationDefinitionInnerTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationDefinitionListResultTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationPropertiesTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationsCheckNameAvailabilityWithResponseMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationsListMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationsRegionalCheckNameAvailabilityWithResponseMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionInnerTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionListResultTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionPropertiesTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionReferenceTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsDeleteMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsListByConfigurationStoreMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourceInnerTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourceListResultTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcePropertiesTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesGetWithResponseMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesListByConfigurationStoreMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkServiceConnectionStateTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/RegenerateKeyParametersTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicaInnerTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicaListResultTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicaPropertiesTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasCreateMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasDeleteMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasGetWithResponseMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasListByConfigurationStoreMockTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ResourceIdentityTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ServiceSpecificationTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/SkuTests.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/UserIdentityTests.java diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/CHANGELOG.md b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/CHANGELOG.md index e36affd5a95d..e5973798be45 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/CHANGELOG.md +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/CHANGELOG.md @@ -1,14 +1,27 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2025-04-30) + +- Azure Resource Manager AppConfiguration client library for Java. This package contains Microsoft Azure SDK for AppConfiguration Management SDK. Package tag package-2024-06-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +#### `models.ConfigurationStoreUpdateParameters` was modified + +* `defaultKeyValueRevisionRetentionPeriodInSeconds()` was added +* `withDefaultKeyValueRevisionRetentionPeriodInSeconds(java.lang.Long)` was added + +#### `models.ConfigurationStore$Definition` was modified -### Bugs Fixed +* `withDefaultKeyValueRevisionRetentionPeriodInSeconds(java.lang.Long)` was added + +#### `models.ConfigurationStore$Update` was modified + +* `withDefaultKeyValueRevisionRetentionPeriodInSeconds(java.lang.Long)` was added + +#### `models.ConfigurationStore` was modified -### Other Changes +* `defaultKeyValueRevisionRetentionPeriodInSeconds()` was added ## 1.0.0 (2024-11-20) diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/README.md b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/README.md index b592b659c3f0..e41e0839b668 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/README.md +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/README.md @@ -2,7 +2,7 @@ Azure Resource Manager AppConfiguration client library for Java. -This package contains Microsoft Azure SDK for AppConfiguration Management SDK. Package tag package-2024-05-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for AppConfiguration Management SDK. Package tag package-2024-06-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ AppConfigurationManager manager = AppConfigurationManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/SAMPLE.md b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/SAMPLE.md index 598d916e82b5..fe50ccd9eb2a 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/SAMPLE.md +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/SAMPLE.md @@ -53,106 +53,55 @@ ### ConfigurationStores_Create ```java -import com.azure.resourcemanager.appconfiguration.models.AuthenticationMode; -import com.azure.resourcemanager.appconfiguration.models.DataPlaneProxyProperties; -import com.azure.resourcemanager.appconfiguration.models.IdentityType; -import com.azure.resourcemanager.appconfiguration.models.PrivateLinkDelegation; -import com.azure.resourcemanager.appconfiguration.models.ResourceIdentity; -import com.azure.resourcemanager.appconfiguration.models.Sku; -import com.azure.resourcemanager.appconfiguration.models.UserIdentity; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for ConfigurationStores Create. + * Samples for PrivateEndpointConnections ListByConfigurationStore. */ -public final class ConfigurationStoresCreateSamples { +public final class PrivateEndpointConnectionsListByConfigurationStoreSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresCreate.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresListPrivateEndpointConnections.json */ /** - * Sample code: ConfigurationStores_Create. + * Sample code: PrivateEndpointConnection_List. * * @param manager Entry point to AppConfigurationManager. */ public static void - configurationStoresCreate(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.configurationStores() - .define("contoso") - .withRegion("westus") - .withExistingResourceGroup("myResourceGroup") - .withSku(new Sku().withName("Standard")) - .withTags(mapOf("myTag", "myTagValue")) - .create(); + privateEndpointConnectionList(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.privateEndpointConnections() + .listByConfigurationStore("myResourceGroup", "contoso", com.azure.core.util.Context.NONE); } +} +``` - /* - * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresCreateWithIdentity.json - */ - /** - * Sample code: ConfigurationStores_Create_With_Identity. - * - * @param manager Entry point to AppConfigurationManager. - */ - public static void configurationStoresCreateWithIdentity( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.configurationStores() - .define("contoso") - .withRegion("westus") - .withExistingResourceGroup("myResourceGroup") - .withSku(new Sku().withName("Standard")) - .withTags(mapOf("myTag", "myTagValue")) - .withIdentity(new ResourceIdentity().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/c80fb759-c965-4c6a-9110-9b2b2d038882/resourcegroups/myResourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2", - new UserIdentity()))) - .create(); - } +### ConfigurationStores_Delete - /* - * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresCreateWithDataPlaneProxy.json - */ - /** - * Sample code: ConfigurationStores_Create_With_Data_Plane_Proxy. - * - * @param manager Entry point to AppConfigurationManager. - */ - public static void configurationStoresCreateWithDataPlaneProxy( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.configurationStores() - .define("contoso") - .withRegion("westus") - .withExistingResourceGroup("myResourceGroup") - .withSku(new Sku().withName("Standard")) - .withDataPlaneProxy(new DataPlaneProxyProperties().withAuthenticationMode(AuthenticationMode.PASS_THROUGH) - .withPrivateLinkDelegation(PrivateLinkDelegation.ENABLED)) - .create(); - } +```java +import java.util.HashMap; +import java.util.Map; +/** + * Samples for KeyValues CreateOrUpdate. + */ +public final class KeyValuesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresCreateWithLocalAuthDisabled.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresCreateKeyValue.json */ /** - * Sample code: ConfigurationStores_Create_With_Local_Auth_Disabled. + * Sample code: KeyValues_CreateOrUpdate. * * @param manager Entry point to AppConfigurationManager. */ - public static void configurationStoresCreateWithLocalAuthDisabled( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.configurationStores() - .define("contoso") - .withRegion("westus") - .withExistingResourceGroup("myResourceGroup") - .withSku(new Sku().withName("Standard")) - .withDisableLocalAuth(true) + public static void + keyValuesCreateOrUpdate(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.keyValues() + .define("myKey$myLabel") + .withExistingConfigurationStore("myResourceGroup", "contoso") + .withTags(mapOf("tag1", "tagValue1", "tag2", "tagValue2")) + .withValue("myValue") .create(); } @@ -170,30 +119,6 @@ public final class ConfigurationStoresCreateSamples { } ``` -### ConfigurationStores_Delete - -```java -/** - * Samples for ConfigurationStores Delete. - */ -public final class ConfigurationStoresDeleteSamples { - /* - * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresDelete.json - */ - /** - * Sample code: ConfigurationStores_Delete. - * - * @param manager Entry point to AppConfigurationManager. - */ - public static void - configurationStoresDelete(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.configurationStores().delete("myResourceGroup", "contoso", com.azure.core.util.Context.NONE); - } -} -``` - ### ConfigurationStores_GetByResourceGroup ```java @@ -203,7 +128,7 @@ public final class ConfigurationStoresDeleteSamples { public final class ConfigurationStoresGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresGet.json */ /** @@ -223,22 +148,22 @@ public final class ConfigurationStoresGetByResourceGroupSamples { ```java /** - * Samples for ConfigurationStores GetDeleted. + * Samples for ConfigurationStores PurgeDeleted. */ -public final class ConfigurationStoresGetDeletedSamples { +public final class ConfigurationStoresPurgeDeletedSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * DeletedConfigurationStoresGet.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * DeletedConfigurationStoresPurge.json */ /** - * Sample code: DeletedConfigurationStores_Get. + * Sample code: Purge a deleted configuration store. * * @param manager Entry point to AppConfigurationManager. */ public static void - deletedConfigurationStoresGet(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.configurationStores().getDeletedWithResponse("westus", "contoso", com.azure.core.util.Context.NONE); + purgeADeletedConfigurationStore(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().purgeDeleted("westus", "contoso", com.azure.core.util.Context.NONE); } } ``` @@ -252,7 +177,7 @@ public final class ConfigurationStoresGetDeletedSamples { public final class ConfigurationStoresListSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresList.json */ /** @@ -271,22 +196,21 @@ public final class ConfigurationStoresListSamples { ```java /** - * Samples for ConfigurationStores ListByResourceGroup. + * Samples for KeyValues Delete. */ -public final class ConfigurationStoresListByResourceGroupSamples { +public final class KeyValuesDeleteSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresListByResourceGroup.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresDeleteKeyValue.json */ /** - * Sample code: ConfigurationStores_ListByResourceGroup. + * Sample code: KeyValues_Delete. * * @param manager Entry point to AppConfigurationManager. */ - public static void configurationStoresListByResourceGroup( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.configurationStores().listByResourceGroup("myResourceGroup", null, com.azure.core.util.Context.NONE); + public static void keyValuesDelete(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.keyValues().delete("myResourceGroup", "contoso", "myKey$myLabel", com.azure.core.util.Context.NONE); } } ``` @@ -295,104 +219,28 @@ public final class ConfigurationStoresListByResourceGroupSamples { ```java /** - * Samples for ConfigurationStores ListDeleted. + * Samples for ConfigurationStores GetDeleted. */ -public final class ConfigurationStoresListDeletedSamples { +public final class ConfigurationStoresGetDeletedSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * DeletedConfigurationStoresList.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * DeletedConfigurationStoresGet.json */ /** - * Sample code: DeletedConfigurationStores_List. + * Sample code: DeletedConfigurationStores_Get. * * @param manager Entry point to AppConfigurationManager. */ public static void - deletedConfigurationStoresList(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.configurationStores().listDeleted(com.azure.core.util.Context.NONE); + deletedConfigurationStoresGet(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().getDeletedWithResponse("westus", "contoso", com.azure.core.util.Context.NONE); } } ``` ### ConfigurationStores_ListKeys -```java -/** - * Samples for ConfigurationStores ListKeys. - */ -public final class ConfigurationStoresListKeysSamples { - /* - * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresListKeys.json - */ - /** - * Sample code: ConfigurationStores_ListKeys. - * - * @param manager Entry point to AppConfigurationManager. - */ - public static void - configurationStoresListKeys(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.configurationStores().listKeys("myResourceGroup", "contoso", null, com.azure.core.util.Context.NONE); - } -} -``` - -### ConfigurationStores_PurgeDeleted - -```java -/** - * Samples for ConfigurationStores PurgeDeleted. - */ -public final class ConfigurationStoresPurgeDeletedSamples { - /* - * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * DeletedConfigurationStoresPurge.json - */ - /** - * Sample code: Purge a deleted configuration store. - * - * @param manager Entry point to AppConfigurationManager. - */ - public static void - purgeADeletedConfigurationStore(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.configurationStores().purgeDeleted("westus", "contoso", com.azure.core.util.Context.NONE); - } -} -``` - -### ConfigurationStores_RegenerateKey - -```java -import com.azure.resourcemanager.appconfiguration.models.RegenerateKeyParameters; - -/** - * Samples for ConfigurationStores RegenerateKey. - */ -public final class ConfigurationStoresRegenerateKeySamples { - /* - * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresRegenerateKey.json - */ - /** - * Sample code: ConfigurationStores_RegenerateKey. - * - * @param manager Entry point to AppConfigurationManager. - */ - public static void - configurationStoresRegenerateKey(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.configurationStores() - .regenerateKeyWithResponse("myResourceGroup", "contoso", - new RegenerateKeyParameters().withId("439AD01B4BE67DB1"), com.azure.core.util.Context.NONE); - } -} -``` - -### ConfigurationStores_Update - ```java import com.azure.resourcemanager.appconfiguration.models.ConfigurationStore; import com.azure.resourcemanager.appconfiguration.models.IdentityType; @@ -408,7 +256,7 @@ import java.util.Map; public final class ConfigurationStoresUpdateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresUpdateDisableLocalAuth.json */ /** @@ -426,7 +274,7 @@ public final class ConfigurationStoresUpdateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresUpdate.json */ /** @@ -444,7 +292,7 @@ public final class ConfigurationStoresUpdateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresUpdateWithIdentity.json */ /** @@ -481,46 +329,112 @@ public final class ConfigurationStoresUpdateSamples { } ``` -### KeyValues_CreateOrUpdate +### ConfigurationStores_PurgeDeleted ```java -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.appconfiguration.models.ConnectionStatus; +import com.azure.resourcemanager.appconfiguration.models.PrivateEndpointConnection; +import com.azure.resourcemanager.appconfiguration.models.PrivateLinkServiceConnectionState; /** - * Samples for KeyValues CreateOrUpdate. + * Samples for PrivateEndpointConnections CreateOrUpdate. */ -public final class KeyValuesCreateOrUpdateSamples { +public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresCreateKeyValue.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresUpdatePrivateEndpointConnection.json */ /** - * Sample code: KeyValues_CreateOrUpdate. + * Sample code: PrivateEndpointConnection_Update. * * @param manager Entry point to AppConfigurationManager. */ public static void - keyValuesCreateOrUpdate(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.keyValues() - .define("myKey$myLabel") - .withExistingConfigurationStore("myResourceGroup", "contoso") - .withTags(mapOf("tag1", "tagValue1", "tag2", "tagValue2")) - .withValue("myValue") - .create(); + privateEndpointConnectionUpdate(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + PrivateEndpointConnection resource = manager.privateEndpointConnections() + .getWithResponse("myResourceGroup", "contoso", "myConnection", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) + .withDescription("Auto-Approved")) + .apply(); } +} +``` - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; +### ConfigurationStores_RegenerateKey + +```java +import com.azure.resourcemanager.appconfiguration.models.RegenerateKeyParameters; + +/** + * Samples for ConfigurationStores RegenerateKey. + */ +public final class ConfigurationStoresRegenerateKeySamples { + /* + * x-ms-original-file: + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresRegenerateKey.json + */ + /** + * Sample code: ConfigurationStores_RegenerateKey. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void + configurationStoresRegenerateKey(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores() + .regenerateKeyWithResponse("myResourceGroup", "contoso", + new RegenerateKeyParameters().withId("439AD01B4BE67DB1"), com.azure.core.util.Context.NONE); + } +} +``` + +### ConfigurationStores_Update + +```java +/** + * Samples for Replicas Delete. + */ +public final class ReplicasDeleteSamples { + /* + * x-ms-original-file: + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresDeleteReplica.json + */ + /** + * Sample code: Replicas_Delete. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void replicasDelete(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.replicas().delete("myResourceGroup", "contoso", "myReplicaEus", com.azure.core.util.Context.NONE); + } +} +``` + +### KeyValues_CreateOrUpdate + +```java +/** + * Samples for ConfigurationStores ListDeleted. + */ +public final class ConfigurationStoresListDeletedSamples { + /* + * x-ms-original-file: + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * DeletedConfigurationStoresList.json + */ + /** + * Sample code: DeletedConfigurationStores_List. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void + deletedConfigurationStoresList(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().listDeleted(com.azure.core.util.Context.NONE); } } ``` @@ -529,21 +443,23 @@ public final class KeyValuesCreateOrUpdateSamples { ```java /** - * Samples for KeyValues Delete. + * Samples for PrivateEndpointConnections Get. */ -public final class KeyValuesDeleteSamples { +public final class PrivateEndpointConnectionsGetSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresDeleteKeyValue.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresGetPrivateEndpointConnection.json */ /** - * Sample code: KeyValues_Delete. + * Sample code: PrivateEndpointConnection_GetConnection. * * @param manager Entry point to AppConfigurationManager. */ - public static void keyValuesDelete(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.keyValues().delete("myResourceGroup", "contoso", "myKey$myLabel", com.azure.core.util.Context.NONE); + public static void privateEndpointConnectionGetConnection( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.privateEndpointConnections() + .getWithResponse("myResourceGroup", "contoso", "myConnection", com.azure.core.util.Context.NONE); } } ``` @@ -552,22 +468,25 @@ public final class KeyValuesDeleteSamples { ```java /** - * Samples for KeyValues Get. + * Samples for Replicas Create. */ -public final class KeyValuesGetSamples { +public final class ReplicasCreateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresGetKeyValue.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresCreateReplica.json */ /** - * Sample code: KeyValues_Get. + * Sample code: Replicas_Create. * * @param manager Entry point to AppConfigurationManager. */ - public static void keyValuesGet(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.keyValues() - .getWithResponse("myResourceGroup", "contoso", "myKey$myLabel", com.azure.core.util.Context.NONE); + public static void replicasCreate(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.replicas() + .define("myReplicaEus") + .withExistingConfigurationStore("myResourceGroup", "contoso") + .withRegion("eastus") + .create(); } } ``` @@ -584,7 +503,7 @@ import com.azure.resourcemanager.appconfiguration.models.ConfigurationResourceTy public final class OperationsCheckNameAvailabilitySamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * CheckNameAvailable.json */ /** @@ -603,7 +522,7 @@ public final class OperationsCheckNameAvailabilitySamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * CheckNameNotAvailable.json */ /** @@ -631,7 +550,7 @@ public final class OperationsCheckNameAvailabilitySamples { public final class OperationsListSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * OperationsList.json */ /** @@ -648,49 +567,23 @@ public final class OperationsListSamples { ### Operations_RegionalCheckNameAvailability ```java -import com.azure.resourcemanager.appconfiguration.models.CheckNameAvailabilityParameters; -import com.azure.resourcemanager.appconfiguration.models.ConfigurationResourceType; - /** - * Samples for Operations RegionalCheckNameAvailability. + * Samples for Replicas Get. */ -public final class OperationsRegionalCheckNameAvailabilitySamples { - /* - * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * RegionalCheckNameAvailable.json - */ - /** - * Sample code: ConfigurationStores_CheckNameAvailable. - * - * @param manager Entry point to AppConfigurationManager. - */ - public static void configurationStoresCheckNameAvailable( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.operations() - .regionalCheckNameAvailabilityWithResponse("westus", - new CheckNameAvailabilityParameters().withName("contoso") - .withType(ConfigurationResourceType.MICROSOFT_APP_CONFIGURATION_CONFIGURATION_STORES), - com.azure.core.util.Context.NONE); - } - +public final class ReplicasGetSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * RegionalCheckNameNotAvailable.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresGetReplica.json */ /** - * Sample code: ConfigurationStores_CheckNameNotAvailable. + * Sample code: Replicas_Get. * * @param manager Entry point to AppConfigurationManager. */ - public static void configurationStoresCheckNameNotAvailable( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.operations() - .regionalCheckNameAvailabilityWithResponse("westus", - new CheckNameAvailabilityParameters().withName("contoso") - .withType(ConfigurationResourceType.MICROSOFT_APP_CONFIGURATION_CONFIGURATION_STORES), - com.azure.core.util.Context.NONE); + public static void replicasGet(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.replicas() + .getWithResponse("myResourceGroup", "contoso", "myReplicaEus", com.azure.core.util.Context.NONE); } } ``` @@ -698,34 +591,30 @@ public final class OperationsRegionalCheckNameAvailabilitySamples { ### PrivateEndpointConnections_CreateOrUpdate ```java -import com.azure.resourcemanager.appconfiguration.models.ConnectionStatus; -import com.azure.resourcemanager.appconfiguration.models.PrivateEndpointConnection; -import com.azure.resourcemanager.appconfiguration.models.PrivateLinkServiceConnectionState; +import com.azure.resourcemanager.appconfiguration.models.KeyValueFilter; +import java.util.Arrays; /** - * Samples for PrivateEndpointConnections CreateOrUpdate. + * Samples for Snapshots Create. */ -public final class PrivateEndpointConnectionsCreateOrUpdateSamples { +public final class SnapshotsCreateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresUpdatePrivateEndpointConnection.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresCreateSnapshot.json */ /** - * Sample code: PrivateEndpointConnection_Update. + * Sample code: Snapshots_Create. * * @param manager Entry point to AppConfigurationManager. */ - public static void - privateEndpointConnectionUpdate(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - PrivateEndpointConnection resource = manager.privateEndpointConnections() - .getWithResponse("myResourceGroup", "contoso", "myConnection", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) - .withDescription("Auto-Approved")) - .apply(); + public static void snapshotsCreate(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.snapshots() + .define("mySnapshot") + .withExistingConfigurationStore("myResourceGroup", "contoso") + .withFilters(Arrays.asList(new KeyValueFilter().withKey("fakeTokenPlaceholder").withLabel("Production"))) + .withRetentionPeriod(3600L) + .create(); } } ``` @@ -734,23 +623,23 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { ```java /** - * Samples for PrivateEndpointConnections Delete. + * Samples for Replicas ListByConfigurationStore. */ -public final class PrivateEndpointConnectionsDeleteSamples { +public final class ReplicasListByConfigurationStoreSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresDeletePrivateEndpointConnection.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresListReplicas.json */ /** - * Sample code: PrivateEndpointConnections_Delete. + * Sample code: Replicas_ListByConfigurationStore. * * @param manager Entry point to AppConfigurationManager. */ public static void - privateEndpointConnectionsDelete(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.privateEndpointConnections() - .delete("myResourceGroup", "contoso", "myConnection", com.azure.core.util.Context.NONE); + replicasListByConfigurationStore(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.replicas() + .listByConfigurationStore("myResourceGroup", "contoso", null, com.azure.core.util.Context.NONE); } } ``` @@ -759,23 +648,23 @@ public final class PrivateEndpointConnectionsDeleteSamples { ```java /** - * Samples for PrivateEndpointConnections Get. + * Samples for PrivateLinkResources Get. */ -public final class PrivateEndpointConnectionsGetSamples { +public final class PrivateLinkResourcesGetSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresGetPrivateEndpointConnection.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * PrivateLinkResourceGet.json */ /** - * Sample code: PrivateEndpointConnection_GetConnection. + * Sample code: PrivateLinkResources_Get. * * @param manager Entry point to AppConfigurationManager. */ - public static void privateEndpointConnectionGetConnection( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.privateEndpointConnections() - .getWithResponse("myResourceGroup", "contoso", "myConnection", com.azure.core.util.Context.NONE); + public static void + privateLinkResourcesGet(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.privateLinkResources() + .getWithResponse("myResourceGroup", "contoso", "configurationStores", com.azure.core.util.Context.NONE); } } ``` @@ -784,23 +673,23 @@ public final class PrivateEndpointConnectionsGetSamples { ```java /** - * Samples for PrivateEndpointConnections ListByConfigurationStore. + * Samples for PrivateEndpointConnections Delete. */ -public final class PrivateEndpointConnectionsListByConfigurationStoreSamples { +public final class PrivateEndpointConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresListPrivateEndpointConnections.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresDeletePrivateEndpointConnection.json */ /** - * Sample code: PrivateEndpointConnection_List. + * Sample code: PrivateEndpointConnections_Delete. * * @param manager Entry point to AppConfigurationManager. */ public static void - privateEndpointConnectionList(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + privateEndpointConnectionsDelete(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { manager.privateEndpointConnections() - .listByConfigurationStore("myResourceGroup", "contoso", com.azure.core.util.Context.NONE); + .delete("myResourceGroup", "contoso", "myConnection", com.azure.core.util.Context.NONE); } } ``` @@ -809,23 +698,22 @@ public final class PrivateEndpointConnectionsListByConfigurationStoreSamples { ```java /** - * Samples for PrivateLinkResources Get. + * Samples for ConfigurationStores Delete. */ -public final class PrivateLinkResourcesGetSamples { +public final class ConfigurationStoresDeleteSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * PrivateLinkResourceGet.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresDelete.json */ /** - * Sample code: PrivateLinkResources_Get. + * Sample code: ConfigurationStores_Delete. * * @param manager Entry point to AppConfigurationManager. */ public static void - privateLinkResourcesGet(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.privateLinkResources() - .getWithResponse("myResourceGroup", "contoso", "configurationStores", com.azure.core.util.Context.NONE); + configurationStoresDelete(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().delete("myResourceGroup", "contoso", com.azure.core.util.Context.NONE); } } ``` @@ -834,23 +722,22 @@ public final class PrivateLinkResourcesGetSamples { ```java /** - * Samples for PrivateLinkResources ListByConfigurationStore. + * Samples for ConfigurationStores ListByResourceGroup. */ -public final class PrivateLinkResourcesListByConfigurationStoreSamples { +public final class ConfigurationStoresListByResourceGroupSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * PrivateLinkResourcesListByConfigurationStore.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresListByResourceGroup.json */ /** - * Sample code: PrivateLinkResources_ListGroupIds. + * Sample code: ConfigurationStores_ListByResourceGroup. * * @param manager Entry point to AppConfigurationManager. */ - public static void - privateLinkResourcesListGroupIds(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.privateLinkResources() - .listByConfigurationStore("myResourceGroup", "contoso", com.azure.core.util.Context.NONE); + public static void configurationStoresListByResourceGroup( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().listByResourceGroup("myResourceGroup", null, com.azure.core.util.Context.NONE); } } ``` @@ -859,25 +746,22 @@ public final class PrivateLinkResourcesListByConfigurationStoreSamples { ```java /** - * Samples for Replicas Create. + * Samples for KeyValues Get. */ -public final class ReplicasCreateSamples { +public final class KeyValuesGetSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresCreateReplica.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresGetKeyValue.json */ /** - * Sample code: Replicas_Create. + * Sample code: KeyValues_Get. * * @param manager Entry point to AppConfigurationManager. */ - public static void replicasCreate(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.replicas() - .define("myReplicaEus") - .withExistingConfigurationStore("myResourceGroup", "contoso") - .withRegion("eastus") - .create(); + public static void keyValuesGet(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.keyValues() + .getWithResponse("myResourceGroup", "contoso", "myKey$myLabel", com.azure.core.util.Context.NONE); } } ``` @@ -885,22 +769,121 @@ public final class ReplicasCreateSamples { ### Replicas_Delete ```java +import com.azure.resourcemanager.appconfiguration.models.AuthenticationMode; +import com.azure.resourcemanager.appconfiguration.models.DataPlaneProxyProperties; +import com.azure.resourcemanager.appconfiguration.models.IdentityType; +import com.azure.resourcemanager.appconfiguration.models.PrivateLinkDelegation; +import com.azure.resourcemanager.appconfiguration.models.ResourceIdentity; +import com.azure.resourcemanager.appconfiguration.models.Sku; +import com.azure.resourcemanager.appconfiguration.models.UserIdentity; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for Replicas Delete. + * Samples for ConfigurationStores Create. */ -public final class ReplicasDeleteSamples { +public final class ConfigurationStoresCreateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresDeleteReplica.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresCreate.json */ /** - * Sample code: Replicas_Delete. + * Sample code: ConfigurationStores_Create. * * @param manager Entry point to AppConfigurationManager. */ - public static void replicasDelete(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.replicas().delete("myResourceGroup", "contoso", "myReplicaEus", com.azure.core.util.Context.NONE); + public static void + configurationStoresCreate(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores() + .define("contoso") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withSku(new Sku().withName("Standard")) + .withTags(mapOf("myTag", "myTagValue")) + .create(); + } + + /* + * x-ms-original-file: + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresCreateWithIdentity.json + */ + /** + * Sample code: ConfigurationStores_Create_With_Identity. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void configurationStoresCreateWithIdentity( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores() + .define("contoso") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withSku(new Sku().withName("Standard")) + .withTags(mapOf("myTag", "myTagValue")) + .withIdentity(new ResourceIdentity().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/c80fb759-c965-4c6a-9110-9b2b2d038882/resourcegroups/myResourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2", + new UserIdentity()))) + .create(); + } + + /* + * x-ms-original-file: + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresCreateWithDataPlaneProxy.json + */ + /** + * Sample code: ConfigurationStores_Create_With_Data_Plane_Proxy. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void configurationStoresCreateWithDataPlaneProxy( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores() + .define("contoso") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withSku(new Sku().withName("Standard")) + .withDataPlaneProxy(new DataPlaneProxyProperties().withAuthenticationMode(AuthenticationMode.PASS_THROUGH) + .withPrivateLinkDelegation(PrivateLinkDelegation.ENABLED)) + .create(); + } + + /* + * x-ms-original-file: + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresCreateWithLocalAuthDisabled.json + */ + /** + * Sample code: ConfigurationStores_Create_With_Local_Auth_Disabled. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void configurationStoresCreateWithLocalAuthDisabled( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores() + .define("contoso") + .withRegion("westus") + .withExistingResourceGroup("myResourceGroup") + .withSku(new Sku().withName("Standard")) + .withDisableLocalAuth(true) + .withDataPlaneProxy(new DataPlaneProxyProperties().withAuthenticationMode(AuthenticationMode.PASS_THROUGH) + .withPrivateLinkDelegation(PrivateLinkDelegation.DISABLED)) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` @@ -908,23 +891,49 @@ public final class ReplicasDeleteSamples { ### Replicas_Get ```java +import com.azure.resourcemanager.appconfiguration.models.CheckNameAvailabilityParameters; +import com.azure.resourcemanager.appconfiguration.models.ConfigurationResourceType; + /** - * Samples for Replicas Get. + * Samples for Operations RegionalCheckNameAvailability. */ -public final class ReplicasGetSamples { +public final class OperationsRegionalCheckNameAvailabilitySamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresGetReplica.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * RegionalCheckNameAvailable.json */ /** - * Sample code: Replicas_Get. + * Sample code: ConfigurationStores_CheckNameAvailable. * * @param manager Entry point to AppConfigurationManager. */ - public static void replicasGet(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.replicas() - .getWithResponse("myResourceGroup", "contoso", "myReplicaEus", com.azure.core.util.Context.NONE); + public static void configurationStoresCheckNameAvailable( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.operations() + .regionalCheckNameAvailabilityWithResponse("westus", + new CheckNameAvailabilityParameters().withName("contoso") + .withType(ConfigurationResourceType.MICROSOFT_APP_CONFIGURATION_CONFIGURATION_STORES), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * RegionalCheckNameNotAvailable.json + */ + /** + * Sample code: ConfigurationStores_CheckNameNotAvailable. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void configurationStoresCheckNameNotAvailable( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.operations() + .regionalCheckNameAvailabilityWithResponse("westus", + new CheckNameAvailabilityParameters().withName("contoso") + .withType(ConfigurationResourceType.MICROSOFT_APP_CONFIGURATION_CONFIGURATION_STORES), + com.azure.core.util.Context.NONE); } } ``` @@ -933,23 +942,22 @@ public final class ReplicasGetSamples { ```java /** - * Samples for Replicas ListByConfigurationStore. + * Samples for Snapshots Get. */ -public final class ReplicasListByConfigurationStoreSamples { +public final class SnapshotsGetSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresListReplicas.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresGetSnapshot.json */ /** - * Sample code: Replicas_ListByConfigurationStore. + * Sample code: Snapshots_Get. * * @param manager Entry point to AppConfigurationManager. */ - public static void - replicasListByConfigurationStore(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.replicas() - .listByConfigurationStore("myResourceGroup", "contoso", null, com.azure.core.util.Context.NONE); + public static void snapshotsGet(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.snapshots() + .getWithResponse("myResourceGroup", "contoso", "mySnapshot", com.azure.core.util.Context.NONE); } } ``` @@ -957,30 +965,23 @@ public final class ReplicasListByConfigurationStoreSamples { ### Snapshots_Create ```java -import com.azure.resourcemanager.appconfiguration.models.KeyValueFilter; -import java.util.Arrays; - /** - * Samples for Snapshots Create. + * Samples for ConfigurationStores ListKeys. */ -public final class SnapshotsCreateSamples { +public final class ConfigurationStoresListKeysSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresCreateSnapshot.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * ConfigurationStoresListKeys.json */ /** - * Sample code: Snapshots_Create. + * Sample code: ConfigurationStores_ListKeys. * * @param manager Entry point to AppConfigurationManager. */ - public static void snapshotsCreate(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.snapshots() - .define("mySnapshot") - .withExistingConfigurationStore("myResourceGroup", "contoso") - .withFilters(Arrays.asList(new KeyValueFilter().withKey("fakeTokenPlaceholder").withLabel("Production"))) - .withRetentionPeriod(3600L) - .create(); + public static void + configurationStoresListKeys(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().listKeys("myResourceGroup", "contoso", null, com.azure.core.util.Context.NONE); } } ``` @@ -989,22 +990,23 @@ public final class SnapshotsCreateSamples { ```java /** - * Samples for Snapshots Get. + * Samples for PrivateLinkResources ListByConfigurationStore. */ -public final class SnapshotsGetSamples { +public final class PrivateLinkResourcesListByConfigurationStoreSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ - * ConfigurationStoresGetSnapshot.json + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ + * PrivateLinkResourcesListByConfigurationStore.json */ /** - * Sample code: Snapshots_Get. + * Sample code: PrivateLinkResources_ListGroupIds. * * @param manager Entry point to AppConfigurationManager. */ - public static void snapshotsGet(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { - manager.snapshots() - .getWithResponse("myResourceGroup", "contoso", "mySnapshot", com.azure.core.util.Context.NONE); + public static void + privateLinkResourcesListGroupIds(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.privateLinkResources() + .listByConfigurationStore("myResourceGroup", "contoso", com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml index f5e83be1a1ff..3594e90efc49 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for AppConfiguration Management - This package contains Microsoft Azure SDK for AppConfiguration Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-05-01. + This package contains Microsoft Azure SDK for AppConfiguration Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-06-01. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/AppConfigurationManager.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/AppConfigurationManager.java index f53f5e8c88e0..3fdff40678dc 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/AppConfigurationManager.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/AppConfigurationManager.java @@ -22,6 +22,7 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appconfiguration.fluent.AppConfigurationManagementClient; import com.azure.resourcemanager.appconfiguration.implementation.AppConfigurationManagementClientBuilder; @@ -43,6 +44,7 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -116,6 +118,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-appconfiguration.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -223,12 +228,14 @@ public AppConfigurationManager authenticate(TokenCredential credential, AzurePro Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.appconfiguration") .append("/") - .append("1.0.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/KeyValuesClient.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/KeyValuesClient.java index dac813fc27b7..f46d8596081f 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/KeyValuesClient.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/KeyValuesClient.java @@ -79,13 +79,15 @@ Response createOrUpdateWithResponse(String resourceGroupName, Str * @param configStoreName The name of the configuration store. * @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is * optional. + * @param keyValueParameters The parameters for creating a key-value. * @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 key-value resource along with all resource properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - KeyValueInner createOrUpdate(String resourceGroupName, String configStoreName, String keyValueName); + KeyValueInner createOrUpdate(String resourceGroupName, String configStoreName, String keyValueName, + KeyValueInner keyValueParameters); /** * Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreInner.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreInner.java index 1cdf66403c68..70082dc3b328 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreInner.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreInner.java @@ -310,6 +310,38 @@ public ConfigurationStoreInner withSoftDeleteRetentionInDays(Integer softDeleteR return this; } + /** + * Get the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value + * revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores and + * Premium SKU stores. + * + * @return the defaultKeyValueRevisionRetentionPeriodInSeconds value. + */ + public Long defaultKeyValueRevisionRetentionPeriodInSeconds() { + return this.innerProperties() == null + ? null + : this.innerProperties().defaultKeyValueRevisionRetentionPeriodInSeconds(); + } + + /** + * Set the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value + * revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores and + * Premium SKU stores. + * + * @param defaultKeyValueRevisionRetentionPeriodInSeconds the defaultKeyValueRevisionRetentionPeriodInSeconds value + * to set. + * @return the ConfigurationStoreInner object itself. + */ + public ConfigurationStoreInner + withDefaultKeyValueRevisionRetentionPeriodInSeconds(Long defaultKeyValueRevisionRetentionPeriodInSeconds) { + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationStoreProperties(); + } + this.innerProperties() + .withDefaultKeyValueRevisionRetentionPeriodInSeconds(defaultKeyValueRevisionRetentionPeriodInSeconds); + return this; + } + /** * Get the enablePurgeProtection property: Property specifying whether protection against purge is enabled for this * configuration store. diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreProperties.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreProperties.java index eec6c2d78117..480a56647913 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreProperties.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreProperties.java @@ -65,6 +65,12 @@ public final class ConfigurationStoreProperties implements JsonSerializable> createOrUpdateWithResponseAsync(String res if (keyValueName == null) { return Mono.error(new IllegalArgumentException("Parameter keyValueName is required and cannot be null.")); } - if (keyValueParameters != null) { + if (keyValueParameters == null) { + return Mono + .error(new IllegalArgumentException("Parameter keyValueParameters is required and cannot be null.")); + } else { keyValueParameters.validate(); } final String accept = "application/json"; @@ -332,7 +335,10 @@ private Mono> createOrUpdateWithResponseAsync(String res if (keyValueName == null) { return Mono.error(new IllegalArgumentException("Parameter keyValueName is required and cannot be null.")); } - if (keyValueParameters != null) { + if (keyValueParameters == null) { + return Mono + .error(new IllegalArgumentException("Parameter keyValueParameters is required and cannot be null.")); + } else { keyValueParameters.validate(); } final String accept = "application/json"; @@ -349,6 +355,7 @@ private Mono> createOrUpdateWithResponseAsync(String res * @param configStoreName The name of the configuration store. * @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is * optional. + * @param keyValueParameters The parameters for creating a key-value. * @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. @@ -356,8 +363,7 @@ private Mono> createOrUpdateWithResponseAsync(String res */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String configStoreName, - String keyValueName) { - final KeyValueInner keyValueParameters = null; + String keyValueName, KeyValueInner keyValueParameters) { return createOrUpdateWithResponseAsync(resourceGroupName, configStoreName, keyValueName, keyValueParameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -392,14 +398,15 @@ public Response createOrUpdateWithResponse(String resourceGroupNa * @param configStoreName The name of the configuration store. * @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is * optional. + * @param keyValueParameters The parameters for creating a key-value. * @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 key-value resource along with all resource properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - public KeyValueInner createOrUpdate(String resourceGroupName, String configStoreName, String keyValueName) { - final KeyValueInner keyValueParameters = null; + public KeyValueInner createOrUpdate(String resourceGroupName, String configStoreName, String keyValueName, + KeyValueInner keyValueParameters) { return createOrUpdateWithResponse(resourceGroupName, configStoreName, keyValueName, keyValueParameters, Context.NONE).getValue(); } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ConfigurationStore.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ConfigurationStore.java index f98d64da3bfb..fe71b606fa3b 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ConfigurationStore.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ConfigurationStore.java @@ -133,6 +133,15 @@ public interface ConfigurationStore { */ Integer softDeleteRetentionInDays(); + /** + * Gets the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain new key + * value revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores + * and Premium SKU stores. + * + * @return the defaultKeyValueRevisionRetentionPeriodInSeconds value. + */ + Long defaultKeyValueRevisionRetentionPeriodInSeconds(); + /** * Gets the enablePurgeProtection property: Property specifying whether protection against purge is enabled for this * configuration store. @@ -252,11 +261,12 @@ interface WithSku { * The stage of the ConfigurationStore definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithEncryption, - DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithDisableLocalAuth, - DefinitionStages.WithSoftDeleteRetentionInDays, DefinitionStages.WithEnablePurgeProtection, - DefinitionStages.WithDataPlaneProxy, DefinitionStages.WithCreateMode { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithEncryption, DefinitionStages.WithPublicNetworkAccess, + DefinitionStages.WithDisableLocalAuth, DefinitionStages.WithSoftDeleteRetentionInDays, + DefinitionStages.WithDefaultKeyValueRevisionRetentionPeriodInSeconds, + DefinitionStages.WithEnablePurgeProtection, DefinitionStages.WithDataPlaneProxy, + DefinitionStages.WithCreateMode { /** * Executes the create request. * @@ -356,6 +366,25 @@ interface WithSoftDeleteRetentionInDays { WithCreate withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays); } + /** + * The stage of the ConfigurationStore definition allowing to specify + * defaultKeyValueRevisionRetentionPeriodInSeconds. + */ + interface WithDefaultKeyValueRevisionRetentionPeriodInSeconds { + /** + * Specifies the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain + * new key value revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for + * Standard SKU stores and Premium SKU stores.. + * + * @param defaultKeyValueRevisionRetentionPeriodInSeconds The duration in seconds to retain new key value + * revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores + * and Premium SKU stores. + * @return the next definition stage. + */ + WithCreate withDefaultKeyValueRevisionRetentionPeriodInSeconds( + Long defaultKeyValueRevisionRetentionPeriodInSeconds); + } + /** * The stage of the ConfigurationStore definition allowing to specify enablePurgeProtection. */ @@ -410,9 +439,10 @@ interface WithCreateMode { /** * The template for ConfigurationStore update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku, - UpdateStages.WithEncryption, UpdateStages.WithDisableLocalAuth, UpdateStages.WithPublicNetworkAccess, - UpdateStages.WithEnablePurgeProtection, UpdateStages.WithDataPlaneProxy { + interface Update + extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku, UpdateStages.WithEncryption, + UpdateStages.WithDisableLocalAuth, UpdateStages.WithPublicNetworkAccess, UpdateStages.WithEnablePurgeProtection, + UpdateStages.WithDataPlaneProxy, UpdateStages.WithDefaultKeyValueRevisionRetentionPeriodInSeconds { /** * Executes the update request. * @@ -543,6 +573,25 @@ interface WithDataPlaneProxy { */ Update withDataPlaneProxy(DataPlaneProxyProperties dataPlaneProxy); } + + /** + * The stage of the ConfigurationStore update allowing to specify + * defaultKeyValueRevisionRetentionPeriodInSeconds. + */ + interface WithDefaultKeyValueRevisionRetentionPeriodInSeconds { + /** + * Specifies the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain + * new key value revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for + * Standard SKU stores and Premium SKU stores.. + * + * @param defaultKeyValueRevisionRetentionPeriodInSeconds The duration in seconds to retain new key value + * revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores + * and Premium SKU stores. + * @return the next definition stage. + */ + Update withDefaultKeyValueRevisionRetentionPeriodInSeconds( + Long defaultKeyValueRevisionRetentionPeriodInSeconds); + } } /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ConfigurationStoreUpdateParameters.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ConfigurationStoreUpdateParameters.java index 9c4cd1368ee2..7b16cdb54028 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ConfigurationStoreUpdateParameters.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ConfigurationStoreUpdateParameters.java @@ -234,6 +234,38 @@ public ConfigurationStoreUpdateParameters withDataPlaneProxy(DataPlaneProxyPrope return this; } + /** + * Get the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value + * revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores and + * Premium SKU stores. + * + * @return the defaultKeyValueRevisionRetentionPeriodInSeconds value. + */ + public Long defaultKeyValueRevisionRetentionPeriodInSeconds() { + return this.innerProperties() == null + ? null + : this.innerProperties().defaultKeyValueRevisionRetentionPeriodInSeconds(); + } + + /** + * Set the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value + * revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores and + * Premium SKU stores. + * + * @param defaultKeyValueRevisionRetentionPeriodInSeconds the defaultKeyValueRevisionRetentionPeriodInSeconds value + * to set. + * @return the ConfigurationStoreUpdateParameters object itself. + */ + public ConfigurationStoreUpdateParameters + withDefaultKeyValueRevisionRetentionPeriodInSeconds(Long defaultKeyValueRevisionRetentionPeriodInSeconds) { + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationStorePropertiesUpdateParameters(); + } + this.innerProperties() + .withDefaultKeyValueRevisionRetentionPeriodInSeconds(defaultKeyValueRevisionRetentionPeriodInSeconds); + return this; + } + /** * Validates the instance. * diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/resources/azure-resourcemanager-appconfiguration.properties b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/resources/azure-resourcemanager-appconfiguration.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/resources/azure-resourcemanager-appconfiguration.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresCreateSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresCreateSamples.java index a2e028d54570..18243dca11df 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresCreateSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresCreateSamples.java @@ -20,7 +20,7 @@ public final class ConfigurationStoresCreateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresCreate.json */ /** @@ -41,7 +41,7 @@ public final class ConfigurationStoresCreateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresCreateWithIdentity.json */ /** @@ -66,7 +66,7 @@ public static void configurationStoresCreateWithIdentity( /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresCreateWithDataPlaneProxy.json */ /** @@ -88,7 +88,7 @@ public static void configurationStoresCreateWithDataPlaneProxy( /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresCreateWithLocalAuthDisabled.json */ /** @@ -104,6 +104,8 @@ public static void configurationStoresCreateWithLocalAuthDisabled( .withExistingResourceGroup("myResourceGroup") .withSku(new Sku().withName("Standard")) .withDisableLocalAuth(true) + .withDataPlaneProxy(new DataPlaneProxyProperties().withAuthenticationMode(AuthenticationMode.PASS_THROUGH) + .withPrivateLinkDelegation(PrivateLinkDelegation.DISABLED)) .create(); } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresDeleteSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresDeleteSamples.java index b986c7fd81ca..278a6ad6177d 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresDeleteSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresDeleteSamples.java @@ -10,7 +10,7 @@ public final class ConfigurationStoresDeleteSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresDelete.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetByResourceGroupSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetByResourceGroupSamples.java index c829dc298f48..82ae6ee01008 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetByResourceGroupSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ConfigurationStoresGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresGet.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetDeletedSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetDeletedSamples.java index f81467033ebe..bf7687faee4a 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetDeletedSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetDeletedSamples.java @@ -10,7 +10,7 @@ public final class ConfigurationStoresGetDeletedSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * DeletedConfigurationStoresGet.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListByResourceGroupSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListByResourceGroupSamples.java index d7c5cbe1518a..79aa619fedda 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListByResourceGroupSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ConfigurationStoresListByResourceGroupSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresListByResourceGroup.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListDeletedSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListDeletedSamples.java index b69bd92678f8..1046b83e3013 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListDeletedSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListDeletedSamples.java @@ -10,7 +10,7 @@ public final class ConfigurationStoresListDeletedSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * DeletedConfigurationStoresList.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListKeysSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListKeysSamples.java index 78a6446af084..e6ebf058ebd9 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListKeysSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListKeysSamples.java @@ -10,7 +10,7 @@ public final class ConfigurationStoresListKeysSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresListKeys.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListSamples.java index 35d1e973497b..b2ede32457ce 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListSamples.java @@ -10,7 +10,7 @@ public final class ConfigurationStoresListSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresList.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresPurgeDeletedSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresPurgeDeletedSamples.java index a01fa19c4e3d..3e42ff34053b 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresPurgeDeletedSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresPurgeDeletedSamples.java @@ -10,7 +10,7 @@ public final class ConfigurationStoresPurgeDeletedSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * DeletedConfigurationStoresPurge.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresRegenerateKeySamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresRegenerateKeySamples.java index 9103f7620001..e25ecefc8ff3 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresRegenerateKeySamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresRegenerateKeySamples.java @@ -12,7 +12,7 @@ public final class ConfigurationStoresRegenerateKeySamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresRegenerateKey.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresUpdateSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresUpdateSamples.java index 4bb105300778..fbd9e33f0ed1 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresUpdateSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresUpdateSamples.java @@ -18,7 +18,7 @@ public final class ConfigurationStoresUpdateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresUpdateDisableLocalAuth.json */ /** @@ -36,7 +36,7 @@ public static void configurationStoresUpdateDisableLocalAuth( /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresUpdate.json */ /** @@ -54,7 +54,7 @@ public static void configurationStoresUpdateDisableLocalAuth( /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresUpdateWithIdentity.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesCreateOrUpdateSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesCreateOrUpdateSamples.java index d980c9b0d195..a62a25fe5819 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesCreateOrUpdateSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ public final class KeyValuesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresCreateKeyValue.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesDeleteSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesDeleteSamples.java index 3d716a8a4b8e..0e505b25e6af 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesDeleteSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesDeleteSamples.java @@ -10,7 +10,7 @@ public final class KeyValuesDeleteSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresDeleteKeyValue.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesGetSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesGetSamples.java index ccdac75fdeae..5a294415da30 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesGetSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesGetSamples.java @@ -10,7 +10,7 @@ public final class KeyValuesGetSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresGetKeyValue.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsCheckNameAvailabilitySamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsCheckNameAvailabilitySamples.java index 040edc785886..ebda4b7df8bc 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsCheckNameAvailabilitySamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsCheckNameAvailabilitySamples.java @@ -13,7 +13,7 @@ public final class OperationsCheckNameAvailabilitySamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * CheckNameAvailable.json */ /** @@ -32,7 +32,7 @@ public static void configurationStoresCheckNameAvailable( /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * CheckNameNotAvailable.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsListSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsListSamples.java index df85019abdeb..eb5ea432c5b4 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsListSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsListSamples.java @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * OperationsList.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsRegionalCheckNameAvailabilitySamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsRegionalCheckNameAvailabilitySamples.java index 15b28ec52947..0add67ff71c7 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsRegionalCheckNameAvailabilitySamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsRegionalCheckNameAvailabilitySamples.java @@ -13,7 +13,7 @@ public final class OperationsRegionalCheckNameAvailabilitySamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * RegionalCheckNameAvailable.json */ /** @@ -32,7 +32,7 @@ public static void configurationStoresCheckNameAvailable( /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * RegionalCheckNameNotAvailable.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index 878526dc1900..aefd24a78146 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresUpdatePrivateEndpointConnection.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsDeleteSamples.java index d4752e1243ae..03fe308c34ed 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -10,7 +10,7 @@ public final class PrivateEndpointConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresDeletePrivateEndpointConnection.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsGetSamples.java index 4a64d058ee02..39adb49fe2eb 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsGetSamples.java @@ -10,7 +10,7 @@ public final class PrivateEndpointConnectionsGetSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresGetPrivateEndpointConnection.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsListByConfigurationStoreSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsListByConfigurationStoreSamples.java index ab3de9653bdb..5a6354c65e50 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsListByConfigurationStoreSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsListByConfigurationStoreSamples.java @@ -10,7 +10,7 @@ public final class PrivateEndpointConnectionsListByConfigurationStoreSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresListPrivateEndpointConnections.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesGetSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesGetSamples.java index 68f17ba48f67..b02ae9ec56a9 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesGetSamples.java @@ -10,7 +10,7 @@ public final class PrivateLinkResourcesGetSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * PrivateLinkResourceGet.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesListByConfigurationStoreSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesListByConfigurationStoreSamples.java index 14c1f5bd5a9c..b0a4103784f3 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesListByConfigurationStoreSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesListByConfigurationStoreSamples.java @@ -10,7 +10,7 @@ public final class PrivateLinkResourcesListByConfigurationStoreSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * PrivateLinkResourcesListByConfigurationStore.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasCreateSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasCreateSamples.java index 70a8f3914411..51b6e03bbaaf 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasCreateSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasCreateSamples.java @@ -10,7 +10,7 @@ public final class ReplicasCreateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresCreateReplica.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasDeleteSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasDeleteSamples.java index 1d9c278efb06..c7e79ce0e537 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasDeleteSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasDeleteSamples.java @@ -10,7 +10,7 @@ public final class ReplicasDeleteSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresDeleteReplica.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasGetSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasGetSamples.java index 59093131f6e3..5831efb955d9 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasGetSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasGetSamples.java @@ -10,7 +10,7 @@ public final class ReplicasGetSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresGetReplica.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasListByConfigurationStoreSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasListByConfigurationStoreSamples.java index 84958d71a7db..088c7d44f5b6 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasListByConfigurationStoreSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasListByConfigurationStoreSamples.java @@ -10,7 +10,7 @@ public final class ReplicasListByConfigurationStoreSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresListReplicas.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/SnapshotsCreateSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/SnapshotsCreateSamples.java index c6a06799b083..1b5cbf8bfaca 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/SnapshotsCreateSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/SnapshotsCreateSamples.java @@ -13,7 +13,7 @@ public final class SnapshotsCreateSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresCreateSnapshot.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/SnapshotsGetSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/SnapshotsGetSamples.java index 76e643fb276f..ba9a13363784 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/SnapshotsGetSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/SnapshotsGetSamples.java @@ -10,7 +10,7 @@ public final class SnapshotsGetSamples { /* * x-ms-original-file: - * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ + * specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-06-01/examples/ * ConfigurationStoresGetSnapshot.json */ /** diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ApiKeyInnerTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ApiKeyInnerTests.java deleted file mode 100644 index 43f1a88c60a2..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ApiKeyInnerTests.java +++ /dev/null @@ -1,23 +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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.ApiKeyInner; - -public final class ApiKeyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApiKeyInner model = BinaryData.fromString( - "{\"id\":\"jqul\",\"name\":\"sntnbybkzgcw\",\"value\":\"clxxwrljdo\",\"connectionString\":\"kcqvkocrc\",\"lastModified\":\"2021-02-11T18:18:15Z\",\"readOnly\":false}") - .toObject(ApiKeyInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApiKeyInner model = new ApiKeyInner(); - model = BinaryData.fromObject(model).toObject(ApiKeyInner.class); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ApiKeyListResultTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ApiKeyListResultTests.java deleted file mode 100644 index cdfb4bda9818..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ApiKeyListResultTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.ApiKeyInner; -import com.azure.resourcemanager.appconfiguration.models.ApiKeyListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ApiKeyListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApiKeyListResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"ojakhmsbzjhcrze\",\"name\":\"phlxa\",\"value\":\"thqt\",\"connectionString\":\"qjbpfzfsin\",\"lastModified\":\"2021-11-15T02:44:36Z\",\"readOnly\":true},{\"id\":\"rwzoxxjtfelluwf\",\"name\":\"tonpe\",\"value\":\"pjkjlxofpdv\",\"connectionString\":\"fxxypininmayhuy\",\"lastModified\":\"2021-05-05T04:33:07Z\",\"readOnly\":true},{\"id\":\"epoo\",\"name\":\"nuvamiheogna\",\"value\":\"zxtheotusivyevcc\",\"connectionString\":\"ihnhun\",\"lastModified\":\"2021-08-15T16:10:49Z\",\"readOnly\":false},{\"id\":\"nfygxgispemvtz\",\"name\":\"ufubl\",\"value\":\"fxqeof\",\"connectionString\":\"e\",\"lastModified\":\"2021-01-23T13:20:17Z\",\"readOnly\":true}],\"nextLink\":\"asvm\"}") - .toObject(ApiKeyListResult.class); - Assertions.assertEquals("asvm", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApiKeyListResult model = new ApiKeyListResult() - .withValue(Arrays.asList(new ApiKeyInner(), new ApiKeyInner(), new ApiKeyInner(), new ApiKeyInner())) - .withNextLink("asvm"); - model = BinaryData.fromObject(model).toObject(ApiKeyListResult.class); - Assertions.assertEquals("asvm", model.nextLink()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/CheckNameAvailabilityParametersTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/CheckNameAvailabilityParametersTests.java deleted file mode 100644 index 8e9f6cf42e3a..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/CheckNameAvailabilityParametersTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.CheckNameAvailabilityParameters; -import com.azure.resourcemanager.appconfiguration.models.ConfigurationResourceType; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityParameters model = BinaryData - .fromString("{\"name\":\"yoqpsoaccta\",\"type\":\"Microsoft.AppConfiguration/configurationStores\"}") - .toObject(CheckNameAvailabilityParameters.class); - Assertions.assertEquals("yoqpsoaccta", model.name()); - Assertions.assertEquals(ConfigurationResourceType.MICROSOFT_APP_CONFIGURATION_CONFIGURATION_STORES, - model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityParameters model = new CheckNameAvailabilityParameters().withName("yoqpsoaccta") - .withType(ConfigurationResourceType.MICROSOFT_APP_CONFIGURATION_CONFIGURATION_STORES); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityParameters.class); - Assertions.assertEquals("yoqpsoaccta", model.name()); - Assertions.assertEquals(ConfigurationResourceType.MICROSOFT_APP_CONFIGURATION_CONFIGURATION_STORES, - model.type()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresDeleteMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresDeleteMockTests.java deleted file mode 100644 index f8952559fa02..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresDeleteMockTests.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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConfigurationStoresDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.configurationStores().delete("iiswacffgdkzze", "kfvhqcrailvpn", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetDeletedWithResponseMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetDeletedWithResponseMockTests.java deleted file mode 100644 index ef73ad08dd49..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetDeletedWithResponseMockTests.java +++ /dev/null @@ -1,37 +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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.DeletedConfigurationStore; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConfigurationStoresGetDeletedWithResponseMockTests { - @Test - public void testGetDeletedWithResponse() throws Exception { - String responseStr - = "{\"id\":\"qyib\",\"name\":\"wfluszdt\",\"type\":\"rkwofyyvoqa\",\"properties\":{\"configurationStoreId\":\"expbtg\",\"location\":\"bwoenwashrt\",\"deletionDate\":\"2021-03-25T05:20:51Z\",\"scheduledPurgeDate\":\"2021-10-02T00:32Z\",\"tags\":{\"qiiobyuqer\":\"wbpokulpiujwaasi\",\"bdbutauvf\":\"qlpqwcciuq\",\"afnn\":\"tkuwhhmhykojo\"},\"purgeProtectionEnabled\":true}}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeletedConfigurationStore response = manager.configurationStores() - .getDeletedWithResponse("jrjxgciqibrhosx", "dqrhzoymib", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListDeletedMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListDeletedMockTests.java deleted file mode 100644 index 1af3b8e2fab5..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListDeletedMockTests.java +++ /dev/null @@ -1,37 +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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.DeletedConfigurationStore; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConfigurationStoresListDeletedMockTests { - @Test - public void testListDeleted() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"cpwi\",\"name\":\"vqtmnub\",\"type\":\"kpzksmondjmq\",\"properties\":{\"configurationStoreId\":\"ypomgkopkwho\",\"location\":\"pajqgxysm\",\"deletionDate\":\"2020-12-21T19:48:14Z\",\"scheduledPurgeDate\":\"2021-03-21T23:12:31Z\",\"tags\":{\"zapvhelx\":\"vmkcx\",\"tddckcb\":\"rgly\"},\"purgeProtectionEnabled\":true}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.configurationStores().listDeleted(com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListKeysMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListKeysMockTests.java deleted file mode 100644 index c5ad18951658..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListKeysMockTests.java +++ /dev/null @@ -1,37 +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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.ApiKey; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConfigurationStoresListKeysMockTests { - @Test - public void testListKeys() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"agafcnihgwqap\",\"name\":\"dgfbcvkcvqvpke\",\"value\":\"cvdrhvoodsot\",\"connectionString\":\"bzdopcj\",\"lastModified\":\"2021-09-30T23:37:37Z\",\"readOnly\":false}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.configurationStores().listKeys("pfuflrw", "mh", "lxyjr", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresPurgeDeletedMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresPurgeDeletedMockTests.java deleted file mode 100644 index dc48c83c9cc7..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresPurgeDeletedMockTests.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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConfigurationStoresPurgeDeletedMockTests { - @Test - public void testPurgeDeleted() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.configurationStores().purgeDeleted("ichkoymkcdyhb", "kkpwdreqnovvq", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresRegenerateKeyWithResponseMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresRegenerateKeyWithResponseMockTests.java deleted file mode 100644 index e0fd1c1a8f3e..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresRegenerateKeyWithResponseMockTests.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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.ApiKey; -import com.azure.resourcemanager.appconfiguration.models.RegenerateKeyParameters; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConfigurationStoresRegenerateKeyWithResponseMockTests { - @Test - public void testRegenerateKeyWithResponse() throws Exception { - String responseStr - = "{\"id\":\"wniyqsluicpd\",\"name\":\"kzzlvmbmpaxmodf\",\"value\":\"efyw\",\"connectionString\":\"pfvmwyhrfou\",\"lastModified\":\"2021-03-05T05:10:55Z\",\"readOnly\":false}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApiKey response = manager.configurationStores() - .regenerateKeyWithResponse("ld", "mgxcxrslpm", new RegenerateKeyParameters().withId("wuoegrpk"), - com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DataPlaneProxyPropertiesTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DataPlaneProxyPropertiesTests.java deleted file mode 100644 index ad69602e0954..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DataPlaneProxyPropertiesTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.AuthenticationMode; -import com.azure.resourcemanager.appconfiguration.models.DataPlaneProxyProperties; -import com.azure.resourcemanager.appconfiguration.models.PrivateLinkDelegation; -import org.junit.jupiter.api.Assertions; - -public final class DataPlaneProxyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataPlaneProxyProperties model - = BinaryData.fromString("{\"authenticationMode\":\"Pass-through\",\"privateLinkDelegation\":\"Enabled\"}") - .toObject(DataPlaneProxyProperties.class); - Assertions.assertEquals(AuthenticationMode.PASS_THROUGH, model.authenticationMode()); - Assertions.assertEquals(PrivateLinkDelegation.ENABLED, model.privateLinkDelegation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataPlaneProxyProperties model - = new DataPlaneProxyProperties().withAuthenticationMode(AuthenticationMode.PASS_THROUGH) - .withPrivateLinkDelegation(PrivateLinkDelegation.ENABLED); - model = BinaryData.fromObject(model).toObject(DataPlaneProxyProperties.class); - Assertions.assertEquals(AuthenticationMode.PASS_THROUGH, model.authenticationMode()); - Assertions.assertEquals(PrivateLinkDelegation.ENABLED, model.privateLinkDelegation()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DeletedConfigurationStoreInnerTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DeletedConfigurationStoreInnerTests.java deleted file mode 100644 index f36f875dbc14..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DeletedConfigurationStoreInnerTests.java +++ /dev/null @@ -1,23 +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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.DeletedConfigurationStoreInner; - -public final class DeletedConfigurationStoreInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeletedConfigurationStoreInner model = BinaryData.fromString( - "{\"id\":\"uzgwyzmhtx\",\"name\":\"gmtsavjcbpwxqpsr\",\"type\":\"ftguv\",\"properties\":{\"configurationStoreId\":\"hprwmdyv\",\"location\":\"tayriwwroyqbex\",\"deletionDate\":\"2021-05-05T17:55:38Z\",\"scheduledPurgeDate\":\"2021-02-15T11:45:28Z\",\"tags\":{\"vah\":\"cnojvknmefqsg\",\"qzcjrvxdj\":\"pjyzhpv\",\"awjvzunluthnnp\":\"lmwlxkvugfhzo\",\"jzuaejxdultskzbb\":\"nxipeil\"},\"purgeProtectionEnabled\":true}}") - .toObject(DeletedConfigurationStoreInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeletedConfigurationStoreInner model = new DeletedConfigurationStoreInner(); - model = BinaryData.fromObject(model).toObject(DeletedConfigurationStoreInner.class); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DeletedConfigurationStoreListResultTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DeletedConfigurationStoreListResultTests.java deleted file mode 100644 index e75f136e5da6..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DeletedConfigurationStoreListResultTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.DeletedConfigurationStoreInner; -import com.azure.resourcemanager.appconfiguration.models.DeletedConfigurationStoreListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DeletedConfigurationStoreListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeletedConfigurationStoreListResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"ndnhj\",\"name\":\"uwhvylwzbtdhxujz\",\"type\":\"mpowuwpr\",\"properties\":{\"configurationStoreId\":\"veual\",\"location\":\"j\",\"deletionDate\":\"2021-04-21T08:53:38Z\",\"scheduledPurgeDate\":\"2021-04-26T22:12:21Z\",\"tags\":{\"riplrbpbewtg\":\"bcswsrt\",\"c\":\"fgb\",\"gibtnm\":\"wxzvlvqhjkb\"},\"purgeProtectionEnabled\":true}}],\"nextLink\":\"wwaloayqcgwrt\"}") - .toObject(DeletedConfigurationStoreListResult.class); - Assertions.assertEquals("wwaloayqcgwrt", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeletedConfigurationStoreListResult model - = new DeletedConfigurationStoreListResult().withValue(Arrays.asList(new DeletedConfigurationStoreInner())) - .withNextLink("wwaloayqcgwrt"); - model = BinaryData.fromObject(model).toObject(DeletedConfigurationStoreListResult.class); - Assertions.assertEquals("wwaloayqcgwrt", model.nextLink()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DeletedConfigurationStorePropertiesTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DeletedConfigurationStorePropertiesTests.java deleted file mode 100644 index 8a82e51c40f0..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/DeletedConfigurationStorePropertiesTests.java +++ /dev/null @@ -1,23 +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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.DeletedConfigurationStoreProperties; - -public final class DeletedConfigurationStorePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeletedConfigurationStoreProperties model = BinaryData.fromString( - "{\"configurationStoreId\":\"mv\",\"location\":\"kgpwoz\",\"deletionDate\":\"2021-12-04T01:13:33Z\",\"scheduledPurgeDate\":\"2021-08-14T18:03:09Z\",\"tags\":{\"waboe\":\"jyofdxluusdtto\",\"bxwyjsflhhcaa\":\"qvkelnsm\"},\"purgeProtectionEnabled\":true}") - .toObject(DeletedConfigurationStoreProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeletedConfigurationStoreProperties model = new DeletedConfigurationStoreProperties(); - model = BinaryData.fromObject(model).toObject(DeletedConfigurationStoreProperties.class); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesDeleteMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesDeleteMockTests.java deleted file mode 100644 index d352e9177ac7..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesDeleteMockTests.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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class KeyValuesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.keyValues().delete("jcntuj", "tcje", "ftwwaezkojvdc", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/LogSpecificationTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/LogSpecificationTests.java deleted file mode 100644 index b5b80d276aa2..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/LogSpecificationTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.LogSpecification; -import org.junit.jupiter.api.Assertions; - -public final class LogSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogSpecification model - = BinaryData.fromString("{\"name\":\"yxzk\",\"displayName\":\"ocukoklyax\",\"blobDuration\":\"onuq\"}") - .toObject(LogSpecification.class); - Assertions.assertEquals("yxzk", model.name()); - Assertions.assertEquals("ocukoklyax", model.displayName()); - Assertions.assertEquals("onuq", model.blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogSpecification model - = new LogSpecification().withName("yxzk").withDisplayName("ocukoklyax").withBlobDuration("onuq"); - model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("yxzk", model.name()); - Assertions.assertEquals("ocukoklyax", model.displayName()); - Assertions.assertEquals("onuq", model.blobDuration()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/MetricDimensionTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/MetricDimensionTests.java deleted file mode 100644 index c62388417006..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/MetricDimensionTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.MetricDimension; -import org.junit.jupiter.api.Assertions; - -public final class MetricDimensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricDimension model = BinaryData - .fromString("{\"name\":\"hmpvecx\",\"displayName\":\"debfqkkrbmpukgri\",\"internalName\":\"lzlfbxzpuz\"}") - .toObject(MetricDimension.class); - Assertions.assertEquals("hmpvecx", model.name()); - Assertions.assertEquals("debfqkkrbmpukgri", model.displayName()); - Assertions.assertEquals("lzlfbxzpuz", model.internalName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricDimension model = new MetricDimension().withName("hmpvecx") - .withDisplayName("debfqkkrbmpukgri") - .withInternalName("lzlfbxzpuz"); - model = BinaryData.fromObject(model).toObject(MetricDimension.class); - Assertions.assertEquals("hmpvecx", model.name()); - Assertions.assertEquals("debfqkkrbmpukgri", model.displayName()); - Assertions.assertEquals("lzlfbxzpuz", model.internalName()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/MetricSpecificationTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/MetricSpecificationTests.java deleted file mode 100644 index 57bdcfe68c62..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/MetricSpecificationTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.MetricDimension; -import com.azure.resourcemanager.appconfiguration.models.MetricSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricSpecification model = BinaryData.fromString( - "{\"name\":\"fkbey\",\"displayName\":\"wrmjmwvvjektc\",\"displayDescription\":\"enhwlrs\",\"unit\":\"rzpwvlqdqgbiq\",\"aggregationType\":\"ihkaetcktvfc\",\"internalMetricName\":\"fsnkymuctq\",\"dimensions\":[{\"name\":\"ebrjcxe\",\"displayName\":\"uwutttxfvjrbi\",\"internalName\":\"hxepcyvahfnlj\"},{\"name\":\"qxj\",\"displayName\":\"ujqgidok\",\"internalName\":\"ljyoxgvcltb\"},{\"name\":\"ncghkje\",\"displayName\":\"zhbijhtxfv\",\"internalName\":\"bfs\"}],\"fillGapWithZero\":true}") - .toObject(MetricSpecification.class); - Assertions.assertEquals("fkbey", model.name()); - Assertions.assertEquals("wrmjmwvvjektc", model.displayName()); - Assertions.assertEquals("enhwlrs", model.displayDescription()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.unit()); - Assertions.assertEquals("ihkaetcktvfc", model.aggregationType()); - Assertions.assertEquals("fsnkymuctq", model.internalMetricName()); - Assertions.assertEquals("ebrjcxe", model.dimensions().get(0).name()); - Assertions.assertEquals("uwutttxfvjrbi", model.dimensions().get(0).displayName()); - Assertions.assertEquals("hxepcyvahfnlj", model.dimensions().get(0).internalName()); - Assertions.assertEquals(true, model.fillGapWithZero()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricSpecification model = new MetricSpecification().withName("fkbey") - .withDisplayName("wrmjmwvvjektc") - .withDisplayDescription("enhwlrs") - .withUnit("rzpwvlqdqgbiq") - .withAggregationType("ihkaetcktvfc") - .withInternalMetricName("fsnkymuctq") - .withDimensions(Arrays.asList( - new MetricDimension().withName("ebrjcxe") - .withDisplayName("uwutttxfvjrbi") - .withInternalName("hxepcyvahfnlj"), - new MetricDimension().withName("qxj").withDisplayName("ujqgidok").withInternalName("ljyoxgvcltb"), - new MetricDimension().withName("ncghkje").withDisplayName("zhbijhtxfv").withInternalName("bfs"))) - .withFillGapWithZero(true); - model = BinaryData.fromObject(model).toObject(MetricSpecification.class); - Assertions.assertEquals("fkbey", model.name()); - Assertions.assertEquals("wrmjmwvvjektc", model.displayName()); - Assertions.assertEquals("enhwlrs", model.displayDescription()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.unit()); - Assertions.assertEquals("ihkaetcktvfc", model.aggregationType()); - Assertions.assertEquals("fsnkymuctq", model.internalMetricName()); - Assertions.assertEquals("ebrjcxe", model.dimensions().get(0).name()); - Assertions.assertEquals("uwutttxfvjrbi", model.dimensions().get(0).displayName()); - Assertions.assertEquals("hxepcyvahfnlj", model.dimensions().get(0).internalName()); - Assertions.assertEquals(true, model.fillGapWithZero()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/NameAvailabilityStatusInnerTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/NameAvailabilityStatusInnerTests.java deleted file mode 100644 index 2a3f5381121f..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/NameAvailabilityStatusInnerTests.java +++ /dev/null @@ -1,23 +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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.NameAvailabilityStatusInner; - -public final class NameAvailabilityStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NameAvailabilityStatusInner model - = BinaryData.fromString("{\"nameAvailable\":true,\"message\":\"lahbcryff\",\"reason\":\"dosyg\"}") - .toObject(NameAvailabilityStatusInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityStatusInner model = new NameAvailabilityStatusInner(); - model = BinaryData.fromObject(model).toObject(NameAvailabilityStatusInner.class); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationDefinitionDisplayTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationDefinitionDisplayTests.java deleted file mode 100644 index 3afaa3c9d174..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationDefinitionDisplayTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.OperationDefinitionDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDefinitionDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDefinitionDisplay model = BinaryData.fromString( - "{\"provider\":\"h\",\"resource\":\"osfln\",\"operation\":\"sfqpteehz\",\"description\":\"ypyqrimzinp\"}") - .toObject(OperationDefinitionDisplay.class); - Assertions.assertEquals("osfln", model.resource()); - Assertions.assertEquals("sfqpteehz", model.operation()); - Assertions.assertEquals("ypyqrimzinp", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDefinitionDisplay model = new OperationDefinitionDisplay().withResource("osfln") - .withOperation("sfqpteehz") - .withDescription("ypyqrimzinp"); - model = BinaryData.fromObject(model).toObject(OperationDefinitionDisplay.class); - Assertions.assertEquals("osfln", model.resource()); - Assertions.assertEquals("sfqpteehz", model.operation()); - Assertions.assertEquals("ypyqrimzinp", model.description()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationDefinitionInnerTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationDefinitionInnerTests.java deleted file mode 100644 index 4ca613865ca3..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationDefinitionInnerTests.java +++ /dev/null @@ -1,108 +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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.OperationDefinitionInner; -import com.azure.resourcemanager.appconfiguration.models.LogSpecification; -import com.azure.resourcemanager.appconfiguration.models.MetricDimension; -import com.azure.resourcemanager.appconfiguration.models.MetricSpecification; -import com.azure.resourcemanager.appconfiguration.models.OperationDefinitionDisplay; -import com.azure.resourcemanager.appconfiguration.models.OperationProperties; -import com.azure.resourcemanager.appconfiguration.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationDefinitionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDefinitionInner model = BinaryData.fromString( - "{\"name\":\"mmnkzsmodmgl\",\"isDataAction\":true,\"display\":{\"provider\":\"kwtmutduqktapspw\",\"resource\":\"uertumk\",\"operation\":\"svqwhbmdgbbjfd\",\"description\":\"mbmbexppbh\"},\"origin\":\"qrolfpf\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"qux\",\"displayName\":\"jyj\",\"blobDuration\":\"jaoyfhrtx\"},{\"name\":\"n\",\"displayName\":\"kujysvlejuvfq\",\"blobDuration\":\"rlyxwjkcprbnw\"}],\"metricSpecifications\":[{\"name\":\"vtb\",\"displayName\":\"ysszdnrujqguh\",\"displayDescription\":\"ouqfprwz\",\"unit\":\"nguitnwuizgazxu\",\"aggregationType\":\"zuckyfi\",\"internalMetricName\":\"fidfvzw\",\"dimensions\":[{}],\"fillGapWithZero\":false},{\"name\":\"mwisdkfthwxmnt\",\"displayName\":\"waopvkmijcmmxd\",\"displayDescription\":\"fufsrpymzi\",\"unit\":\"sezcxtb\",\"aggregationType\":\"gfycc\",\"internalMetricName\":\"ewmdw\",\"dimensions\":[{},{},{},{}],\"fillGapWithZero\":false}]}}}") - .toObject(OperationDefinitionInner.class); - Assertions.assertEquals("mmnkzsmodmgl", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("uertumk", model.display().resource()); - Assertions.assertEquals("svqwhbmdgbbjfd", model.display().operation()); - Assertions.assertEquals("mbmbexppbh", model.display().description()); - Assertions.assertEquals("qrolfpf", model.origin()); - Assertions.assertEquals("qux", model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("jyj", - model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("jaoyfhrtx", - model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("vtb", model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("ysszdnrujqguh", - model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("ouqfprwz", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("nguitnwuizgazxu", - model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("zuckyfi", - model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("fidfvzw", - model.properties().serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, - model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDefinitionInner model = new OperationDefinitionInner().withName("mmnkzsmodmgl") - .withIsDataAction(true) - .withDisplay(new OperationDefinitionDisplay().withResource("uertumk") - .withOperation("svqwhbmdgbbjfd") - .withDescription("mbmbexppbh")) - .withOrigin("qrolfpf") - .withProperties(new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withLogSpecifications(Arrays.asList( - new LogSpecification().withName("qux").withDisplayName("jyj").withBlobDuration("jaoyfhrtx"), - new LogSpecification().withName("n") - .withDisplayName("kujysvlejuvfq") - .withBlobDuration("rlyxwjkcprbnw"))) - .withMetricSpecifications(Arrays.asList( - new MetricSpecification().withName("vtb") - .withDisplayName("ysszdnrujqguh") - .withDisplayDescription("ouqfprwz") - .withUnit("nguitnwuizgazxu") - .withAggregationType("zuckyfi") - .withInternalMetricName("fidfvzw") - .withDimensions(Arrays.asList(new MetricDimension())) - .withFillGapWithZero(false), - new MetricSpecification().withName("mwisdkfthwxmnt") - .withDisplayName("waopvkmijcmmxd") - .withDisplayDescription("fufsrpymzi") - .withUnit("sezcxtb") - .withAggregationType("gfycc") - .withInternalMetricName("ewmdw") - .withDimensions(Arrays.asList(new MetricDimension(), new MetricDimension(), - new MetricDimension(), new MetricDimension())) - .withFillGapWithZero(false))))); - model = BinaryData.fromObject(model).toObject(OperationDefinitionInner.class); - Assertions.assertEquals("mmnkzsmodmgl", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("uertumk", model.display().resource()); - Assertions.assertEquals("svqwhbmdgbbjfd", model.display().operation()); - Assertions.assertEquals("mbmbexppbh", model.display().description()); - Assertions.assertEquals("qrolfpf", model.origin()); - Assertions.assertEquals("qux", model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("jyj", - model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("jaoyfhrtx", - model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("vtb", model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("ysszdnrujqguh", - model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("ouqfprwz", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("nguitnwuizgazxu", - model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("zuckyfi", - model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("fidfvzw", - model.properties().serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, - model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationDefinitionListResultTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationDefinitionListResultTests.java deleted file mode 100644 index 3abc5e06c09a..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationDefinitionListResultTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.OperationDefinitionInner; -import com.azure.resourcemanager.appconfiguration.models.LogSpecification; -import com.azure.resourcemanager.appconfiguration.models.MetricSpecification; -import com.azure.resourcemanager.appconfiguration.models.OperationDefinitionDisplay; -import com.azure.resourcemanager.appconfiguration.models.OperationDefinitionListResult; -import com.azure.resourcemanager.appconfiguration.models.OperationProperties; -import com.azure.resourcemanager.appconfiguration.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationDefinitionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDefinitionListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"inqpjwnzll\",\"isDataAction\":true,\"display\":{\"provider\":\"eebvmgxsab\",\"resource\":\"qduujitcjczdz\",\"operation\":\"ndhkrw\",\"description\":\"appd\"},\"origin\":\"dkvwrwjfe\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{},{},{}],\"metricSpecifications\":[{}]}}},{\"name\":\"ltmrldh\",\"isDataAction\":false,\"display\":{\"provider\":\"datqxhocdgeabl\",\"resource\":\"huticndvkao\",\"operation\":\"yiftyhxhuro\",\"description\":\"tyxolniwpwc\"},\"origin\":\"jfkgiawxk\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{},{},{}],\"metricSpecifications\":[{},{},{}]}}},{\"name\":\"basyy\",\"isDataAction\":true,\"display\":{\"provider\":\"sgcbac\",\"resource\":\"ejk\",\"operation\":\"ynqgoulzndlikwyq\",\"description\":\"fgibmadgakeq\"},\"origin\":\"xybz\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}],\"metricSpecifications\":[{},{},{}]}}}],\"nextLink\":\"ciqfou\"}") - .toObject(OperationDefinitionListResult.class); - Assertions.assertEquals("inqpjwnzll", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("qduujitcjczdz", model.value().get(0).display().resource()); - Assertions.assertEquals("ndhkrw", model.value().get(0).display().operation()); - Assertions.assertEquals("appd", model.value().get(0).display().description()); - Assertions.assertEquals("dkvwrwjfe", model.value().get(0).origin()); - Assertions.assertEquals("ciqfou", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDefinitionListResult model = new OperationDefinitionListResult().withValue(Arrays.asList( - new OperationDefinitionInner().withName("inqpjwnzll") - .withIsDataAction(true) - .withDisplay(new OperationDefinitionDisplay().withResource("qduujitcjczdz") - .withOperation("ndhkrw") - .withDescription("appd")) - .withOrigin("dkvwrwjfe") - .withProperties(new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withLogSpecifications(Arrays.asList(new LogSpecification(), new LogSpecification(), - new LogSpecification(), new LogSpecification())) - .withMetricSpecifications(Arrays.asList(new MetricSpecification())))), - new OperationDefinitionInner().withName("ltmrldh") - .withIsDataAction(false) - .withDisplay(new OperationDefinitionDisplay().withResource("huticndvkao") - .withOperation("yiftyhxhuro") - .withDescription("tyxolniwpwc")) - .withOrigin("jfkgiawxk") - .withProperties(new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withLogSpecifications(Arrays.asList(new LogSpecification(), new LogSpecification(), - new LogSpecification(), new LogSpecification())) - .withMetricSpecifications(Arrays.asList(new MetricSpecification(), new MetricSpecification(), - new MetricSpecification())))), - new OperationDefinitionInner().withName("basyy") - .withIsDataAction(true) - .withDisplay(new OperationDefinitionDisplay().withResource("ejk") - .withOperation("ynqgoulzndlikwyq") - .withDescription("fgibmadgakeq")) - .withOrigin("xybz") - .withProperties(new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withLogSpecifications(Arrays.asList(new LogSpecification(), new LogSpecification())) - .withMetricSpecifications(Arrays.asList(new MetricSpecification(), new MetricSpecification(), - new MetricSpecification())))))) - .withNextLink("ciqfou"); - model = BinaryData.fromObject(model).toObject(OperationDefinitionListResult.class); - Assertions.assertEquals("inqpjwnzll", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("qduujitcjczdz", model.value().get(0).display().resource()); - Assertions.assertEquals("ndhkrw", model.value().get(0).display().operation()); - Assertions.assertEquals("appd", model.value().get(0).display().description()); - Assertions.assertEquals("dkvwrwjfe", model.value().get(0).origin()); - Assertions.assertEquals("ciqfou", model.nextLink()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationPropertiesTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationPropertiesTests.java deleted file mode 100644 index 32ae0a34ff49..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,122 +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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.LogSpecification; -import com.azure.resourcemanager.appconfiguration.models.MetricDimension; -import com.azure.resourcemanager.appconfiguration.models.MetricSpecification; -import com.azure.resourcemanager.appconfiguration.models.OperationProperties; -import com.azure.resourcemanager.appconfiguration.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationProperties model = BinaryData.fromString( - "{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"kirsoodqxhc\",\"displayName\":\"nohjt\",\"blobDuration\":\"whdsoifiyip\"},{\"name\":\"sqwpgrjb\",\"displayName\":\"orcjxvsnby\",\"blobDuration\":\"abnmocpcyshu\"},{\"name\":\"afbljjgpbtoqcjmk\",\"displayName\":\"a\",\"blobDuration\":\"qidtqajzyu\"}],\"metricSpecifications\":[{\"name\":\"dj\",\"displayName\":\"lkhbz\",\"displayDescription\":\"epgzgqexz\",\"unit\":\"c\",\"aggregationType\":\"c\",\"internalMetricName\":\"ierhhbcsglummaj\",\"dimensions\":[{\"name\":\"dxob\",\"displayName\":\"dxkqpx\",\"internalName\":\"ajionpimexgstxg\"},{\"name\":\"odgmaajrmvdjwz\",\"displayName\":\"ovmclwhijcoejct\",\"internalName\":\"aqsqsycbkbfk\"}],\"fillGapWithZero\":false},{\"name\":\"kexxppof\",\"displayName\":\"axcfjpgddtocjjx\",\"displayDescription\":\"pmouexhdz\",\"unit\":\"bqe\",\"aggregationType\":\"nxqbzvddn\",\"internalMetricName\":\"ndei\",\"dimensions\":[{\"name\":\"npzaoq\",\"displayName\":\"hrhcffcyddglmjth\",\"internalName\":\"kw\"},{\"name\":\"eicxmqciwqvhkhi\",\"displayName\":\"igdtopbob\",\"internalName\":\"ghmewuam\"},{\"name\":\"hrzayvvtpgvdf\",\"displayName\":\"otkftutqxlngx\",\"internalName\":\"fgugnxkrxdqmid\"},{\"name\":\"hzrvqd\",\"displayName\":\"bhj\",\"internalName\":\"igeho\"}],\"fillGapWithZero\":false},{\"name\":\"wska\",\"displayName\":\"ktzlcuiywg\",\"displayDescription\":\"wgndrvynhzgpp\",\"unit\":\"cgyncocpecf\",\"aggregationType\":\"mcoo\",\"internalMetricName\":\"xlzevgbmqjqabcy\",\"dimensions\":[{\"name\":\"kwlzuvccfwnfn\",\"displayName\":\"cfionl\",\"internalName\":\"x\"},{\"name\":\"qgtz\",\"displayName\":\"pnqbqqwxrjfe\",\"internalName\":\"lnwsubisn\"},{\"name\":\"mpmngnzscxaqwoo\",\"displayName\":\"cbonqvpk\",\"internalName\":\"rxnjeaseipheofl\"},{\"name\":\"eyy\",\"displayName\":\"nj\",\"internalName\":\"lwtgrhpdj\"}],\"fillGapWithZero\":true}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("kirsoodqxhc", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("nohjt", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("whdsoifiyip", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("dj", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("lkhbz", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("epgzgqexz", - model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("c", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("c", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("ierhhbcsglummaj", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("dxob", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("dxkqpx", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("ajionpimexgstxg", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProperties model = new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withLogSpecifications(Arrays.asList( - new LogSpecification().withName("kirsoodqxhc").withDisplayName("nohjt").withBlobDuration("whdsoifiyip"), - new LogSpecification().withName("sqwpgrjb") - .withDisplayName("orcjxvsnby") - .withBlobDuration("abnmocpcyshu"), - new LogSpecification().withName("afbljjgpbtoqcjmk") - .withDisplayName("a") - .withBlobDuration("qidtqajzyu"))) - .withMetricSpecifications(Arrays.asList( - new MetricSpecification().withName("dj") - .withDisplayName("lkhbz") - .withDisplayDescription("epgzgqexz") - .withUnit("c") - .withAggregationType("c") - .withInternalMetricName("ierhhbcsglummaj") - .withDimensions(Arrays.asList( - new MetricDimension().withName("dxob") - .withDisplayName("dxkqpx") - .withInternalName("ajionpimexgstxg"), - new MetricDimension().withName("odgmaajrmvdjwz") - .withDisplayName("ovmclwhijcoejct") - .withInternalName("aqsqsycbkbfk"))) - .withFillGapWithZero(false), - new MetricSpecification().withName("kexxppof") - .withDisplayName("axcfjpgddtocjjx") - .withDisplayDescription("pmouexhdz") - .withUnit("bqe") - .withAggregationType("nxqbzvddn") - .withInternalMetricName("ndei") - .withDimensions(Arrays.asList( - new MetricDimension().withName("npzaoq") - .withDisplayName("hrhcffcyddglmjth") - .withInternalName("kw"), - new MetricDimension().withName("eicxmqciwqvhkhi") - .withDisplayName("igdtopbob") - .withInternalName("ghmewuam"), - new MetricDimension().withName("hrzayvvtpgvdf") - .withDisplayName("otkftutqxlngx") - .withInternalName("fgugnxkrxdqmid"), - new MetricDimension().withName("hzrvqd").withDisplayName("bhj").withInternalName("igeho"))) - .withFillGapWithZero(false), - new MetricSpecification().withName("wska") - .withDisplayName("ktzlcuiywg") - .withDisplayDescription("wgndrvynhzgpp") - .withUnit("cgyncocpecf") - .withAggregationType("mcoo") - .withInternalMetricName("xlzevgbmqjqabcy") - .withDimensions(Arrays.asList( - new MetricDimension().withName("kwlzuvccfwnfn").withDisplayName("cfionl").withInternalName("x"), - new MetricDimension().withName("qgtz") - .withDisplayName("pnqbqqwxrjfe") - .withInternalName("lnwsubisn"), - new MetricDimension().withName("mpmngnzscxaqwoo") - .withDisplayName("cbonqvpk") - .withInternalName("rxnjeaseipheofl"), - new MetricDimension().withName("eyy").withDisplayName("nj").withInternalName("lwtgrhpdj"))) - .withFillGapWithZero(true)))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("kirsoodqxhc", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("nohjt", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("whdsoifiyip", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("dj", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("lkhbz", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("epgzgqexz", - model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("c", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("c", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("ierhhbcsglummaj", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("dxob", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("dxkqpx", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("ajionpimexgstxg", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationsCheckNameAvailabilityWithResponseMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 529468941f76..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationsCheckNameAvailabilityWithResponseMockTests.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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.CheckNameAvailabilityParameters; -import com.azure.resourcemanager.appconfiguration.models.ConfigurationResourceType; -import com.azure.resourcemanager.appconfiguration.models.NameAvailabilityStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":false,\"message\":\"mnzgmwznmabi\",\"reason\":\"sorgj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NameAvailabilityStatus response = manager.operations() - .checkNameAvailabilityWithResponse( - new CheckNameAvailabilityParameters().withName("itsmypyyn") - .withType(ConfigurationResourceType.MICROSOFT_APP_CONFIGURATION_CONFIGURATION_STORES), - com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationsListMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationsListMockTests.java deleted file mode 100644 index c142822ecf3e..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationsListMockTests.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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.OperationDefinition; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"ok\",\"isDataAction\":false,\"display\":{\"provider\":\"d\",\"resource\":\"gsyocogj\",\"operation\":\"dtbnnha\",\"description\":\"ocrkvcikh\"},\"origin\":\"p\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"queziky\",\"displayName\":\"gxk\",\"blobDuration\":\"la\"}],\"metricSpecifications\":[{\"name\":\"wuipiccjzkzivg\",\"displayName\":\"c\",\"displayDescription\":\"y\",\"unit\":\"yrnxxmueedn\",\"aggregationType\":\"dvstkw\",\"internalMetricName\":\"tchealmf\",\"dimensions\":[{}],\"fillGapWithZero\":true},{\"name\":\"gdv\",\"displayName\":\"gpiohgwxrtfudxe\",\"displayDescription\":\"gyqagvrvmnpkuk\",\"unit\":\"i\",\"aggregationType\":\"blxgwimf\",\"internalMetricName\":\"hfjx\",\"dimensions\":[{},{},{}],\"fillGapWithZero\":false}]}}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.operations().list("xbldtlwwrlkdmtn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ok", response.iterator().next().name()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("gsyocogj", response.iterator().next().display().resource()); - Assertions.assertEquals("dtbnnha", response.iterator().next().display().operation()); - Assertions.assertEquals("ocrkvcikh", response.iterator().next().display().description()); - Assertions.assertEquals("p", response.iterator().next().origin()); - Assertions.assertEquals("queziky", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("gxk", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("la", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("wuipiccjzkzivg", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("c", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("y", - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .displayDescription()); - Assertions.assertEquals("yrnxxmueedn", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("dvstkw", - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .aggregationType()); - Assertions.assertEquals("tchealmf", - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .internalMetricName()); - Assertions.assertEquals(true, - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .fillGapWithZero()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationsRegionalCheckNameAvailabilityWithResponseMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationsRegionalCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 6001317f12da..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/OperationsRegionalCheckNameAvailabilityWithResponseMockTests.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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.CheckNameAvailabilityParameters; -import com.azure.resourcemanager.appconfiguration.models.ConfigurationResourceType; -import com.azure.resourcemanager.appconfiguration.models.NameAvailabilityStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsRegionalCheckNameAvailabilityWithResponseMockTests { - @Test - public void testRegionalCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":false,\"message\":\"lpcirelsf\",\"reason\":\"enwabfatk\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NameAvailabilityStatus response = manager.operations() - .regionalCheckNameAvailabilityWithResponse("kfoqreyfkzikfj", - new CheckNameAvailabilityParameters().withName("wneaiv") - .withType(ConfigurationResourceType.MICROSOFT_APP_CONFIGURATION_CONFIGURATION_STORES), - com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionInnerTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index 064373800439..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionInnerTests.java +++ /dev/null @@ -1,37 +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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.appconfiguration.models.ConnectionStatus; -import com.azure.resourcemanager.appconfiguration.models.PrivateEndpoint; -import com.azure.resourcemanager.appconfiguration.models.PrivateLinkServiceConnectionState; -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\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"qik\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"vplwzbhv\",\"actionsRequired\":\"None\"}},\"id\":\"gu\",\"name\":\"svmkfssxquk\",\"type\":\"fpl\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("qik", model.privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("vplwzbhv", model.privateLinkServiceConnectionState().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model - = new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("qik")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) - .withDescription("vplwzbhv")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("qik", model.privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("vplwzbhv", model.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionListResultTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionListResultTests.java deleted file mode 100644 index 6fc5d19e80e8..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionListResultTests.java +++ /dev/null @@ -1,56 +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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.appconfiguration.models.ConnectionStatus; -import com.azure.resourcemanager.appconfiguration.models.PrivateEndpoint; -import com.azure.resourcemanager.appconfiguration.models.PrivateEndpointConnectionListResult; -import com.azure.resourcemanager.appconfiguration.models.PrivateLinkServiceConnectionState; -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\":{\"provisioningState\":\"Canceled\",\"privateEndpoint\":{\"id\":\"ahmgkbrp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ibnuqqkpik\",\"actionsRequired\":\"None\"}},\"id\":\"gvtqagnbuynh\",\"name\":\"jggmebfsiarbu\",\"type\":\"rcvpnazzmhjrunmp\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"rbnlankxmyskp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"btkcxywnytnrsyn\",\"actionsRequired\":\"Recreate\"}},\"id\":\"dybyxczfclhaa\",\"name\":\"dbabp\",\"type\":\"lwrq\"},{\"properties\":{\"provisioningState\":\"Failed\",\"privateEndpoint\":{\"id\":\"hsucoc\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"azt\",\"actionsRequired\":\"None\"}},\"id\":\"wwrq\",\"name\":\"uedck\",\"type\":\"ywbiexzfeyueax\"},{\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"bhqwalmuzyoxa\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"zjancuxr\",\"actionsRequired\":\"Recreate\"}},\"id\":\"bavxbniwdjswzt\",\"name\":\"dbpgnxytxhp\",\"type\":\"xbzpfzab\"}],\"nextLink\":\"cuh\"}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals("ahmgkbrp", model.value().get(0).privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.APPROVED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ibnuqqkpik", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("cuh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionListResult model = new PrivateEndpointConnectionListResult().withValue(Arrays.asList( - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("ahmgkbrp")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) - .withDescription("ibnuqqkpik")), - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("rbnlankxmyskp")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.REJECTED) - .withDescription("btkcxywnytnrsyn")), - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("hsucoc")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED) - .withDescription("azt")), - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId("bhqwalmuzyoxa")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.REJECTED) - .withDescription("zjancuxr")))) - .withNextLink("cuh"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals("ahmgkbrp", model.value().get(0).privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.APPROVED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ibnuqqkpik", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("cuh", model.nextLink()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index e75120680524..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionPropertiesTests.java +++ /dev/null @@ -1,37 +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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.appconfiguration.models.ConnectionStatus; -import com.azure.resourcemanager.appconfiguration.models.PrivateEndpoint; -import com.azure.resourcemanager.appconfiguration.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Canceled\",\"privateEndpoint\":{\"id\":\"chgejspodm\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"ydehoj\",\"actionsRequired\":\"None\"}}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("chgejspodm", model.privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ydehoj", model.privateLinkServiceConnectionState().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model - = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint().withId("chgejspodm")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.DISCONNECTED) - .withDescription("ydehoj")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("chgejspodm", model.privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ydehoj", model.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionReferenceTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionReferenceTests.java deleted file mode 100644 index 8e7d1a92e0c5..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionReferenceTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.ConnectionStatus; -import com.azure.resourcemanager.appconfiguration.models.PrivateEndpoint; -import com.azure.resourcemanager.appconfiguration.models.PrivateEndpointConnectionReference; -import com.azure.resourcemanager.appconfiguration.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionReference model = BinaryData.fromString( - "{\"id\":\"fwvuk\",\"name\":\"audccsnhs\",\"type\":\"nyejhkryhtnap\",\"properties\":{\"provisioningState\":\"Creating\",\"privateEndpoint\":{\"id\":\"jye\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"ni\",\"actionsRequired\":\"Recreate\"}}}") - .toObject(PrivateEndpointConnectionReference.class); - Assertions.assertEquals("jye", model.privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ni", model.privateLinkServiceConnectionState().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionReference model = new PrivateEndpointConnectionReference() - .withPrivateEndpoint(new PrivateEndpoint().withId("jye")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.REJECTED).withDescription("ni")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionReference.class); - Assertions.assertEquals("jye", model.privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ni", model.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java deleted file mode 100644 index 4c6c7dbcadc5..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,48 +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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.ConnectionStatus; -import com.azure.resourcemanager.appconfiguration.models.PrivateEndpoint; -import com.azure.resourcemanager.appconfiguration.models.PrivateEndpointConnection; -import com.azure.resourcemanager.appconfiguration.models.PrivateLinkServiceConnectionState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"xleptramx\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"lwnwxuqlcvydyp\",\"actionsRequired\":\"Recreate\"}},\"id\":\"ooaojkniodkooebw\",\"name\":\"ujhemmsbvdkcrodt\",\"type\":\"infwjlfltkacjve\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = manager.privateEndpointConnections() - .define("judpfrxt") - .withExistingConfigurationStore("mewzsyyc", "uzsoi") - .withPrivateEndpoint(new PrivateEndpoint().withId("ytdw")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.APPROVED).withDescription("qu")) - .create(); - - Assertions.assertEquals("xleptramx", response.privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.PENDING, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lwnwxuqlcvydyp", response.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsDeleteMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsDeleteMockTests.java deleted file mode 100644 index d9f3735816a1..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsDeleteMockTests.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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.privateEndpointConnections() - .delete("nbyxbaaabjyv", "yffimrzrtuzqogs", "xnevfdnwn", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index 4c77ee5c72a5..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,42 +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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.ConnectionStatus; -import com.azure.resourcemanager.appconfiguration.models.PrivateEndpointConnection; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"privateEndpoint\":{\"id\":\"hp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"ymareqnajxqugj\",\"actionsRequired\":\"Recreate\"}},\"id\":\"cubeddgssofw\",\"name\":\"mzqa\",\"type\":\"krmnjijpxacqqud\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("moadsuvarmy", "dmjsjqb", "hhyxxrw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hp", response.privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.DISCONNECTED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ymareqnajxqugj", response.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsListByConfigurationStoreMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsListByConfigurationStoreMockTests.java deleted file mode 100644 index 00069b98e94e..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsListByConfigurationStoreMockTests.java +++ /dev/null @@ -1,44 +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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.ConnectionStatus; -import com.azure.resourcemanager.appconfiguration.models.PrivateEndpointConnection; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsListByConfigurationStoreMockTests { - @Test - public void testListByConfigurationStore() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"privateEndpoint\":{\"id\":\"glrvimjwosytxi\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"fcktqumiekke\",\"actionsRequired\":\"None\"}},\"id\":\"khly\",\"name\":\"jhdgqggebdunyga\",\"type\":\"qidbqfatpxllrxcy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.privateEndpointConnections() - .listByConfigurationStore("ddxbjhwuaanoz", "osphyoul", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("glrvimjwosytxi", response.iterator().next().privateEndpoint().id()); - Assertions.assertEquals(ConnectionStatus.PENDING, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("fcktqumiekke", - response.iterator().next().privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointTests.java deleted file mode 100644 index 928f1b196ad9..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.PrivateEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"uxinpmqnjaq\"}").toObject(PrivateEndpoint.class); - Assertions.assertEquals("uxinpmqnjaq", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint().withId("uxinpmqnjaq"); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - Assertions.assertEquals("uxinpmqnjaq", model.id()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourceInnerTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourceInnerTests.java deleted file mode 100644 index d06c1a05d219..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,23 +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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.PrivateLinkResourceInner; - -public final class PrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = BinaryData.fromString( - "{\"id\":\"nbbelda\",\"name\":\"zbaliourqha\",\"type\":\"uhashsfwx\",\"properties\":{\"groupId\":\"w\",\"requiredMembers\":[\"ugicjooxdjebw\",\"ucww\",\"vo\"],\"requiredZoneNames\":[\"meue\",\"ivyhzceuojgjrwju\"]}}") - .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/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourceListResultTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourceListResultTests.java deleted file mode 100644 index 0b9f2e190266..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourceListResultTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.appconfiguration.models.PrivateLinkResourceListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"xnkjzkdesl\",\"name\":\"lopwiyig\",\"type\":\"pkdwzbai\",\"properties\":{\"groupId\":\"baumnyqupedeoj\",\"requiredMembers\":[\"ckhsmtxpsieb\",\"fhvpesaps\",\"rdqmhjjdhtldwkyz\"],\"requiredZoneNames\":[\"tkncwsc\",\"svlxotogtwrup\"]}},{\"id\":\"xvnmicykvceov\",\"name\":\"lo\",\"type\":\"oty\",\"properties\":{\"groupId\":\"cnjbkcnxdhbt\",\"requiredMembers\":[\"h\",\"wpn\"],\"requiredZoneNames\":[\"oqnermclfpl\"]}},{\"id\":\"oxuscrpabgyepsbj\",\"name\":\"zq\",\"type\":\"xywpmueefjzwfqkq\",\"properties\":{\"groupId\":\"dsuyonobgla\",\"requiredMembers\":[\"xtccmg\",\"udxytlmoyrx\",\"wfudwpzntxhdzhl\"],\"requiredZoneNames\":[\"bh\",\"kfrlhrxsbky\",\"pycanuzbpz\"]}},{\"id\":\"fkuwbcrnwbmehhse\",\"name\":\"jusrtslhspk\",\"type\":\"emaofmxagkvt\",\"properties\":{\"groupId\":\"mqkrhahvljuahaqu\",\"requiredMembers\":[\"hmdua\",\"aex\"],\"requiredZoneNames\":[\"fadmws\",\"crgvxpvgom\"]}}],\"nextLink\":\"fmisg\"}") - .toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("fmisg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceListResult model = new PrivateLinkResourceListResult() - .withValue(Arrays.asList(new PrivateLinkResourceInner(), new PrivateLinkResourceInner(), - new PrivateLinkResourceInner(), new PrivateLinkResourceInner())) - .withNextLink("fmisg"); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("fmisg", model.nextLink()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcePropertiesTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index 2bfc07a02f5f..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,23 +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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.PrivateLinkResourceProperties; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = BinaryData - .fromString("{\"groupId\":\"otwmcdyt\",\"requiredMembers\":[\"it\"],\"requiredZoneNames\":[\"jawgqwg\"]}") - .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/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesGetWithResponseMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesGetWithResponseMockTests.java deleted file mode 100644 index 83ab5b8611de..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.PrivateLinkResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"id\":\"cwsobqwcs\",\"name\":\"nwdcfhu\",\"type\":\"dpfuvg\",\"properties\":{\"groupId\":\"jjcanvxbvtv\",\"requiredMembers\":[\"tncormrlxqtvco\",\"udflvkgjubgdknn\"],\"requiredZoneNames\":[\"aznqntoru\",\"sgsahmkycgr\",\"uwjuetaeburuvdmo\"]}}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResource response = manager.privateLinkResources() - .getWithResponse("feqztppriol", "or", "altol", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesListByConfigurationStoreMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesListByConfigurationStoreMockTests.java deleted file mode 100644 index 104c0a55eba1..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesListByConfigurationStoreMockTests.java +++ /dev/null @@ -1,37 +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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.PrivateLinkResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesListByConfigurationStoreMockTests { - @Test - public void testListByConfigurationStore() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"blylsyxkqjnsj\",\"name\":\"vti\",\"type\":\"xsdszuempsb\",\"properties\":{\"groupId\":\"z\",\"requiredMembers\":[\"v\",\"nqicvinvkjjxdxrb\",\"ukzclewyhmlwpaz\",\"zpof\"],\"requiredZoneNames\":[\"kwyfzqwhxxbuyqax\"]}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.privateLinkResources() - .listByConfigurationStore("kdlfoa", "ggkfpagaowpul", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 9bd17a187de3..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkServiceConnectionStateTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.ConnectionStatus; -import com.azure.resourcemanager.appconfiguration.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = BinaryData - .fromString("{\"status\":\"Pending\",\"description\":\"sprozvcput\",\"actionsRequired\":\"None\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(ConnectionStatus.PENDING, model.status()); - Assertions.assertEquals("sprozvcput", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(ConnectionStatus.PENDING) - .withDescription("sprozvcput"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(ConnectionStatus.PENDING, model.status()); - Assertions.assertEquals("sprozvcput", model.description()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/RegenerateKeyParametersTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/RegenerateKeyParametersTests.java deleted file mode 100644 index 4f9d56acb378..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/RegenerateKeyParametersTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.RegenerateKeyParameters; -import org.junit.jupiter.api.Assertions; - -public final class RegenerateKeyParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegenerateKeyParameters model - = BinaryData.fromString("{\"id\":\"hxbnjbiksqrg\"}").toObject(RegenerateKeyParameters.class); - Assertions.assertEquals("hxbnjbiksqrg", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegenerateKeyParameters model = new RegenerateKeyParameters().withId("hxbnjbiksqrg"); - model = BinaryData.fromObject(model).toObject(RegenerateKeyParameters.class); - Assertions.assertEquals("hxbnjbiksqrg", model.id()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicaInnerTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicaInnerTests.java deleted file mode 100644 index 549656b594a4..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicaInnerTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.ReplicaInner; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaInner model = BinaryData.fromString( - "{\"location\":\"aqtdoqmcbx\",\"properties\":{\"endpoint\":\"yslqbhsfx\",\"provisioningState\":\"Deleting\"},\"id\":\"ytkblmpew\",\"name\":\"wfbkrvrns\",\"type\":\"shqjohxcrsbf\"}") - .toObject(ReplicaInner.class); - Assertions.assertEquals("aqtdoqmcbx", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaInner model = new ReplicaInner().withLocation("aqtdoqmcbx"); - model = BinaryData.fromObject(model).toObject(ReplicaInner.class); - Assertions.assertEquals("aqtdoqmcbx", model.location()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicaListResultTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicaListResultTests.java deleted file mode 100644 index c69ddd4b0def..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicaListResultTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appconfiguration.models.ReplicaListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaListResult model = BinaryData.fromString( - "{\"value\":[{\"location\":\"sxyawjoyaqcs\",\"properties\":{\"endpoint\":\"kiidzyex\",\"provisioningState\":\"Creating\"},\"id\":\"lixhnrztfol\",\"name\":\"bnxknalaulppg\",\"type\":\"dtpnapnyiropuhp\"},{\"location\":\"vpgylgqgitxmed\",\"properties\":{\"endpoint\":\"lynqwwncwzzh\",\"provisioningState\":\"Succeeded\"},\"id\":\"trmgucnapkte\",\"name\":\"ellwptfdy\",\"type\":\"pfqbuaceopzf\"},{\"location\":\"hhuao\",\"properties\":{\"endpoint\":\"qeqxo\",\"provisioningState\":\"Deleting\"},\"id\":\"ahzxctobgbk\",\"name\":\"moizpos\",\"type\":\"mgrcfbu\"},{\"location\":\"mfqjhhkxbp\",\"properties\":{\"endpoint\":\"jhxxjyn\",\"provisioningState\":\"Succeeded\"},\"id\":\"ivkrtsw\",\"name\":\"xqzvszjfa\",\"type\":\"vjfdx\"}],\"nextLink\":\"vetvt\"}") - .toObject(ReplicaListResult.class); - Assertions.assertEquals("sxyawjoyaqcs", model.value().get(0).location()); - Assertions.assertEquals("vetvt", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaListResult model - = new ReplicaListResult().withValue(Arrays.asList(new ReplicaInner().withLocation("sxyawjoyaqcs"), - new ReplicaInner().withLocation("vpgylgqgitxmed"), new ReplicaInner().withLocation("hhuao"), - new ReplicaInner().withLocation("mfqjhhkxbp"))).withNextLink("vetvt"); - model = BinaryData.fromObject(model).toObject(ReplicaListResult.class); - Assertions.assertEquals("sxyawjoyaqcs", model.value().get(0).location()); - Assertions.assertEquals("vetvt", model.nextLink()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicaPropertiesTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicaPropertiesTests.java deleted file mode 100644 index e073bd1e2433..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicaPropertiesTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.fluent.models.ReplicaProperties; - -public final class ReplicaPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaProperties model = BinaryData.fromString("{\"endpoint\":\"asrru\",\"provisioningState\":\"Canceled\"}") - .toObject(ReplicaProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaProperties model = new ReplicaProperties(); - model = BinaryData.fromObject(model).toObject(ReplicaProperties.class); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasCreateMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasCreateMockTests.java deleted file mode 100644 index cd90b4ca8c32..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasCreateMockTests.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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.Replica; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicasCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"location\":\"brgz\",\"properties\":{\"endpoint\":\"weyp\",\"provisioningState\":\"Succeeded\"},\"id\":\"xggicccnxqhuexmk\",\"name\":\"tlstvlzywem\",\"type\":\"zrncsdt\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Replica response = manager.replicas() - .define("zqhof") - .withExistingConfigurationStore("hziuiefozbhdms", "l") - .withRegion("maequiahxicslfa") - .create(); - - Assertions.assertEquals("brgz", response.location()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasDeleteMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasDeleteMockTests.java deleted file mode 100644 index c1082c0e1399..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasDeleteMockTests.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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicasDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.replicas().delete("u", "zkopb", "inrfdwoyu", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasGetWithResponseMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasGetWithResponseMockTests.java deleted file mode 100644 index 8e2aeaa5d9e8..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasGetWithResponseMockTests.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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.Replica; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicasGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"location\":\"kzevdlhewpusds\",\"properties\":{\"endpoint\":\"ogvbbejdcngq\",\"provisioningState\":\"Failed\"},\"id\":\"akufgmjz\",\"name\":\"wr\",\"type\":\"grtwae\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Replica response = manager.replicas() - .getWithResponse("znkbykutwpfhpagm", "r", "kdsnfdsdoakgtdl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("kzevdlhewpusds", response.location()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasListByConfigurationStoreMockTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasListByConfigurationStoreMockTests.java deleted file mode 100644 index 805a059175a9..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ReplicasListByConfigurationStoreMockTests.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.appconfiguration.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appconfiguration.AppConfigurationManager; -import com.azure.resourcemanager.appconfiguration.models.Replica; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ReplicasListByConfigurationStoreMockTests { - @Test - public void testListByConfigurationStore() throws Exception { - String responseStr - = "{\"value\":[{\"location\":\"bt\",\"properties\":{\"endpoint\":\"ra\",\"provisioningState\":\"Succeeded\"},\"id\":\"koowtl\",\"name\":\"nguxawqaldsy\",\"type\":\"uximerqfobw\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AppConfigurationManager manager = AppConfigurationManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.replicas() - .listByConfigurationStore("khnzbonlw", "toego", "dwbwhkszzcmrvexz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bt", response.iterator().next().location()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ResourceIdentityTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ResourceIdentityTests.java deleted file mode 100644 index 66e4888890a8..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ResourceIdentityTests.java +++ /dev/null @@ -1,43 +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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.IdentityType; -import com.azure.resourcemanager.appconfiguration.models.ResourceIdentity; -import com.azure.resourcemanager.appconfiguration.models.UserIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceIdentity model = BinaryData.fromString( - "{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"rtihfxtijbpz\":{\"principalId\":\"xzdxtayrlhmwh\",\"clientId\":\"mrqobmtukknr\"}},\"principalId\":\"nwzsymg\",\"tenantId\":\"uf\"}") - .toObject(ResourceIdentity.class); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceIdentity model = new ResourceIdentity().withType(IdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("rtihfxtijbpz", new UserIdentity())); - model = BinaryData.fromObject(model).toObject(ResourceIdentity.class); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ServiceSpecificationTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ServiceSpecificationTests.java deleted file mode 100644 index defa4cd3557d..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,130 +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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.LogSpecification; -import com.azure.resourcemanager.appconfiguration.models.MetricDimension; -import com.azure.resourcemanager.appconfiguration.models.MetricSpecification; -import com.azure.resourcemanager.appconfiguration.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceSpecification model = BinaryData.fromString( - "{\"logSpecifications\":[{\"name\":\"xazjpqyegual\",\"displayName\":\"xxhejjzzvd\",\"blobDuration\":\"gwdslfhotwm\"},{\"name\":\"npwlbjnpg\",\"displayName\":\"ftadehxnltyfs\",\"blobDuration\":\"pusuesn\"},{\"name\":\"dejbavo\",\"displayName\":\"zdmohctbqvu\",\"blobDuration\":\"xdn\"},{\"name\":\"vo\",\"displayName\":\"ujjugwdkcglh\",\"blobDuration\":\"azjdyggd\"}],\"metricSpecifications\":[{\"name\":\"hbkuofqwey\",\"displayName\":\"menevfyexfwh\",\"displayDescription\":\"cibvyvdcsitynn\",\"unit\":\"mdectehfiqscjey\",\"aggregationType\":\"hezrkgq\",\"internalMetricName\":\"jrefovgmkqsle\",\"dimensions\":[{\"name\":\"yqjpkcatt\",\"displayName\":\"gjcrcczsqpjhvm\",\"internalName\":\"jvnysounqe\"},{\"name\":\"noae\",\"displayName\":\"fhyhltrpmopjmcma\",\"internalName\":\"okth\"},{\"name\":\"iuaod\",\"displayName\":\"cpkvxodp\",\"internalName\":\"zmyzydagf\"},{\"name\":\"xbezyiuokktwh\",\"displayName\":\"xw\",\"internalName\":\"wqsmbsur\"}],\"fillGapWithZero\":true},{\"name\":\"o\",\"displayName\":\"ocfs\",\"displayDescription\":\"s\",\"unit\":\"ddystkiiuxhqy\",\"aggregationType\":\"xorrqnb\",\"internalMetricName\":\"czvyifq\",\"dimensions\":[{\"name\":\"vjsllrmvvdfw\",\"displayName\":\"kpnpulexxbczwtr\",\"internalName\":\"iqzbq\"},{\"name\":\"sovmyokacspkwl\",\"displayName\":\"dobpxjmflbvvn\",\"internalName\":\"rkcciwwzjuqk\"}],\"fillGapWithZero\":false},{\"name\":\"jiwkuofoskghsau\",\"displayName\":\"mjmvxieduugidyjr\",\"displayDescription\":\"byao\",\"unit\":\"e\",\"aggregationType\":\"sonpclhocohs\",\"internalMetricName\":\"ev\",\"dimensions\":[{\"name\":\"zfbuhf\",\"displayName\":\"faxkffeii\",\"internalName\":\"lvmezyvshxmzsbbz\"},{\"name\":\"gigr\",\"displayName\":\"burvjxxjnspy\",\"internalName\":\"tko\"}],\"fillGapWithZero\":true},{\"name\":\"uknvudwti\",\"displayName\":\"bldngkpoc\",\"displayDescription\":\"azyxoegukg\",\"unit\":\"piu\",\"aggregationType\":\"ygevqzntypmrbpiz\",\"internalMetricName\":\"r\",\"dimensions\":[{\"name\":\"pyd\",\"displayName\":\"yhxdeoejzicwi\",\"internalName\":\"jttgzf\"},{\"name\":\"shcbkhajdeyeamdp\",\"displayName\":\"g\",\"internalName\":\"pbuxwgipwhon\"},{\"name\":\"kgshwa\",\"displayName\":\"ixzbinjeputtmryw\",\"internalName\":\"zoqftiyqzrnkcqvy\"},{\"name\":\"whzlsicohoq\",\"displayName\":\"wvl\",\"internalName\":\"avwhheunm\"}],\"fillGapWithZero\":true}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("xazjpqyegual", model.logSpecifications().get(0).name()); - Assertions.assertEquals("xxhejjzzvd", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("gwdslfhotwm", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("hbkuofqwey", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("menevfyexfwh", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("cibvyvdcsitynn", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("mdectehfiqscjey", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("hezrkgq", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("jrefovgmkqsle", model.metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("yqjpkcatt", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("gjcrcczsqpjhvm", - model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("jvnysounqe", model.metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).fillGapWithZero()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceSpecification model = new ServiceSpecification().withLogSpecifications(Arrays.asList( - new LogSpecification().withName("xazjpqyegual") - .withDisplayName("xxhejjzzvd") - .withBlobDuration("gwdslfhotwm"), - new LogSpecification().withName("npwlbjnpg").withDisplayName("ftadehxnltyfs").withBlobDuration("pusuesn"), - new LogSpecification().withName("dejbavo").withDisplayName("zdmohctbqvu").withBlobDuration("xdn"), - new LogSpecification().withName("vo").withDisplayName("ujjugwdkcglh").withBlobDuration("azjdyggd"))) - .withMetricSpecifications(Arrays.asList( - new MetricSpecification().withName("hbkuofqwey") - .withDisplayName("menevfyexfwh") - .withDisplayDescription("cibvyvdcsitynn") - .withUnit("mdectehfiqscjey") - .withAggregationType("hezrkgq") - .withInternalMetricName("jrefovgmkqsle") - .withDimensions(Arrays.asList(new MetricDimension() - .withName("yqjpkcatt") - .withDisplayName("gjcrcczsqpjhvm") - .withInternalName("jvnysounqe"), - new MetricDimension().withName("noae") - .withDisplayName("fhyhltrpmopjmcma") - .withInternalName("okth"), - new MetricDimension() - .withName("iuaod") - .withDisplayName("cpkvxodp") - .withInternalName("zmyzydagf"), - new MetricDimension().withName("xbezyiuokktwh") - .withDisplayName("xw") - .withInternalName("wqsmbsur"))) - .withFillGapWithZero(true), - new MetricSpecification().withName("o") - .withDisplayName("ocfs") - .withDisplayDescription("s") - .withUnit("ddystkiiuxhqy") - .withAggregationType("xorrqnb") - .withInternalMetricName("czvyifq") - .withDimensions(Arrays.asList( - new MetricDimension().withName("vjsllrmvvdfw") - .withDisplayName("kpnpulexxbczwtr") - .withInternalName("iqzbq"), - new MetricDimension().withName("sovmyokacspkwl") - .withDisplayName("dobpxjmflbvvn") - .withInternalName("rkcciwwzjuqk"))) - .withFillGapWithZero(false), - new MetricSpecification().withName("jiwkuofoskghsau") - .withDisplayName("mjmvxieduugidyjr") - .withDisplayDescription("byao") - .withUnit("e") - .withAggregationType("sonpclhocohs") - .withInternalMetricName("ev") - .withDimensions(Arrays.asList( - new MetricDimension().withName("zfbuhf") - .withDisplayName("faxkffeii") - .withInternalName("lvmezyvshxmzsbbz"), - new MetricDimension().withName("gigr").withDisplayName("burvjxxjnspy").withInternalName("tko"))) - .withFillGapWithZero(true), - new MetricSpecification().withName("uknvudwti") - .withDisplayName("bldngkpoc") - .withDisplayDescription("azyxoegukg") - .withUnit("piu") - .withAggregationType("ygevqzntypmrbpiz") - .withInternalMetricName("r") - .withDimensions(Arrays.asList( - new MetricDimension().withName("pyd") - .withDisplayName("yhxdeoejzicwi") - .withInternalName("jttgzf"), - new MetricDimension().withName("shcbkhajdeyeamdp") - .withDisplayName("g") - .withInternalName("pbuxwgipwhon"), - new MetricDimension().withName("kgshwa") - .withDisplayName("ixzbinjeputtmryw") - .withInternalName("zoqftiyqzrnkcqvy"), - new MetricDimension().withName("whzlsicohoq") - .withDisplayName("wvl") - .withInternalName("avwhheunm"))) - .withFillGapWithZero(true))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("xazjpqyegual", model.logSpecifications().get(0).name()); - Assertions.assertEquals("xxhejjzzvd", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("gwdslfhotwm", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("hbkuofqwey", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("menevfyexfwh", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("cibvyvdcsitynn", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("mdectehfiqscjey", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("hezrkgq", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("jrefovgmkqsle", model.metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("yqjpkcatt", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("gjcrcczsqpjhvm", - model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("jvnysounqe", model.metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).fillGapWithZero()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/SkuTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/SkuTests.java deleted file mode 100644 index ba509821738f..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/SkuTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.Sku; -import org.junit.jupiter.api.Assertions; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = BinaryData.fromString("{\"name\":\"datscmd\"}").toObject(Sku.class); - Assertions.assertEquals("datscmd", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = new Sku().withName("datscmd"); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("datscmd", model.name()); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/UserIdentityTests.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/UserIdentityTests.java deleted file mode 100644 index 6abceb652217..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/test/java/com/azure/resourcemanager/appconfiguration/generated/UserIdentityTests.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.appconfiguration.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appconfiguration.models.UserIdentity; - -public final class UserIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserIdentity model = BinaryData.fromString("{\"principalId\":\"zk\",\"clientId\":\"dbihanufhfcbj\"}") - .toObject(UserIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserIdentity model = new UserIdentity(); - model = BinaryData.fromObject(model).toObject(UserIdentity.class); - } -}