From ecc547b7ad44c5ad0f19e6c9ca9895381024c0c2 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 21 Jan 2022 19:48:59 +0000 Subject: [PATCH] CodeGen from PR 17444 in Azure/azure-rest-api-specs Merge da18efeac54424463a2cd921c7724c0fd869b786 into a4def981588f1c39ee8d795fdcf6e8594e9a01dc --- .../CHANGELOG.md | 3 +- .../README.md | 4 +- .../SAMPLE.md | 787 +++++++++++++- .../pom.xml | 2 +- .../AppConfigurationManager.java | 19 +- .../fluent/ConfigurationStoresClient.java | 136 ++- .../fluent/KeyValuesClient.java | 13 +- .../fluent/OperationsClient.java | 31 +- .../PrivateEndpointConnectionsClient.java | 20 +- .../fluent/PrivateLinkResourcesClient.java | 2 +- .../models/ConfigurationStoreInner.java | 191 ++-- .../models/ConfigurationStoreProperties.java | 264 +++++ ...rationStorePropertiesUpdateParameters.java | 112 ++ .../DeletedConfigurationStoreInner.java | 143 +++ .../DeletedConfigurationStoreProperties.java | 118 +++ .../fluent/models/KeyValueInner.java | 101 +- .../fluent/models/KeyValueProperties.java | 196 ++++ .../PrivateEndpointConnectionInner.java | 51 +- .../PrivateEndpointConnectionProperties.java | 110 ++ .../models/PrivateLinkResourceInner.java | 44 +- .../models/PrivateLinkResourceProperties.java | 70 ++ .../AppConfigurationManagementClientImpl.java | 2 +- .../ConfigurationStoreImpl.java | 28 + .../ConfigurationStoresClientImpl.java | 988 +++++++++++++++--- .../ConfigurationStoresImpl.java | 44 + .../DeletedConfigurationStoreImpl.java | 73 ++ .../implementation/KeyValuesClientImpl.java | 61 +- .../implementation/OperationsClientImpl.java | 201 +++- .../implementation/OperationsImpl.java | 28 + .../PrivateEndpointConnectionsClientImpl.java | 77 +- .../PrivateLinkResourcesClientImpl.java | 23 +- .../models/ConfigurationStore.java | 64 +- .../ConfigurationStoreUpdateParameters.java | 64 +- .../models/ConfigurationStores.java | 77 +- .../appconfiguration/models/CreateMode.java | 47 + .../models/DeletedConfigurationStore.java | 82 ++ .../DeletedConfigurationStoreListResult.java | 81 ++ .../appconfiguration/models/KeyValues.java | 6 +- .../appconfiguration/models/Operations.java | 29 +- .../PrivateEndpointConnectionReference.java | 56 +- .../models/PrivateEndpointConnections.java | 9 +- .../models/PrivateLinkResources.java | 2 +- .../models/ResourceIdentity.java | 2 + .../KeyValuesDeleteSamples.java | 20 - .../appconfiguration/KeyValuesGetSamples.java | 22 - .../ConfigurationStoresCreateSamples.java | 29 +- .../ConfigurationStoresDeleteSamples.java | 11 +- ...rationStoresGetByResourceGroupSamples.java | 13 +- .../ConfigurationStoresGetDeletedSamples.java | 23 + ...ationStoresListByResourceGroupSamples.java | 11 +- ...ConfigurationStoresListDeletedSamples.java | 23 + .../ConfigurationStoresListKeysSamples.java | 11 +- .../ConfigurationStoresListSamples.java | 11 +- ...onfigurationStoresPurgeDeletedSamples.java | 23 + ...nfigurationStoresRegenerateKeySamples.java | 11 +- .../ConfigurationStoresUpdateSamples.java | 29 +- .../KeyValuesCreateOrUpdateSamples.java | 11 +- .../generated/KeyValuesDeleteSamples.java | 22 + .../generated/KeyValuesGetSamples.java | 22 + ...ValuesListByConfigurationStoreSamples.java | 11 +- ...perationsCheckNameAvailabilitySamples.java | 20 +- ...sRegionalCheckNameAvailabilitySamples.java | 52 + ...pointConnectionsCreateOrUpdateSamples.java | 11 +- ...ivateEndpointConnectionsDeleteSamples.java | 13 +- .../PrivateEndpointConnectionsGetSamples.java | 11 +- ...ctionsListByConfigurationStoreSamples.java | 13 +- .../PrivateLinkResourcesGetSamples.java | 11 +- ...ourcesListByConfigurationStoreSamples.java | 13 +- 68 files changed, 4222 insertions(+), 686 deletions(-) create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreProperties.java create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStorePropertiesUpdateParameters.java create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/DeletedConfigurationStoreInner.java create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/DeletedConfigurationStoreProperties.java create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/KeyValueProperties.java create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateEndpointConnectionProperties.java create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateLinkResourceProperties.java create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/DeletedConfigurationStoreImpl.java create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/CreateMode.java create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/DeletedConfigurationStore.java create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/DeletedConfigurationStoreListResult.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesDeleteSamples.java delete mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesGetSamples.java rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/ConfigurationStoresCreateSamples.java (75%) rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/ConfigurationStoresDeleteSamples.java (53%) rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/ConfigurationStoresGetByResourceGroupSamples.java (53%) create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetDeletedSamples.java rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/ConfigurationStoresListByResourceGroupSamples.java (55%) create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListDeletedSamples.java rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/ConfigurationStoresListKeysSamples.java (53%) rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/ConfigurationStoresListSamples.java (55%) create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresPurgeDeletedSamples.java rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/ConfigurationStoresRegenerateKeySamples.java (69%) rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/ConfigurationStoresUpdateSamples.java (76%) rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/KeyValuesCreateOrUpdateSamples.java (75%) create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesDeleteSamples.java create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesGetSamples.java rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/KeyValuesListByConfigurationStoreSamples.java (54%) rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/OperationsCheckNameAvailabilitySamples.java (71%) create mode 100644 sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsRegionalCheckNameAvailabilitySamples.java rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/PrivateEndpointConnectionsCreateOrUpdateSamples.java (74%) rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/PrivateEndpointConnectionsDeleteSamples.java (52%) rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/PrivateEndpointConnectionsGetSamples.java (64%) rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/PrivateEndpointConnectionsListByConfigurationStoreSamples.java (53%) rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/PrivateLinkResourcesGetSamples.java (64%) rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/PrivateLinkResourcesListByConfigurationStoreSamples.java (54%) diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/CHANGELOG.md b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/CHANGELOG.md index 9210c2367626..00fd16f4525c 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/CHANGELOG.md +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2022-01-21) +- Azure Resource Manager AppConfiguration client library for Java. This package contains Microsoft Azure SDK for AppConfiguration Management SDK. Package tag package-2021-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.3 (2021-07-09) diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/README.md b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/README.md index 74082dcb6e12..a1957c86d9c8 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-2021-03-01-preview. 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-2021-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-appconfiguration - 1.0.0-beta.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/SAMPLE.md b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/SAMPLE.md index 0a017b085890..debe72f9be38 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/SAMPLE.md +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/SAMPLE.md @@ -1,36 +1,775 @@ # Code snippets and samples -### ConfigurationStores +## ConfigurationStores -- [Create](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresCreateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresDeleteSamples.java) -- [GetByResourceGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresGetByResourceGroupSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresListSamples.java) -- [ListByResourceGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresListByResourceGroupSamples.java) -- [ListKeys](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresListKeysSamples.java) -- [RegenerateKey](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresRegenerateKeySamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresUpdateSamples.java) +- [Create](#configurationstores_create) +- [Delete](#configurationstores_delete) +- [GetByResourceGroup](#configurationstores_getbyresourcegroup) +- [GetDeleted](#configurationstores_getdeleted) +- [List](#configurationstores_list) +- [ListByResourceGroup](#configurationstores_listbyresourcegroup) +- [ListDeleted](#configurationstores_listdeleted) +- [ListKeys](#configurationstores_listkeys) +- [PurgeDeleted](#configurationstores_purgedeleted) +- [RegenerateKey](#configurationstores_regeneratekey) +- [Update](#configurationstores_update) -### KeyValues +## KeyValues -- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesCreateOrUpdateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesGetSamples.java) -- [ListByConfigurationStore](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesListByConfigurationStoreSamples.java) +- [CreateOrUpdate](#keyvalues_createorupdate) +- [Delete](#keyvalues_delete) +- [Get](#keyvalues_get) +- [ListByConfigurationStore](#keyvalues_listbyconfigurationstore) -### Operations +## Operations -- [CheckNameAvailability](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/OperationsCheckNameAvailabilitySamples.java) +- [CheckNameAvailability](#operations_checknameavailability) +- [RegionalCheckNameAvailability](#operations_regionalchecknameavailability) -### PrivateEndpointConnections +## PrivateEndpointConnections -- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsCreateOrUpdateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsGetSamples.java) -- [ListByConfigurationStore](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsListByConfigurationStoreSamples.java) +- [CreateOrUpdate](#privateendpointconnections_createorupdate) +- [Delete](#privateendpointconnections_delete) +- [Get](#privateendpointconnections_get) +- [ListByConfigurationStore](#privateendpointconnections_listbyconfigurationstore) -### PrivateLinkResources +## PrivateLinkResources + +- [Get](#privatelinkresources_get) +- [ListByConfigurationStore](#privatelinkresources_listbyconfigurationstore) +### ConfigurationStores_Create + +```java +import com.azure.resourcemanager.appconfiguration.models.IdentityType; +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. */ +public final class ConfigurationStoresCreateSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresCreate.json + */ + /** + * Sample code: ConfigurationStores_Create. + * + * @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(); + } + + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/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/preview/2021-10-01-preview/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) + .create(); + } + + @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_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ConfigurationStores Delete. */ +public final class ConfigurationStoresDeleteSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/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", Context.NONE); + } +} +``` + +### ConfigurationStores_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for ConfigurationStores GetByResourceGroup. */ +public final class ConfigurationStoresGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresGet.json + */ + /** + * Sample code: ConfigurationStores_Get. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void configurationStoresGet( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().getByResourceGroupWithResponse("myResourceGroup", "contoso", Context.NONE); + } +} +``` + +### ConfigurationStores_GetDeleted + +```java +import com.azure.core.util.Context; + +/** Samples for ConfigurationStores GetDeleted. */ +public final class ConfigurationStoresGetDeletedSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/DeletedConfigurationStoresGet.json + */ + /** + * Sample code: DeletedConfigurationStores_Get. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void deletedConfigurationStoresGet( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().getDeletedWithResponse("westus", "contoso", Context.NONE); + } +} +``` + +### ConfigurationStores_List + +```java +import com.azure.core.util.Context; + +/** Samples for ConfigurationStores List. */ +public final class ConfigurationStoresListSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresList.json + */ + /** + * Sample code: ConfigurationStores_List. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void configurationStoresList( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().list(null, Context.NONE); + } +} +``` + +### ConfigurationStores_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for ConfigurationStores ListByResourceGroup. */ +public final class ConfigurationStoresListByResourceGroupSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresListByResourceGroup.json + */ + /** + * Sample code: ConfigurationStores_ListByResourceGroup. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void configurationStoresListByResourceGroup( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().listByResourceGroup("myResourceGroup", null, Context.NONE); + } +} +``` + +### ConfigurationStores_ListDeleted + +```java +import com.azure.core.util.Context; + +/** Samples for ConfigurationStores ListDeleted. */ +public final class ConfigurationStoresListDeletedSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/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(Context.NONE); + } +} +``` + +### ConfigurationStores_ListKeys + +```java +import com.azure.core.util.Context; + +/** Samples for ConfigurationStores ListKeys. */ +public final class ConfigurationStoresListKeysSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/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, Context.NONE); + } +} +``` + +### ConfigurationStores_PurgeDeleted + +```java +import com.azure.core.util.Context; + +/** Samples for ConfigurationStores PurgeDeleted. */ +public final class ConfigurationStoresPurgeDeletedSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/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", Context.NONE); + } +} +``` + +### ConfigurationStores_RegenerateKey + +```java +import com.azure.core.util.Context; +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/preview/2021-10-01-preview/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"), Context.NONE); + } +} +``` + +### ConfigurationStores_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appconfiguration.models.ConfigurationStore; +import com.azure.resourcemanager.appconfiguration.models.IdentityType; +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 Update. */ +public final class ConfigurationStoresUpdateSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresUpdateDisableLocalAuth.json + */ + /** + * Sample code: ConfigurationStores_Update_Disable_Local_Auth. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void configurationStoresUpdateDisableLocalAuth( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + ConfigurationStore resource = + manager + .configurationStores() + .getByResourceGroupWithResponse("myResourceGroup", "contoso", Context.NONE) + .getValue(); + resource.update().withSku(new Sku().withName("Standard")).withDisableLocalAuth(true).apply(); + } + + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresUpdate.json + */ + /** + * Sample code: ConfigurationStores_Update. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void configurationStoresUpdate( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + ConfigurationStore resource = + manager + .configurationStores() + .getByResourceGroupWithResponse("myResourceGroup", "contoso", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Category", "Marketing")).withSku(new Sku().withName("Standard")).apply(); + } + + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresUpdateWithIdentity.json + */ + /** + * Sample code: ConfigurationStores_Update_With_Identity. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void configurationStoresUpdateWithIdentity( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + ConfigurationStore resource = + manager + .configurationStores() + .getByResourceGroupWithResponse("myResourceGroup", "contoso", Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("Category", "Marketing")) + .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()))) + .withSku(new Sku().withName("Standard")) + .apply(); + } + + @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; + } +} +``` + +### KeyValues_CreateOrUpdate + +```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/preview/2021-10-01-preview/examples/ConfigurationStoresCreateKeyValue.json + */ + /** + * Sample code: KeyValues_CreateOrUpdate. + * + * @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(); + } + + @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; + } +} +``` + +### KeyValues_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for KeyValues Delete. */ +public final class KeyValuesDeleteSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresDeleteKeyValue.json + */ + /** + * Sample code: KeyValues_Delete. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void keyValuesDelete(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.keyValues().delete("myResourceGroup", "contoso", "myKey$myLabel", Context.NONE); + } +} +``` + +### KeyValues_Get + +```java +import com.azure.core.util.Context; + +/** Samples for KeyValues Get. */ +public final class KeyValuesGetSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresGetKeyValue.json + */ + /** + * Sample code: KeyValues_Get. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void keyValuesGet(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.keyValues().getWithResponse("myResourceGroup", "contoso", "myKey$myLabel", Context.NONE); + } +} +``` + +### KeyValues_ListByConfigurationStore + +```java +import com.azure.core.util.Context; + +/** Samples for KeyValues ListByConfigurationStore. */ +public final class KeyValuesListByConfigurationStoreSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresListKeyValues.json + */ + /** + * Sample code: KeyValues_ListByConfigurationStore. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void keyValuesListByConfigurationStore( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.keyValues().listByConfigurationStore("myResourceGroup", "contoso", null, Context.NONE); + } +} +``` + +### Operations_CheckNameAvailability + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appconfiguration.models.CheckNameAvailabilityParameters; +import com.azure.resourcemanager.appconfiguration.models.ConfigurationResourceType; + +/** Samples for Operations CheckNameAvailability. */ +public final class OperationsCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/CheckNameAvailable.json + */ + /** + * Sample code: ConfigurationStores_CheckNameAvailable. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void configurationStoresCheckNameAvailable( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager + .operations() + .checkNameAvailabilityWithResponse( + new CheckNameAvailabilityParameters() + .withName("contoso") + .withType(ConfigurationResourceType.MICROSOFT_APP_CONFIGURATION_CONFIGURATION_STORES), + Context.NONE); + } + + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/CheckNameNotAvailable.json + */ + /** + * Sample code: ConfigurationStores_CheckNameNotAvailable. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void configurationStoresCheckNameNotAvailable( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager + .operations() + .checkNameAvailabilityWithResponse( + new CheckNameAvailabilityParameters() + .withName("contoso") + .withType(ConfigurationResourceType.MICROSOFT_APP_CONFIGURATION_CONFIGURATION_STORES), + Context.NONE); + } +} +``` + +### Operations_RegionalCheckNameAvailability + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appconfiguration.models.CheckNameAvailabilityParameters; +import com.azure.resourcemanager.appconfiguration.models.ConfigurationResourceType; + +/** Samples for Operations RegionalCheckNameAvailability. */ +public final class OperationsRegionalCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/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), + Context.NONE); + } + + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/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), + Context.NONE); + } +} +``` + +### PrivateEndpointConnections_CreateOrUpdate + +```java +import com.azure.resourcemanager.appconfiguration.models.ConnectionStatus; +import com.azure.resourcemanager.appconfiguration.models.PrivateLinkServiceConnectionState; + +/** Samples for PrivateEndpointConnections CreateOrUpdate. */ +public final class PrivateEndpointConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresCreatePrivateEndpointConnection.json + */ + /** + * Sample code: PrivateEndpointConnection_CreateOrUpdate. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void privateEndpointConnectionCreateOrUpdate( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager + .privateEndpointConnections() + .define("myConnection") + .withExistingConfigurationStore("myResourceGroup", "contoso") + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(ConnectionStatus.APPROVED) + .withDescription("Auto-Approved")) + .create(); + } +} +``` + +### PrivateEndpointConnections_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Delete. */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresDeletePrivateEndpointConnection.json + */ + /** + * Sample code: PrivateEndpointConnections_Delete. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void privateEndpointConnectionsDelete( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.privateEndpointConnections().delete("myResourceGroup", "contoso", "myConnection", Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Get + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Get. */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresGetPrivateEndpointConnection.json + */ + /** + * Sample code: PrivateEndpointConnection_GetConnection. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void privateEndpointConnectionGetConnection( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager + .privateEndpointConnections() + .getWithResponse("myResourceGroup", "contoso", "myConnection", Context.NONE); + } +} +``` + +### PrivateEndpointConnections_ListByConfigurationStore + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections ListByConfigurationStore. */ +public final class PrivateEndpointConnectionsListByConfigurationStoreSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresListPrivateEndpointConnections.json + */ + /** + * Sample code: PrivateEndpointConnection_List. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void privateEndpointConnectionList( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.privateEndpointConnections().listByConfigurationStore("myResourceGroup", "contoso", Context.NONE); + } +} +``` + +### PrivateLinkResources_Get + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResources Get. */ +public final class PrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/PrivateLinkResourceGet.json + */ + /** + * Sample code: PrivateLinkResources_Get. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void privateLinkResourcesGet( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager + .privateLinkResources() + .getWithResponse("myResourceGroup", "contoso", "configurationStores", Context.NONE); + } +} +``` + +### PrivateLinkResources_ListByConfigurationStore + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResources ListByConfigurationStore. */ +public final class PrivateLinkResourcesListByConfigurationStoreSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/PrivateLinkResourcesListByConfigurationStore.json + */ + /** + * Sample code: PrivateLinkResources_ListGroupIds. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void privateLinkResourcesListGroupIds( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.privateLinkResources().listByConfigurationStore("myResourceGroup", "contoso", Context.NONE); + } +} +``` -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateLinkResourcesGetSamples.java) -- [ListByConfigurationStore](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateLinkResourcesListByConfigurationStoreSamples.java) diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml index d60a11f97eb0..84a2106514cb 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml @@ -13,7 +13,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-2021-03-01-preview. + 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-2021-10-01-preview. https://github.com/Azure/azure-sdk-for-java 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 27ac8dc631a3..dbc4a03b09e8 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 @@ -8,6 +8,7 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; @@ -37,6 +38,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to AppConfigurationManager. */ public final class AppConfigurationManager { @@ -186,7 +188,7 @@ public AppConfigurationManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.appconfiguration") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -209,11 +211,24 @@ public AppConfigurationManager authenticate(TokenCredential credential, AzurePro List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/ConfigurationStoresClient.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/ConfigurationStoresClient.java index 149b307e5211..13fa64318774 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/ConfigurationStoresClient.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/ConfigurationStoresClient.java @@ -13,8 +13,10 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appconfiguration.fluent.models.ApiKeyInner; import com.azure.resourcemanager.appconfiguration.fluent.models.ConfigurationStoreInner; +import com.azure.resourcemanager.appconfiguration.fluent.models.DeletedConfigurationStoreInner; import com.azure.resourcemanager.appconfiguration.models.ConfigurationStoreUpdateParameters; import com.azure.resourcemanager.appconfiguration.models.RegenerateKeyParameters; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ConfigurationStoresClient. */ public interface ConfigurationStoresClient { @@ -94,7 +96,7 @@ PagedIterable listByResourceGroup( * @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 properties of the specified configuration store. + * @return the properties of the specified configuration store along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -109,9 +111,10 @@ Response getByResourceGroupWithResponse( * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationStoreInner> beginCreate( String resourceGroupName, String configStoreName, ConfigurationStoreInner configStoreCreationParameters); @@ -125,9 +128,10 @@ SyncPoller, ConfigurationStoreInner> beginCr * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationStoreInner> beginCreate( String resourceGroupName, String configStoreName, @@ -176,9 +180,9 @@ ConfigurationStoreInner create( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String configStoreName); /** @@ -190,9 +194,9 @@ ConfigurationStoreInner create( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String configStoreName, Context context); /** @@ -229,9 +233,10 @@ ConfigurationStoreInner create( * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationStoreInner> beginUpdate( String resourceGroupName, String configStoreName, @@ -247,9 +252,10 @@ SyncPoller, ConfigurationStoreInner> beginUp * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationStoreInner> beginUpdate( String resourceGroupName, String configStoreName, @@ -348,7 +354,7 @@ ApiKeyInner regenerateKey( * @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 an API key used for authenticating with a configuration store endpoint. + * @return an API key used for authenticating with a configuration store endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response regenerateKeyWithResponse( @@ -356,4 +362,106 @@ Response regenerateKeyWithResponse( String configStoreName, RegenerateKeyParameters regenerateKeyParameters, Context context); + + /** + * Gets information about the deleted configuration stores in a subscription. + * + * @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 information about the deleted configuration stores in a subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeleted(); + + /** + * Gets information about the deleted configuration stores in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the deleted configuration stores in a subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeleted(Context context); + + /** + * Gets a deleted Azure app configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @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 a deleted Azure app configuration store. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeletedConfigurationStoreInner getDeleted(String location, String configStoreName); + + /** + * Gets a deleted Azure app configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a deleted Azure app configuration store along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeletedWithResponse( + String location, String configStoreName, Context context); + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginPurgeDeleted(String location, String configStoreName); + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginPurgeDeleted(String location, String configStoreName, Context context); + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void purgeDeleted(String location, String configStoreName); + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void purgeDeleted(String location, String configStoreName, Context context); } 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 7146148f90f1..8e6f0d86a6ae 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 @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appconfiguration.fluent.models.KeyValueInner; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in KeyValuesClient. */ public interface KeyValuesClient { @@ -72,7 +73,7 @@ PagedIterable listByConfigurationStore( * @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 properties of the specified key-value. + * @return the properties of the specified key-value along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -105,7 +106,7 @@ Response getWithResponse( * @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. + * @return the key-value resource along with all resource properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -125,9 +126,9 @@ Response createOrUpdateWithResponse( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String configStoreName, String keyValueName); @@ -142,9 +143,9 @@ SyncPoller, Void> beginDelete( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String configStoreName, String keyValueName, Context context); diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/OperationsClient.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/OperationsClient.java index 87083db11803..e2c4b7cad0a3 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/OperationsClient.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/OperationsClient.java @@ -35,7 +35,7 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to check the availability of a resource name. + * @return the result of a request to check the availability of a resource name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response checkNameAvailabilityWithResponse( @@ -65,4 +65,33 @@ Response checkNameAvailabilityWithResponse( */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String skipToken, Context context); + + /** + * Checks whether the configuration store name is available for use. + * + * @param location The location in which uniqueness will be verified. + * @param checkNameAvailabilityParameters The object containing information for the availability request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to check the availability of a resource name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NameAvailabilityStatusInner regionalCheckNameAvailability( + String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters); + + /** + * Checks whether the configuration store name is available for use. + * + * @param location The location in which uniqueness will be verified. + * @param checkNameAvailabilityParameters The object containing information for the availability request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to check the availability of a resource name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response regionalCheckNameAvailabilityWithResponse( + String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context); } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/PrivateEndpointConnectionsClient.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/PrivateEndpointConnectionsClient.java index e7e80b6bbf50..bb6950ea14de 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/PrivateEndpointConnectionsClient.java @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appconfiguration.fluent.models.PrivateEndpointConnectionInner; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public interface PrivateEndpointConnectionsClient { @@ -69,7 +70,8 @@ PrivateEndpointConnectionInner get( * @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 specified private endpoint connection associated with the configuration store. + * @return the specified private endpoint connection associated with the configuration store along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -85,9 +87,9 @@ Response getWithResponse( * @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 a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String configStoreName, @@ -105,9 +107,9 @@ SyncPoller, PrivateEndpointConnection * @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 a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String configStoreName, @@ -164,9 +166,9 @@ PrivateEndpointConnectionInner createOrUpdate( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String configStoreName, String privateEndpointConnectionName); @@ -180,9 +182,9 @@ SyncPoller, Void> beginDelete( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String configStoreName, String privateEndpointConnectionName, Context context); diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/PrivateLinkResourcesClient.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/PrivateLinkResourcesClient.java index 6cbab37605a6..423e0b9296b2 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/PrivateLinkResourcesClient.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/PrivateLinkResourcesClient.java @@ -65,7 +65,7 @@ PagedIterable listByConfigurationStore( * @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 a private link resource that need to be created for a configuration store. + * @return a private link resource that need to be created for a configuration store along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( 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 5076c0d0d4d1..b953e7cba1b7 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 @@ -5,10 +5,10 @@ package com.azure.resourcemanager.appconfiguration.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appconfiguration.models.CreateMode; import com.azure.resourcemanager.appconfiguration.models.EncryptionProperties; import com.azure.resourcemanager.appconfiguration.models.PrivateEndpointConnectionReference; import com.azure.resourcemanager.appconfiguration.models.ProvisioningState; @@ -25,9 +25,8 @@ * The configuration store along with all resource properties. The Configuration Store will have all information to * begin utilizing it. */ -@JsonFlatten @Fluent -public class ConfigurationStoreInner extends Resource { +public final class ConfigurationStoreInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationStoreInner.class); /* @@ -36,6 +35,12 @@ public class ConfigurationStoreInner extends Resource { @JsonProperty(value = "identity") private ResourceIdentity identity; + /* + * The properties of a configuration store. + */ + @JsonProperty(value = "properties") + private ConfigurationStoreProperties innerProperties; + /* * The sku of the configuration store. */ @@ -48,50 +53,6 @@ public class ConfigurationStoreInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /* - * The provisioning state of the configuration store. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The creation date of configuration store. - */ - @JsonProperty(value = "properties.creationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationDate; - - /* - * The DNS endpoint where the configuration store API will be available. - */ - @JsonProperty(value = "properties.endpoint", access = JsonProperty.Access.WRITE_ONLY) - private String endpoint; - - /* - * The encryption settings of the configuration store. - */ - @JsonProperty(value = "properties.encryption") - private EncryptionProperties encryption; - - /* - * The list of private endpoint connections that are set up for this - * resource. - */ - @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) - private List privateEndpointConnections; - - /* - * Control permission for data plane traffic coming from public networks - * while private endpoint is enabled. - */ - @JsonProperty(value = "properties.publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; - - /* - * Disables all authentication methods other than AAD authentication. - */ - @JsonProperty(value = "properties.disableLocalAuth") - private Boolean disableLocalAuth; - /** * Get the identity property: The managed identity information, if configured. * @@ -112,6 +73,15 @@ public ConfigurationStoreInner withIdentity(ResourceIdentity identity) { return this; } + /** + * Get the innerProperties property: The properties of a configuration store. + * + * @return the innerProperties value. + */ + private ConfigurationStoreProperties innerProperties() { + return this.innerProperties; + } + /** * Get the sku property: The sku of the configuration store. * @@ -141,13 +111,27 @@ public SystemData systemData() { return this.systemData; } + /** {@inheritDoc} */ + @Override + public ConfigurationStoreInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ConfigurationStoreInner withTags(Map tags) { + super.withTags(tags); + return this; + } + /** * Get the provisioningState property: The provisioning state of the configuration store. * * @return the provisioningState value. */ public ProvisioningState provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -156,7 +140,7 @@ public ProvisioningState provisioningState() { * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.creationDate; + return this.innerProperties() == null ? null : this.innerProperties().creationDate(); } /** @@ -165,7 +149,7 @@ public OffsetDateTime creationDate() { * @return the endpoint value. */ public String endpoint() { - return this.endpoint; + return this.innerProperties() == null ? null : this.innerProperties().endpoint(); } /** @@ -174,7 +158,7 @@ public String endpoint() { * @return the encryption value. */ public EncryptionProperties encryption() { - return this.encryption; + return this.innerProperties() == null ? null : this.innerProperties().encryption(); } /** @@ -184,7 +168,10 @@ public EncryptionProperties encryption() { * @return the ConfigurationStoreInner object itself. */ public ConfigurationStoreInner withEncryption(EncryptionProperties encryption) { - this.encryption = encryption; + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationStoreProperties(); + } + this.innerProperties().withEncryption(encryption); return this; } @@ -195,7 +182,7 @@ public ConfigurationStoreInner withEncryption(EncryptionProperties encryption) { * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { - return this.privateEndpointConnections; + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); } /** @@ -205,7 +192,7 @@ public List privateEndpointConnections() { * @return the publicNetworkAccess value. */ public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); } /** @@ -216,7 +203,10 @@ public PublicNetworkAccess publicNetworkAccess() { * @return the ConfigurationStoreInner object itself. */ public ConfigurationStoreInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationStoreProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); return this; } @@ -226,7 +216,7 @@ public ConfigurationStoreInner withPublicNetworkAccess(PublicNetworkAccess publi * @return the disableLocalAuth value. */ public Boolean disableLocalAuth() { - return this.disableLocalAuth; + return this.innerProperties() == null ? null : this.innerProperties().disableLocalAuth(); } /** @@ -236,21 +226,83 @@ public Boolean disableLocalAuth() { * @return the ConfigurationStoreInner object itself. */ public ConfigurationStoreInner withDisableLocalAuth(Boolean disableLocalAuth) { - this.disableLocalAuth = disableLocalAuth; + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationStoreProperties(); + } + this.innerProperties().withDisableLocalAuth(disableLocalAuth); return this; } - /** {@inheritDoc} */ - @Override - public ConfigurationStoreInner withLocation(String location) { - super.withLocation(location); + /** + * Get the softDeleteRetentionInDays property: The amount of time in days that the configuration store will be + * retained when it is soft deleted. + * + * @return the softDeleteRetentionInDays value. + */ + public Integer softDeleteRetentionInDays() { + return this.innerProperties() == null ? null : this.innerProperties().softDeleteRetentionInDays(); + } + + /** + * Set the softDeleteRetentionInDays property: The amount of time in days that the configuration store will be + * retained when it is soft deleted. + * + * @param softDeleteRetentionInDays the softDeleteRetentionInDays value to set. + * @return the ConfigurationStoreInner object itself. + */ + public ConfigurationStoreInner withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationStoreProperties(); + } + this.innerProperties().withSoftDeleteRetentionInDays(softDeleteRetentionInDays); return this; } - /** {@inheritDoc} */ - @Override - public ConfigurationStoreInner withTags(Map tags) { - super.withTags(tags); + /** + * Get the enablePurgeProtection property: Property specifying whether protection against purge is enabled for this + * configuration store. + * + * @return the enablePurgeProtection value. + */ + public Boolean enablePurgeProtection() { + return this.innerProperties() == null ? null : this.innerProperties().enablePurgeProtection(); + } + + /** + * Set the enablePurgeProtection property: Property specifying whether protection against purge is enabled for this + * configuration store. + * + * @param enablePurgeProtection the enablePurgeProtection value to set. + * @return the ConfigurationStoreInner object itself. + */ + public ConfigurationStoreInner withEnablePurgeProtection(Boolean enablePurgeProtection) { + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationStoreProperties(); + } + this.innerProperties().withEnablePurgeProtection(enablePurgeProtection); + return this; + } + + /** + * Get the createMode property: Indicates whether the configuration store need to be recovered. + * + * @return the createMode value. + */ + public CreateMode createMode() { + return this.innerProperties() == null ? null : this.innerProperties().createMode(); + } + + /** + * Set the createMode property: Indicates whether the configuration store need to be recovered. + * + * @param createMode the createMode value to set. + * @return the ConfigurationStoreInner object itself. + */ + public ConfigurationStoreInner withCreateMode(CreateMode createMode) { + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationStoreProperties(); + } + this.innerProperties().withCreateMode(createMode); return this; } @@ -263,6 +315,9 @@ public void validate() { if (identity() != null) { identity().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } if (sku() == null) { throw logger .logExceptionAsError( @@ -270,11 +325,5 @@ public void validate() { } else { sku().validate(); } - if (encryption() != null) { - encryption().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } } } 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 new file mode 100644 index 000000000000..67fb6edaa893 --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreProperties.java @@ -0,0 +1,264 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appconfiguration.models.CreateMode; +import com.azure.resourcemanager.appconfiguration.models.EncryptionProperties; +import com.azure.resourcemanager.appconfiguration.models.PrivateEndpointConnectionReference; +import com.azure.resourcemanager.appconfiguration.models.ProvisioningState; +import com.azure.resourcemanager.appconfiguration.models.PublicNetworkAccess; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The properties of a configuration store. */ +@Fluent +public final class ConfigurationStoreProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationStoreProperties.class); + + /* + * The provisioning state of the configuration store. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The creation date of configuration store. + */ + @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationDate; + + /* + * The DNS endpoint where the configuration store API will be available. + */ + @JsonProperty(value = "endpoint", access = JsonProperty.Access.WRITE_ONLY) + private String endpoint; + + /* + * The encryption settings of the configuration store. + */ + @JsonProperty(value = "encryption") + private EncryptionProperties encryption; + + /* + * The list of private endpoint connections that are set up for this + * resource. + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /* + * Control permission for data plane traffic coming from public networks + * while private endpoint is enabled. + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /* + * Disables all authentication methods other than AAD authentication. + */ + @JsonProperty(value = "disableLocalAuth") + private Boolean disableLocalAuth; + + /* + * The amount of time in days that the configuration store will be retained + * when it is soft deleted. + */ + @JsonProperty(value = "softDeleteRetentionInDays") + private Integer softDeleteRetentionInDays; + + /* + * Property specifying whether protection against purge is enabled for this + * configuration store. + */ + @JsonProperty(value = "enablePurgeProtection") + private Boolean enablePurgeProtection; + + /* + * Indicates whether the configuration store need to be recovered. + */ + @JsonProperty(value = "createMode") + private CreateMode createMode; + + /** + * Get the provisioningState property: The provisioning state of the configuration store. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the creationDate property: The creation date of configuration store. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the endpoint property: The DNS endpoint where the configuration store API will be available. + * + * @return the endpoint value. + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Get the encryption property: The encryption settings of the configuration store. + * + * @return the encryption value. + */ + public EncryptionProperties encryption() { + return this.encryption; + } + + /** + * Set the encryption property: The encryption settings of the configuration store. + * + * @param encryption the encryption value to set. + * @return the ConfigurationStoreProperties object itself. + */ + public ConfigurationStoreProperties withEncryption(EncryptionProperties encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the privateEndpointConnections property: The list of private endpoint connections that are set up for this + * resource. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Get the publicNetworkAccess property: Control permission for data plane traffic coming from public networks while + * private endpoint is enabled. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Control permission for data plane traffic coming from public networks while + * private endpoint is enabled. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the ConfigurationStoreProperties object itself. + */ + public ConfigurationStoreProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the disableLocalAuth property: Disables all authentication methods other than AAD authentication. + * + * @return the disableLocalAuth value. + */ + public Boolean disableLocalAuth() { + return this.disableLocalAuth; + } + + /** + * Set the disableLocalAuth property: Disables all authentication methods other than AAD authentication. + * + * @param disableLocalAuth the disableLocalAuth value to set. + * @return the ConfigurationStoreProperties object itself. + */ + public ConfigurationStoreProperties withDisableLocalAuth(Boolean disableLocalAuth) { + this.disableLocalAuth = disableLocalAuth; + return this; + } + + /** + * Get the softDeleteRetentionInDays property: The amount of time in days that the configuration store will be + * retained when it is soft deleted. + * + * @return the softDeleteRetentionInDays value. + */ + public Integer softDeleteRetentionInDays() { + return this.softDeleteRetentionInDays; + } + + /** + * Set the softDeleteRetentionInDays property: The amount of time in days that the configuration store will be + * retained when it is soft deleted. + * + * @param softDeleteRetentionInDays the softDeleteRetentionInDays value to set. + * @return the ConfigurationStoreProperties object itself. + */ + public ConfigurationStoreProperties withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { + this.softDeleteRetentionInDays = softDeleteRetentionInDays; + return this; + } + + /** + * Get the enablePurgeProtection property: Property specifying whether protection against purge is enabled for this + * configuration store. + * + * @return the enablePurgeProtection value. + */ + public Boolean enablePurgeProtection() { + return this.enablePurgeProtection; + } + + /** + * Set the enablePurgeProtection property: Property specifying whether protection against purge is enabled for this + * configuration store. + * + * @param enablePurgeProtection the enablePurgeProtection value to set. + * @return the ConfigurationStoreProperties object itself. + */ + public ConfigurationStoreProperties withEnablePurgeProtection(Boolean enablePurgeProtection) { + this.enablePurgeProtection = enablePurgeProtection; + return this; + } + + /** + * Get the createMode property: Indicates whether the configuration store need to be recovered. + * + * @return the createMode value. + */ + public CreateMode createMode() { + return this.createMode; + } + + /** + * Set the createMode property: Indicates whether the configuration store need to be recovered. + * + * @param createMode the createMode value to set. + * @return the ConfigurationStoreProperties object itself. + */ + public ConfigurationStoreProperties withCreateMode(CreateMode createMode) { + this.createMode = createMode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStorePropertiesUpdateParameters.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStorePropertiesUpdateParameters.java new file mode 100644 index 000000000000..793ed04e712f --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStorePropertiesUpdateParameters.java @@ -0,0 +1,112 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appconfiguration.models.EncryptionProperties; +import com.azure.resourcemanager.appconfiguration.models.PublicNetworkAccess; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties for updating a configuration store. */ +@Fluent +public final class ConfigurationStorePropertiesUpdateParameters { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(ConfigurationStorePropertiesUpdateParameters.class); + + /* + * The encryption settings of the configuration store. + */ + @JsonProperty(value = "encryption") + private EncryptionProperties encryption; + + /* + * Disables all authentication methods other than AAD authentication. + */ + @JsonProperty(value = "disableLocalAuth") + private Boolean disableLocalAuth; + + /* + * Control permission for data plane traffic coming from public networks + * while private endpoint is enabled. + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /** + * Get the encryption property: The encryption settings of the configuration store. + * + * @return the encryption value. + */ + public EncryptionProperties encryption() { + return this.encryption; + } + + /** + * Set the encryption property: The encryption settings of the configuration store. + * + * @param encryption the encryption value to set. + * @return the ConfigurationStorePropertiesUpdateParameters object itself. + */ + public ConfigurationStorePropertiesUpdateParameters withEncryption(EncryptionProperties encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the disableLocalAuth property: Disables all authentication methods other than AAD authentication. + * + * @return the disableLocalAuth value. + */ + public Boolean disableLocalAuth() { + return this.disableLocalAuth; + } + + /** + * Set the disableLocalAuth property: Disables all authentication methods other than AAD authentication. + * + * @param disableLocalAuth the disableLocalAuth value to set. + * @return the ConfigurationStorePropertiesUpdateParameters object itself. + */ + public ConfigurationStorePropertiesUpdateParameters withDisableLocalAuth(Boolean disableLocalAuth) { + this.disableLocalAuth = disableLocalAuth; + return this; + } + + /** + * Get the publicNetworkAccess property: Control permission for data plane traffic coming from public networks while + * private endpoint is enabled. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Control permission for data plane traffic coming from public networks while + * private endpoint is enabled. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the ConfigurationStorePropertiesUpdateParameters object itself. + */ + public ConfigurationStorePropertiesUpdateParameters withPublicNetworkAccess( + PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/DeletedConfigurationStoreInner.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/DeletedConfigurationStoreInner.java new file mode 100644 index 000000000000..991a7b0b4e3d --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/DeletedConfigurationStoreInner.java @@ -0,0 +1,143 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Deleted configuration store information with extended details. */ +@Fluent +public final class DeletedConfigurationStoreInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeletedConfigurationStoreInner.class); + + /* + * The resource ID for the deleted configuration store. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The name of the configuration store. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The resource type of the configuration store. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * Properties of the deleted configuration store + */ + @JsonProperty(value = "properties") + private DeletedConfigurationStoreProperties innerProperties; + + /** + * Get the id property: The resource ID for the deleted configuration store. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the configuration store. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: The resource type of the configuration store. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the innerProperties property: Properties of the deleted configuration store. + * + * @return the innerProperties value. + */ + private DeletedConfigurationStoreProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the configurationStoreId property: The resource id of the original configuration store. + * + * @return the configurationStoreId value. + */ + public String configurationStoreId() { + return this.innerProperties() == null ? null : this.innerProperties().configurationStoreId(); + } + + /** + * Get the location property: The location of the original configuration store. + * + * @return the location value. + */ + public String location() { + return this.innerProperties() == null ? null : this.innerProperties().location(); + } + + /** + * Get the deletionDate property: The deleted date. + * + * @return the deletionDate value. + */ + public OffsetDateTime deletionDate() { + return this.innerProperties() == null ? null : this.innerProperties().deletionDate(); + } + + /** + * Get the scheduledPurgeDate property: The scheduled purged date. + * + * @return the scheduledPurgeDate value. + */ + public OffsetDateTime scheduledPurgeDate() { + return this.innerProperties() == null ? null : this.innerProperties().scheduledPurgeDate(); + } + + /** + * Get the tags property: Tags of the original configuration store. + * + * @return the tags value. + */ + public Map tags() { + return this.innerProperties() == null ? null : this.innerProperties().tags(); + } + + /** + * Get the purgeProtectionEnabled property: Purge protection status of the original configuration store. + * + * @return the purgeProtectionEnabled value. + */ + public Boolean purgeProtectionEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().purgeProtectionEnabled(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/DeletedConfigurationStoreProperties.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/DeletedConfigurationStoreProperties.java new file mode 100644 index 000000000000..508c6445ddc9 --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/DeletedConfigurationStoreProperties.java @@ -0,0 +1,118 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Properties of the deleted configuration store. */ +@Immutable +public final class DeletedConfigurationStoreProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeletedConfigurationStoreProperties.class); + + /* + * The resource id of the original configuration store. + */ + @JsonProperty(value = "configurationStoreId", access = JsonProperty.Access.WRITE_ONLY) + private String configurationStoreId; + + /* + * The location of the original configuration store. + */ + @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) + private String location; + + /* + * The deleted date. + */ + @JsonProperty(value = "deletionDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime deletionDate; + + /* + * The scheduled purged date. + */ + @JsonProperty(value = "scheduledPurgeDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime scheduledPurgeDate; + + /* + * Tags of the original configuration store. + */ + @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * Purge protection status of the original configuration store. + */ + @JsonProperty(value = "purgeProtectionEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean purgeProtectionEnabled; + + /** + * Get the configurationStoreId property: The resource id of the original configuration store. + * + * @return the configurationStoreId value. + */ + public String configurationStoreId() { + return this.configurationStoreId; + } + + /** + * Get the location property: The location of the original configuration store. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Get the deletionDate property: The deleted date. + * + * @return the deletionDate value. + */ + public OffsetDateTime deletionDate() { + return this.deletionDate; + } + + /** + * Get the scheduledPurgeDate property: The scheduled purged date. + * + * @return the scheduledPurgeDate value. + */ + public OffsetDateTime scheduledPurgeDate() { + return this.scheduledPurgeDate; + } + + /** + * Get the tags property: Tags of the original configuration store. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Get the purgeProtectionEnabled property: Purge protection status of the original configuration store. + * + * @return the purgeProtectionEnabled value. + */ + public Boolean purgeProtectionEnabled() { + return this.purgeProtectionEnabled; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/KeyValueInner.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/KeyValueInner.java index 8327cc3b9489..9d86fae1f034 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/KeyValueInner.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/KeyValueInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.appconfiguration.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -14,68 +13,24 @@ import java.util.Map; /** The key-value resource along with all resource properties. */ -@JsonFlatten @Fluent -public class KeyValueInner extends ProxyResource { +public final class KeyValueInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyValueInner.class); /* - * The primary identifier of a key-value. - * The key is used in unison with the label to uniquely identify a - * key-value. + * All key-value properties. */ - @JsonProperty(value = "properties.key", access = JsonProperty.Access.WRITE_ONLY) - private String key; + @JsonProperty(value = "properties") + private KeyValueProperties innerProperties; - /* - * A value used to group key-values. - * The label is used in unison with the key to uniquely identify a - * key-value. - */ - @JsonProperty(value = "properties.label", access = JsonProperty.Access.WRITE_ONLY) - private String label; - - /* - * The value of the key-value. - */ - @JsonProperty(value = "properties.value") - private String value; - - /* - * The content type of the key-value's value. - * Providing a proper content-type can enable transformations of values - * when they are retrieved by applications. - */ - @JsonProperty(value = "properties.contentType") - private String contentType; - - /* - * An ETag indicating the state of a key-value within a configuration - * store. - */ - @JsonProperty(value = "properties.eTag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /* - * The last time a modifying operation was performed on the given - * key-value. - */ - @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModified; - - /* - * A value indicating whether the key-value is locked. - * A locked key-value may not be modified until it is unlocked. - */ - @JsonProperty(value = "properties.locked", access = JsonProperty.Access.WRITE_ONLY) - private Boolean locked; - - /* - * A dictionary of tags that can help identify what a key-value may be - * applicable for. + /** + * Get the innerProperties property: All key-value properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.tags") - private Map tags; + private KeyValueProperties innerProperties() { + return this.innerProperties; + } /** * Get the key property: The primary identifier of a key-value. The key is used in unison with the label to uniquely @@ -84,7 +39,7 @@ public class KeyValueInner extends ProxyResource { * @return the key value. */ public String key() { - return this.key; + return this.innerProperties() == null ? null : this.innerProperties().key(); } /** @@ -94,7 +49,7 @@ public String key() { * @return the label value. */ public String label() { - return this.label; + return this.innerProperties() == null ? null : this.innerProperties().label(); } /** @@ -103,7 +58,7 @@ public String label() { * @return the value value. */ public String value() { - return this.value; + return this.innerProperties() == null ? null : this.innerProperties().value(); } /** @@ -113,7 +68,10 @@ public String value() { * @return the KeyValueInner object itself. */ public KeyValueInner withValue(String value) { - this.value = value; + if (this.innerProperties() == null) { + this.innerProperties = new KeyValueProperties(); + } + this.innerProperties().withValue(value); return this; } @@ -124,7 +82,7 @@ public KeyValueInner withValue(String value) { * @return the contentType value. */ public String contentType() { - return this.contentType; + return this.innerProperties() == null ? null : this.innerProperties().contentType(); } /** @@ -135,7 +93,10 @@ public String contentType() { * @return the KeyValueInner object itself. */ public KeyValueInner withContentType(String contentType) { - this.contentType = contentType; + if (this.innerProperties() == null) { + this.innerProperties = new KeyValueProperties(); + } + this.innerProperties().withContentType(contentType); return this; } @@ -145,7 +106,7 @@ public KeyValueInner withContentType(String contentType) { * @return the etag value. */ public String etag() { - return this.etag; + return this.innerProperties() == null ? null : this.innerProperties().etag(); } /** @@ -154,7 +115,7 @@ public String etag() { * @return the lastModified value. */ public OffsetDateTime lastModified() { - return this.lastModified; + return this.innerProperties() == null ? null : this.innerProperties().lastModified(); } /** @@ -164,7 +125,7 @@ public OffsetDateTime lastModified() { * @return the locked value. */ public Boolean locked() { - return this.locked; + return this.innerProperties() == null ? null : this.innerProperties().locked(); } /** @@ -173,7 +134,7 @@ public Boolean locked() { * @return the tags value. */ public Map tags() { - return this.tags; + return this.innerProperties() == null ? null : this.innerProperties().tags(); } /** @@ -183,7 +144,10 @@ public Map tags() { * @return the KeyValueInner object itself. */ public KeyValueInner withTags(Map tags) { - this.tags = tags; + if (this.innerProperties() == null) { + this.innerProperties = new KeyValueProperties(); + } + this.innerProperties().withTags(tags); return this; } @@ -193,5 +157,8 @@ public KeyValueInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/KeyValueProperties.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/KeyValueProperties.java new file mode 100644 index 000000000000..a750b057087b --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/KeyValueProperties.java @@ -0,0 +1,196 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** All key-value properties. */ +@Fluent +public final class KeyValueProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyValueProperties.class); + + /* + * The primary identifier of a key-value. + * The key is used in unison with the label to uniquely identify a + * key-value. + */ + @JsonProperty(value = "key", access = JsonProperty.Access.WRITE_ONLY) + private String key; + + /* + * A value used to group key-values. + * The label is used in unison with the key to uniquely identify a + * key-value. + */ + @JsonProperty(value = "label", access = JsonProperty.Access.WRITE_ONLY) + private String label; + + /* + * The value of the key-value. + */ + @JsonProperty(value = "value") + private String value; + + /* + * The content type of the key-value's value. + * Providing a proper content-type can enable transformations of values + * when they are retrieved by applications. + */ + @JsonProperty(value = "contentType") + private String contentType; + + /* + * An ETag indicating the state of a key-value within a configuration + * store. + */ + @JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /* + * The last time a modifying operation was performed on the given + * key-value. + */ + @JsonProperty(value = "lastModified", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModified; + + /* + * A value indicating whether the key-value is locked. + * A locked key-value may not be modified until it is unlocked. + */ + @JsonProperty(value = "locked", access = JsonProperty.Access.WRITE_ONLY) + private Boolean locked; + + /* + * A dictionary of tags that can help identify what a key-value may be + * applicable for. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the key property: The primary identifier of a key-value. The key is used in unison with the label to uniquely + * identify a key-value. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Get the label property: A value used to group key-values. The label is used in unison with the key to uniquely + * identify a key-value. + * + * @return the label value. + */ + public String label() { + return this.label; + } + + /** + * Get the value property: The value of the key-value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value of the key-value. + * + * @param value the value value to set. + * @return the KeyValueProperties object itself. + */ + public KeyValueProperties withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the contentType property: The content type of the key-value's value. Providing a proper content-type can + * enable transformations of values when they are retrieved by applications. + * + * @return the contentType value. + */ + public String contentType() { + return this.contentType; + } + + /** + * Set the contentType property: The content type of the key-value's value. Providing a proper content-type can + * enable transformations of values when they are retrieved by applications. + * + * @param contentType the contentType value to set. + * @return the KeyValueProperties object itself. + */ + public KeyValueProperties withContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the etag property: An ETag indicating the state of a key-value within a configuration store. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the lastModified property: The last time a modifying operation was performed on the given key-value. + * + * @return the lastModified value. + */ + public OffsetDateTime lastModified() { + return this.lastModified; + } + + /** + * Get the locked property: A value indicating whether the key-value is locked. A locked key-value may not be + * modified until it is unlocked. + * + * @return the locked value. + */ + public Boolean locked() { + return this.locked; + } + + /** + * Get the tags property: A dictionary of tags that can help identify what a key-value may be applicable for. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: A dictionary of tags that can help identify what a key-value may be applicable for. + * + * @param tags the tags value to set. + * @return the KeyValueProperties object itself. + */ + public KeyValueProperties withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateEndpointConnectionInner.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateEndpointConnectionInner.java index d53891bc1d9d..8a05f6c581f2 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateEndpointConnectionInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.appconfiguration.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appconfiguration.models.PrivateEndpoint; @@ -15,29 +14,24 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A private endpoint connection. */ -@JsonFlatten @Fluent -public class PrivateEndpointConnectionInner extends ProxyResource { +public final class PrivateEndpointConnectionInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); /* - * The provisioning status of the private endpoint connection. + * The properties of a private endpoint. */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; + @JsonProperty(value = "properties") + private PrivateEndpointConnectionProperties innerProperties; - /* - * The resource of private endpoint. - */ - @JsonProperty(value = "properties.privateEndpoint") - private PrivateEndpoint privateEndpoint; - - /* - * A collection of information about the state of the connection between - * service consumer and provider. + /** + * Get the innerProperties property: The properties of a private endpoint. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.privateLinkServiceConnectionState") - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; + } /** * Get the provisioningState property: The provisioning status of the private endpoint connection. @@ -45,7 +39,7 @@ public class PrivateEndpointConnectionInner extends ProxyResource { * @return the provisioningState value. */ public ProvisioningState provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -54,7 +48,7 @@ public ProvisioningState provisioningState() { * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); } /** @@ -64,7 +58,10 @@ public PrivateEndpoint privateEndpoint() { * @return the PrivateEndpointConnectionInner object itself. */ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); return this; } @@ -75,7 +72,7 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privat * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); } /** @@ -87,7 +84,10 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { */ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); return this; } @@ -97,11 +97,8 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() != null) { - privateLinkServiceConnectionState().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateEndpointConnectionProperties.java new file mode 100644 index 000000000000..8ba865b80894 --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateEndpointConnectionProperties.java @@ -0,0 +1,110 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appconfiguration.models.PrivateEndpoint; +import com.azure.resourcemanager.appconfiguration.models.PrivateLinkServiceConnectionState; +import com.azure.resourcemanager.appconfiguration.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of a private endpoint connection. */ +@Fluent +public final class PrivateEndpointConnectionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionProperties.class); + + /* + * The provisioning status of the private endpoint connection. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The resource of private endpoint. + */ + @JsonProperty(value = "privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between + * service consumer and provider. + */ + @JsonProperty(value = "privateLinkServiceConnectionState", required = true) + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /** + * Get the provisioningState property: The provisioning status of the private endpoint connection. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateEndpoint property: The resource of private endpoint. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: The resource of private endpoint. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property privateLinkServiceConnectionState in model" + + " PrivateEndpointConnectionProperties")); + } else { + privateLinkServiceConnectionState().validate(); + } + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateLinkResourceInner.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateLinkResourceInner.java index a17bdf414771..9b95f222e6e6 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateLinkResourceInner.java @@ -4,17 +4,15 @@ package com.azure.resourcemanager.appconfiguration.fluent.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A resource that supports private link capabilities. */ -@JsonFlatten -@Immutable -public class PrivateLinkResourceInner { +@Fluent +public final class PrivateLinkResourceInner { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class); /* @@ -36,22 +34,10 @@ public class PrivateLinkResourceInner { private String type; /* - * The private link resource group id. + * Private link resource properties. */ - @JsonProperty(value = "properties.groupId", access = JsonProperty.Access.WRITE_ONLY) - private String groupId; - - /* - * The private link resource required member names. - */ - @JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY) - private List requiredMembers; - - /* - * The list of required DNS zone names of the private link resource. - */ - @JsonProperty(value = "properties.requiredZoneNames", access = JsonProperty.Access.WRITE_ONLY) - private List requiredZoneNames; + @JsonProperty(value = "properties") + private PrivateLinkResourceProperties innerProperties; /** * Get the id property: The resource ID. @@ -80,13 +66,22 @@ public String type() { return this.type; } + /** + * Get the innerProperties property: Private link resource properties. + * + * @return the innerProperties value. + */ + private PrivateLinkResourceProperties innerProperties() { + return this.innerProperties; + } + /** * Get the groupId property: The private link resource group id. * * @return the groupId value. */ public String groupId() { - return this.groupId; + return this.innerProperties() == null ? null : this.innerProperties().groupId(); } /** @@ -95,7 +90,7 @@ public String groupId() { * @return the requiredMembers value. */ public List requiredMembers() { - return this.requiredMembers; + return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); } /** @@ -104,7 +99,7 @@ public List requiredMembers() { * @return the requiredZoneNames value. */ public List requiredZoneNames() { - return this.requiredZoneNames; + return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); } /** @@ -113,5 +108,8 @@ public List requiredZoneNames() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateLinkResourceProperties.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateLinkResourceProperties.java new file mode 100644 index 000000000000..f2b63742b202 --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/PrivateLinkResourceProperties.java @@ -0,0 +1,70 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of a private link resource. */ +@Immutable +public final class PrivateLinkResourceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceProperties.class); + + /* + * The private link resource group id. + */ + @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) + private String groupId; + + /* + * The private link resource required member names. + */ + @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) + private List requiredMembers; + + /* + * The list of required DNS zone names of the private link resource. + */ + @JsonProperty(value = "requiredZoneNames", access = JsonProperty.Access.WRITE_ONLY) + private List requiredZoneNames; + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get the requiredZoneNames property: The list of required DNS zone names of the private link resource. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/AppConfigurationManagementClientImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/AppConfigurationManagementClientImpl.java index 64f905576169..e5881397d42b 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/AppConfigurationManagementClientImpl.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/AppConfigurationManagementClientImpl.java @@ -196,7 +196,7 @@ public KeyValuesClient getKeyValues() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-03-01-preview"; + this.apiVersion = "2021-10-01-preview"; this.configurationStores = new ConfigurationStoresClientImpl(this); this.operations = new OperationsClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoreImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoreImpl.java index 770ba479e814..a1dba919f6a1 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoreImpl.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoreImpl.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.appconfiguration.models.ApiKey; import com.azure.resourcemanager.appconfiguration.models.ConfigurationStore; import com.azure.resourcemanager.appconfiguration.models.ConfigurationStoreUpdateParameters; +import com.azure.resourcemanager.appconfiguration.models.CreateMode; import com.azure.resourcemanager.appconfiguration.models.EncryptionProperties; import com.azure.resourcemanager.appconfiguration.models.PrivateEndpointConnectionReference; import com.azure.resourcemanager.appconfiguration.models.ProvisioningState; @@ -101,6 +102,18 @@ public Boolean disableLocalAuth() { return this.innerModel().disableLocalAuth(); } + public Integer softDeleteRetentionInDays() { + return this.innerModel().softDeleteRetentionInDays(); + } + + public Boolean enablePurgeProtection() { + return this.innerModel().enablePurgeProtection(); + } + + public CreateMode createMode() { + return this.innerModel().createMode(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -296,6 +309,21 @@ public ConfigurationStoreImpl withDisableLocalAuth(Boolean disableLocalAuth) { } } + public ConfigurationStoreImpl withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { + this.innerModel().withSoftDeleteRetentionInDays(softDeleteRetentionInDays); + return this; + } + + public ConfigurationStoreImpl withEnablePurgeProtection(Boolean enablePurgeProtection) { + this.innerModel().withEnablePurgeProtection(enablePurgeProtection); + return this; + } + + public ConfigurationStoreImpl withCreateMode(CreateMode createMode) { + this.innerModel().withCreateMode(createMode); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoresClientImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoresClientImpl.java index 683f4bebe36a..057700a73beb 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoresClientImpl.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoresClientImpl.java @@ -37,9 +37,11 @@ import com.azure.resourcemanager.appconfiguration.fluent.ConfigurationStoresClient; import com.azure.resourcemanager.appconfiguration.fluent.models.ApiKeyInner; import com.azure.resourcemanager.appconfiguration.fluent.models.ConfigurationStoreInner; +import com.azure.resourcemanager.appconfiguration.fluent.models.DeletedConfigurationStoreInner; import com.azure.resourcemanager.appconfiguration.models.ApiKeyListResult; import com.azure.resourcemanager.appconfiguration.models.ConfigurationStoreListResult; import com.azure.resourcemanager.appconfiguration.models.ConfigurationStoreUpdateParameters; +import com.azure.resourcemanager.appconfiguration.models.DeletedConfigurationStoreListResult; import com.azure.resourcemanager.appconfiguration.models.RegenerateKeyParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -194,6 +196,47 @@ Mono> regenerateKey( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/deletedConfigurationStores") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDeleted( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/locations/{location}" + + "/deletedConfigurationStores/{configStoreName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDeleted( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @PathParam("configStoreName") String configStoreName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/locations/{location}" + + "/deletedConfigurationStores/{configStoreName}/purge") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> purgeDeleted( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @PathParam("configStoreName") String configStoreName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -223,6 +266,16 @@ Mono> listKeysNext( @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDeletedNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); } /** @@ -234,7 +287,8 @@ Mono> listKeysNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list configuration stores. + * @return the result of a request to list configuration stores along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String skipToken) { @@ -284,7 +338,8 @@ private Mono> listSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list configuration stores. + * @return the result of a request to list configuration stores along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String skipToken, Context context) { @@ -408,7 +463,8 @@ public PagedIterable list(String skipToken, Context con * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list configuration stores. + * @return the result of a request to list configuration stores along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -465,7 +521,8 @@ private Mono> listByResourceGroupSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list configuration stores. + * @return the result of a request to list configuration stores along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -607,7 +664,8 @@ public PagedIterable listByResourceGroup( * @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 properties of the specified configuration store. + * @return the properties of the specified configuration store along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -657,7 +715,8 @@ private Mono> getByResourceGroupWithResponseAs * @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 properties of the specified configuration store. + * @return the properties of the specified configuration store along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -703,7 +762,7 @@ private Mono> getByResourceGroupWithResponseAs * @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 properties of the specified configuration store. + * @return the properties of the specified configuration store on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String configStoreName) { @@ -742,7 +801,7 @@ public ConfigurationStoreInner getByResourceGroup(String resourceGroupName, Stri * @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 properties of the specified configuration store. + * @return the properties of the specified configuration store along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -759,7 +818,8 @@ public Response getByResourceGroupWithResponse( * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -819,7 +879,8 @@ private Mono>> createWithResponseAsync( * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -878,9 +939,10 @@ private Mono>> createWithResponseAsync( * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationStoreInner> beginCreateAsync( String resourceGroupName, String configStoreName, ConfigurationStoreInner configStoreCreationParameters) { Mono>> mono = @@ -892,7 +954,7 @@ private PollerFlux, ConfigurationStoreInner> this.client.getHttpPipeline(), ConfigurationStoreInner.class, ConfigurationStoreInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -905,9 +967,10 @@ private PollerFlux, ConfigurationStoreInner> * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationStoreInner> beginCreateAsync( String resourceGroupName, String configStoreName, @@ -935,9 +998,10 @@ private PollerFlux, ConfigurationStoreInner> * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationStoreInner> beginCreate( String resourceGroupName, String configStoreName, ConfigurationStoreInner configStoreCreationParameters) { return beginCreateAsync(resourceGroupName, configStoreName, configStoreCreationParameters).getSyncPoller(); @@ -953,9 +1017,10 @@ public SyncPoller, ConfigurationStoreInner> * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationStoreInner> beginCreate( String resourceGroupName, String configStoreName, @@ -974,7 +1039,7 @@ public SyncPoller, ConfigurationStoreInner> * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -994,7 +1059,7 @@ private Mono createAsync( * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -1053,7 +1118,7 @@ public ConfigurationStoreInner create( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String configStoreName) { @@ -1102,7 +1167,7 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1148,14 +1213,15 @@ private Mono>> deleteWithResponseAsync( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String configStoreName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, configStoreName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1167,9 +1233,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String configStoreName, Context context) { context = this.client.mergeContext(context); @@ -1187,9 +1253,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String configStoreName) { return beginDeleteAsync(resourceGroupName, configStoreName).getSyncPoller(); } @@ -1203,9 +1269,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String configStoreName, Context context) { return beginDeleteAsync(resourceGroupName, configStoreName, context).getSyncPoller(); @@ -1219,7 +1285,7 @@ public SyncPoller, Void> beginDelete( * @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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String configStoreName) { @@ -1237,7 +1303,7 @@ private Mono deleteAsync(String resourceGroupName, String configStoreName) * @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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String configStoreName, Context context) { @@ -1284,7 +1350,8 @@ public void delete(String resourceGroupName, String configStoreName, Context con * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1346,7 +1413,8 @@ private Mono>> updateWithResponseAsync( * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1405,9 +1473,10 @@ private Mono>> updateWithResponseAsync( * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationStoreInner> beginUpdateAsync( String resourceGroupName, String configStoreName, @@ -1421,7 +1490,7 @@ private PollerFlux, ConfigurationStoreInner> this.client.getHttpPipeline(), ConfigurationStoreInner.class, ConfigurationStoreInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1434,9 +1503,10 @@ private PollerFlux, ConfigurationStoreInner> * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationStoreInner> beginUpdateAsync( String resourceGroupName, String configStoreName, @@ -1464,9 +1534,10 @@ private PollerFlux, ConfigurationStoreInner> * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationStoreInner> beginUpdate( String resourceGroupName, String configStoreName, @@ -1484,9 +1555,10 @@ public SyncPoller, ConfigurationStoreInner> * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationStoreInner> beginUpdate( String resourceGroupName, String configStoreName, @@ -1505,7 +1577,7 @@ public SyncPoller, ConfigurationStoreInner> * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1527,7 +1599,7 @@ private Mono updateAsync( * @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 configuration store along with all resource properties. + * @return the configuration store along with all resource properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1591,7 +1663,8 @@ public ConfigurationStoreInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list API keys. + * @return the result of a request to list API keys along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listKeysSinglePageAsync( @@ -1654,7 +1727,8 @@ private Mono> listKeysSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list API keys. + * @return the result of a request to list API keys along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listKeysSinglePageAsync( @@ -1807,7 +1881,8 @@ public PagedIterable listKeys( * @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 an API key used for authenticating with a configuration store endpoint. + * @return an API key used for authenticating with a configuration store endpoint along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> regenerateKeyWithResponseAsync( @@ -1866,7 +1941,8 @@ private Mono> regenerateKeyWithResponseAsync( * @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 an API key used for authenticating with a configuration store endpoint. + * @return an API key used for authenticating with a configuration store endpoint along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> regenerateKeyWithResponseAsync( @@ -1924,7 +2000,8 @@ private Mono> regenerateKeyWithResponseAsync( * @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 an API key used for authenticating with a configuration store endpoint. + * @return an API key used for authenticating with a configuration store endpoint on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono regenerateKeyAsync( @@ -1967,7 +2044,7 @@ public ApiKeyInner regenerateKey( * @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 an API key used for authenticating with a configuration store endpoint. + * @return an API key used for authenticating with a configuration store endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response regenerateKeyWithResponse( @@ -1980,29 +2057,39 @@ public Response regenerateKeyWithResponse( } /** - * Get the next page of items. + * Gets information about the deleted configuration stores in a subscription. * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list configuration stores. + * @return information about the deleted configuration stores in a subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } + private Mono> listDeletedSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .withContext( + context -> + service + .listDeleted( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context)) + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -2015,30 +2102,38 @@ private Mono> listNextSinglePageAsync(Str } /** - * Get the next page of items. + * Gets information about the deleted configuration stores in a subscription. * - * @param nextLink The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list configuration stores. + * @return information about the deleted configuration stores in a subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } + private Mono> listDeletedSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) + .listDeleted( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context) .map( res -> new PagedResponseBase<>( @@ -2051,138 +2146,721 @@ private Mono> listNextSinglePageAsync(Str } /** - * Get the next page of items. + * Gets information about the deleted configuration stores in a subscription. * - * @param nextLink The nextLink parameter. + * @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 information about the deleted configuration stores in a subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDeletedAsync() { + return new PagedFlux<>( + () -> listDeletedSinglePageAsync(), nextLink -> listDeletedNextSinglePageAsync(nextLink)); + } + + /** + * Gets information about the deleted configuration stores in a subscription. + * + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list configuration stores. + * @return information about the deleted configuration stores in a subscription. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDeletedAsync(Context context) { + return new PagedFlux<>( + () -> listDeletedSinglePageAsync(context), nextLink -> listDeletedNextSinglePageAsync(nextLink, context)); } /** - * Get the next page of items. + * Gets information about the deleted configuration stores in a subscription. + * + * @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 information about the deleted configuration stores in a subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeleted() { + return new PagedIterable<>(listDeletedAsync()); + } + + /** + * Gets information about the deleted configuration stores in a subscription. * - * @param nextLink The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list configuration stores. + * @return information about the deleted configuration stores in a subscription. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeleted(Context context) { + return new PagedIterable<>(listDeletedAsync(context)); } /** - * Get the next page of items. + * Gets a deleted Azure app configuration store. * - * @param nextLink The nextLink parameter. + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list API keys. + * @return a deleted Azure app configuration store along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } + private Mono> getDeletedWithResponseAsync( + String location, String configStoreName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (configStoreName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configStoreName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listKeysNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext( + context -> + service + .getDeleted( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + location, + configStoreName, + accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get the next page of items. + * Gets a deleted Azure app configuration store. * - * @param nextLink The nextLink parameter. + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list API keys. + * @return a deleted Azure app configuration store along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } + private Mono> getDeletedWithResponseAsync( + String location, String configStoreName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listKeysNext(nextLink, this.client.getEndpoint(), accept, context) + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (configStoreName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configStoreName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getDeleted( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + location, + configStoreName, + accept, + context); + } + + /** + * Gets a deleted Azure app configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a deleted Azure app configuration store on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeletedAsync(String location, String configStoreName) { + return getDeletedWithResponseAsync(location, configStoreName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a deleted Azure app configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a deleted Azure app configuration store. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeletedConfigurationStoreInner getDeleted(String location, String configStoreName) { + return getDeletedAsync(location, configStoreName).block(); + } + + /** + * Gets a deleted Azure app configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a deleted Azure app configuration store along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeletedWithResponse( + String location, String configStoreName, Context context) { + return getDeletedWithResponseAsync(location, configStoreName, context).block(); + } + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> purgeDeletedWithResponseAsync(String location, String configStoreName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (configStoreName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configStoreName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .purgeDeleted( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + location, + configStoreName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> purgeDeletedWithResponseAsync( + String location, String configStoreName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (configStoreName == null) { + return Mono + .error(new IllegalArgumentException("Parameter configStoreName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .purgeDeleted( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + location, + configStoreName, + accept, + context); + } + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginPurgeDeletedAsync(String location, String configStoreName) { + Mono>> mono = purgeDeletedWithResponseAsync(location, configStoreName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginPurgeDeletedAsync( + String location, String configStoreName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = purgeDeletedWithResponseAsync(location, configStoreName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginPurgeDeleted(String location, String configStoreName) { + return beginPurgeDeletedAsync(location, configStoreName).getSyncPoller(); + } + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginPurgeDeleted( + String location, String configStoreName, Context context) { + return beginPurgeDeletedAsync(location, configStoreName, context).getSyncPoller(); + } + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono purgeDeletedAsync(String location, String configStoreName) { + return beginPurgeDeletedAsync(location, configStoreName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono purgeDeletedAsync(String location, String configStoreName, Context context) { + return beginPurgeDeletedAsync(location, configStoreName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void purgeDeleted(String location, String configStoreName) { + purgeDeletedAsync(location, configStoreName).block(); + } + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void purgeDeleted(String location, String configStoreName, Context context) { + purgeDeletedAsync(location, configStoreName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list configuration stores along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list configuration stores along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list configuration stores along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list configuration stores along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list API keys along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listKeysNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list API keys along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listKeysNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @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 list of deleted configuration stores along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeletedNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDeletedNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of deleted configuration stores along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeletedNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listDeletedNext(nextLink, this.client.getEndpoint(), accept, context) .map( res -> new PagedResponseBase<>( diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoresImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoresImpl.java index 6bf62e459243..12f689f49a33 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoresImpl.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoresImpl.java @@ -12,9 +12,11 @@ import com.azure.resourcemanager.appconfiguration.fluent.ConfigurationStoresClient; import com.azure.resourcemanager.appconfiguration.fluent.models.ApiKeyInner; import com.azure.resourcemanager.appconfiguration.fluent.models.ConfigurationStoreInner; +import com.azure.resourcemanager.appconfiguration.fluent.models.DeletedConfigurationStoreInner; import com.azure.resourcemanager.appconfiguration.models.ApiKey; import com.azure.resourcemanager.appconfiguration.models.ConfigurationStore; import com.azure.resourcemanager.appconfiguration.models.ConfigurationStores; +import com.azure.resourcemanager.appconfiguration.models.DeletedConfigurationStore; import com.azure.resourcemanager.appconfiguration.models.RegenerateKeyParameters; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -129,6 +131,48 @@ public Response regenerateKeyWithResponse( } } + public PagedIterable listDeleted() { + PagedIterable inner = this.serviceClient().listDeleted(); + return Utils.mapPage(inner, inner1 -> new DeletedConfigurationStoreImpl(inner1, this.manager())); + } + + public PagedIterable listDeleted(Context context) { + PagedIterable inner = this.serviceClient().listDeleted(context); + return Utils.mapPage(inner, inner1 -> new DeletedConfigurationStoreImpl(inner1, this.manager())); + } + + public DeletedConfigurationStore getDeleted(String location, String configStoreName) { + DeletedConfigurationStoreInner inner = this.serviceClient().getDeleted(location, configStoreName); + if (inner != null) { + return new DeletedConfigurationStoreImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDeletedWithResponse( + String location, String configStoreName, Context context) { + Response inner = + this.serviceClient().getDeletedWithResponse(location, configStoreName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeletedConfigurationStoreImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void purgeDeleted(String location, String configStoreName) { + this.serviceClient().purgeDeleted(location, configStoreName); + } + + public void purgeDeleted(String location, String configStoreName, Context context) { + this.serviceClient().purgeDeleted(location, configStoreName, context); + } + public ConfigurationStore getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/DeletedConfigurationStoreImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/DeletedConfigurationStoreImpl.java new file mode 100644 index 000000000000..30d65aa6049d --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/DeletedConfigurationStoreImpl.java @@ -0,0 +1,73 @@ +// 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.implementation; + +import com.azure.resourcemanager.appconfiguration.fluent.models.DeletedConfigurationStoreInner; +import com.azure.resourcemanager.appconfiguration.models.DeletedConfigurationStore; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; + +public final class DeletedConfigurationStoreImpl implements DeletedConfigurationStore { + private DeletedConfigurationStoreInner innerObject; + + private final com.azure.resourcemanager.appconfiguration.AppConfigurationManager serviceManager; + + DeletedConfigurationStoreImpl( + DeletedConfigurationStoreInner innerObject, + com.azure.resourcemanager.appconfiguration.AppConfigurationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String configurationStoreId() { + return this.innerModel().configurationStoreId(); + } + + public String location() { + return this.innerModel().location(); + } + + public OffsetDateTime deletionDate() { + return this.innerModel().deletionDate(); + } + + public OffsetDateTime scheduledPurgeDate() { + return this.innerModel().scheduledPurgeDate(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Boolean purgeProtectionEnabled() { + return this.innerModel().purgeProtectionEnabled(); + } + + public DeletedConfigurationStoreInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/KeyValuesClientImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/KeyValuesClientImpl.java index f3850be2ae7d..831f17f5a06b 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/KeyValuesClientImpl.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/KeyValuesClientImpl.java @@ -154,7 +154,8 @@ Mono> listByConfigurationStoreNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list key-values. + * @return the result of a request to list key-values along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByConfigurationStoreSinglePageAsync( @@ -217,7 +218,8 @@ private Mono> listByConfigurationStoreSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list key-values. + * @return the result of a request to list key-values along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByConfigurationStoreSinglePageAsync( @@ -373,7 +375,8 @@ public PagedIterable listByConfigurationStore( * @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 properties of the specified key-value. + * @return the properties of the specified key-value along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -429,7 +432,8 @@ private Mono> getWithResponseAsync( * @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 properties of the specified key-value. + * @return the properties of the specified key-value along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -481,7 +485,7 @@ private Mono> getWithResponseAsync( * @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 properties of the specified key-value. + * @return the properties of the specified key-value on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String configStoreName, String keyValueName) { @@ -524,7 +528,7 @@ public KeyValueInner get(String resourceGroupName, String configStoreName, Strin * @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 properties of the specified key-value. + * @return the properties of the specified key-value along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -543,7 +547,8 @@ public Response getWithResponse( * @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. + * @return the key-value resource along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -604,7 +609,8 @@ private Mono> createOrUpdateWithResponseAsync( * @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. + * @return the key-value resource along with all resource properties along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -665,7 +671,7 @@ private Mono> createOrUpdateWithResponseAsync( * @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. + * @return the key-value resource along with all resource properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -691,7 +697,7 @@ private Mono createOrUpdateAsync( * @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. + * @return the key-value resource along with all resource properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -738,7 +744,7 @@ public KeyValueInner createOrUpdate(String resourceGroupName, String configStore * @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. + * @return the key-value resource along with all resource properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -762,7 +768,7 @@ public Response createOrUpdateWithResponse( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -818,7 +824,7 @@ private Mono>> deleteWithResponseAsync( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -870,16 +876,17 @@ private Mono>> deleteWithResponseAsync( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String configStoreName, String keyValueName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, configStoreName, keyValueName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -893,9 +900,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String configStoreName, String keyValueName, Context context) { context = this.client.mergeContext(context); @@ -916,9 +923,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String configStoreName, String keyValueName) { return beginDeleteAsync(resourceGroupName, configStoreName, keyValueName).getSyncPoller(); @@ -935,9 +942,9 @@ public SyncPoller, Void> beginDelete( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String configStoreName, String keyValueName, Context context) { return beginDeleteAsync(resourceGroupName, configStoreName, keyValueName, context).getSyncPoller(); @@ -953,7 +960,7 @@ public SyncPoller, Void> beginDelete( * @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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String configStoreName, String keyValueName) { @@ -973,7 +980,7 @@ private Mono deleteAsync(String resourceGroupName, String configStoreName, * @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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1023,7 +1030,8 @@ public void delete(String resourceGroupName, String configStoreName, String keyV * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list key-values. + * @return the result of a request to list key-values along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByConfigurationStoreNextSinglePageAsync(String nextLink) { @@ -1060,7 +1068,8 @@ private Mono> listByConfigurationStoreNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list key-values. + * @return the result of a request to list key-values along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByConfigurationStoreNextSinglePageAsync( diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsClientImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsClientImpl.java index a0a02c4020f1..f41395bbf89e 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsClientImpl.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsClientImpl.java @@ -86,6 +86,21 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/locations/{location}" + + "/checkNameAvailability") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> regionalCheckNameAvailability( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CheckNameAvailabilityParameters checkNameAvailabilityParameters, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -104,7 +119,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to check the availability of a resource name. + * @return the result of a request to check the availability of a resource name along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -152,7 +168,8 @@ private Mono> checkNameAvailabilityWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to check the availability of a resource name. + * @return the result of a request to check the availability of a resource name along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -196,7 +213,8 @@ private Mono> checkNameAvailabilityWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to check the availability of a resource name. + * @return the result of a request to check the availability of a resource name on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkNameAvailabilityAsync( @@ -235,7 +253,7 @@ public NameAvailabilityStatusInner checkNameAvailability( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to check the availability of a resource name. + * @return the result of a request to check the availability of a resource name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response checkNameAvailabilityWithResponse( @@ -252,7 +270,8 @@ public Response checkNameAvailabilityWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list configuration store operations. + * @return the result of a request to list configuration store operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String skipToken) { @@ -289,7 +308,8 @@ private Mono> listSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list configuration store operations. + * @return the result of a request to list configuration store operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String skipToken, Context context) { @@ -391,6 +411,169 @@ public PagedIterable list(String skipToken, Context co return new PagedIterable<>(listAsync(skipToken, context)); } + /** + * Checks whether the configuration store name is available for use. + * + * @param location The location in which uniqueness will be verified. + * @param checkNameAvailabilityParameters The object containing information for the availability request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to check the availability of a resource name along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> regionalCheckNameAvailabilityWithResponseAsync( + String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (checkNameAvailabilityParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter checkNameAvailabilityParameters is required and cannot be null.")); + } else { + checkNameAvailabilityParameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .regionalCheckNameAvailability( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + this.client.getApiVersion(), + checkNameAvailabilityParameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks whether the configuration store name is available for use. + * + * @param location The location in which uniqueness will be verified. + * @param checkNameAvailabilityParameters The object containing information for the availability request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to check the availability of a resource name along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> regionalCheckNameAvailabilityWithResponseAsync( + String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (checkNameAvailabilityParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter checkNameAvailabilityParameters is required and cannot be null.")); + } else { + checkNameAvailabilityParameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .regionalCheckNameAvailability( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + this.client.getApiVersion(), + checkNameAvailabilityParameters, + accept, + context); + } + + /** + * Checks whether the configuration store name is available for use. + * + * @param location The location in which uniqueness will be verified. + * @param checkNameAvailabilityParameters The object containing information for the availability request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to check the availability of a resource name on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono regionalCheckNameAvailabilityAsync( + String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters) { + return regionalCheckNameAvailabilityWithResponseAsync(location, checkNameAvailabilityParameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Checks whether the configuration store name is available for use. + * + * @param location The location in which uniqueness will be verified. + * @param checkNameAvailabilityParameters The object containing information for the availability request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to check the availability of a resource name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NameAvailabilityStatusInner regionalCheckNameAvailability( + String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters) { + return regionalCheckNameAvailabilityAsync(location, checkNameAvailabilityParameters).block(); + } + + /** + * Checks whether the configuration store name is available for use. + * + * @param location The location in which uniqueness will be verified. + * @param checkNameAvailabilityParameters The object containing information for the availability request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to check the availability of a resource name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response regionalCheckNameAvailabilityWithResponse( + String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) { + return regionalCheckNameAvailabilityWithResponseAsync(location, checkNameAvailabilityParameters, context) + .block(); + } + /** * Get the next page of items. * @@ -398,7 +581,8 @@ public PagedIterable list(String skipToken, Context co * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list configuration store operations. + * @return the result of a request to list configuration store operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -434,7 +618,8 @@ private Mono> listNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list configuration store operations. + * @return the result of a request to list configuration store operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsImpl.java index 7cab13a03823..c6d39a0d7eac 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsImpl.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/OperationsImpl.java @@ -67,6 +67,34 @@ public PagedIterable list(String skipToken, Context context return Utils.mapPage(inner, inner1 -> new OperationDefinitionImpl(inner1, this.manager())); } + public NameAvailabilityStatus regionalCheckNameAvailability( + String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters) { + NameAvailabilityStatusInner inner = + this.serviceClient().regionalCheckNameAvailability(location, checkNameAvailabilityParameters); + if (inner != null) { + return new NameAvailabilityStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response regionalCheckNameAvailabilityWithResponse( + String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) { + Response inner = + this + .serviceClient() + .regionalCheckNameAvailabilityWithResponse(location, checkNameAvailabilityParameters, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new NameAvailabilityStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + private OperationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateEndpointConnectionsClientImpl.java index f00c5bb41189..26b977dfd756 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateEndpointConnectionsClientImpl.java @@ -152,7 +152,8 @@ Mono> listByConfigurationStoreNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections. + * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByConfigurationStoreSinglePageAsync( @@ -211,7 +212,8 @@ private Mono> listByConfigurationS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections. + * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByConfigurationStoreSinglePageAsync( @@ -337,7 +339,8 @@ public PagedIterable listByConfigurationStore( * @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 specified private endpoint connection associated with the configuration store. + * @return the specified private endpoint connection associated with the configuration store along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -395,7 +398,8 @@ private Mono> getWithResponseAsync( * @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 specified private endpoint connection associated with the configuration store. + * @return the specified private endpoint connection associated with the configuration store along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -449,7 +453,8 @@ private Mono> getWithResponseAsync( * @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 specified private endpoint connection associated with the configuration store. + * @return the specified private endpoint connection associated with the configuration store on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -492,7 +497,8 @@ public PrivateEndpointConnectionInner get( * @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 specified private endpoint connection associated with the configuration store. + * @return the specified private endpoint connection associated with the configuration store along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -510,7 +516,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -581,7 +587,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -649,9 +655,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -668,7 +674,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -682,9 +688,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -716,9 +722,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String configStoreName, @@ -740,9 +746,9 @@ public SyncPoller, PrivateEndpointCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String configStoreName, @@ -764,7 +770,7 @@ public SyncPoller, PrivateEndpointCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -789,7 +795,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -861,7 +867,7 @@ public PrivateEndpointConnectionInner createOrUpdate( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -919,7 +925,7 @@ private Mono>> deleteWithResponseAsync( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -973,16 +979,17 @@ private Mono>> deleteWithResponseAsync( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String configStoreName, String privateEndpointConnectionName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, configStoreName, privateEndpointConnectionName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -995,9 +1002,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String configStoreName, String privateEndpointConnectionName, Context context) { context = this.client.mergeContext(context); @@ -1017,9 +1024,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String configStoreName, String privateEndpointConnectionName) { return beginDeleteAsync(resourceGroupName, configStoreName, privateEndpointConnectionName).getSyncPoller(); @@ -1035,9 +1042,9 @@ public SyncPoller, Void> beginDelete( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String configStoreName, String privateEndpointConnectionName, Context context) { return beginDeleteAsync(resourceGroupName, configStoreName, privateEndpointConnectionName, context) @@ -1053,7 +1060,7 @@ public SyncPoller, Void> beginDelete( * @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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1073,7 +1080,7 @@ private Mono deleteAsync( * @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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1122,7 +1129,8 @@ public void delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections. + * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByConfigurationStoreNextSinglePageAsync( @@ -1160,7 +1168,8 @@ private Mono> listByConfigurationS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections. + * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByConfigurationStoreNextSinglePageAsync( diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateLinkResourcesClientImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateLinkResourcesClientImpl.java index e72839cc548c..c2ed366a2565 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/PrivateLinkResourcesClientImpl.java @@ -110,7 +110,8 @@ Mono> listByConfigurationStoreNext( * @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 private link resources that need to be created for a configuration store. + * @return the private link resources that need to be created for a configuration store along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByConfigurationStoreSinglePageAsync( @@ -169,7 +170,8 @@ private Mono> listByConfigurationStoreSi * @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 private link resources that need to be created for a configuration store. + * @return the private link resources that need to be created for a configuration store along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByConfigurationStoreSinglePageAsync( @@ -295,7 +297,8 @@ public PagedIterable listByConfigurationStore( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private link resource that need to be created for a configuration store. + * @return a private link resource that need to be created for a configuration store along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -350,7 +353,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private link resource that need to be created for a configuration store. + * @return a private link resource that need to be created for a configuration store along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -401,7 +405,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private link resource that need to be created for a configuration store. + * @return a private link resource that need to be created for a configuration store on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -443,7 +448,7 @@ public PrivateLinkResourceInner get(String resourceGroupName, String configStore * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private link resource that need to be created for a configuration store. + * @return a private link resource that need to be created for a configuration store along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -458,7 +463,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByConfigurationStoreNextSinglePageAsync(String nextLink) { @@ -495,7 +501,8 @@ private Mono> listByConfigurationStoreNe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByConfigurationStoreNextSinglePageAsync( 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 aaacf1eb03fa..b33b7f795a3f 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 @@ -123,6 +123,29 @@ public interface ConfigurationStore { */ Boolean disableLocalAuth(); + /** + * Gets the softDeleteRetentionInDays property: The amount of time in days that the configuration store will be + * retained when it is soft deleted. + * + * @return the softDeleteRetentionInDays value. + */ + Integer softDeleteRetentionInDays(); + + /** + * Gets the enablePurgeProtection property: Property specifying whether protection against purge is enabled for this + * configuration store. + * + * @return the enablePurgeProtection value. + */ + Boolean enablePurgeProtection(); + + /** + * Gets the createMode property: Indicates whether the configuration store need to be recovered. + * + * @return the createMode value. + */ + CreateMode createMode(); + /** * Gets the region of the resource. * @@ -204,7 +227,10 @@ interface WithCreate DefinitionStages.WithIdentity, DefinitionStages.WithEncryption, DefinitionStages.WithPublicNetworkAccess, - DefinitionStages.WithDisableLocalAuth { + DefinitionStages.WithDisableLocalAuth, + DefinitionStages.WithSoftDeleteRetentionInDays, + DefinitionStages.WithEnablePurgeProtection, + DefinitionStages.WithCreateMode { /** * Executes the create request. * @@ -273,6 +299,40 @@ interface WithDisableLocalAuth { */ WithCreate withDisableLocalAuth(Boolean disableLocalAuth); } + /** The stage of the ConfigurationStore definition allowing to specify softDeleteRetentionInDays. */ + interface WithSoftDeleteRetentionInDays { + /** + * Specifies the softDeleteRetentionInDays property: The amount of time in days that the configuration store + * will be retained when it is soft deleted.. + * + * @param softDeleteRetentionInDays The amount of time in days that the configuration store will be retained + * when it is soft deleted. + * @return the next definition stage. + */ + WithCreate withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays); + } + /** The stage of the ConfigurationStore definition allowing to specify enablePurgeProtection. */ + interface WithEnablePurgeProtection { + /** + * Specifies the enablePurgeProtection property: Property specifying whether protection against purge is + * enabled for this configuration store.. + * + * @param enablePurgeProtection Property specifying whether protection against purge is enabled for this + * configuration store. + * @return the next definition stage. + */ + WithCreate withEnablePurgeProtection(Boolean enablePurgeProtection); + } + /** The stage of the ConfigurationStore definition allowing to specify createMode. */ + interface WithCreateMode { + /** + * Specifies the createMode property: Indicates whether the configuration store need to be recovered.. + * + * @param createMode Indicates whether the configuration store need to be recovered. + * @return the next definition stage. + */ + WithCreate withCreateMode(CreateMode createMode); + } } /** * Begins update for the ConfigurationStore resource. @@ -427,7 +487,7 @@ interface WithPublicNetworkAccess { * @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 an API key used for authenticating with a configuration store endpoint. + * @return an API key used for authenticating with a configuration store endpoint along with {@link Response}. */ Response regenerateKeyWithResponse(RegenerateKeyParameters regenerateKeyParameters, Context context); } 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 89d50d964f44..8644ef680b7a 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 @@ -5,18 +5,24 @@ package com.azure.resourcemanager.appconfiguration.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appconfiguration.fluent.models.ConfigurationStorePropertiesUpdateParameters; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** The parameters for updating a configuration store. */ -@JsonFlatten @Fluent -public class ConfigurationStoreUpdateParameters { +public final class ConfigurationStoreUpdateParameters { @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationStoreUpdateParameters.class); + /* + * The properties for updating a configuration store. + */ + @JsonProperty(value = "properties") + private ConfigurationStorePropertiesUpdateParameters innerProperties; + /* * The managed identity information for the configuration store. */ @@ -33,26 +39,17 @@ public class ConfigurationStoreUpdateParameters { * The ARM resource tags. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /* - * The encryption settings of the configuration store. - */ - @JsonProperty(value = "properties.encryption") - private EncryptionProperties encryption; - - /* - * Disables all authentication methods other than AAD authentication. - */ - @JsonProperty(value = "properties.disableLocalAuth") - private Boolean disableLocalAuth; - - /* - * Control permission for data plane traffic coming from public networks - * while private endpoint is enabled. + /** + * Get the innerProperties property: The properties for updating a configuration store. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; + private ConfigurationStorePropertiesUpdateParameters innerProperties() { + return this.innerProperties; + } /** * Get the identity property: The managed identity information for the configuration store. @@ -120,7 +117,7 @@ public ConfigurationStoreUpdateParameters withTags(Map tags) { * @return the encryption value. */ public EncryptionProperties encryption() { - return this.encryption; + return this.innerProperties() == null ? null : this.innerProperties().encryption(); } /** @@ -130,7 +127,10 @@ public EncryptionProperties encryption() { * @return the ConfigurationStoreUpdateParameters object itself. */ public ConfigurationStoreUpdateParameters withEncryption(EncryptionProperties encryption) { - this.encryption = encryption; + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationStorePropertiesUpdateParameters(); + } + this.innerProperties().withEncryption(encryption); return this; } @@ -140,7 +140,7 @@ public ConfigurationStoreUpdateParameters withEncryption(EncryptionProperties en * @return the disableLocalAuth value. */ public Boolean disableLocalAuth() { - return this.disableLocalAuth; + return this.innerProperties() == null ? null : this.innerProperties().disableLocalAuth(); } /** @@ -150,7 +150,10 @@ public Boolean disableLocalAuth() { * @return the ConfigurationStoreUpdateParameters object itself. */ public ConfigurationStoreUpdateParameters withDisableLocalAuth(Boolean disableLocalAuth) { - this.disableLocalAuth = disableLocalAuth; + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationStorePropertiesUpdateParameters(); + } + this.innerProperties().withDisableLocalAuth(disableLocalAuth); return this; } @@ -161,7 +164,7 @@ public ConfigurationStoreUpdateParameters withDisableLocalAuth(Boolean disableLo * @return the publicNetworkAccess value. */ public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); } /** @@ -172,7 +175,10 @@ public PublicNetworkAccess publicNetworkAccess() { * @return the ConfigurationStoreUpdateParameters object itself. */ public ConfigurationStoreUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationStorePropertiesUpdateParameters(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); return this; } @@ -182,14 +188,14 @@ public ConfigurationStoreUpdateParameters withPublicNetworkAccess(PublicNetworkA * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } if (identity() != null) { identity().validate(); } if (sku() != null) { sku().validate(); } - if (encryption() != null) { - encryption().validate(); - } } } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ConfigurationStores.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ConfigurationStores.java index a2c5bc948b17..42fce571d0ac 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ConfigurationStores.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ConfigurationStores.java @@ -80,7 +80,7 @@ public interface ConfigurationStores { * @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 properties of the specified configuration store. + * @return the properties of the specified configuration store along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String configStoreName, Context context); @@ -160,7 +160,7 @@ ApiKey regenerateKey( * @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 an API key used for authenticating with a configuration store endpoint. + * @return an API key used for authenticating with a configuration store endpoint along with {@link Response}. */ Response regenerateKeyWithResponse( String resourceGroupName, @@ -168,6 +168,75 @@ Response regenerateKeyWithResponse( RegenerateKeyParameters regenerateKeyParameters, Context context); + /** + * Gets information about the deleted configuration stores in a subscription. + * + * @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 information about the deleted configuration stores in a subscription. + */ + PagedIterable listDeleted(); + + /** + * Gets information about the deleted configuration stores in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the deleted configuration stores in a subscription. + */ + PagedIterable listDeleted(Context context); + + /** + * Gets a deleted Azure app configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @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 a deleted Azure app configuration store. + */ + DeletedConfigurationStore getDeleted(String location, String configStoreName); + + /** + * Gets a deleted Azure app configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a deleted Azure app configuration store along with {@link Response}. + */ + Response getDeletedWithResponse( + String location, String configStoreName, Context context); + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void purgeDeleted(String location, String configStoreName); + + /** + * Permanently deletes the specified configuration store. + * + * @param location The location in which uniqueness will be verified. + * @param configStoreName The name of the configuration store. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void purgeDeleted(String location, String configStoreName, Context context); + /** * Gets the properties of the specified configuration store. * @@ -175,7 +244,7 @@ Response regenerateKeyWithResponse( * @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 properties of the specified configuration store. + * @return the properties of the specified configuration store along with {@link Response}. */ ConfigurationStore getById(String id); @@ -187,7 +256,7 @@ Response regenerateKeyWithResponse( * @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 properties of the specified configuration store. + * @return the properties of the specified configuration store along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/CreateMode.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/CreateMode.java new file mode 100644 index 000000000000..b01485e092ec --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/CreateMode.java @@ -0,0 +1,47 @@ +// 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.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for CreateMode. */ +public enum CreateMode { + /** Enum value Recover. */ + RECOVER("Recover"), + + /** Enum value Default. */ + DEFAULT("Default"); + + /** The actual serialized value for a CreateMode instance. */ + private final String value; + + CreateMode(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CreateMode instance. + * + * @param value the serialized value to parse. + * @return the parsed CreateMode object, or null if unable to parse. + */ + @JsonCreator + public static CreateMode fromString(String value) { + CreateMode[] items = CreateMode.values(); + for (CreateMode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/DeletedConfigurationStore.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/DeletedConfigurationStore.java new file mode 100644 index 000000000000..5a16f89f072b --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/DeletedConfigurationStore.java @@ -0,0 +1,82 @@ +// 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.models; + +import com.azure.resourcemanager.appconfiguration.fluent.models.DeletedConfigurationStoreInner; +import java.time.OffsetDateTime; +import java.util.Map; + +/** An immutable client-side representation of DeletedConfigurationStore. */ +public interface DeletedConfigurationStore { + /** + * Gets the id property: The resource ID for the deleted configuration store. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the configuration store. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The resource type of the configuration store. + * + * @return the type value. + */ + String type(); + + /** + * Gets the configurationStoreId property: The resource id of the original configuration store. + * + * @return the configurationStoreId value. + */ + String configurationStoreId(); + + /** + * Gets the location property: The location of the original configuration store. + * + * @return the location value. + */ + String location(); + + /** + * Gets the deletionDate property: The deleted date. + * + * @return the deletionDate value. + */ + OffsetDateTime deletionDate(); + + /** + * Gets the scheduledPurgeDate property: The scheduled purged date. + * + * @return the scheduledPurgeDate value. + */ + OffsetDateTime scheduledPurgeDate(); + + /** + * Gets the tags property: Tags of the original configuration store. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the purgeProtectionEnabled property: Purge protection status of the original configuration store. + * + * @return the purgeProtectionEnabled value. + */ + Boolean purgeProtectionEnabled(); + + /** + * Gets the inner com.azure.resourcemanager.appconfiguration.fluent.models.DeletedConfigurationStoreInner object. + * + * @return the inner object. + */ + DeletedConfigurationStoreInner innerModel(); +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/DeletedConfigurationStoreListResult.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/DeletedConfigurationStoreListResult.java new file mode 100644 index 000000000000..6f21ac3c6561 --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/DeletedConfigurationStoreListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appconfiguration.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appconfiguration.fluent.models.DeletedConfigurationStoreInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of deleted configuration stores. */ +@Fluent +public final class DeletedConfigurationStoreListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeletedConfigurationStoreListResult.class); + + /* + * The list of deleted configuration store. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of deleted configuration stores. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: The list of deleted configuration store. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of deleted configuration store. + * + * @param value the value value to set. + * @return the DeletedConfigurationStoreListResult object itself. + */ + public DeletedConfigurationStoreListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of deleted configuration stores. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URL to get the next set of deleted configuration stores. + * + * @param nextLink the nextLink value to set. + * @return the DeletedConfigurationStoreListResult object itself. + */ + public DeletedConfigurationStoreListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/KeyValues.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/KeyValues.java index 6d86e0a29232..a3062c370350 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/KeyValues.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/KeyValues.java @@ -64,7 +64,7 @@ PagedIterable listByConfigurationStore( * @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 properties of the specified key-value. + * @return the properties of the specified key-value along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String configStoreName, String keyValueName, Context context); @@ -103,7 +103,7 @@ Response getWithResponse( * @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 properties of the specified key-value. + * @return the properties of the specified key-value along with {@link Response}. */ KeyValue getById(String id); @@ -115,7 +115,7 @@ Response getWithResponse( * @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 properties of the specified key-value. + * @return the properties of the specified key-value along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/Operations.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/Operations.java index a3a07b4efef1..71e5423ee73f 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/Operations.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/Operations.java @@ -29,7 +29,7 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to check the availability of a resource name. + * @return the result of a request to check the availability of a resource name along with {@link Response}. */ Response checkNameAvailabilityWithResponse( CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context); @@ -56,4 +56,31 @@ Response checkNameAvailabilityWithResponse( * @return the result of a request to list configuration store operations. */ PagedIterable list(String skipToken, Context context); + + /** + * Checks whether the configuration store name is available for use. + * + * @param location The location in which uniqueness will be verified. + * @param checkNameAvailabilityParameters The object containing information for the availability request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to check the availability of a resource name. + */ + NameAvailabilityStatus regionalCheckNameAvailability( + String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters); + + /** + * Checks whether the configuration store name is available for use. + * + * @param location The location in which uniqueness will be verified. + * @param checkNameAvailabilityParameters The object containing information for the availability request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to check the availability of a resource name along with {@link Response}. + */ + Response regionalCheckNameAvailabilityWithResponse( + String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context); } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateEndpointConnectionReference.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateEndpointConnectionReference.java index 2c83aa6964f4..aa0f1cd11001 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateEndpointConnectionReference.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateEndpointConnectionReference.java @@ -5,15 +5,14 @@ package com.azure.resourcemanager.appconfiguration.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appconfiguration.fluent.models.PrivateEndpointConnectionProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A reference to a related private endpoint connection. */ -@JsonFlatten @Fluent -public class PrivateEndpointConnectionReference { +public final class PrivateEndpointConnectionReference { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionReference.class); /* @@ -35,23 +34,10 @@ public class PrivateEndpointConnectionReference { private String type; /* - * The provisioning status of the private endpoint connection. + * The properties of a private endpoint connection. */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The resource of private endpoint. - */ - @JsonProperty(value = "properties.privateEndpoint") - private PrivateEndpoint privateEndpoint; - - /* - * A collection of information about the state of the connection between - * service consumer and provider. - */ - @JsonProperty(value = "properties.privateLinkServiceConnectionState") - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + @JsonProperty(value = "properties") + private PrivateEndpointConnectionProperties innerProperties; /** * Get the id property: The resource ID. @@ -80,13 +66,22 @@ public String type() { return this.type; } + /** + * Get the innerProperties property: The properties of a private endpoint connection. + * + * @return the innerProperties value. + */ + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; + } + /** * Get the provisioningState property: The provisioning status of the private endpoint connection. * * @return the provisioningState value. */ public ProvisioningState provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -95,7 +90,7 @@ public ProvisioningState provisioningState() { * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); } /** @@ -105,7 +100,10 @@ public PrivateEndpoint privateEndpoint() { * @return the PrivateEndpointConnectionReference object itself. */ public PrivateEndpointConnectionReference withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); return this; } @@ -116,7 +114,7 @@ public PrivateEndpointConnectionReference withPrivateEndpoint(PrivateEndpoint pr * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); } /** @@ -128,7 +126,10 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { */ public PrivateEndpointConnectionReference withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); return this; } @@ -138,11 +139,8 @@ public PrivateEndpointConnectionReference withPrivateLinkServiceConnectionState( * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() != null) { - privateLinkServiceConnectionState().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateEndpointConnections.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateEndpointConnections.java index 4206b306d5d4..7c6973143021 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateEndpointConnections.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateEndpointConnections.java @@ -60,7 +60,8 @@ PrivateEndpointConnection get( * @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 specified private endpoint connection associated with the configuration store. + * @return the specified private endpoint connection associated with the configuration store along with {@link + * Response}. */ Response getWithResponse( String resourceGroupName, String configStoreName, String privateEndpointConnectionName, Context context); @@ -98,7 +99,8 @@ void delete( * @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 specified private endpoint connection associated with the configuration store. + * @return the specified private endpoint connection associated with the configuration store along with {@link + * Response}. */ PrivateEndpointConnection getById(String id); @@ -110,7 +112,8 @@ void delete( * @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 specified private endpoint connection associated with the configuration store. + * @return the specified private endpoint connection associated with the configuration store along with {@link + * Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateLinkResources.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateLinkResources.java index 1bd480ced58e..a29521816613 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateLinkResources.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateLinkResources.java @@ -59,7 +59,7 @@ PagedIterable listByConfigurationStore( * @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 a private link resource that need to be created for a configuration store. + * @return a private link resource that need to be created for a configuration store along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String configStoreName, String groupName, Context context); diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ResourceIdentity.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ResourceIdentity.java index aea40cd4dbe7..3cd411f251a2 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ResourceIdentity.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ResourceIdentity.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -30,6 +31,7 @@ public class ResourceIdentity { * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; /* diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesDeleteSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesDeleteSamples.java deleted file mode 100644 index 4363d3722e36..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesDeleteSamples.java +++ /dev/null @@ -1,20 +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; - -import com.azure.core.util.Context; - -/** Samples for KeyValues Delete. */ -public final class KeyValuesDeleteSamples { - /** - * Sample code: KeyValues_Delete. - * - * @param appConfigurationManager Entry point to AppConfigurationManager. - */ - public static void keyValuesDelete( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager.keyValues().delete("myResourceGroup", "contoso", "myKey$myLabel", Context.NONE); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesGetSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesGetSamples.java deleted file mode 100644 index 51f024a17acf..000000000000 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesGetSamples.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; - -import com.azure.core.util.Context; - -/** Samples for KeyValues Get. */ -public final class KeyValuesGetSamples { - /** - * Sample code: KeyValues_Get. - * - * @param appConfigurationManager Entry point to AppConfigurationManager. - */ - public static void keyValuesGet( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager - .keyValues() - .getWithResponse("myResourceGroup", "contoso", "myKey$myLabel", Context.NONE); - } -} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresCreateSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresCreateSamples.java similarity index 75% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresCreateSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresCreateSamples.java index 2f51db360e6a..c576be9e2c0b 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresCreateSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresCreateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.resourcemanager.appconfiguration.models.IdentityType; import com.azure.resourcemanager.appconfiguration.models.ResourceIdentity; @@ -13,14 +13,17 @@ /** Samples for ConfigurationStores Create. */ public final class ConfigurationStoresCreateSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresCreate.json + */ /** * Sample code: ConfigurationStores_Create. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresCreate( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager .configurationStores() .define("contoso") .withRegion("westus") @@ -30,14 +33,17 @@ public static void configurationStoresCreate( .create(); } + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresCreateWithIdentity.json + */ /** * Sample code: ConfigurationStores_Create_With_Identity. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresCreateWithIdentity( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager .configurationStores() .define("contoso") .withRegion("westus") @@ -54,14 +60,17 @@ public static void configurationStoresCreateWithIdentity( .create(); } + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresCreateWithLocalAuthDisabled.json + */ /** * Sample code: ConfigurationStores_Create_With_Local_Auth_Disabled. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresCreateWithLocalAuthDisabled( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager .configurationStores() .define("contoso") .withRegion("westus") diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresDeleteSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresDeleteSamples.java similarity index 53% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresDeleteSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresDeleteSamples.java index 27699e376a8f..665f4c1f1e41 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresDeleteSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresDeleteSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; /** Samples for ConfigurationStores Delete. */ public final class ConfigurationStoresDeleteSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresDelete.json + */ /** * Sample code: ConfigurationStores_Delete. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresDelete( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager.configurationStores().delete("myResourceGroup", "contoso", Context.NONE); + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().delete("myResourceGroup", "contoso", Context.NONE); } } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresGetByResourceGroupSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetByResourceGroupSamples.java similarity index 53% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresGetByResourceGroupSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetByResourceGroupSamples.java index 6613ad4922b4..af8e8e6eb4f8 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresGetByResourceGroupSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetByResourceGroupSamples.java @@ -2,21 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; /** Samples for ConfigurationStores GetByResourceGroup. */ public final class ConfigurationStoresGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresGet.json + */ /** * Sample code: ConfigurationStores_Get. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresGet( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager - .configurationStores() - .getByResourceGroupWithResponse("myResourceGroup", "contoso", Context.NONE); + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().getByResourceGroupWithResponse("myResourceGroup", "contoso", Context.NONE); } } 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 new file mode 100644 index 000000000000..0c6132415a16 --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresGetDeletedSamples.java @@ -0,0 +1,23 @@ +// 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.Context; + +/** Samples for ConfigurationStores GetDeleted. */ +public final class ConfigurationStoresGetDeletedSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/DeletedConfigurationStoresGet.json + */ + /** + * Sample code: DeletedConfigurationStores_Get. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void deletedConfigurationStoresGet( + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().getDeletedWithResponse("westus", "contoso", Context.NONE); + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresListByResourceGroupSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListByResourceGroupSamples.java similarity index 55% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresListByResourceGroupSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListByResourceGroupSamples.java index 841eb15c7dc7..4a92092d02fa 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresListByResourceGroupSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListByResourceGroupSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; /** Samples for ConfigurationStores ListByResourceGroup. */ public final class ConfigurationStoresListByResourceGroupSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresListByResourceGroup.json + */ /** * Sample code: ConfigurationStores_ListByResourceGroup. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresListByResourceGroup( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager.configurationStores().listByResourceGroup("myResourceGroup", null, Context.NONE); + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().listByResourceGroup("myResourceGroup", null, Context.NONE); } } 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 new file mode 100644 index 000000000000..3fc92e3a6f29 --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListDeletedSamples.java @@ -0,0 +1,23 @@ +// 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.Context; + +/** Samples for ConfigurationStores ListDeleted. */ +public final class ConfigurationStoresListDeletedSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/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(Context.NONE); + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresListKeysSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListKeysSamples.java similarity index 53% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresListKeysSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListKeysSamples.java index 9a60edf91380..21468f304019 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresListKeysSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListKeysSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; /** Samples for ConfigurationStores ListKeys. */ public final class ConfigurationStoresListKeysSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresListKeys.json + */ /** * Sample code: ConfigurationStores_ListKeys. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresListKeys( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager.configurationStores().listKeys("myResourceGroup", "contoso", null, Context.NONE); + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().listKeys("myResourceGroup", "contoso", null, Context.NONE); } } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresListSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListSamples.java similarity index 55% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresListSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListSamples.java index a3c64d319282..8d48c4e1fbf1 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresListSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresListSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; /** Samples for ConfigurationStores List. */ public final class ConfigurationStoresListSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresList.json + */ /** * Sample code: ConfigurationStores_List. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresList( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager.configurationStores().list(null, Context.NONE); + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.configurationStores().list(null, Context.NONE); } } 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 new file mode 100644 index 000000000000..c7c5da22bf99 --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresPurgeDeletedSamples.java @@ -0,0 +1,23 @@ +// 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.Context; + +/** Samples for ConfigurationStores PurgeDeleted. */ +public final class ConfigurationStoresPurgeDeletedSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/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", Context.NONE); + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresRegenerateKeySamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresRegenerateKeySamples.java similarity index 69% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresRegenerateKeySamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresRegenerateKeySamples.java index f2d2f49e90b9..3274620bc62d 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresRegenerateKeySamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresRegenerateKeySamples.java @@ -2,21 +2,24 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; 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/preview/2021-10-01-preview/examples/ConfigurationStoresRegenerateKey.json + */ /** * Sample code: ConfigurationStores_RegenerateKey. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresRegenerateKey( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager .configurationStores() .regenerateKeyWithResponse( "myResourceGroup", "contoso", new RegenerateKeyParameters().withId("439AD01B4BE67DB1"), Context.NONE); diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresUpdateSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresUpdateSamples.java similarity index 76% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresUpdateSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresUpdateSamples.java index 7de0d4d07255..ea155071ff87 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/ConfigurationStoresUpdateSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/ConfigurationStoresUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.appconfiguration.models.ConfigurationStore; @@ -15,45 +15,54 @@ /** Samples for ConfigurationStores Update. */ public final class ConfigurationStoresUpdateSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresUpdateDisableLocalAuth.json + */ /** * Sample code: ConfigurationStores_Update_Disable_Local_Auth. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresUpdateDisableLocalAuth( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { ConfigurationStore resource = - appConfigurationManager + manager .configurationStores() .getByResourceGroupWithResponse("myResourceGroup", "contoso", Context.NONE) .getValue(); resource.update().withSku(new Sku().withName("Standard")).withDisableLocalAuth(true).apply(); } + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresUpdate.json + */ /** * Sample code: ConfigurationStores_Update. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresUpdate( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { ConfigurationStore resource = - appConfigurationManager + manager .configurationStores() .getByResourceGroupWithResponse("myResourceGroup", "contoso", Context.NONE) .getValue(); resource.update().withTags(mapOf("Category", "Marketing")).withSku(new Sku().withName("Standard")).apply(); } + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresUpdateWithIdentity.json + */ /** * Sample code: ConfigurationStores_Update_With_Identity. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresUpdateWithIdentity( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { ConfigurationStore resource = - appConfigurationManager + manager .configurationStores() .getByResourceGroupWithResponse("myResourceGroup", "contoso", Context.NONE) .getValue(); diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesCreateOrUpdateSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesCreateOrUpdateSamples.java similarity index 75% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesCreateOrUpdateSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesCreateOrUpdateSamples.java index 36b47885662e..eb0b890458ab 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesCreateOrUpdateSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesCreateOrUpdateSamples.java @@ -2,21 +2,24 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; 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/preview/2021-10-01-preview/examples/ConfigurationStoresCreateKeyValue.json + */ /** * Sample code: KeyValues_CreateOrUpdate. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void keyValuesCreateOrUpdate( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager .keyValues() .define("myKey$myLabel") .withExistingConfigurationStore("myResourceGroup", "contoso") 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 new file mode 100644 index 000000000000..c105527f610d --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appconfiguration.generated; + +import com.azure.core.util.Context; + +/** Samples for KeyValues Delete. */ +public final class KeyValuesDeleteSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresDeleteKeyValue.json + */ + /** + * Sample code: KeyValues_Delete. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void keyValuesDelete(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.keyValues().delete("myResourceGroup", "contoso", "myKey$myLabel", Context.NONE); + } +} 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 new file mode 100644 index 000000000000..a89ef2b89f3d --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appconfiguration.generated; + +import com.azure.core.util.Context; + +/** Samples for KeyValues Get. */ +public final class KeyValuesGetSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresGetKeyValue.json + */ + /** + * Sample code: KeyValues_Get. + * + * @param manager Entry point to AppConfigurationManager. + */ + public static void keyValuesGet(com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.keyValues().getWithResponse("myResourceGroup", "contoso", "myKey$myLabel", Context.NONE); + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesListByConfigurationStoreSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesListByConfigurationStoreSamples.java similarity index 54% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesListByConfigurationStoreSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesListByConfigurationStoreSamples.java index d82cbe59c225..995e26babae6 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/KeyValuesListByConfigurationStoreSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/KeyValuesListByConfigurationStoreSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; /** Samples for KeyValues ListByConfigurationStore. */ public final class KeyValuesListByConfigurationStoreSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresListKeyValues.json + */ /** * Sample code: KeyValues_ListByConfigurationStore. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void keyValuesListByConfigurationStore( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager.keyValues().listByConfigurationStore("myResourceGroup", "contoso", null, Context.NONE); + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.keyValues().listByConfigurationStore("myResourceGroup", "contoso", null, Context.NONE); } } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/OperationsCheckNameAvailabilitySamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsCheckNameAvailabilitySamples.java similarity index 71% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/OperationsCheckNameAvailabilitySamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsCheckNameAvailabilitySamples.java index 90a3b9ef9898..60a616eb8caa 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/OperationsCheckNameAvailabilitySamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsCheckNameAvailabilitySamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.appconfiguration.models.CheckNameAvailabilityParameters; @@ -10,14 +10,17 @@ /** Samples for Operations CheckNameAvailability. */ public final class OperationsCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/CheckNameAvailable.json + */ /** * Sample code: ConfigurationStores_CheckNameAvailable. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresCheckNameAvailable( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager .operations() .checkNameAvailabilityWithResponse( new CheckNameAvailabilityParameters() @@ -26,14 +29,17 @@ public static void configurationStoresCheckNameAvailable( Context.NONE); } + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/CheckNameNotAvailable.json + */ /** * Sample code: ConfigurationStores_CheckNameNotAvailable. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void configurationStoresCheckNameNotAvailable( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager .operations() .checkNameAvailabilityWithResponse( new CheckNameAvailabilityParameters() 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 new file mode 100644 index 000000000000..55cda67d9bba --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/OperationsRegionalCheckNameAvailabilitySamples.java @@ -0,0 +1,52 @@ +// 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.Context; +import com.azure.resourcemanager.appconfiguration.models.CheckNameAvailabilityParameters; +import com.azure.resourcemanager.appconfiguration.models.ConfigurationResourceType; + +/** Samples for Operations RegionalCheckNameAvailability. */ +public final class OperationsRegionalCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/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), + Context.NONE); + } + + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/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), + Context.NONE); + } +} diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java similarity index 74% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsCreateOrUpdateSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index 1896c67b907a..e5f35f28909a 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -2,21 +2,24 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.resourcemanager.appconfiguration.models.ConnectionStatus; import com.azure.resourcemanager.appconfiguration.models.PrivateLinkServiceConnectionState; /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresCreatePrivateEndpointConnection.json + */ /** * Sample code: PrivateEndpointConnection_CreateOrUpdate. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void privateEndpointConnectionCreateOrUpdate( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager .privateEndpointConnections() .define("myConnection") .withExistingConfigurationStore("myResourceGroup", "contoso") diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsDeleteSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsDeleteSamples.java similarity index 52% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsDeleteSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsDeleteSamples.java index df99ca80e464..83f0bed8b03d 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -2,21 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresDeletePrivateEndpointConnection.json + */ /** * Sample code: PrivateEndpointConnections_Delete. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void privateEndpointConnectionsDelete( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager - .privateEndpointConnections() - .delete("myResourceGroup", "contoso", "myConnection", Context.NONE); + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.privateEndpointConnections().delete("myResourceGroup", "contoso", "myConnection", Context.NONE); } } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsGetSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsGetSamples.java similarity index 64% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsGetSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsGetSamples.java index 9d790fcfc5f2..bc13fcc1390a 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsGetSamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresGetPrivateEndpointConnection.json + */ /** * Sample code: PrivateEndpointConnection_GetConnection. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void privateEndpointConnectionGetConnection( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager .privateEndpointConnections() .getWithResponse("myResourceGroup", "contoso", "myConnection", Context.NONE); } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsListByConfigurationStoreSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsListByConfigurationStoreSamples.java similarity index 53% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsListByConfigurationStoreSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsListByConfigurationStoreSamples.java index f3f3d9e89805..85c8a04b61f6 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateEndpointConnectionsListByConfigurationStoreSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateEndpointConnectionsListByConfigurationStoreSamples.java @@ -2,21 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections ListByConfigurationStore. */ public final class PrivateEndpointConnectionsListByConfigurationStoreSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/ConfigurationStoresListPrivateEndpointConnections.json + */ /** * Sample code: PrivateEndpointConnection_List. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void privateEndpointConnectionList( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager - .privateEndpointConnections() - .listByConfigurationStore("myResourceGroup", "contoso", Context.NONE); + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.privateEndpointConnections().listByConfigurationStore("myResourceGroup", "contoso", Context.NONE); } } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateLinkResourcesGetSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesGetSamples.java similarity index 64% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateLinkResourcesGetSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesGetSamples.java index 9bfec8a328bf..ad09a3ec961f 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateLinkResourcesGetSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesGetSamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; /** Samples for PrivateLinkResources Get. */ public final class PrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/PrivateLinkResourceGet.json + */ /** * Sample code: PrivateLinkResources_Get. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void privateLinkResourcesGet( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager .privateLinkResources() .getWithResponse("myResourceGroup", "contoso", "configurationStores", Context.NONE); } diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateLinkResourcesListByConfigurationStoreSamples.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesListByConfigurationStoreSamples.java similarity index 54% rename from sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateLinkResourcesListByConfigurationStoreSamples.java rename to sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesListByConfigurationStoreSamples.java index b64c1c499959..fd8e10948134 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/PrivateLinkResourcesListByConfigurationStoreSamples.java +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/generated/PrivateLinkResourcesListByConfigurationStoreSamples.java @@ -2,21 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appconfiguration; +package com.azure.resourcemanager.appconfiguration.generated; import com.azure.core.util.Context; /** Samples for PrivateLinkResources ListByConfigurationStore. */ public final class PrivateLinkResourcesListByConfigurationStoreSamples { + /* + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/preview/2021-10-01-preview/examples/PrivateLinkResourcesListByConfigurationStore.json + */ /** * Sample code: PrivateLinkResources_ListGroupIds. * - * @param appConfigurationManager Entry point to AppConfigurationManager. + * @param manager Entry point to AppConfigurationManager. */ public static void privateLinkResourcesListGroupIds( - com.azure.resourcemanager.appconfiguration.AppConfigurationManager appConfigurationManager) { - appConfigurationManager - .privateLinkResources() - .listByConfigurationStore("myResourceGroup", "contoso", Context.NONE); + com.azure.resourcemanager.appconfiguration.AppConfigurationManager manager) { + manager.privateLinkResources().listByConfigurationStore("myResourceGroup", "contoso", Context.NONE); } }