From bfcbd1a90de7bef85b8ee1e2a46336ec0a3cc8d1 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 24 Nov 2021 01:55:28 +0000 Subject: [PATCH] CodeGen from PR 16847 in Azure/azure-rest-api-specs Add Track2 release go tag (#16847) * Add Track2 release go tag * recover --- .../CHANGELOG.md | 3 +- .../README.md | 2 +- .../SAMPLE.md | 666 +++++++++++++++++- .../pom.xml | 13 +- .../AppConfigurationManager.java | 19 +- .../fluent/ConfigurationStoresClient.java | 12 +- .../fluent/KeyValuesClient.java | 4 +- .../PrivateEndpointConnectionsClient.java | 8 +- .../models/ConfigurationStoreInner.java | 129 ++-- .../models/ConfigurationStoreProperties.java | 179 +++++ ...rationStorePropertiesUpdateParameters.java | 112 +++ .../fluent/models/KeyValueInner.java | 101 +-- .../fluent/models/KeyValueProperties.java | 196 ++++++ .../PrivateEndpointConnectionInner.java | 51 +- .../PrivateEndpointConnectionProperties.java | 110 +++ .../models/PrivateLinkResourceInner.java | 44 +- .../models/PrivateLinkResourceProperties.java | 70 ++ .../ConfigurationStoresClientImpl.java | 24 +- .../implementation/KeyValuesClientImpl.java | 8 +- .../PrivateEndpointConnectionsClientImpl.java | 16 +- .../ConfigurationStoreUpdateParameters.java | 64 +- .../PrivateEndpointConnectionReference.java | 56 +- .../models/ResourceIdentity.java | 2 + .../KeyValuesDeleteSamples.java | 20 - .../appconfiguration/KeyValuesGetSamples.java | 22 - .../ConfigurationStoresCreateSamples.java | 29 +- .../ConfigurationStoresDeleteSamples.java | 11 +- ...rationStoresGetByResourceGroupSamples.java | 13 +- ...ationStoresListByResourceGroupSamples.java | 11 +- .../ConfigurationStoresListKeysSamples.java | 11 +- .../ConfigurationStoresListSamples.java | 11 +- ...nfigurationStoresRegenerateKeySamples.java | 11 +- .../ConfigurationStoresUpdateSamples.java | 29 +- .../KeyValuesCreateOrUpdateSamples.java | 11 +- .../generated/KeyValuesDeleteSamples.java | 22 + .../generated/KeyValuesGetSamples.java | 22 + ...ValuesListByConfigurationStoreSamples.java | 11 +- ...perationsCheckNameAvailabilitySamples.java | 20 +- ...pointConnectionsCreateOrUpdateSamples.java | 11 +- ...ivateEndpointConnectionsDeleteSamples.java | 13 +- .../PrivateEndpointConnectionsGetSamples.java | 11 +- ...ctionsListByConfigurationStoreSamples.java | 13 +- .../PrivateLinkResourcesGetSamples.java | 11 +- ...ourcesListByConfigurationStoreSamples.java | 13 +- 44 files changed, 1757 insertions(+), 458 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/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 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%) rename sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/samples/java/com/azure/resourcemanager/appconfiguration/{ => generated}/ConfigurationStoresListByResourceGroupSamples.java (55%) 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%) 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%) 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 9210c2367626f..cdd7104f90bee 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 (2021-11-24) +- 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). ## 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 74082dcb6e12d..3ed086ef6d3ee 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/README.md +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/README.md @@ -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 0a017b0858908..20a55c410c90a 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/SAMPLE.md +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/SAMPLE.md @@ -1,36 +1,654 @@ # 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) +- [List](#configurationstores_list) +- [ListByResourceGroup](#configurationstores_listbyresourcegroup) +- [ListKeys](#configurationstores_listkeys) +- [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) -### 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-03-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-03-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-03-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-03-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-03-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_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-03-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-03-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_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-03-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_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-03-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-03-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-03-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-03-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-03-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-03-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-03-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-03-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-03-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-03-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); + } +} +``` + +### 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-03-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-03-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-03-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-03-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-03-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-03-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 13f71def93cbb..ab2e459a19b39 100644 --- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml @@ -38,7 +38,10 @@ UTF-8 - + true + false + + @@ -54,14 +57,6 @@ - - org.jacoco - jacoco-maven-plugin - 0.8.7 - - true - - org.revapi revapi-maven-plugin 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 27ac8dc631a37..dbc4a03b09e8c 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 149b307e52112..805de1f3ebc4a 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 @@ -111,7 +111,7 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration store along with all resource properties. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationStoreInner> beginCreate( String resourceGroupName, String configStoreName, ConfigurationStoreInner configStoreCreationParameters); @@ -127,7 +127,7 @@ SyncPoller, ConfigurationStoreInner> beginCr * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration store along with all resource properties. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationStoreInner> beginCreate( String resourceGroupName, String configStoreName, @@ -178,7 +178,7 @@ ConfigurationStoreInner create( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String configStoreName); /** @@ -192,7 +192,7 @@ ConfigurationStoreInner create( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String configStoreName, Context context); /** @@ -231,7 +231,7 @@ ConfigurationStoreInner create( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration store along with all resource properties. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationStoreInner> beginUpdate( String resourceGroupName, String configStoreName, @@ -249,7 +249,7 @@ SyncPoller, ConfigurationStoreInner> beginUp * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration store along with all resource properties. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationStoreInner> beginUpdate( String resourceGroupName, String configStoreName, 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 7146148f90f1d..245b0e6c8afa6 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 @@ -127,7 +127,7 @@ Response createOrUpdateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String configStoreName, String keyValueName); @@ -144,7 +144,7 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @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/PrivateEndpointConnectionsClient.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/PrivateEndpointConnectionsClient.java index e7e80b6bbf50f..ff5b90ee9c392 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 @@ -87,7 +87,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String configStoreName, @@ -107,7 +107,7 @@ SyncPoller, PrivateEndpointConnection * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String configStoreName, @@ -166,7 +166,7 @@ PrivateEndpointConnectionInner createOrUpdate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String configStoreName, String privateEndpointConnectionName); @@ -182,7 +182,7 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @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/models/ConfigurationStoreInner.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreInner.java index 5076c0d0d4d19..ae87b410c2e45 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,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.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -25,9 +24,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 +34,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 +52,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 +72,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 +110,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 +139,7 @@ public ProvisioningState provisioningState() { * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.creationDate; + return this.innerProperties() == null ? null : this.innerProperties().creationDate(); } /** @@ -165,7 +148,7 @@ public OffsetDateTime creationDate() { * @return the endpoint value. */ public String endpoint() { - return this.endpoint; + return this.innerProperties() == null ? null : this.innerProperties().endpoint(); } /** @@ -174,7 +157,7 @@ public String endpoint() { * @return the encryption value. */ public EncryptionProperties encryption() { - return this.encryption; + return this.innerProperties() == null ? null : this.innerProperties().encryption(); } /** @@ -184,7 +167,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 +181,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 +191,7 @@ public List privateEndpointConnections() { * @return the publicNetworkAccess value. */ public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); } /** @@ -216,7 +202,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 +215,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 +225,10 @@ public Boolean disableLocalAuth() { * @return the ConfigurationStoreInner object itself. */ public ConfigurationStoreInner withDisableLocalAuth(Boolean disableLocalAuth) { - this.disableLocalAuth = disableLocalAuth; - return this; - } - - /** {@inheritDoc} */ - @Override - public ConfigurationStoreInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ConfigurationStoreInner withTags(Map tags) { - super.withTags(tags); + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationStoreProperties(); + } + this.innerProperties().withDisableLocalAuth(disableLocalAuth); return this; } @@ -263,6 +241,9 @@ public void validate() { if (identity() != null) { identity().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } if (sku() == null) { throw logger .logExceptionAsError( @@ -270,11 +251,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 0000000000000..63f6fde0eb4ce --- /dev/null +++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreProperties.java @@ -0,0 +1,179 @@ +// 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.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; + + /** + * 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; + } + + /** + * 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 0000000000000..793ed04e712f5 --- /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/KeyValueInner.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/KeyValueInner.java index 8327cc3b94893..9d86fae1f0343 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 0000000000000..a750b057087be --- /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 d53891bc1d9d0..8a05f6c581f29 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 0000000000000..8ba865b808945 --- /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 a17bdf4147718..9b95f222e6e64 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 0000000000000..f2b63742b202f --- /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/ConfigurationStoresClientImpl.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/ConfigurationStoresClientImpl.java index 683f4bebe36a6..9644843db1993 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 @@ -880,7 +880,7 @@ private Mono>> createWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration store along with all resource properties. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationStoreInner> beginCreateAsync( String resourceGroupName, String configStoreName, ConfigurationStoreInner configStoreCreationParameters) { Mono>> mono = @@ -907,7 +907,7 @@ private PollerFlux, ConfigurationStoreInner> * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration store along with all resource properties. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationStoreInner> beginCreateAsync( String resourceGroupName, String configStoreName, @@ -937,7 +937,7 @@ private PollerFlux, ConfigurationStoreInner> * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration store along with all resource properties. */ - @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(); @@ -955,7 +955,7 @@ public SyncPoller, ConfigurationStoreInner> * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration store along with all resource properties. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationStoreInner> beginCreate( String resourceGroupName, String configStoreName, @@ -1150,7 +1150,7 @@ private Mono>> deleteWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @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 @@ -1169,7 +1169,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @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); @@ -1189,7 +1189,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String configStoreName) { return beginDeleteAsync(resourceGroupName, configStoreName).getSyncPoller(); } @@ -1205,7 +1205,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @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(); @@ -1407,7 +1407,7 @@ private Mono>> updateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration store along with all resource properties. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationStoreInner> beginUpdateAsync( String resourceGroupName, String configStoreName, @@ -1436,7 +1436,7 @@ private PollerFlux, ConfigurationStoreInner> * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration store along with all resource properties. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationStoreInner> beginUpdateAsync( String resourceGroupName, String configStoreName, @@ -1466,7 +1466,7 @@ private PollerFlux, ConfigurationStoreInner> * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration store along with all resource properties. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationStoreInner> beginUpdate( String resourceGroupName, String configStoreName, @@ -1486,7 +1486,7 @@ public SyncPoller, ConfigurationStoreInner> * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the configuration store along with all resource properties. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationStoreInner> beginUpdate( String resourceGroupName, String configStoreName, 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 f3850be2ae7d6..5fe909234f0f5 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 @@ -872,7 +872,7 @@ private Mono>> deleteWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String configStoreName, String keyValueName) { Mono>> mono = @@ -895,7 +895,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @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); @@ -918,7 +918,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @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(); @@ -937,7 +937,7 @@ public SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @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(); 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 f00c5bb411897..3f6373a8f3a9b 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 @@ -651,7 +651,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -684,7 +684,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -718,7 +718,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String configStoreName, @@ -742,7 +742,7 @@ public SyncPoller, PrivateEndpointCon * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String configStoreName, @@ -975,7 +975,7 @@ private Mono>> deleteWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String configStoreName, String privateEndpointConnectionName) { Mono>> mono = @@ -997,7 +997,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @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); @@ -1019,7 +1019,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @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(); @@ -1037,7 +1037,7 @@ public SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @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) 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 89d50d964f442..8644ef680b7a4 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/PrivateEndpointConnectionReference.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateEndpointConnectionReference.java index 2c83aa6964f45..aa0f1cd110013 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/ResourceIdentity.java b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/ResourceIdentity.java index aea40cd4dbe79..3cd411f251a25 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 4363d3722e36f..0000000000000 --- 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 51f024a17acf4..0000000000000 --- 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 2f51db360e6a5..95b9a4e564190 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-03-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-03-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-03-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 27699e376a8fd..52db9f9e152c7 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-03-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 6613ad4922b4b..0ab3467a58931 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-03-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/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 841eb15c7dc7f..d3dd500e9589c 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-03-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/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 9a60edf91380f..8831263e91ded 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-03-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 a3c64d3192821..dc1ac0185adda 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-03-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/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 f2d2f49e90b9d..2d36f03a0e772 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-03-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 7de0d4d072551..bb3334af5d8c9 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-03-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-03-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-03-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 36b47885662ee..d8f81e5a68523 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-03-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 0000000000000..891aa7b9ebdd3 --- /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-03-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 0000000000000..59509b16d99b5 --- /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-03-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 d82cbe59c2257..4db231b28c4d1 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-03-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 90a3b9ef98986..2c47bb95e966c 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-03-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-03-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/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 1896c67b907af..35002b5be6598 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-03-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 df99ca80e464e..1cd93efa9ac95 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-03-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 9d790fcfc5f2f..893e536aa871f 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-03-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 f3f3d9e89805e..b20e17b9551dd 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-03-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 9bfec8a328bfc..b3e46a995eff7 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-03-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 b64c1c499959f..80cb3cf70538b 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-03-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); } }