diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/CHANGELOG.md b/sdk/datalakestore/azure-resourcemanager-datalakestore/CHANGELOG.md index d8aa77f643055..77d63cc18a986 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/CHANGELOG.md +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2022-03-15) +- Azure Resource Manager DataLakeStore client library for Java. This package contains Microsoft Azure SDK for DataLakeStore Management SDK. Creates an Azure Data Lake Store account management client. Package tag package-2016-11. 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.1 (2021-04-22) diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/README.md b/sdk/datalakestore/azure-resourcemanager-datalakestore/README.md index 6e5cf2300b3a2..83e22da9c965b 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/README.md +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-datalakestore - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/datalakestore/azure-resourcemanager-datalakestore/SAMPLE.md) + + ## Troubleshooting ## Next steps diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/SAMPLE.md b/sdk/datalakestore/azure-resourcemanager-datalakestore/SAMPLE.md new file mode 100644 index 0000000000000..ba3454d3a7d4c --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/SAMPLE.md @@ -0,0 +1,754 @@ +# Code snippets and samples + + +## Accounts + +- [CheckNameAvailability](#accounts_checknameavailability) +- [Create](#accounts_create) +- [Delete](#accounts_delete) +- [EnableKeyVault](#accounts_enablekeyvault) +- [GetByResourceGroup](#accounts_getbyresourcegroup) +- [List](#accounts_list) +- [ListByResourceGroup](#accounts_listbyresourcegroup) +- [Update](#accounts_update) + +## FirewallRules + +- [CreateOrUpdate](#firewallrules_createorupdate) +- [Delete](#firewallrules_delete) +- [Get](#firewallrules_get) +- [ListByAccount](#firewallrules_listbyaccount) +- [Update](#firewallrules_update) + +## Locations + +- [GetCapability](#locations_getcapability) +- [GetUsage](#locations_getusage) + +## Operations + +- [List](#operations_list) + +## TrustedIdProviders + +- [CreateOrUpdate](#trustedidproviders_createorupdate) +- [Delete](#trustedidproviders_delete) +- [Get](#trustedidproviders_get) +- [ListByAccount](#trustedidproviders_listbyaccount) +- [Update](#trustedidproviders_update) + +## VirtualNetworkRules + +- [CreateOrUpdate](#virtualnetworkrules_createorupdate) +- [Delete](#virtualnetworkrules_delete) +- [Get](#virtualnetworkrules_get) +- [ListByAccount](#virtualnetworkrules_listbyaccount) +- [Update](#virtualnetworkrules_update) +### Accounts_CheckNameAvailability + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.datalakestore.models.CheckNameAvailabilityParameters; + +/** Samples for Accounts CheckNameAvailability. */ +public final class AccountsCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_CheckNameAvailability.json + */ + /** + * Sample code: Checks whether the specified account name is available or taken. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void checksWhetherTheSpecifiedAccountNameIsAvailableOrTaken( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .accounts() + .checkNameAvailabilityWithResponse( + "EastUS2", new CheckNameAvailabilityParameters().withName("contosoadla"), Context.NONE); + } +} +``` + +### Accounts_Create + +```java +import com.azure.resourcemanager.datalakestore.models.CreateFirewallRuleWithAccountParameters; +import com.azure.resourcemanager.datalakestore.models.CreateTrustedIdProviderWithAccountParameters; +import com.azure.resourcemanager.datalakestore.models.EncryptionConfig; +import com.azure.resourcemanager.datalakestore.models.EncryptionConfigType; +import com.azure.resourcemanager.datalakestore.models.EncryptionIdentity; +import com.azure.resourcemanager.datalakestore.models.EncryptionState; +import com.azure.resourcemanager.datalakestore.models.FirewallAllowAzureIpsState; +import com.azure.resourcemanager.datalakestore.models.FirewallState; +import com.azure.resourcemanager.datalakestore.models.KeyVaultMetaInfo; +import com.azure.resourcemanager.datalakestore.models.TierType; +import com.azure.resourcemanager.datalakestore.models.TrustedIdProviderState; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Accounts Create. */ +public final class AccountsCreateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_Create.json + */ + /** + * Sample code: Creates the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void createsTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .accounts() + .define("contosoadla") + .withRegion("eastus2") + .withExistingResourceGroup("contosorg") + .withTags(mapOf("test_key", "test_value")) + .withIdentity(new EncryptionIdentity()) + .withDefaultGroup("test_default_group") + .withEncryptionConfig( + new EncryptionConfig() + .withType(EncryptionConfigType.USER_MANAGED) + .withKeyVaultMetaInfo( + new KeyVaultMetaInfo() + .withKeyVaultResourceId("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345") + .withEncryptionKeyName("test_encryption_key_name") + .withEncryptionKeyVersion("encryption_key_version"))) + .withEncryptionState(EncryptionState.ENABLED) + .withFirewallRules( + Arrays + .asList( + new CreateFirewallRuleWithAccountParameters() + .withName("test_rule") + .withStartIpAddress("1.1.1.1") + .withEndIpAddress("2.2.2.2"))) + .withFirewallState(FirewallState.ENABLED) + .withFirewallAllowAzureIps(FirewallAllowAzureIpsState.ENABLED) + .withTrustedIdProviders( + Arrays + .asList( + new CreateTrustedIdProviderWithAccountParameters() + .withName("test_trusted_id_provider_name") + .withIdProvider("https://sts.windows.net/ea9ec534-a3e3-4e45-ad36-3afc5bb291c1"))) + .withTrustedIdProviderState(TrustedIdProviderState.ENABLED) + .withNewTier(TierType.CONSUMPTION) + .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; + } +} +``` + +### Accounts_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Accounts Delete. */ +public final class AccountsDeleteSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_Delete.json + */ + /** + * Sample code: Deletes the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void deletesTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.accounts().delete("contosorg", "contosoadla", Context.NONE); + } +} +``` + +### Accounts_EnableKeyVault + +```java +import com.azure.core.util.Context; + +/** Samples for Accounts EnableKeyVault. */ +public final class AccountsEnableKeyVaultSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_EnableKeyVault.json + */ + /** + * Sample code: Attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void attemptsToEnableAUserManagedKeyVaultForEncryptionOfTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.accounts().enableKeyVaultWithResponse("contosorg", "contosoadla", Context.NONE); + } +} +``` + +### Accounts_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Accounts GetByResourceGroup. */ +public final class AccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_Get.json + */ + /** + * Sample code: Gets the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void getsTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.accounts().getByResourceGroupWithResponse("contosorg", "contosoadla", Context.NONE); + } +} +``` + +### Accounts_List + +```java +import com.azure.core.util.Context; + +/** Samples for Accounts List. */ +public final class AccountsListSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_List.json + */ + /** + * Sample code: Lists the Data Lake Store accounts within the subscription. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void listsTheDataLakeStoreAccountsWithinTheSubscription( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.accounts().list("test_filter", 1, 1, "test_select", "test_orderby", false, Context.NONE); + } +} +``` + +### Accounts_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Accounts ListByResourceGroup. */ +public final class AccountsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_ListByResourceGroup.json + */ + /** + * Sample code: Lists the Data Lake Store accounts within a specific resource group. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void listsTheDataLakeStoreAccountsWithinASpecificResourceGroup( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .accounts() + .listByResourceGroup("contosorg", "test_filter", 1, 1, "test_select", "test_orderby", false, Context.NONE); + } +} +``` + +### Accounts_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.datalakestore.models.DataLakeStoreAccount; +import com.azure.resourcemanager.datalakestore.models.FirewallAllowAzureIpsState; +import com.azure.resourcemanager.datalakestore.models.FirewallState; +import com.azure.resourcemanager.datalakestore.models.TierType; +import com.azure.resourcemanager.datalakestore.models.TrustedIdProviderState; +import com.azure.resourcemanager.datalakestore.models.UpdateEncryptionConfig; +import com.azure.resourcemanager.datalakestore.models.UpdateKeyVaultMetaInfo; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Accounts Update. */ +public final class AccountsUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_Update.json + */ + /** + * Sample code: Updates the specified Data Lake Store account information. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void updatesTheSpecifiedDataLakeStoreAccountInformation( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + DataLakeStoreAccount resource = + manager.accounts().getByResourceGroupWithResponse("contosorg", "contosoadla", Context.NONE).getValue(); + resource + .update() + .withTags(mapOf("test_key", "test_value")) + .withDefaultGroup("test_default_group") + .withEncryptionConfig( + new UpdateEncryptionConfig() + .withKeyVaultMetaInfo( + new UpdateKeyVaultMetaInfo().withEncryptionKeyVersion("encryption_key_version"))) + .withFirewallState(FirewallState.ENABLED) + .withFirewallAllowAzureIps(FirewallAllowAzureIpsState.ENABLED) + .withTrustedIdProviderState(TrustedIdProviderState.ENABLED) + .withNewTier(TierType.CONSUMPTION) + .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; + } +} +``` + +### FirewallRules_CreateOrUpdate + +```java +/** Samples for FirewallRules CreateOrUpdate. */ +public final class FirewallRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_CreateOrUpdate.json + */ + /** + * Sample code: Creates or updates the specified firewall rule. During update, the firewall rule with the specified + * name will be replaced with this new firewall rule. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void + createsOrUpdatesTheSpecifiedFirewallRuleDuringUpdateTheFirewallRuleWithTheSpecifiedNameWillBeReplacedWithThisNewFirewallRule( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .firewallRules() + .define("test_rule") + .withExistingAccount("contosorg", "contosoadla") + .withStartIpAddress("1.1.1.1") + .withEndIpAddress("2.2.2.2") + .create(); + } +} +``` + +### FirewallRules_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for FirewallRules Delete. */ +public final class FirewallRulesDeleteSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_Delete.json + */ + /** + * Sample code: Deletes the specified firewall rule from the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void deletesTheSpecifiedFirewallRuleFromTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.firewallRules().deleteWithResponse("contosorg", "contosoadla", "test_rule", Context.NONE); + } +} +``` + +### FirewallRules_Get + +```java +import com.azure.core.util.Context; + +/** Samples for FirewallRules Get. */ +public final class FirewallRulesGetSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_Get.json + */ + /** + * Sample code: Gets the specified Data Lake Store firewall rule. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void getsTheSpecifiedDataLakeStoreFirewallRule( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.firewallRules().getWithResponse("contosorg", "contosoadla", "test_rule", Context.NONE); + } +} +``` + +### FirewallRules_ListByAccount + +```java +import com.azure.core.util.Context; + +/** Samples for FirewallRules ListByAccount. */ +public final class FirewallRulesListByAccountSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_ListByAccount.json + */ + /** + * Sample code: Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void listsTheDataLakeStoreFirewallRulesWithinTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.firewallRules().listByAccount("contosorg", "contosoadla", Context.NONE); + } +} +``` + +### FirewallRules_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.datalakestore.models.FirewallRule; + +/** Samples for FirewallRules Update. */ +public final class FirewallRulesUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_Update.json + */ + /** + * Sample code: Updates the specified firewall rule. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void updatesTheSpecifiedFirewallRule( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + FirewallRule resource = + manager.firewallRules().getWithResponse("contosorg", "contosoadla", "test_rule", Context.NONE).getValue(); + resource.update().withStartIpAddress("1.1.1.1").withEndIpAddress("2.2.2.2").apply(); + } +} +``` + +### Locations_GetCapability + +```java +import com.azure.core.util.Context; + +/** Samples for Locations GetCapability. */ +public final class LocationsGetCapabilitySamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Locations_GetCapability.json + */ + /** + * Sample code: Gets subscription-level properties and limits for Data Lake Store specified by resource location. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void getsSubscriptionLevelPropertiesAndLimitsForDataLakeStoreSpecifiedByResourceLocation( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.locations().getCapabilityWithResponse("EastUS2", Context.NONE); + } +} +``` + +### Locations_GetUsage + +```java +import com.azure.core.util.Context; + +/** Samples for Locations GetUsage. */ +public final class LocationsGetUsageSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Locations_GetUsage.json + */ + /** + * Sample code: UsageList. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void usageList(com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.locations().getUsage("WestUS", Context.NONE); + } +} +``` + +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Operations_List.json + */ + /** + * Sample code: Lists all of the available Data Lake Store REST API operations. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void listsAllOfTheAvailableDataLakeStoreRESTAPIOperations( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.operations().listWithResponse(Context.NONE); + } +} +``` + +### TrustedIdProviders_CreateOrUpdate + +```java +/** Samples for TrustedIdProviders CreateOrUpdate. */ +public final class TrustedIdProvidersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_CreateOrUpdate.json + */ + /** + * Sample code: Creates or updates the specified trusted identity provider. During update, the trusted identity + * provider with the specified name will be replaced with this new provider. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void + createsOrUpdatesTheSpecifiedTrustedIdentityProviderDuringUpdateTheTrustedIdentityProviderWithTheSpecifiedNameWillBeReplacedWithThisNewProvider( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .trustedIdProviders() + .define("test_trusted_id_provider_name") + .withExistingAccount("contosorg", "contosoadla") + .withIdProvider("https://sts.windows.net/ea9ec534-a3e3-4e45-ad36-3afc5bb291c1") + .create(); + } +} +``` + +### TrustedIdProviders_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for TrustedIdProviders Delete. */ +public final class TrustedIdProvidersDeleteSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_Delete.json + */ + /** + * Sample code: Deletes the specified trusted identity provider from the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void deletesTheSpecifiedTrustedIdentityProviderFromTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .trustedIdProviders() + .deleteWithResponse("contosorg", "contosoadla", "test_trusted_id_provider_name", Context.NONE); + } +} +``` + +### TrustedIdProviders_Get + +```java +import com.azure.core.util.Context; + +/** Samples for TrustedIdProviders Get. */ +public final class TrustedIdProvidersGetSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_Get.json + */ + /** + * Sample code: Gets the specified Data Lake Store trusted identity provider. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void getsTheSpecifiedDataLakeStoreTrustedIdentityProvider( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .trustedIdProviders() + .getWithResponse("contosorg", "contosoadla", "test_trusted_id_provider_name", Context.NONE); + } +} +``` + +### TrustedIdProviders_ListByAccount + +```java +import com.azure.core.util.Context; + +/** Samples for TrustedIdProviders ListByAccount. */ +public final class TrustedIdProvidersListByAccountSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_ListByAccount.json + */ + /** + * Sample code: Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void listsTheDataLakeStoreTrustedIdentityProvidersWithinTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.trustedIdProviders().listByAccount("contosorg", "contosoadla", Context.NONE); + } +} +``` + +### TrustedIdProviders_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.datalakestore.models.TrustedIdProvider; + +/** Samples for TrustedIdProviders Update. */ +public final class TrustedIdProvidersUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_Update.json + */ + /** + * Sample code: Updates the specified trusted identity provider. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void updatesTheSpecifiedTrustedIdentityProvider( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + TrustedIdProvider resource = + manager + .trustedIdProviders() + .getWithResponse("contosorg", "contosoadla", "test_trusted_id_provider_name", Context.NONE) + .getValue(); + resource.update().withIdProvider("https://sts.windows.net/ea9ec534-a3e3-4e45-ad36-3afc5bb291c1").apply(); + } +} +``` + +### VirtualNetworkRules_CreateOrUpdate + +```java +/** Samples for VirtualNetworkRules CreateOrUpdate. */ +public final class VirtualNetworkRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_CreateOrUpdate.json + */ + /** + * Sample code: Creates or updates the specified virtual network rule. During update, the virtual network rule with + * the specified name will be replaced with this new virtual network rule. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void + createsOrUpdatesTheSpecifiedVirtualNetworkRuleDuringUpdateTheVirtualNetworkRuleWithTheSpecifiedNameWillBeReplacedWithThisNewVirtualNetworkRule( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .virtualNetworkRules() + .define("test_virtual_network_rules_name") + .withExistingAccount("contosorg", "contosoadla") + .withSubnetId("test_subnetId") + .create(); + } +} +``` + +### VirtualNetworkRules_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualNetworkRules Delete. */ +public final class VirtualNetworkRulesDeleteSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_Delete.json + */ + /** + * Sample code: Deletes the specified virtual network rule from the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void deletesTheSpecifiedVirtualNetworkRuleFromTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .virtualNetworkRules() + .deleteWithResponse("contosorg", "contosoadla", "test_virtual_network_rules_name", Context.NONE); + } +} +``` + +### VirtualNetworkRules_Get + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualNetworkRules Get. */ +public final class VirtualNetworkRulesGetSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_Get.json + */ + /** + * Sample code: Gets the specified Data Lake Store virtual network rule. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void getsTheSpecifiedDataLakeStoreVirtualNetworkRule( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .virtualNetworkRules() + .getWithResponse("contosorg", "contosoadla", "test_virtual_network_rules_name", Context.NONE); + } +} +``` + +### VirtualNetworkRules_ListByAccount + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualNetworkRules ListByAccount. */ +public final class VirtualNetworkRulesListByAccountSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_ListByAccount.json + */ + /** + * Sample code: Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void listsTheDataLakeStoreVirtualNetworkRulesWithinTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.virtualNetworkRules().listByAccount("contosorg", "contosoadla", Context.NONE); + } +} +``` + +### VirtualNetworkRules_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.datalakestore.models.VirtualNetworkRule; + +/** Samples for VirtualNetworkRules Update. */ +public final class VirtualNetworkRulesUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_Update.json + */ + /** + * Sample code: Updates the specified virtual network rule. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void updatesTheSpecifiedVirtualNetworkRule( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + VirtualNetworkRule resource = + manager + .virtualNetworkRules() + .getWithResponse("contosorg", "contosoadla", "test_virtual_network_rules_name", Context.NONE) + .getValue(); + resource.update().withSubnetId("test_subnetId").apply(); + } +} +``` + diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/pom.xml b/sdk/datalakestore/azure-resourcemanager-datalakestore/pom.xml index 2e1136fdfe2a8..ed6fa68854de7 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/pom.xml +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/pom.xml @@ -1,55 +1,55 @@ - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + - com.azure.resourcemanager - azure-resourcemanager-datalakestore - 1.0.0-beta.2 - jar + com.azure.resourcemanager + azure-resourcemanager-datalakestore + 1.0.0-beta.2 + jar - Microsoft Azure SDK for DataLakeStore Management - This package contains Microsoft Azure SDK for DataLakeStore Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Creates an Azure Data Lake Store account management client. Package tag package-2016-11. - https://github.com/Azure/azure-sdk-for-java + Microsoft Azure SDK for DataLakeStore Management + This package contains Microsoft Azure SDK for DataLakeStore Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Creates an Azure Data Lake Store account management client. Package tag package-2016-11. + https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + - - https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - microsoft - Microsoft - - - - UTF-8 - true - - - - com.azure - azure-core - 1.26.0 - - - com.azure - azure-core-management - 1.5.3 - - + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + true + + + + com.azure + azure-core + 1.26.0 + + + com.azure + azure-core-management + 1.5.3 + + diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/DataLakeStoreManager.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/DataLakeStoreManager.java index dde6dec3d8f0f..8e6524b062f16 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/DataLakeStoreManager.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/DataLakeStoreManager.java @@ -8,8 +8,8 @@ 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.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -17,6 +17,7 @@ import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -39,6 +40,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to DataLakeStoreManager. Creates an Azure Data Lake Store account management client. */ public final class DataLakeStoreManager { @@ -92,11 +94,12 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; private Duration defaultPollInterval; @@ -136,6 +139,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { return this; } + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + /** * Sets the retry policy to the HTTP pipeline. * @@ -154,9 +168,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -192,20 +208,33 @@ public DataLakeStoreManager authenticate(TokenCredential credential, AzureProfil userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } 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 - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.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/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/AccountsClient.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/AccountsClient.java index ec08e4b5bd1cf..84856e8f67f11 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/AccountsClient.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/AccountsClient.java @@ -26,7 +26,7 @@ public interface AccountsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -49,7 +49,7 @@ public interface AccountsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -63,7 +63,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -87,7 +87,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup( @@ -109,9 +109,9 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return the {@link SyncPoller} for polling of data Lake Store account information. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DataLakeStoreAccountInner> beginCreate( String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters); @@ -125,9 +125,9 @@ SyncPoller, DataLakeStoreAccountInner> beg * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return the {@link SyncPoller} for polling of data Lake Store account information. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DataLakeStoreAccountInner> beginCreate( String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters, Context context); @@ -184,7 +184,7 @@ DataLakeStoreAccountInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store account. + * @return the specified Data Lake Store account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -199,9 +199,9 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return the {@link SyncPoller} for polling of data Lake Store account information. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DataLakeStoreAccountInner> beginUpdate( String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters); @@ -215,9 +215,9 @@ SyncPoller, DataLakeStoreAccountInner> beg * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return the {@link SyncPoller} for polling of data Lake Store account information. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DataLakeStoreAccountInner> beginUpdate( String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters, Context context); @@ -260,9 +260,9 @@ DataLakeStoreAccountInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String accountName); /** @@ -274,9 +274,9 @@ DataLakeStoreAccountInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, Context context); /** @@ -325,7 +325,7 @@ DataLakeStoreAccountInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response enableKeyVaultWithResponse(String resourceGroupName, String accountName, Context context); @@ -352,7 +352,7 @@ DataLakeStoreAccountInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account name availability result information. + * @return data Lake Store account name availability result information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response checkNameAvailabilityWithResponse( diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/FirewallRulesClient.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/FirewallRulesClient.java index c305c33e79bbc..ec7122e143fe2 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/FirewallRulesClient.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/FirewallRulesClient.java @@ -23,7 +23,7 @@ public interface FirewallRulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule list information. + * @return data Lake Store firewall rule list information as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByAccount(String resourceGroupName, String accountName); @@ -37,7 +37,7 @@ public interface FirewallRulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule list information. + * @return data Lake Store firewall rule list information as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByAccount(String resourceGroupName, String accountName, Context context); @@ -74,7 +74,7 @@ FirewallRuleInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule information. + * @return data Lake Store firewall rule information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -108,7 +108,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store firewall rule. + * @return the specified Data Lake Store firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -139,7 +139,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule information. + * @return data Lake Store firewall rule information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -172,7 +172,7 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/LocationsClient.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/LocationsClient.java index 9a5ce8d12fa81..799d843d32570 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/LocationsClient.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/LocationsClient.java @@ -34,7 +34,8 @@ public interface LocationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription-level properties and limits for Data Lake Store specified by resource location. + * @return subscription-level properties and limits for Data Lake Store specified by resource location along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getCapabilityWithResponse(String location, Context context); @@ -46,7 +47,8 @@ public interface LocationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage count and the limit for the resources of the location under the subscription. + * @return the current usage count and the limit for the resources of the location under the subscription as + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getUsage(String location); @@ -59,7 +61,8 @@ public interface LocationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage count and the limit for the resources of the location under the subscription. + * @return the current usage count and the limit for the resources of the location under the subscription as + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable getUsage(String location, Context context); diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/OperationsClient.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/OperationsClient.java index 9bea2aa0b1cbe..5ca1138cc97dc 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/OperationsClient.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/OperationsClient.java @@ -29,7 +29,7 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available operations for Data Lake Store. + * @return the list of available operations for Data Lake Store along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse(Context context); diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/TrustedIdProvidersClient.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/TrustedIdProvidersClient.java index 053699721a726..cc65eae506f28 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/TrustedIdProvidersClient.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/TrustedIdProvidersClient.java @@ -23,7 +23,8 @@ public interface TrustedIdProvidersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider list information. + * @return data Lake Store trusted identity provider list information as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByAccount(String resourceGroupName, String accountName); @@ -37,7 +38,8 @@ public interface TrustedIdProvidersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider list information. + * @return data Lake Store trusted identity provider list information as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByAccount(String resourceGroupName, String accountName, Context context); @@ -76,7 +78,7 @@ TrustedIdProviderInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider information. + * @return data Lake Store trusted identity provider information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -110,7 +112,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store trusted identity provider. + * @return the specified Data Lake Store trusted identity provider along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -143,7 +145,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider information. + * @return data Lake Store trusted identity provider information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -176,7 +178,7 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/VirtualNetworkRulesClient.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/VirtualNetworkRulesClient.java index e6c92f4ae20db..161b5573fc1dc 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/VirtualNetworkRulesClient.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/VirtualNetworkRulesClient.java @@ -23,7 +23,7 @@ public interface VirtualNetworkRulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule list information. + * @return data Lake Store virtual network rule list information as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByAccount(String resourceGroupName, String accountName); @@ -37,7 +37,7 @@ public interface VirtualNetworkRulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule list information. + * @return data Lake Store virtual network rule list information as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByAccount(String resourceGroupName, String accountName, Context context); @@ -74,7 +74,7 @@ VirtualNetworkRuleInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule information. + * @return data Lake Store virtual network rule information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -108,7 +108,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store virtual network rule. + * @return the specified Data Lake Store virtual network rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -139,7 +139,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule information. + * @return data Lake Store virtual network rule information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -172,7 +172,7 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CapabilityInformationInner.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CapabilityInformationInner.java index 82adf704a57ff..01a36226297cb 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CapabilityInformationInner.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CapabilityInformationInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datalakestore.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.models.SubscriptionState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; /** Subscription-level properties and limits for Data Lake Store. */ @Immutable public final class CapabilityInformationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CapabilityInformationInner.class); - /* * The subscription credentials that uniquely identifies the subscription. */ diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CreateDataLakeStoreAccountProperties.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CreateDataLakeStoreAccountProperties.java new file mode 100644 index 0000000000000..4d0f797e63e34 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CreateDataLakeStoreAccountProperties.java @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.datalakestore.models.CreateFirewallRuleWithAccountParameters; +import com.azure.resourcemanager.datalakestore.models.CreateTrustedIdProviderWithAccountParameters; +import com.azure.resourcemanager.datalakestore.models.CreateVirtualNetworkRuleWithAccountParameters; +import com.azure.resourcemanager.datalakestore.models.EncryptionConfig; +import com.azure.resourcemanager.datalakestore.models.EncryptionState; +import com.azure.resourcemanager.datalakestore.models.FirewallAllowAzureIpsState; +import com.azure.resourcemanager.datalakestore.models.FirewallState; +import com.azure.resourcemanager.datalakestore.models.TierType; +import com.azure.resourcemanager.datalakestore.models.TrustedIdProviderState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The CreateDataLakeStoreAccountProperties model. */ +@Fluent +public final class CreateDataLakeStoreAccountProperties { + /* + * The default owner group for all new folders and files created in the + * Data Lake Store account. + */ + @JsonProperty(value = "defaultGroup") + private String defaultGroup; + + /* + * The Key Vault encryption configuration. + */ + @JsonProperty(value = "encryptionConfig") + private EncryptionConfig encryptionConfig; + + /* + * The current state of encryption for this Data Lake Store account. + */ + @JsonProperty(value = "encryptionState") + private EncryptionState encryptionState; + + /* + * The list of firewall rules associated with this Data Lake Store account. + */ + @JsonProperty(value = "firewallRules") + private List firewallRules; + + /* + * The list of virtual network rules associated with this Data Lake Store + * account. + */ + @JsonProperty(value = "virtualNetworkRules") + private List virtualNetworkRules; + + /* + * The current state of the IP address firewall for this Data Lake Store + * account. + */ + @JsonProperty(value = "firewallState") + private FirewallState firewallState; + + /* + * The current state of allowing or disallowing IPs originating within + * Azure through the firewall. If the firewall is disabled, this is not + * enforced. + */ + @JsonProperty(value = "firewallAllowAzureIps") + private FirewallAllowAzureIpsState firewallAllowAzureIps; + + /* + * The list of trusted identity providers associated with this Data Lake + * Store account. + */ + @JsonProperty(value = "trustedIdProviders") + private List trustedIdProviders; + + /* + * The current state of the trusted identity provider feature for this Data + * Lake Store account. + */ + @JsonProperty(value = "trustedIdProviderState") + private TrustedIdProviderState trustedIdProviderState; + + /* + * The commitment tier to use for next month. + */ + @JsonProperty(value = "newTier") + private TierType newTier; + + /** + * Get the defaultGroup property: The default owner group for all new folders and files created in the Data Lake + * Store account. + * + * @return the defaultGroup value. + */ + public String defaultGroup() { + return this.defaultGroup; + } + + /** + * Set the defaultGroup property: The default owner group for all new folders and files created in the Data Lake + * Store account. + * + * @param defaultGroup the defaultGroup value to set. + * @return the CreateDataLakeStoreAccountProperties object itself. + */ + public CreateDataLakeStoreAccountProperties withDefaultGroup(String defaultGroup) { + this.defaultGroup = defaultGroup; + return this; + } + + /** + * Get the encryptionConfig property: The Key Vault encryption configuration. + * + * @return the encryptionConfig value. + */ + public EncryptionConfig encryptionConfig() { + return this.encryptionConfig; + } + + /** + * Set the encryptionConfig property: The Key Vault encryption configuration. + * + * @param encryptionConfig the encryptionConfig value to set. + * @return the CreateDataLakeStoreAccountProperties object itself. + */ + public CreateDataLakeStoreAccountProperties withEncryptionConfig(EncryptionConfig encryptionConfig) { + this.encryptionConfig = encryptionConfig; + return this; + } + + /** + * Get the encryptionState property: The current state of encryption for this Data Lake Store account. + * + * @return the encryptionState value. + */ + public EncryptionState encryptionState() { + return this.encryptionState; + } + + /** + * Set the encryptionState property: The current state of encryption for this Data Lake Store account. + * + * @param encryptionState the encryptionState value to set. + * @return the CreateDataLakeStoreAccountProperties object itself. + */ + public CreateDataLakeStoreAccountProperties withEncryptionState(EncryptionState encryptionState) { + this.encryptionState = encryptionState; + return this; + } + + /** + * Get the firewallRules property: The list of firewall rules associated with this Data Lake Store account. + * + * @return the firewallRules value. + */ + public List firewallRules() { + return this.firewallRules; + } + + /** + * Set the firewallRules property: The list of firewall rules associated with this Data Lake Store account. + * + * @param firewallRules the firewallRules value to set. + * @return the CreateDataLakeStoreAccountProperties object itself. + */ + public CreateDataLakeStoreAccountProperties withFirewallRules( + List firewallRules) { + this.firewallRules = firewallRules; + return this; + } + + /** + * Get the virtualNetworkRules property: The list of virtual network rules associated with this Data Lake Store + * account. + * + * @return the virtualNetworkRules value. + */ + public List virtualNetworkRules() { + return this.virtualNetworkRules; + } + + /** + * Set the virtualNetworkRules property: The list of virtual network rules associated with this Data Lake Store + * account. + * + * @param virtualNetworkRules the virtualNetworkRules value to set. + * @return the CreateDataLakeStoreAccountProperties object itself. + */ + public CreateDataLakeStoreAccountProperties withVirtualNetworkRules( + List virtualNetworkRules) { + this.virtualNetworkRules = virtualNetworkRules; + return this; + } + + /** + * Get the firewallState property: The current state of the IP address firewall for this Data Lake Store account. + * + * @return the firewallState value. + */ + public FirewallState firewallState() { + return this.firewallState; + } + + /** + * Set the firewallState property: The current state of the IP address firewall for this Data Lake Store account. + * + * @param firewallState the firewallState value to set. + * @return the CreateDataLakeStoreAccountProperties object itself. + */ + public CreateDataLakeStoreAccountProperties withFirewallState(FirewallState firewallState) { + this.firewallState = firewallState; + return this; + } + + /** + * Get the firewallAllowAzureIps property: The current state of allowing or disallowing IPs originating within Azure + * through the firewall. If the firewall is disabled, this is not enforced. + * + * @return the firewallAllowAzureIps value. + */ + public FirewallAllowAzureIpsState firewallAllowAzureIps() { + return this.firewallAllowAzureIps; + } + + /** + * Set the firewallAllowAzureIps property: The current state of allowing or disallowing IPs originating within Azure + * through the firewall. If the firewall is disabled, this is not enforced. + * + * @param firewallAllowAzureIps the firewallAllowAzureIps value to set. + * @return the CreateDataLakeStoreAccountProperties object itself. + */ + public CreateDataLakeStoreAccountProperties withFirewallAllowAzureIps( + FirewallAllowAzureIpsState firewallAllowAzureIps) { + this.firewallAllowAzureIps = firewallAllowAzureIps; + return this; + } + + /** + * Get the trustedIdProviders property: The list of trusted identity providers associated with this Data Lake Store + * account. + * + * @return the trustedIdProviders value. + */ + public List trustedIdProviders() { + return this.trustedIdProviders; + } + + /** + * Set the trustedIdProviders property: The list of trusted identity providers associated with this Data Lake Store + * account. + * + * @param trustedIdProviders the trustedIdProviders value to set. + * @return the CreateDataLakeStoreAccountProperties object itself. + */ + public CreateDataLakeStoreAccountProperties withTrustedIdProviders( + List trustedIdProviders) { + this.trustedIdProviders = trustedIdProviders; + return this; + } + + /** + * Get the trustedIdProviderState property: The current state of the trusted identity provider feature for this Data + * Lake Store account. + * + * @return the trustedIdProviderState value. + */ + public TrustedIdProviderState trustedIdProviderState() { + return this.trustedIdProviderState; + } + + /** + * Set the trustedIdProviderState property: The current state of the trusted identity provider feature for this Data + * Lake Store account. + * + * @param trustedIdProviderState the trustedIdProviderState value to set. + * @return the CreateDataLakeStoreAccountProperties object itself. + */ + public CreateDataLakeStoreAccountProperties withTrustedIdProviderState( + TrustedIdProviderState trustedIdProviderState) { + this.trustedIdProviderState = trustedIdProviderState; + return this; + } + + /** + * Get the newTier property: The commitment tier to use for next month. + * + * @return the newTier value. + */ + public TierType newTier() { + return this.newTier; + } + + /** + * Set the newTier property: The commitment tier to use for next month. + * + * @param newTier the newTier value to set. + * @return the CreateDataLakeStoreAccountProperties object itself. + */ + public CreateDataLakeStoreAccountProperties withNewTier(TierType newTier) { + this.newTier = newTier; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryptionConfig() != null) { + encryptionConfig().validate(); + } + if (firewallRules() != null) { + firewallRules().forEach(e -> e.validate()); + } + if (virtualNetworkRules() != null) { + virtualNetworkRules().forEach(e -> e.validate()); + } + if (trustedIdProviders() != null) { + trustedIdProviders().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CreateOrUpdateFirewallRuleProperties.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CreateOrUpdateFirewallRuleProperties.java new file mode 100644 index 0000000000000..c4d53e9d3fd3c --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CreateOrUpdateFirewallRuleProperties.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The firewall rule properties to use when creating a new firewall rule. */ +@Fluent +public final class CreateOrUpdateFirewallRuleProperties { + /* + * The start IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "startIpAddress", required = true) + private String startIpAddress; + + /* + * The end IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "endIpAddress", required = true) + private String endIpAddress; + + /** + * Get the startIpAddress property: The start IP address for the firewall rule. This can be either ipv4 or ipv6. + * Start and End should be in the same protocol. + * + * @return the startIpAddress value. + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Set the startIpAddress property: The start IP address for the firewall rule. This can be either ipv4 or ipv6. + * Start and End should be in the same protocol. + * + * @param startIpAddress the startIpAddress value to set. + * @return the CreateOrUpdateFirewallRuleProperties object itself. + */ + public CreateOrUpdateFirewallRuleProperties withStartIpAddress(String startIpAddress) { + this.startIpAddress = startIpAddress; + return this; + } + + /** + * Get the endIpAddress property: The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start + * and End should be in the same protocol. + * + * @return the endIpAddress value. + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Set the endIpAddress property: The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start + * and End should be in the same protocol. + * + * @param endIpAddress the endIpAddress value to set. + * @return the CreateOrUpdateFirewallRuleProperties object itself. + */ + public CreateOrUpdateFirewallRuleProperties withEndIpAddress(String endIpAddress) { + this.endIpAddress = endIpAddress; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (startIpAddress() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property startIpAddress in model CreateOrUpdateFirewallRuleProperties")); + } + if (endIpAddress() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property endIpAddress in model CreateOrUpdateFirewallRuleProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CreateOrUpdateFirewallRuleProperties.class); +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CreateOrUpdateTrustedIdProviderProperties.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CreateOrUpdateTrustedIdProviderProperties.java new file mode 100644 index 0000000000000..5fa5f46e74bdc --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CreateOrUpdateTrustedIdProviderProperties.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The trusted identity provider properties to use when creating a new trusted identity provider. */ +@Fluent +public final class CreateOrUpdateTrustedIdProviderProperties { + /* + * The URL of this trusted identity provider. + */ + @JsonProperty(value = "idProvider", required = true) + private String idProvider; + + /** + * Get the idProvider property: The URL of this trusted identity provider. + * + * @return the idProvider value. + */ + public String idProvider() { + return this.idProvider; + } + + /** + * Set the idProvider property: The URL of this trusted identity provider. + * + * @param idProvider the idProvider value to set. + * @return the CreateOrUpdateTrustedIdProviderProperties object itself. + */ + public CreateOrUpdateTrustedIdProviderProperties withIdProvider(String idProvider) { + this.idProvider = idProvider; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (idProvider() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property idProvider in model CreateOrUpdateTrustedIdProviderProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CreateOrUpdateTrustedIdProviderProperties.class); +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CreateOrUpdateVirtualNetworkRuleProperties.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CreateOrUpdateVirtualNetworkRuleProperties.java new file mode 100644 index 0000000000000..99f9d84fe9518 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/CreateOrUpdateVirtualNetworkRuleProperties.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The virtual network rule properties to use when creating a new virtual network rule. */ +@Fluent +public final class CreateOrUpdateVirtualNetworkRuleProperties { + /* + * The resource identifier for the subnet. + */ + @JsonProperty(value = "subnetId", required = true) + private String subnetId; + + /** + * Get the subnetId property: The resource identifier for the subnet. + * + * @return the subnetId value. + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the subnetId property: The resource identifier for the subnet. + * + * @param subnetId the subnetId value to set. + * @return the CreateOrUpdateVirtualNetworkRuleProperties object itself. + */ + public CreateOrUpdateVirtualNetworkRuleProperties withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subnetId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property subnetId in model CreateOrUpdateVirtualNetworkRuleProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CreateOrUpdateVirtualNetworkRuleProperties.class); +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountBasicInner.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountBasicInner.java index 3447ce14f6b4d..f0624a4589613 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountBasicInner.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountBasicInner.java @@ -4,59 +4,46 @@ package com.azure.resourcemanager.datalakestore.fluent.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; +import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.models.DataLakeStoreAccountState; import com.azure.resourcemanager.datalakestore.models.DataLakeStoreAccountStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.Map; import java.util.UUID; /** Basic Data Lake Store account information, returned on list calls. */ -@JsonFlatten -@Immutable -public class DataLakeStoreAccountBasicInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataLakeStoreAccountBasicInner.class); - - /* - * The unique identifier associated with this Data Lake Store account. - */ - @JsonProperty(value = "properties.accountId", access = JsonProperty.Access.WRITE_ONLY) - private UUID accountId; - +@Fluent +public final class DataLakeStoreAccountBasicInner extends Resource { /* - * The provisioning status of the Data Lake Store account. + * The basic Data Lake Store account properties. */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private DataLakeStoreAccountStatus provisioningState; + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeStoreAccountPropertiesBasic innerProperties; - /* - * The state of the Data Lake Store account. - */ - @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) - private DataLakeStoreAccountState state; - - /* - * The account creation time. + /** + * Get the innerProperties property: The basic Data Lake Store account properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationTime; + private DataLakeStoreAccountPropertiesBasic innerProperties() { + return this.innerProperties; + } - /* - * The account last modified time. - */ - @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedTime; + /** {@inheritDoc} */ + @Override + public DataLakeStoreAccountBasicInner withLocation(String location) { + super.withLocation(location); + return this; + } - /* - * The full CName endpoint for this account. - */ - @JsonProperty(value = "properties.endpoint", access = JsonProperty.Access.WRITE_ONLY) - private String endpoint; + /** {@inheritDoc} */ + @Override + public DataLakeStoreAccountBasicInner withTags(Map tags) { + super.withTags(tags); + return this; + } /** * Get the accountId property: The unique identifier associated with this Data Lake Store account. @@ -64,7 +51,7 @@ public class DataLakeStoreAccountBasicInner extends Resource { * @return the accountId value. */ public UUID accountId() { - return this.accountId; + return this.innerProperties() == null ? null : this.innerProperties().accountId(); } /** @@ -73,7 +60,7 @@ public UUID accountId() { * @return the provisioningState value. */ public DataLakeStoreAccountStatus provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -82,7 +69,7 @@ public DataLakeStoreAccountStatus provisioningState() { * @return the state value. */ public DataLakeStoreAccountState state() { - return this.state; + return this.innerProperties() == null ? null : this.innerProperties().state(); } /** @@ -91,7 +78,7 @@ public DataLakeStoreAccountState state() { * @return the creationTime value. */ public OffsetDateTime creationTime() { - return this.creationTime; + return this.innerProperties() == null ? null : this.innerProperties().creationTime(); } /** @@ -100,7 +87,7 @@ public OffsetDateTime creationTime() { * @return the lastModifiedTime value. */ public OffsetDateTime lastModifiedTime() { - return this.lastModifiedTime; + return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTime(); } /** @@ -109,21 +96,7 @@ public OffsetDateTime lastModifiedTime() { * @return the endpoint value. */ public String endpoint() { - return this.endpoint; - } - - /** {@inheritDoc} */ - @Override - public DataLakeStoreAccountBasicInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataLakeStoreAccountBasicInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().endpoint(); } /** @@ -132,5 +105,8 @@ public DataLakeStoreAccountBasicInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountInner.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountInner.java index 9ba1a9868f203..ec0c8ccf591cc 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountInner.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountInner.java @@ -4,10 +4,8 @@ package com.azure.resourcemanager.datalakestore.fluent.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; +import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.models.DataLakeStoreAccountState; import com.azure.resourcemanager.datalakestore.models.DataLakeStoreAccountStatus; import com.azure.resourcemanager.datalakestore.models.EncryptionConfig; @@ -18,7 +16,6 @@ import com.azure.resourcemanager.datalakestore.models.FirewallState; import com.azure.resourcemanager.datalakestore.models.TierType; import com.azure.resourcemanager.datalakestore.models.TrustedIdProviderState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -26,11 +23,8 @@ import java.util.UUID; /** Data Lake Store account information. */ -@JsonFlatten -@Immutable -public class DataLakeStoreAccountInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataLakeStoreAccountInner.class); - +@Fluent +public final class DataLakeStoreAccountInner extends Resource { /* * The Key Vault encryption identity, if any. */ @@ -38,120 +32,10 @@ public class DataLakeStoreAccountInner extends Resource { private EncryptionIdentity identity; /* - * The unique identifier associated with this Data Lake Store account. - */ - @JsonProperty(value = "properties.accountId", access = JsonProperty.Access.WRITE_ONLY) - private UUID accountId; - - /* - * The provisioning status of the Data Lake Store account. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private DataLakeStoreAccountStatus provisioningState; - - /* - * The state of the Data Lake Store account. - */ - @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) - private DataLakeStoreAccountState state; - - /* - * The account creation time. - */ - @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationTime; - - /* - * The account last modified time. - */ - @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedTime; - - /* - * The full CName endpoint for this account. - */ - @JsonProperty(value = "properties.endpoint", access = JsonProperty.Access.WRITE_ONLY) - private String endpoint; - - /* - * The default owner group for all new folders and files created in the - * Data Lake Store account. - */ - @JsonProperty(value = "properties.defaultGroup", access = JsonProperty.Access.WRITE_ONLY) - private String defaultGroup; - - /* - * The Key Vault encryption configuration. - */ - @JsonProperty(value = "properties.encryptionConfig", access = JsonProperty.Access.WRITE_ONLY) - private EncryptionConfig encryptionConfig; - - /* - * The current state of encryption for this Data Lake Store account. - */ - @JsonProperty(value = "properties.encryptionState", access = JsonProperty.Access.WRITE_ONLY) - private EncryptionState encryptionState; - - /* - * The current state of encryption provisioning for this Data Lake Store - * account. - */ - @JsonProperty(value = "properties.encryptionProvisioningState", access = JsonProperty.Access.WRITE_ONLY) - private EncryptionProvisioningState encryptionProvisioningState; - - /* - * The list of firewall rules associated with this Data Lake Store account. - */ - @JsonProperty(value = "properties.firewallRules", access = JsonProperty.Access.WRITE_ONLY) - private List firewallRules; - - /* - * The list of virtual network rules associated with this Data Lake Store - * account. - */ - @JsonProperty(value = "properties.virtualNetworkRules", access = JsonProperty.Access.WRITE_ONLY) - private List virtualNetworkRules; - - /* - * The current state of the IP address firewall for this Data Lake Store - * account. - */ - @JsonProperty(value = "properties.firewallState", access = JsonProperty.Access.WRITE_ONLY) - private FirewallState firewallState; - - /* - * The current state of allowing or disallowing IPs originating within - * Azure through the firewall. If the firewall is disabled, this is not - * enforced. - */ - @JsonProperty(value = "properties.firewallAllowAzureIps", access = JsonProperty.Access.WRITE_ONLY) - private FirewallAllowAzureIpsState firewallAllowAzureIps; - - /* - * The list of trusted identity providers associated with this Data Lake - * Store account. + * The Data Lake Store account properties. */ - @JsonProperty(value = "properties.trustedIdProviders", access = JsonProperty.Access.WRITE_ONLY) - private List trustedIdProviders; - - /* - * The current state of the trusted identity provider feature for this Data - * Lake Store account. - */ - @JsonProperty(value = "properties.trustedIdProviderState", access = JsonProperty.Access.WRITE_ONLY) - private TrustedIdProviderState trustedIdProviderState; - - /* - * The commitment tier to use for next month. - */ - @JsonProperty(value = "properties.newTier", access = JsonProperty.Access.WRITE_ONLY) - private TierType newTier; - - /* - * The commitment tier in use for the current month. - */ - @JsonProperty(value = "properties.currentTier", access = JsonProperty.Access.WRITE_ONLY) - private TierType currentTier; + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private DataLakeStoreAccountProperties innerProperties; /** * Get the identity property: The Key Vault encryption identity, if any. @@ -163,57 +47,26 @@ public EncryptionIdentity identity() { } /** - * Get the accountId property: The unique identifier associated with this Data Lake Store account. + * Get the innerProperties property: The Data Lake Store account properties. * - * @return the accountId value. + * @return the innerProperties value. */ - public UUID accountId() { - return this.accountId; + private DataLakeStoreAccountProperties innerProperties() { + return this.innerProperties; } - /** - * Get the provisioningState property: The provisioning status of the Data Lake Store account. - * - * @return the provisioningState value. - */ - public DataLakeStoreAccountStatus provisioningState() { - return this.provisioningState; - } - - /** - * Get the state property: The state of the Data Lake Store account. - * - * @return the state value. - */ - public DataLakeStoreAccountState state() { - return this.state; - } - - /** - * Get the creationTime property: The account creation time. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Get the lastModifiedTime property: The account last modified time. - * - * @return the lastModifiedTime value. - */ - public OffsetDateTime lastModifiedTime() { - return this.lastModifiedTime; + /** {@inheritDoc} */ + @Override + public DataLakeStoreAccountInner withLocation(String location) { + super.withLocation(location); + return this; } - /** - * Get the endpoint property: The full CName endpoint for this account. - * - * @return the endpoint value. - */ - public String endpoint() { - return this.endpoint; + /** {@inheritDoc} */ + @Override + public DataLakeStoreAccountInner withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -223,7 +76,7 @@ public String endpoint() { * @return the defaultGroup value. */ public String defaultGroup() { - return this.defaultGroup; + return this.innerProperties() == null ? null : this.innerProperties().defaultGroup(); } /** @@ -232,7 +85,7 @@ public String defaultGroup() { * @return the encryptionConfig value. */ public EncryptionConfig encryptionConfig() { - return this.encryptionConfig; + return this.innerProperties() == null ? null : this.innerProperties().encryptionConfig(); } /** @@ -241,7 +94,7 @@ public EncryptionConfig encryptionConfig() { * @return the encryptionState value. */ public EncryptionState encryptionState() { - return this.encryptionState; + return this.innerProperties() == null ? null : this.innerProperties().encryptionState(); } /** @@ -251,7 +104,7 @@ public EncryptionState encryptionState() { * @return the encryptionProvisioningState value. */ public EncryptionProvisioningState encryptionProvisioningState() { - return this.encryptionProvisioningState; + return this.innerProperties() == null ? null : this.innerProperties().encryptionProvisioningState(); } /** @@ -260,7 +113,7 @@ public EncryptionProvisioningState encryptionProvisioningState() { * @return the firewallRules value. */ public List firewallRules() { - return this.firewallRules; + return this.innerProperties() == null ? null : this.innerProperties().firewallRules(); } /** @@ -270,7 +123,7 @@ public List firewallRules() { * @return the virtualNetworkRules value. */ public List virtualNetworkRules() { - return this.virtualNetworkRules; + return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkRules(); } /** @@ -279,7 +132,7 @@ public List virtualNetworkRules() { * @return the firewallState value. */ public FirewallState firewallState() { - return this.firewallState; + return this.innerProperties() == null ? null : this.innerProperties().firewallState(); } /** @@ -289,7 +142,7 @@ public FirewallState firewallState() { * @return the firewallAllowAzureIps value. */ public FirewallAllowAzureIpsState firewallAllowAzureIps() { - return this.firewallAllowAzureIps; + return this.innerProperties() == null ? null : this.innerProperties().firewallAllowAzureIps(); } /** @@ -299,7 +152,7 @@ public FirewallAllowAzureIpsState firewallAllowAzureIps() { * @return the trustedIdProviders value. */ public List trustedIdProviders() { - return this.trustedIdProviders; + return this.innerProperties() == null ? null : this.innerProperties().trustedIdProviders(); } /** @@ -309,7 +162,7 @@ public List trustedIdProviders() { * @return the trustedIdProviderState value. */ public TrustedIdProviderState trustedIdProviderState() { - return this.trustedIdProviderState; + return this.innerProperties() == null ? null : this.innerProperties().trustedIdProviderState(); } /** @@ -318,7 +171,7 @@ public TrustedIdProviderState trustedIdProviderState() { * @return the newTier value. */ public TierType newTier() { - return this.newTier; + return this.innerProperties() == null ? null : this.innerProperties().newTier(); } /** @@ -327,21 +180,61 @@ public TierType newTier() { * @return the currentTier value. */ public TierType currentTier() { - return this.currentTier; + return this.innerProperties() == null ? null : this.innerProperties().currentTier(); } - /** {@inheritDoc} */ - @Override - public DataLakeStoreAccountInner withLocation(String location) { - super.withLocation(location); - return this; + /** + * Get the accountId property: The unique identifier associated with this Data Lake Store account. + * + * @return the accountId value. + */ + public UUID accountId() { + return this.innerProperties() == null ? null : this.innerProperties().accountId(); } - /** {@inheritDoc} */ - @Override - public DataLakeStoreAccountInner withTags(Map tags) { - super.withTags(tags); - return this; + /** + * Get the provisioningState property: The provisioning status of the Data Lake Store account. + * + * @return the provisioningState value. + */ + public DataLakeStoreAccountStatus provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the state property: The state of the Data Lake Store account. + * + * @return the state value. + */ + public DataLakeStoreAccountState state() { + return this.innerProperties() == null ? null : this.innerProperties().state(); + } + + /** + * Get the creationTime property: The account creation time. + * + * @return the creationTime value. + */ + public OffsetDateTime creationTime() { + return this.innerProperties() == null ? null : this.innerProperties().creationTime(); + } + + /** + * Get the lastModifiedTime property: The account last modified time. + * + * @return the lastModifiedTime value. + */ + public OffsetDateTime lastModifiedTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTime(); + } + + /** + * Get the endpoint property: The full CName endpoint for this account. + * + * @return the endpoint value. + */ + public String endpoint() { + return this.innerProperties() == null ? null : this.innerProperties().endpoint(); } /** @@ -353,17 +246,8 @@ public void validate() { if (identity() != null) { identity().validate(); } - if (encryptionConfig() != null) { - encryptionConfig().validate(); - } - if (firewallRules() != null) { - firewallRules().forEach(e -> e.validate()); - } - if (virtualNetworkRules() != null) { - virtualNetworkRules().forEach(e -> e.validate()); - } - if (trustedIdProviders() != null) { - trustedIdProviders().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccountProperties.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountProperties.java similarity index 92% rename from sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccountProperties.java rename to sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountProperties.java index 301a87fa0d2ff..755a7309667e5 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccountProperties.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountProperties.java @@ -2,22 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.datalakestore.models; +package com.azure.resourcemanager.datalakestore.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.datalakestore.fluent.models.FirewallRuleInner; -import com.azure.resourcemanager.datalakestore.fluent.models.TrustedIdProviderInner; -import com.azure.resourcemanager.datalakestore.fluent.models.VirtualNetworkRuleInner; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.models.EncryptionConfig; +import com.azure.resourcemanager.datalakestore.models.EncryptionProvisioningState; +import com.azure.resourcemanager.datalakestore.models.EncryptionState; +import com.azure.resourcemanager.datalakestore.models.FirewallAllowAzureIpsState; +import com.azure.resourcemanager.datalakestore.models.FirewallState; +import com.azure.resourcemanager.datalakestore.models.TierType; +import com.azure.resourcemanager.datalakestore.models.TrustedIdProviderState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Data Lake Store account properties information. */ @Immutable public final class DataLakeStoreAccountProperties extends DataLakeStoreAccountPropertiesBasic { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataLakeStoreAccountProperties.class); - /* * The default owner group for all new folders and files created in the * Data Lake Store account. diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccountPropertiesBasic.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountPropertiesBasic.java similarity index 92% rename from sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccountPropertiesBasic.java rename to sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountPropertiesBasic.java index 99aa551f14347..99a5d50ae200b 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccountPropertiesBasic.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/DataLakeStoreAccountPropertiesBasic.java @@ -2,11 +2,11 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.datalakestore.models; +package com.azure.resourcemanager.datalakestore.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.models.DataLakeStoreAccountState; +import com.azure.resourcemanager.datalakestore.models.DataLakeStoreAccountStatus; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.UUID; @@ -14,8 +14,6 @@ /** The basic account specific properties that are associated with an underlying Data Lake Store account. */ @Immutable public class DataLakeStoreAccountPropertiesBasic { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataLakeStoreAccountPropertiesBasic.class); - /* * The unique identifier associated with this Data Lake Store account. */ diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/FirewallRuleInner.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/FirewallRuleInner.java index 4b891317fd4c5..ce8132c307877 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/FirewallRuleInner.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/FirewallRuleInner.java @@ -4,32 +4,18 @@ package com.azure.resourcemanager.datalakestore.fluent.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; +import com.azure.core.annotation.Fluent; import com.azure.core.management.SubResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Data Lake Store firewall rule information. */ -@JsonFlatten -@Immutable -public class FirewallRuleInner extends SubResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FirewallRuleInner.class); - +@Fluent +public final class FirewallRuleInner extends SubResource { /* - * The start IP address for the firewall rule. This can be either ipv4 or - * ipv6. Start and End should be in the same protocol. + * The firewall rule properties. */ - @JsonProperty(value = "properties.startIpAddress", access = JsonProperty.Access.WRITE_ONLY) - private String startIpAddress; - - /* - * The end IP address for the firewall rule. This can be either ipv4 or - * ipv6. Start and End should be in the same protocol. - */ - @JsonProperty(value = "properties.endIpAddress", access = JsonProperty.Access.WRITE_ONLY) - private String endIpAddress; + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private FirewallRuleProperties innerProperties; /* * The resource name. @@ -44,23 +30,12 @@ public class FirewallRuleInner extends SubResource { private String type; /** - * Get the startIpAddress property: The start IP address for the firewall rule. This can be either ipv4 or ipv6. - * Start and End should be in the same protocol. - * - * @return the startIpAddress value. - */ - public String startIpAddress() { - return this.startIpAddress; - } - - /** - * Get the endIpAddress property: The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start - * and End should be in the same protocol. + * Get the innerProperties property: The firewall rule properties. * - * @return the endIpAddress value. + * @return the innerProperties value. */ - public String endIpAddress() { - return this.endIpAddress; + private FirewallRuleProperties innerProperties() { + return this.innerProperties; } /** @@ -88,11 +63,34 @@ public FirewallRuleInner withId(String id) { return this; } + /** + * Get the startIpAddress property: The start IP address for the firewall rule. This can be either ipv4 or ipv6. + * Start and End should be in the same protocol. + * + * @return the startIpAddress value. + */ + public String startIpAddress() { + return this.innerProperties() == null ? null : this.innerProperties().startIpAddress(); + } + + /** + * Get the endIpAddress property: The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start + * and End should be in the same protocol. + * + * @return the endIpAddress value. + */ + public String endIpAddress() { + return this.innerProperties() == null ? null : this.innerProperties().endIpAddress(); + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/FirewallRuleProperties.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/FirewallRuleProperties.java new file mode 100644 index 0000000000000..71f280358f5c2 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/FirewallRuleProperties.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The firewall rule properties. */ +@Immutable +public final class FirewallRuleProperties { + /* + * The start IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "startIpAddress", access = JsonProperty.Access.WRITE_ONLY) + private String startIpAddress; + + /* + * The end IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "endIpAddress", access = JsonProperty.Access.WRITE_ONLY) + private String endIpAddress; + + /** + * Get the startIpAddress property: The start IP address for the firewall rule. This can be either ipv4 or ipv6. + * Start and End should be in the same protocol. + * + * @return the startIpAddress value. + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Get the endIpAddress property: The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start + * and End should be in the same protocol. + * + * @return the endIpAddress value. + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/NameAvailabilityInformationInner.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/NameAvailabilityInformationInner.java index 1a3571bd27453..746871b37d8dd 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/NameAvailabilityInformationInner.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/NameAvailabilityInformationInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datalakestore.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; /** Data Lake Store account name availability result information. */ @Immutable public final class NameAvailabilityInformationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityInformationInner.class); - /* * The Boolean value of true or false to indicate whether the Data Lake * Store account name is available or not. diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/OperationListResultInner.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/OperationListResultInner.java index b7adb2293b132..bd97c8265f6b0 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/OperationListResultInner.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/OperationListResultInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datalakestore.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.models.Operation; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of available operations for Data Lake Store. */ @Immutable public final class OperationListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResultInner.class); - /* * The results of the list operation. */ diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/TrustedIdProviderInner.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/TrustedIdProviderInner.java index 253bc3e4d28ed..0f82b9f80a5b7 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/TrustedIdProviderInner.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/TrustedIdProviderInner.java @@ -4,24 +4,18 @@ package com.azure.resourcemanager.datalakestore.fluent.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; +import com.azure.core.annotation.Fluent; import com.azure.core.management.SubResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Data Lake Store trusted identity provider information. */ -@JsonFlatten -@Immutable -public class TrustedIdProviderInner extends SubResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TrustedIdProviderInner.class); - +@Fluent +public final class TrustedIdProviderInner extends SubResource { /* - * The URL of this trusted identity provider. + * The trusted identity provider properties. */ - @JsonProperty(value = "properties.idProvider", access = JsonProperty.Access.WRITE_ONLY) - private String idProvider; + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private TrustedIdProviderProperties innerProperties; /* * The resource name. @@ -36,12 +30,12 @@ public class TrustedIdProviderInner extends SubResource { private String type; /** - * Get the idProvider property: The URL of this trusted identity provider. + * Get the innerProperties property: The trusted identity provider properties. * - * @return the idProvider value. + * @return the innerProperties value. */ - public String idProvider() { - return this.idProvider; + private TrustedIdProviderProperties innerProperties() { + return this.innerProperties; } /** @@ -69,11 +63,23 @@ public TrustedIdProviderInner withId(String id) { return this; } + /** + * Get the idProvider property: The URL of this trusted identity provider. + * + * @return the idProvider value. + */ + public String idProvider() { + return this.innerProperties() == null ? null : this.innerProperties().idProvider(); + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/TrustedIdProviderProperties.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/TrustedIdProviderProperties.java new file mode 100644 index 0000000000000..694198863281e --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/TrustedIdProviderProperties.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The trusted identity provider properties. */ +@Immutable +public final class TrustedIdProviderProperties { + /* + * The URL of this trusted identity provider. + */ + @JsonProperty(value = "idProvider", access = JsonProperty.Access.WRITE_ONLY) + private String idProvider; + + /** + * Get the idProvider property: The URL of this trusted identity provider. + * + * @return the idProvider value. + */ + public String idProvider() { + return this.idProvider; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UpdateDataLakeStoreAccountProperties.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UpdateDataLakeStoreAccountProperties.java new file mode 100644 index 0000000000000..8f2b10ba8c35a --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UpdateDataLakeStoreAccountProperties.java @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.datalakestore.models.FirewallAllowAzureIpsState; +import com.azure.resourcemanager.datalakestore.models.FirewallState; +import com.azure.resourcemanager.datalakestore.models.TierType; +import com.azure.resourcemanager.datalakestore.models.TrustedIdProviderState; +import com.azure.resourcemanager.datalakestore.models.UpdateEncryptionConfig; +import com.azure.resourcemanager.datalakestore.models.UpdateFirewallRuleWithAccountParameters; +import com.azure.resourcemanager.datalakestore.models.UpdateTrustedIdProviderWithAccountParameters; +import com.azure.resourcemanager.datalakestore.models.UpdateVirtualNetworkRuleWithAccountParameters; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Data Lake Store account properties information to be updated. */ +@Fluent +public final class UpdateDataLakeStoreAccountProperties { + /* + * The default owner group for all new folders and files created in the + * Data Lake Store account. + */ + @JsonProperty(value = "defaultGroup") + private String defaultGroup; + + /* + * Used for rotation of user managed Key Vault keys. Can only be used to + * rotate a user managed encryption Key Vault key. + */ + @JsonProperty(value = "encryptionConfig") + private UpdateEncryptionConfig encryptionConfig; + + /* + * The list of firewall rules associated with this Data Lake Store account. + */ + @JsonProperty(value = "firewallRules") + private List firewallRules; + + /* + * The list of virtual network rules associated with this Data Lake Store + * account. + */ + @JsonProperty(value = "virtualNetworkRules") + private List virtualNetworkRules; + + /* + * The current state of the IP address firewall for this Data Lake Store + * account. Disabling the firewall does not remove existing rules, they + * will just be ignored until the firewall is re-enabled. + */ + @JsonProperty(value = "firewallState") + private FirewallState firewallState; + + /* + * The current state of allowing or disallowing IPs originating within + * Azure through the firewall. If the firewall is disabled, this is not + * enforced. + */ + @JsonProperty(value = "firewallAllowAzureIps") + private FirewallAllowAzureIpsState firewallAllowAzureIps; + + /* + * The list of trusted identity providers associated with this Data Lake + * Store account. + */ + @JsonProperty(value = "trustedIdProviders") + private List trustedIdProviders; + + /* + * The current state of the trusted identity provider feature for this Data + * Lake Store account. Disabling trusted identity provider functionality + * does not remove the providers, they will just be ignored until this + * feature is re-enabled. + */ + @JsonProperty(value = "trustedIdProviderState") + private TrustedIdProviderState trustedIdProviderState; + + /* + * The commitment tier to use for next month. + */ + @JsonProperty(value = "newTier") + private TierType newTier; + + /** + * Get the defaultGroup property: The default owner group for all new folders and files created in the Data Lake + * Store account. + * + * @return the defaultGroup value. + */ + public String defaultGroup() { + return this.defaultGroup; + } + + /** + * Set the defaultGroup property: The default owner group for all new folders and files created in the Data Lake + * Store account. + * + * @param defaultGroup the defaultGroup value to set. + * @return the UpdateDataLakeStoreAccountProperties object itself. + */ + public UpdateDataLakeStoreAccountProperties withDefaultGroup(String defaultGroup) { + this.defaultGroup = defaultGroup; + return this; + } + + /** + * Get the encryptionConfig property: Used for rotation of user managed Key Vault keys. Can only be used to rotate a + * user managed encryption Key Vault key. + * + * @return the encryptionConfig value. + */ + public UpdateEncryptionConfig encryptionConfig() { + return this.encryptionConfig; + } + + /** + * Set the encryptionConfig property: Used for rotation of user managed Key Vault keys. Can only be used to rotate a + * user managed encryption Key Vault key. + * + * @param encryptionConfig the encryptionConfig value to set. + * @return the UpdateDataLakeStoreAccountProperties object itself. + */ + public UpdateDataLakeStoreAccountProperties withEncryptionConfig(UpdateEncryptionConfig encryptionConfig) { + this.encryptionConfig = encryptionConfig; + return this; + } + + /** + * Get the firewallRules property: The list of firewall rules associated with this Data Lake Store account. + * + * @return the firewallRules value. + */ + public List firewallRules() { + return this.firewallRules; + } + + /** + * Set the firewallRules property: The list of firewall rules associated with this Data Lake Store account. + * + * @param firewallRules the firewallRules value to set. + * @return the UpdateDataLakeStoreAccountProperties object itself. + */ + public UpdateDataLakeStoreAccountProperties withFirewallRules( + List firewallRules) { + this.firewallRules = firewallRules; + return this; + } + + /** + * Get the virtualNetworkRules property: The list of virtual network rules associated with this Data Lake Store + * account. + * + * @return the virtualNetworkRules value. + */ + public List virtualNetworkRules() { + return this.virtualNetworkRules; + } + + /** + * Set the virtualNetworkRules property: The list of virtual network rules associated with this Data Lake Store + * account. + * + * @param virtualNetworkRules the virtualNetworkRules value to set. + * @return the UpdateDataLakeStoreAccountProperties object itself. + */ + public UpdateDataLakeStoreAccountProperties withVirtualNetworkRules( + List virtualNetworkRules) { + this.virtualNetworkRules = virtualNetworkRules; + return this; + } + + /** + * Get the firewallState property: The current state of the IP address firewall for this Data Lake Store account. + * Disabling the firewall does not remove existing rules, they will just be ignored until the firewall is + * re-enabled. + * + * @return the firewallState value. + */ + public FirewallState firewallState() { + return this.firewallState; + } + + /** + * Set the firewallState property: The current state of the IP address firewall for this Data Lake Store account. + * Disabling the firewall does not remove existing rules, they will just be ignored until the firewall is + * re-enabled. + * + * @param firewallState the firewallState value to set. + * @return the UpdateDataLakeStoreAccountProperties object itself. + */ + public UpdateDataLakeStoreAccountProperties withFirewallState(FirewallState firewallState) { + this.firewallState = firewallState; + return this; + } + + /** + * Get the firewallAllowAzureIps property: The current state of allowing or disallowing IPs originating within Azure + * through the firewall. If the firewall is disabled, this is not enforced. + * + * @return the firewallAllowAzureIps value. + */ + public FirewallAllowAzureIpsState firewallAllowAzureIps() { + return this.firewallAllowAzureIps; + } + + /** + * Set the firewallAllowAzureIps property: The current state of allowing or disallowing IPs originating within Azure + * through the firewall. If the firewall is disabled, this is not enforced. + * + * @param firewallAllowAzureIps the firewallAllowAzureIps value to set. + * @return the UpdateDataLakeStoreAccountProperties object itself. + */ + public UpdateDataLakeStoreAccountProperties withFirewallAllowAzureIps( + FirewallAllowAzureIpsState firewallAllowAzureIps) { + this.firewallAllowAzureIps = firewallAllowAzureIps; + return this; + } + + /** + * Get the trustedIdProviders property: The list of trusted identity providers associated with this Data Lake Store + * account. + * + * @return the trustedIdProviders value. + */ + public List trustedIdProviders() { + return this.trustedIdProviders; + } + + /** + * Set the trustedIdProviders property: The list of trusted identity providers associated with this Data Lake Store + * account. + * + * @param trustedIdProviders the trustedIdProviders value to set. + * @return the UpdateDataLakeStoreAccountProperties object itself. + */ + public UpdateDataLakeStoreAccountProperties withTrustedIdProviders( + List trustedIdProviders) { + this.trustedIdProviders = trustedIdProviders; + return this; + } + + /** + * Get the trustedIdProviderState property: The current state of the trusted identity provider feature for this Data + * Lake Store account. Disabling trusted identity provider functionality does not remove the providers, they will + * just be ignored until this feature is re-enabled. + * + * @return the trustedIdProviderState value. + */ + public TrustedIdProviderState trustedIdProviderState() { + return this.trustedIdProviderState; + } + + /** + * Set the trustedIdProviderState property: The current state of the trusted identity provider feature for this Data + * Lake Store account. Disabling trusted identity provider functionality does not remove the providers, they will + * just be ignored until this feature is re-enabled. + * + * @param trustedIdProviderState the trustedIdProviderState value to set. + * @return the UpdateDataLakeStoreAccountProperties object itself. + */ + public UpdateDataLakeStoreAccountProperties withTrustedIdProviderState( + TrustedIdProviderState trustedIdProviderState) { + this.trustedIdProviderState = trustedIdProviderState; + return this; + } + + /** + * Get the newTier property: The commitment tier to use for next month. + * + * @return the newTier value. + */ + public TierType newTier() { + return this.newTier; + } + + /** + * Set the newTier property: The commitment tier to use for next month. + * + * @param newTier the newTier value to set. + * @return the UpdateDataLakeStoreAccountProperties object itself. + */ + public UpdateDataLakeStoreAccountProperties withNewTier(TierType newTier) { + this.newTier = newTier; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryptionConfig() != null) { + encryptionConfig().validate(); + } + if (firewallRules() != null) { + firewallRules().forEach(e -> e.validate()); + } + if (virtualNetworkRules() != null) { + virtualNetworkRules().forEach(e -> e.validate()); + } + if (trustedIdProviders() != null) { + trustedIdProviders().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UpdateFirewallRuleProperties.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UpdateFirewallRuleProperties.java new file mode 100644 index 0000000000000..e27da29e046a6 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UpdateFirewallRuleProperties.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The firewall rule properties to use when updating a firewall rule. */ +@Fluent +public final class UpdateFirewallRuleProperties { + /* + * The start IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "startIpAddress") + private String startIpAddress; + + /* + * The end IP address for the firewall rule. This can be either ipv4 or + * ipv6. Start and End should be in the same protocol. + */ + @JsonProperty(value = "endIpAddress") + private String endIpAddress; + + /** + * Get the startIpAddress property: The start IP address for the firewall rule. This can be either ipv4 or ipv6. + * Start and End should be in the same protocol. + * + * @return the startIpAddress value. + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Set the startIpAddress property: The start IP address for the firewall rule. This can be either ipv4 or ipv6. + * Start and End should be in the same protocol. + * + * @param startIpAddress the startIpAddress value to set. + * @return the UpdateFirewallRuleProperties object itself. + */ + public UpdateFirewallRuleProperties withStartIpAddress(String startIpAddress) { + this.startIpAddress = startIpAddress; + return this; + } + + /** + * Get the endIpAddress property: The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start + * and End should be in the same protocol. + * + * @return the endIpAddress value. + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Set the endIpAddress property: The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start + * and End should be in the same protocol. + * + * @param endIpAddress the endIpAddress value to set. + * @return the UpdateFirewallRuleProperties object itself. + */ + public UpdateFirewallRuleProperties withEndIpAddress(String endIpAddress) { + this.endIpAddress = endIpAddress; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UpdateTrustedIdProviderProperties.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UpdateTrustedIdProviderProperties.java new file mode 100644 index 0000000000000..8f75e9f5eef61 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UpdateTrustedIdProviderProperties.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The trusted identity provider properties to use when updating a trusted identity provider. */ +@Fluent +public final class UpdateTrustedIdProviderProperties { + /* + * The URL of this trusted identity provider. + */ + @JsonProperty(value = "idProvider") + private String idProvider; + + /** + * Get the idProvider property: The URL of this trusted identity provider. + * + * @return the idProvider value. + */ + public String idProvider() { + return this.idProvider; + } + + /** + * Set the idProvider property: The URL of this trusted identity provider. + * + * @param idProvider the idProvider value to set. + * @return the UpdateTrustedIdProviderProperties object itself. + */ + public UpdateTrustedIdProviderProperties withIdProvider(String idProvider) { + this.idProvider = idProvider; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UpdateVirtualNetworkRuleProperties.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UpdateVirtualNetworkRuleProperties.java new file mode 100644 index 0000000000000..05f6d4e832c65 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UpdateVirtualNetworkRuleProperties.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The virtual network rule properties to use when updating a virtual network rule. */ +@Fluent +public final class UpdateVirtualNetworkRuleProperties { + /* + * The resource identifier for the subnet. + */ + @JsonProperty(value = "subnetId") + private String subnetId; + + /** + * Get the subnetId property: The resource identifier for the subnet. + * + * @return the subnetId value. + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the subnetId property: The resource identifier for the subnet. + * + * @param subnetId the subnetId value to set. + * @return the UpdateVirtualNetworkRuleProperties object itself. + */ + public UpdateVirtualNetworkRuleProperties withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UsageInner.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UsageInner.java index 90749ff8122d1..153451166058e 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UsageInner.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/UsageInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datalakestore.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.models.UsageName; import com.azure.resourcemanager.datalakestore.models.UsageUnit; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes the Resource Usage. */ @Immutable public final class UsageInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageInner.class); - /* * Gets the unit of measurement. */ diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/VirtualNetworkRuleInner.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/VirtualNetworkRuleInner.java index 31374c60a0d05..1a43f567a8cd9 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/VirtualNetworkRuleInner.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/VirtualNetworkRuleInner.java @@ -4,24 +4,18 @@ package com.azure.resourcemanager.datalakestore.fluent.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; +import com.azure.core.annotation.Fluent; import com.azure.core.management.SubResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Data Lake Store virtual network rule information. */ -@JsonFlatten -@Immutable -public class VirtualNetworkRuleInner extends SubResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkRuleInner.class); - +@Fluent +public final class VirtualNetworkRuleInner extends SubResource { /* - * The resource identifier for the subnet. + * The virtual network rule properties. */ - @JsonProperty(value = "properties.subnetId", access = JsonProperty.Access.WRITE_ONLY) - private String subnetId; + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private VirtualNetworkRuleProperties innerProperties; /* * The resource name. @@ -36,12 +30,12 @@ public class VirtualNetworkRuleInner extends SubResource { private String type; /** - * Get the subnetId property: The resource identifier for the subnet. + * Get the innerProperties property: The virtual network rule properties. * - * @return the subnetId value. + * @return the innerProperties value. */ - public String subnetId() { - return this.subnetId; + private VirtualNetworkRuleProperties innerProperties() { + return this.innerProperties; } /** @@ -69,11 +63,23 @@ public VirtualNetworkRuleInner withId(String id) { return this; } + /** + * Get the subnetId property: The resource identifier for the subnet. + * + * @return the subnetId value. + */ + public String subnetId() { + return this.innerProperties() == null ? null : this.innerProperties().subnetId(); + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/VirtualNetworkRuleProperties.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/VirtualNetworkRuleProperties.java new file mode 100644 index 0000000000000..60e79428a6526 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/fluent/models/VirtualNetworkRuleProperties.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The virtual network rule properties. */ +@Immutable +public final class VirtualNetworkRuleProperties { + /* + * The resource identifier for the subnet. + */ + @JsonProperty(value = "subnetId", access = JsonProperty.Access.WRITE_ONLY) + private String subnetId; + + /** + * Get the subnetId property: The resource identifier for the subnet. + * + * @return the subnetId value. + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/AccountsClientImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/AccountsClientImpl.java index 1a5e39235b141..52f77c64e7a63 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/AccountsClientImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/AccountsClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.datalakestore.fluent.AccountsClient; @@ -48,8 +47,6 @@ /** An instance of this class provides access to all the operations defined in AccountsClient. */ public final class AccountsClientImpl implements AccountsClient { - private final ClientLogger logger = new ClientLogger(AccountsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AccountsService service; @@ -238,7 +235,8 @@ Mono> listByResourceGroupNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -302,7 +300,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -362,7 +361,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -378,7 +377,7 @@ private PagedFlux listAsync( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -411,7 +410,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -427,7 +426,7 @@ private PagedFlux listAsync( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -458,7 +457,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -484,7 +483,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -560,7 +560,8 @@ private Mono> listByResourceGroupS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -633,7 +634,7 @@ private Mono> listByResourceGroupS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -657,7 +658,7 @@ private PagedFlux listByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -691,7 +692,7 @@ private PagedFlux listByResourceGroupAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -718,7 +719,7 @@ private PagedFlux listByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -751,7 +752,7 @@ public PagedIterable listByResourceGroup(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup( @@ -776,7 +777,7 @@ public PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return data Lake Store account information along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -832,7 +833,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return data Lake Store account information along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -887,9 +888,9 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return the {@link PollerFlux} for polling of data Lake Store account information. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DataLakeStoreAccountInner> beginCreateAsync( String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters) { Mono>> mono = createWithResponseAsync(resourceGroupName, accountName, parameters); @@ -900,7 +901,7 @@ private PollerFlux, DataLakeStoreAccountIn this.client.getHttpPipeline(), DataLakeStoreAccountInner.class, DataLakeStoreAccountInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -913,9 +914,9 @@ private PollerFlux, DataLakeStoreAccountIn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return the {@link PollerFlux} for polling of data Lake Store account information. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DataLakeStoreAccountInner> beginCreateAsync( String resourceGroupName, String accountName, @@ -943,9 +944,9 @@ private PollerFlux, DataLakeStoreAccountIn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return the {@link SyncPoller} for polling of data Lake Store account information. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DataLakeStoreAccountInner> beginCreate( String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters) { return beginCreateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); @@ -961,9 +962,9 @@ public SyncPoller, DataLakeStoreAccountInn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return the {@link SyncPoller} for polling of data Lake Store account information. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DataLakeStoreAccountInner> beginCreate( String resourceGroupName, String accountName, @@ -981,7 +982,7 @@ public SyncPoller, DataLakeStoreAccountInn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return data Lake Store account information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -1001,7 +1002,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return data Lake Store account information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -1060,7 +1061,8 @@ public DataLakeStoreAccountInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store account. + * @return the specified Data Lake Store account along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1109,7 +1111,8 @@ private Mono> getByResourceGroupWithResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store account. + * @return the specified Data Lake Store account along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1154,7 +1157,7 @@ private Mono> getByResourceGroupWithResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store account. + * @return the specified Data Lake Store account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { @@ -1193,7 +1196,7 @@ public DataLakeStoreAccountInner getByResourceGroup(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store account. + * @return the specified Data Lake Store account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -1210,7 +1213,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return data Lake Store account information along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1266,7 +1269,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return data Lake Store account information along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1321,9 +1324,9 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return the {@link PollerFlux} for polling of data Lake Store account information. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DataLakeStoreAccountInner> beginUpdateAsync( String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters) { Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, parameters); @@ -1334,7 +1337,7 @@ private PollerFlux, DataLakeStoreAccountIn this.client.getHttpPipeline(), DataLakeStoreAccountInner.class, DataLakeStoreAccountInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1347,9 +1350,9 @@ private PollerFlux, DataLakeStoreAccountIn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return the {@link PollerFlux} for polling of data Lake Store account information. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DataLakeStoreAccountInner> beginUpdateAsync( String resourceGroupName, String accountName, @@ -1377,9 +1380,9 @@ private PollerFlux, DataLakeStoreAccountIn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return the {@link SyncPoller} for polling of data Lake Store account information. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DataLakeStoreAccountInner> beginUpdate( String resourceGroupName, String accountName, UpdateDataLakeStoreAccountParameters parameters) { return beginUpdateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); @@ -1395,9 +1398,9 @@ public SyncPoller, DataLakeStoreAccountInn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return the {@link SyncPoller} for polling of data Lake Store account information. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DataLakeStoreAccountInner> beginUpdate( String resourceGroupName, String accountName, @@ -1415,7 +1418,7 @@ public SyncPoller, DataLakeStoreAccountInn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return data Lake Store account information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1435,7 +1438,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account information. + * @return data Lake Store account information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1494,7 +1497,7 @@ public DataLakeStoreAccountInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName) { @@ -1540,7 +1543,7 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1583,14 +1586,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1602,9 +1606,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, Context context) { context = this.client.mergeContext(context); @@ -1622,9 +1626,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName) { return beginDeleteAsync(resourceGroupName, accountName).getSyncPoller(); } @@ -1638,9 +1642,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, Context context) { return beginDeleteAsync(resourceGroupName, accountName, context).getSyncPoller(); @@ -1654,7 +1658,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName) { @@ -1670,7 +1674,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, Context context) { @@ -1716,7 +1720,7 @@ public void delete(String resourceGroupName, String accountName, Context context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> enableKeyVaultWithResponseAsync(String resourceGroupName, String accountName) { @@ -1762,7 +1766,7 @@ private Mono> enableKeyVaultWithResponseAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> enableKeyVaultWithResponseAsync( @@ -1805,7 +1809,7 @@ private Mono> enableKeyVaultWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono enableKeyVaultAsync(String resourceGroupName, String accountName) { @@ -1836,7 +1840,7 @@ public void enableKeyVault(String resourceGroupName, String accountName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response enableKeyVaultWithResponse(String resourceGroupName, String accountName, Context context) { @@ -1851,7 +1855,8 @@ public Response enableKeyVaultWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account name availability result information. + * @return data Lake Store account name availability result information along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -1901,7 +1906,8 @@ private Mono> checkNameAvailabilityWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account name availability result information. + * @return data Lake Store account name availability result information along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -1947,7 +1953,7 @@ private Mono> checkNameAvailabilityWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account name availability result information. + * @return data Lake Store account name availability result information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkNameAvailabilityAsync( @@ -1988,7 +1994,7 @@ public NameAvailabilityInformationInner checkNameAvailability( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account name availability result information. + * @return data Lake Store account name availability result information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response checkNameAvailabilityWithResponse( @@ -2003,7 +2009,8 @@ public Response checkNameAvailabilityWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2039,7 +2046,8 @@ private Mono> listNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync( @@ -2075,7 +2083,8 @@ private Mono> listNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( @@ -2113,7 +2122,8 @@ private Mono> listByResourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/AccountsImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/AccountsImpl.java index 6c9993931326b..a504ddcee368a 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/AccountsImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/AccountsImpl.java @@ -18,10 +18,9 @@ import com.azure.resourcemanager.datalakestore.models.DataLakeStoreAccount; import com.azure.resourcemanager.datalakestore.models.DataLakeStoreAccountBasic; import com.azure.resourcemanager.datalakestore.models.NameAvailabilityInformation; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AccountsImpl implements Accounts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AccountsImpl.class); private final AccountsClient innerClient; @@ -135,7 +134,7 @@ public Response checkNameAvailabilityWithResponse( public DataLakeStoreAccount getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -143,7 +142,7 @@ public DataLakeStoreAccount getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); @@ -154,7 +153,7 @@ public DataLakeStoreAccount getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -162,7 +161,7 @@ public Response getByIdWithResponse(String id, Context con } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); @@ -173,7 +172,7 @@ public Response getByIdWithResponse(String id, Context con public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -181,7 +180,7 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); @@ -192,7 +191,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -200,7 +199,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/DataLakeStoreAccountImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/DataLakeStoreAccountImpl.java index 5eada13f294f4..3808be0022962 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/DataLakeStoreAccountImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/DataLakeStoreAccountImpl.java @@ -76,30 +76,6 @@ public EncryptionIdentity identity() { return this.innerModel().identity(); } - public UUID accountId() { - return this.innerModel().accountId(); - } - - public DataLakeStoreAccountStatus provisioningState() { - return this.innerModel().provisioningState(); - } - - public DataLakeStoreAccountState state() { - return this.innerModel().state(); - } - - public OffsetDateTime creationTime() { - return this.innerModel().creationTime(); - } - - public OffsetDateTime lastModifiedTime() { - return this.innerModel().lastModifiedTime(); - } - - public String endpoint() { - return this.innerModel().endpoint(); - } - public String defaultGroup() { return this.innerModel().defaultGroup(); } @@ -178,6 +154,30 @@ public TierType currentTier() { return this.innerModel().currentTier(); } + public UUID accountId() { + return this.innerModel().accountId(); + } + + public DataLakeStoreAccountStatus provisioningState() { + return this.innerModel().provisioningState(); + } + + public DataLakeStoreAccountState state() { + return this.innerModel().state(); + } + + public OffsetDateTime creationTime() { + return this.innerModel().creationTime(); + } + + public OffsetDateTime lastModifiedTime() { + return this.innerModel().lastModifiedTime(); + } + + public String endpoint() { + return this.innerModel().endpoint(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/DataLakeStoreAccountManagementClientImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/DataLakeStoreAccountManagementClientImpl.java index f28020eea0f68..d613608d899c1 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/DataLakeStoreAccountManagementClientImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/DataLakeStoreAccountManagementClientImpl.java @@ -41,8 +41,6 @@ /** Initializes a new instance of the DataLakeStoreAccountManagementClientImpl type. */ @ServiceClient(builder = DataLakeStoreAccountManagementClientBuilder.class) public final class DataLakeStoreAccountManagementClientImpl implements DataLakeStoreAccountManagementClient { - private final ClientLogger logger = new ClientLogger(DataLakeStoreAccountManagementClientImpl.class); - /** * Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms * part of the URI for every service call. @@ -306,7 +304,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -365,4 +363,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(DataLakeStoreAccountManagementClientImpl.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/FirewallRuleImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/FirewallRuleImpl.java index 5ee269949eb11..3b63079786e61 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/FirewallRuleImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/FirewallRuleImpl.java @@ -19,14 +19,6 @@ public String id() { return this.innerModel().id(); } - public String startIpAddress() { - return this.innerModel().startIpAddress(); - } - - public String endIpAddress() { - return this.innerModel().endIpAddress(); - } - public String name() { return this.innerModel().name(); } @@ -35,6 +27,14 @@ public String type() { return this.innerModel().type(); } + public String startIpAddress() { + return this.innerModel().startIpAddress(); + } + + public String endIpAddress() { + return this.innerModel().endIpAddress(); + } + public FirewallRuleInner innerModel() { return this.innerObject; } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/FirewallRulesClientImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/FirewallRulesClientImpl.java index e7ee0a1337cd1..1a923f673e9c0 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/FirewallRulesClientImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/FirewallRulesClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.fluent.FirewallRulesClient; import com.azure.resourcemanager.datalakestore.fluent.models.FirewallRuleInner; import com.azure.resourcemanager.datalakestore.models.CreateOrUpdateFirewallRuleParameters; @@ -39,8 +38,6 @@ /** An instance of this class provides access to all the operations defined in FirewallRulesClient. */ public final class FirewallRulesClientImpl implements FirewallRulesClient { - private final ClientLogger logger = new ClientLogger(FirewallRulesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final FirewallRulesService service; @@ -164,7 +161,8 @@ Mono> listByAccountNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule list information. + * @return data Lake Store firewall rule list information along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAccountSinglePageAsync( @@ -222,7 +220,8 @@ private Mono> listByAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule list information. + * @return data Lake Store firewall rule list information along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAccountSinglePageAsync( @@ -276,7 +275,7 @@ private Mono> listByAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule list information. + * @return data Lake Store firewall rule list information as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByAccountAsync(String resourceGroupName, String accountName) { @@ -294,7 +293,7 @@ private PagedFlux listByAccountAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule list information. + * @return data Lake Store firewall rule list information as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByAccountAsync( @@ -312,7 +311,7 @@ private PagedFlux listByAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule list information. + * @return data Lake Store firewall rule list information as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByAccount(String resourceGroupName, String accountName) { @@ -328,7 +327,7 @@ public PagedIterable listByAccount(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule list information. + * @return data Lake Store firewall rule list information as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByAccount( @@ -347,7 +346,8 @@ public PagedIterable listByAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule information. + * @return data Lake Store firewall rule information along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -413,7 +413,8 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule information. + * @return data Lake Store firewall rule information along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -476,7 +477,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule information. + * @return data Lake Store firewall rule information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -529,7 +530,7 @@ public FirewallRuleInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule information. + * @return data Lake Store firewall rule information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -551,7 +552,8 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store firewall rule. + * @return the specified Data Lake Store firewall rule along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -606,7 +608,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store firewall rule. + * @return the specified Data Lake Store firewall rule along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -657,7 +660,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store firewall rule. + * @return the specified Data Lake Store firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String firewallRuleName) { @@ -698,7 +701,7 @@ public FirewallRuleInner get(String resourceGroupName, String accountName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store firewall rule. + * @return the specified Data Lake Store firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -716,7 +719,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule information. + * @return data Lake Store firewall rule information along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -779,7 +783,8 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule information. + * @return data Lake Store firewall rule information along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -839,7 +844,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule information. + * @return data Lake Store firewall rule information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -867,7 +872,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule information. + * @return data Lake Store firewall rule information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String accountName, String firewallRuleName) { @@ -911,7 +916,7 @@ public FirewallRuleInner update(String resourceGroupName, String accountName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule information. + * @return data Lake Store firewall rule information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -932,7 +937,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -985,7 +990,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -1034,7 +1039,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String firewallRuleName) { @@ -1067,7 +1072,7 @@ public void delete(String resourceGroupName, String accountName, String firewall * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -1082,7 +1087,8 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule list information. + * @return data Lake Store firewall rule list information along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAccountNextSinglePageAsync(String nextLink) { @@ -1118,7 +1124,8 @@ private Mono> listByAccountNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule list information. + * @return data Lake Store firewall rule list information along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAccountNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/FirewallRulesImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/FirewallRulesImpl.java index 8af34abd4cc42..96e9b77d70885 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/FirewallRulesImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/FirewallRulesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.datalakestore.fluent.models.FirewallRuleInner; import com.azure.resourcemanager.datalakestore.models.FirewallRule; import com.azure.resourcemanager.datalakestore.models.FirewallRules; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class FirewallRulesImpl implements FirewallRules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FirewallRulesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(FirewallRulesImpl.class); private final FirewallRulesClient innerClient; @@ -75,7 +74,7 @@ public Response deleteWithResponse( public FirewallRule getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -83,14 +82,14 @@ public FirewallRule getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String firewallRuleName = Utils.getValueFromIdByName(id, "firewallRules"); if (firewallRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); @@ -101,7 +100,7 @@ public FirewallRule getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -109,14 +108,14 @@ public Response getByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String firewallRuleName = Utils.getValueFromIdByName(id, "firewallRules"); if (firewallRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); @@ -127,7 +126,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -135,25 +134,25 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String firewallRuleName = Utils.getValueFromIdByName(id, "firewallRules"); if (firewallRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, firewallRuleName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, firewallRuleName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -161,14 +160,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String firewallRuleName = Utils.getValueFromIdByName(id, "firewallRules"); if (firewallRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/LocationsClientImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/LocationsClientImpl.java index 10b5c3e72a0ac..b50e2b51dcc2d 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/LocationsClientImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/LocationsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.fluent.LocationsClient; import com.azure.resourcemanager.datalakestore.fluent.models.CapabilityInformationInner; import com.azure.resourcemanager.datalakestore.fluent.models.UsageInner; @@ -34,8 +33,6 @@ /** An instance of this class provides access to all the operations defined in LocationsClient. */ public final class LocationsClientImpl implements LocationsClient { - private final ClientLogger logger = new ClientLogger(LocationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final LocationsService service; @@ -92,7 +89,8 @@ Mono> getUsage( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription-level properties and limits for Data Lake Store specified by resource location. + * @return subscription-level properties and limits for Data Lake Store specified by resource location along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getCapabilityWithResponseAsync(String location) { @@ -134,7 +132,8 @@ private Mono> getCapabilityWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription-level properties and limits for Data Lake Store specified by resource location. + * @return subscription-level properties and limits for Data Lake Store specified by resource location along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getCapabilityWithResponseAsync( @@ -173,7 +172,8 @@ private Mono> getCapabilityWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription-level properties and limits for Data Lake Store specified by resource location. + * @return subscription-level properties and limits for Data Lake Store specified by resource location on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getCapabilityAsync(String location) { @@ -210,7 +210,8 @@ public CapabilityInformationInner getCapability(String location) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription-level properties and limits for Data Lake Store specified by resource location. + * @return subscription-level properties and limits for Data Lake Store specified by resource location along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getCapabilityWithResponse(String location, Context context) { @@ -224,7 +225,8 @@ public Response getCapabilityWithResponse(String loc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage count and the limit for the resources of the location under the subscription. + * @return the current usage count and the limit for the resources of the location under the subscription along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getUsageSinglePageAsync(String location) { @@ -270,7 +272,8 @@ private Mono> getUsageSinglePageAsync(String location) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage count and the limit for the resources of the location under the subscription. + * @return the current usage count and the limit for the resources of the location under the subscription along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getUsageSinglePageAsync(String location, Context context) { @@ -312,7 +315,8 @@ private Mono> getUsageSinglePageAsync(String location, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage count and the limit for the resources of the location under the subscription. + * @return the current usage count and the limit for the resources of the location under the subscription as + * paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getUsageAsync(String location) { @@ -327,7 +331,8 @@ private PagedFlux getUsageAsync(String location) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage count and the limit for the resources of the location under the subscription. + * @return the current usage count and the limit for the resources of the location under the subscription as + * paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getUsageAsync(String location, Context context) { @@ -341,7 +346,8 @@ private PagedFlux getUsageAsync(String location, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage count and the limit for the resources of the location under the subscription. + * @return the current usage count and the limit for the resources of the location under the subscription as + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getUsage(String location) { @@ -356,7 +362,8 @@ public PagedIterable getUsage(String location) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage count and the limit for the resources of the location under the subscription. + * @return the current usage count and the limit for the resources of the location under the subscription as + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getUsage(String location, Context context) { diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/LocationsImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/LocationsImpl.java index ed950c475e02f..ec004b915b899 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/LocationsImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/LocationsImpl.java @@ -15,10 +15,9 @@ import com.azure.resourcemanager.datalakestore.models.CapabilityInformation; import com.azure.resourcemanager.datalakestore.models.Locations; import com.azure.resourcemanager.datalakestore.models.Usage; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class LocationsImpl implements Locations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LocationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(LocationsImpl.class); private final LocationsClient innerClient; diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/OperationsClientImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/OperationsClientImpl.java index a741b8e67b71d..c3f3dddea377f 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/OperationsClientImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/OperationsClientImpl.java @@ -20,15 +20,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.fluent.OperationsClient; import com.azure.resourcemanager.datalakestore.fluent.models.OperationListResultInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -69,7 +66,8 @@ Mono> list( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available operations for Data Lake Store. + * @return the list of available operations for Data Lake Store along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync() { @@ -93,7 +91,8 @@ private Mono> listWithResponseAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available operations for Data Lake Store. + * @return the list of available operations for Data Lake Store along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(Context context) { @@ -113,7 +112,7 @@ private Mono> listWithResponseAsync(Context c * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available operations for Data Lake Store. + * @return the list of available operations for Data Lake Store on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync() { @@ -147,7 +146,7 @@ public OperationListResultInner list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available operations for Data Lake Store. + * @return the list of available operations for Data Lake Store along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse(Context context) { diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/OperationsImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/OperationsImpl.java index fc1f54c8c2337..06269196536e2 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/OperationsImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/OperationsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.datalakestore.fluent.models.OperationListResultInner; import com.azure.resourcemanager.datalakestore.models.OperationListResult; import com.azure.resourcemanager.datalakestore.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/TrustedIdProviderImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/TrustedIdProviderImpl.java index 8cc137ea75ac1..5bf4bfa1ad07f 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/TrustedIdProviderImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/TrustedIdProviderImpl.java @@ -20,10 +20,6 @@ public String id() { return this.innerModel().id(); } - public String idProvider() { - return this.innerModel().idProvider(); - } - public String name() { return this.innerModel().name(); } @@ -32,6 +28,10 @@ public String type() { return this.innerModel().type(); } + public String idProvider() { + return this.innerModel().idProvider(); + } + public TrustedIdProviderInner innerModel() { return this.innerObject; } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/TrustedIdProvidersClientImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/TrustedIdProvidersClientImpl.java index 404f86fe7844f..a32662c2bbc7d 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/TrustedIdProvidersClientImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/TrustedIdProvidersClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.fluent.TrustedIdProvidersClient; import com.azure.resourcemanager.datalakestore.fluent.models.TrustedIdProviderInner; import com.azure.resourcemanager.datalakestore.models.CreateOrUpdateTrustedIdProviderParameters; @@ -39,8 +38,6 @@ /** An instance of this class provides access to all the operations defined in TrustedIdProvidersClient. */ public final class TrustedIdProvidersClientImpl implements TrustedIdProvidersClient { - private final ClientLogger logger = new ClientLogger(TrustedIdProvidersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final TrustedIdProvidersService service; @@ -164,7 +161,8 @@ Mono> listByAccountNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider list information. + * @return data Lake Store trusted identity provider list information along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAccountSinglePageAsync( @@ -222,7 +220,8 @@ private Mono> listByAccountSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider list information. + * @return data Lake Store trusted identity provider list information along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAccountSinglePageAsync( @@ -276,7 +275,7 @@ private Mono> listByAccountSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider list information. + * @return data Lake Store trusted identity provider list information as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByAccountAsync(String resourceGroupName, String accountName) { @@ -294,7 +293,7 @@ private PagedFlux listByAccountAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider list information. + * @return data Lake Store trusted identity provider list information as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByAccountAsync( @@ -312,7 +311,8 @@ private PagedFlux listByAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider list information. + * @return data Lake Store trusted identity provider list information as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByAccount(String resourceGroupName, String accountName) { @@ -328,7 +328,8 @@ public PagedIterable listByAccount(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider list information. + * @return data Lake Store trusted identity provider list information as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByAccount( @@ -348,7 +349,8 @@ public PagedIterable listByAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider information. + * @return data Lake Store trusted identity provider information along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -415,7 +417,8 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider information. + * @return data Lake Store trusted identity provider information along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -479,7 +482,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider information. + * @return data Lake Store trusted identity provider information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -534,7 +537,7 @@ public TrustedIdProviderInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider information. + * @return data Lake Store trusted identity provider information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -557,7 +560,8 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store trusted identity provider. + * @return the specified Data Lake Store trusted identity provider along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -612,7 +616,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store trusted identity provider. + * @return the specified Data Lake Store trusted identity provider along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -663,7 +668,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store trusted identity provider. + * @return the specified Data Lake Store trusted identity provider on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -705,7 +710,7 @@ public TrustedIdProviderInner get(String resourceGroupName, String accountName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store trusted identity provider. + * @return the specified Data Lake Store trusted identity provider along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -724,7 +729,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider information. + * @return data Lake Store trusted identity provider information along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -788,7 +794,8 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider information. + * @return data Lake Store trusted identity provider information along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -849,7 +856,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider information. + * @return data Lake Store trusted identity provider information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -878,7 +885,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider information. + * @return data Lake Store trusted identity provider information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -925,7 +932,7 @@ public TrustedIdProviderInner update(String resourceGroupName, String accountNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider information. + * @return data Lake Store trusted identity provider information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -947,7 +954,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -1000,7 +1007,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -1049,7 +1056,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String trustedIdProviderName) { @@ -1082,7 +1089,7 @@ public void delete(String resourceGroupName, String accountName, String trustedI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -1097,7 +1104,8 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider list information. + * @return data Lake Store trusted identity provider list information along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAccountNextSinglePageAsync(String nextLink) { @@ -1133,7 +1141,8 @@ private Mono> listByAccountNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider list information. + * @return data Lake Store trusted identity provider list information along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAccountNextSinglePageAsync( diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/TrustedIdProvidersImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/TrustedIdProvidersImpl.java index 8eeca37e5bee2..ab83b23fba5f4 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/TrustedIdProvidersImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/TrustedIdProvidersImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.datalakestore.fluent.models.TrustedIdProviderInner; import com.azure.resourcemanager.datalakestore.models.TrustedIdProvider; import com.azure.resourcemanager.datalakestore.models.TrustedIdProviders; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class TrustedIdProvidersImpl implements TrustedIdProviders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TrustedIdProvidersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(TrustedIdProvidersImpl.class); private final TrustedIdProvidersClient innerClient; @@ -78,7 +77,7 @@ public Response deleteWithResponse( public TrustedIdProvider getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -86,14 +85,14 @@ public TrustedIdProvider getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String trustedIdProviderName = Utils.getValueFromIdByName(id, "trustedIdProviders"); if (trustedIdProviderName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -106,7 +105,7 @@ public TrustedIdProvider getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -114,14 +113,14 @@ public Response getByIdWithResponse(String id, Context contex } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String trustedIdProviderName = Utils.getValueFromIdByName(id, "trustedIdProviders"); if (trustedIdProviderName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -134,7 +133,7 @@ public Response getByIdWithResponse(String id, Context contex public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -142,27 +141,27 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String trustedIdProviderName = Utils.getValueFromIdByName(id, "trustedIdProviders"); if (trustedIdProviderName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format( "The resource ID '%s' is not valid. Missing path segment 'trustedIdProviders'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, trustedIdProviderName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, trustedIdProviderName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -170,14 +169,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String trustedIdProviderName = Utils.getValueFromIdByName(id, "trustedIdProviders"); if (trustedIdProviderName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/VirtualNetworkRuleImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/VirtualNetworkRuleImpl.java index cf10d8adb7ce2..002f1ff558c6b 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/VirtualNetworkRuleImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/VirtualNetworkRuleImpl.java @@ -20,10 +20,6 @@ public String id() { return this.innerModel().id(); } - public String subnetId() { - return this.innerModel().subnetId(); - } - public String name() { return this.innerModel().name(); } @@ -32,6 +28,10 @@ public String type() { return this.innerModel().type(); } + public String subnetId() { + return this.innerModel().subnetId(); + } + public VirtualNetworkRuleInner innerModel() { return this.innerObject; } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/VirtualNetworkRulesClientImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/VirtualNetworkRulesClientImpl.java index 24769a947eb94..90dbcd7985d99 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/VirtualNetworkRulesClientImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/VirtualNetworkRulesClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.fluent.VirtualNetworkRulesClient; import com.azure.resourcemanager.datalakestore.fluent.models.VirtualNetworkRuleInner; import com.azure.resourcemanager.datalakestore.models.CreateOrUpdateVirtualNetworkRuleParameters; @@ -39,8 +38,6 @@ /** An instance of this class provides access to all the operations defined in VirtualNetworkRulesClient. */ public final class VirtualNetworkRulesClientImpl implements VirtualNetworkRulesClient { - private final ClientLogger logger = new ClientLogger(VirtualNetworkRulesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VirtualNetworkRulesService service; @@ -164,7 +161,8 @@ Mono> listByAccountNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule list information. + * @return data Lake Store virtual network rule list information along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAccountSinglePageAsync( @@ -222,7 +220,8 @@ private Mono> listByAccountSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule list information. + * @return data Lake Store virtual network rule list information along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAccountSinglePageAsync( @@ -276,7 +275,7 @@ private Mono> listByAccountSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule list information. + * @return data Lake Store virtual network rule list information as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByAccountAsync(String resourceGroupName, String accountName) { @@ -294,7 +293,7 @@ private PagedFlux listByAccountAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule list information. + * @return data Lake Store virtual network rule list information as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByAccountAsync( @@ -312,7 +311,7 @@ private PagedFlux listByAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule list information. + * @return data Lake Store virtual network rule list information as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByAccount(String resourceGroupName, String accountName) { @@ -328,7 +327,7 @@ public PagedIterable listByAccount(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule list information. + * @return data Lake Store virtual network rule list information as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByAccount( @@ -347,7 +346,8 @@ public PagedIterable listByAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule information. + * @return data Lake Store virtual network rule information along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -414,7 +414,8 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule information. + * @return data Lake Store virtual network rule information along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -478,7 +479,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule information. + * @return data Lake Store virtual network rule information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -531,7 +532,7 @@ public VirtualNetworkRuleInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule information. + * @return data Lake Store virtual network rule information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -554,7 +555,8 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store virtual network rule. + * @return the specified Data Lake Store virtual network rule along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -610,7 +612,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store virtual network rule. + * @return the specified Data Lake Store virtual network rule along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -662,7 +665,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store virtual network rule. + * @return the specified Data Lake Store virtual network rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -704,7 +707,7 @@ public VirtualNetworkRuleInner get(String resourceGroupName, String accountName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store virtual network rule. + * @return the specified Data Lake Store virtual network rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -722,7 +725,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule information. + * @return data Lake Store virtual network rule information along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -786,7 +790,8 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule information. + * @return data Lake Store virtual network rule information along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -847,7 +852,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule information. + * @return data Lake Store virtual network rule information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -875,7 +880,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule information. + * @return data Lake Store virtual network rule information on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -920,7 +925,7 @@ public VirtualNetworkRuleInner update(String resourceGroupName, String accountNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule information. + * @return data Lake Store virtual network rule information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -942,7 +947,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -996,7 +1001,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -1046,7 +1051,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName) { @@ -1079,7 +1084,7 @@ public void delete(String resourceGroupName, String accountName, String virtualN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -1094,7 +1099,8 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule list information. + * @return data Lake Store virtual network rule list information along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAccountNextSinglePageAsync(String nextLink) { @@ -1130,7 +1136,8 @@ private Mono> listByAccountNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule list information. + * @return data Lake Store virtual network rule list information along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAccountNextSinglePageAsync( diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/VirtualNetworkRulesImpl.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/VirtualNetworkRulesImpl.java index 2969566f0b37f..4b3421205c45f 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/VirtualNetworkRulesImpl.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/VirtualNetworkRulesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.datalakestore.fluent.models.VirtualNetworkRuleInner; import com.azure.resourcemanager.datalakestore.models.VirtualNetworkRule; import com.azure.resourcemanager.datalakestore.models.VirtualNetworkRules; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VirtualNetworkRulesImpl implements VirtualNetworkRules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkRulesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkRulesImpl.class); private final VirtualNetworkRulesClient innerClient; @@ -79,7 +78,7 @@ public Response deleteWithResponse( public VirtualNetworkRule getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -87,14 +86,14 @@ public VirtualNetworkRule getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String virtualNetworkRuleName = Utils.getValueFromIdByName(id, "virtualNetworkRules"); if (virtualNetworkRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -107,7 +106,7 @@ public VirtualNetworkRule getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -115,14 +114,14 @@ public Response getByIdWithResponse(String id, Context conte } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String virtualNetworkRuleName = Utils.getValueFromIdByName(id, "virtualNetworkRules"); if (virtualNetworkRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -135,7 +134,7 @@ public Response getByIdWithResponse(String id, Context conte public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -143,27 +142,27 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String virtualNetworkRuleName = Utils.getValueFromIdByName(id, "virtualNetworkRules"); if (virtualNetworkRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String .format( "The resource ID '%s' is not valid. Missing path segment 'virtualNetworkRules'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, virtualNetworkRuleName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, virtualNetworkRuleName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -171,14 +170,14 @@ public Response deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String virtualNetworkRuleName = Utils.getValueFromIdByName(id, "virtualNetworkRules"); if (virtualNetworkRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Accounts.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Accounts.java index 6e0ef3e2140bd..6e5d639b3f2e4 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Accounts.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Accounts.java @@ -16,7 +16,7 @@ public interface Accounts { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -38,7 +38,7 @@ public interface Accounts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedIterable}. */ PagedIterable list( String filter, Integer top, Integer skip, String select, String orderby, Boolean count, Context context); @@ -51,7 +51,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -74,7 +74,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account list information response. + * @return data Lake Store account list information response as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup( String resourceGroupName, @@ -107,7 +107,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store account. + * @return the specified Data Lake Store account along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String accountName, Context context); @@ -155,7 +155,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response enableKeyVaultWithResponse(String resourceGroupName, String accountName, Context context); @@ -180,7 +180,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store account name availability result information. + * @return data Lake Store account name availability result information along with {@link Response}. */ Response checkNameAvailabilityWithResponse( String location, CheckNameAvailabilityParameters parameters, Context context); @@ -192,7 +192,7 @@ Response checkNameAvailabilityWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store account. + * @return the specified Data Lake Store account along with {@link Response}. */ DataLakeStoreAccount getById(String id); @@ -204,7 +204,7 @@ Response checkNameAvailabilityWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store account. + * @return the specified Data Lake Store account along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CheckNameAvailabilityParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CheckNameAvailabilityParameters.java index 58f55e3e88fa9..4e0a6dec02b29 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CheckNameAvailabilityParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CheckNameAvailabilityParameters.java @@ -6,14 +6,11 @@ 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; /** Data Lake Store account name availability check parameters. */ @Fluent public final class CheckNameAvailabilityParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityParameters.class); - /* * The Data Lake Store name to check availability for. */ @@ -25,7 +22,7 @@ public final class CheckNameAvailabilityParameters { * constant value is Microsoft.DataLakeStore/accounts */ @JsonProperty(value = "type", required = true) - private String type; + private String type = "Microsoft.DataLakeStore/accounts"; /** Creates an instance of CheckNameAvailabilityParameters class. */ public CheckNameAvailabilityParameters() { @@ -81,10 +78,12 @@ public CheckNameAvailabilityParameters withType(String type) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model CheckNameAvailabilityParameters")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilityParameters.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateDataLakeStoreAccountParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateDataLakeStoreAccountParameters.java index 77182efb27479..4a259a5d5d6bf 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateDataLakeStoreAccountParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateDataLakeStoreAccountParameters.java @@ -5,19 +5,16 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.CreateDataLakeStoreAccountProperties; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; /** The CreateDataLakeStoreAccountParameters model. */ -@JsonFlatten @Fluent -public class CreateDataLakeStoreAccountParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CreateDataLakeStoreAccountParameters.class); - +public final class CreateDataLakeStoreAccountParameters { /* * The resource location. */ @@ -28,6 +25,7 @@ public class CreateDataLakeStoreAccountParameters { * The resource tags. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* @@ -37,71 +35,10 @@ public class CreateDataLakeStoreAccountParameters { private EncryptionIdentity identity; /* - * The default owner group for all new folders and files created in the - * Data Lake Store account. - */ - @JsonProperty(value = "properties.defaultGroup") - private String defaultGroup; - - /* - * The Key Vault encryption configuration. - */ - @JsonProperty(value = "properties.encryptionConfig") - private EncryptionConfig encryptionConfig; - - /* - * The current state of encryption for this Data Lake Store account. - */ - @JsonProperty(value = "properties.encryptionState") - private EncryptionState encryptionState; - - /* - * The list of firewall rules associated with this Data Lake Store account. - */ - @JsonProperty(value = "properties.firewallRules") - private List firewallRules; - - /* - * The list of virtual network rules associated with this Data Lake Store - * account. + * The Data Lake Store account properties to use for creating. */ - @JsonProperty(value = "properties.virtualNetworkRules") - private List virtualNetworkRules; - - /* - * The current state of the IP address firewall for this Data Lake Store - * account. - */ - @JsonProperty(value = "properties.firewallState") - private FirewallState firewallState; - - /* - * The current state of allowing or disallowing IPs originating within - * Azure through the firewall. If the firewall is disabled, this is not - * enforced. - */ - @JsonProperty(value = "properties.firewallAllowAzureIps") - private FirewallAllowAzureIpsState firewallAllowAzureIps; - - /* - * The list of trusted identity providers associated with this Data Lake - * Store account. - */ - @JsonProperty(value = "properties.trustedIdProviders") - private List trustedIdProviders; - - /* - * The current state of the trusted identity provider feature for this Data - * Lake Store account. - */ - @JsonProperty(value = "properties.trustedIdProviderState") - private TrustedIdProviderState trustedIdProviderState; - - /* - * The commitment tier to use for next month. - */ - @JsonProperty(value = "properties.newTier") - private TierType newTier; + @JsonProperty(value = "properties") + private CreateDataLakeStoreAccountProperties innerProperties; /** * Get the location property: The resource location. @@ -163,6 +100,15 @@ public CreateDataLakeStoreAccountParameters withIdentity(EncryptionIdentity iden return this; } + /** + * Get the innerProperties property: The Data Lake Store account properties to use for creating. + * + * @return the innerProperties value. + */ + private CreateDataLakeStoreAccountProperties innerProperties() { + return this.innerProperties; + } + /** * Get the defaultGroup property: The default owner group for all new folders and files created in the Data Lake * Store account. @@ -170,7 +116,7 @@ public CreateDataLakeStoreAccountParameters withIdentity(EncryptionIdentity iden * @return the defaultGroup value. */ public String defaultGroup() { - return this.defaultGroup; + return this.innerProperties() == null ? null : this.innerProperties().defaultGroup(); } /** @@ -181,7 +127,10 @@ public String defaultGroup() { * @return the CreateDataLakeStoreAccountParameters object itself. */ public CreateDataLakeStoreAccountParameters withDefaultGroup(String defaultGroup) { - this.defaultGroup = defaultGroup; + if (this.innerProperties() == null) { + this.innerProperties = new CreateDataLakeStoreAccountProperties(); + } + this.innerProperties().withDefaultGroup(defaultGroup); return this; } @@ -191,7 +140,7 @@ public CreateDataLakeStoreAccountParameters withDefaultGroup(String defaultGroup * @return the encryptionConfig value. */ public EncryptionConfig encryptionConfig() { - return this.encryptionConfig; + return this.innerProperties() == null ? null : this.innerProperties().encryptionConfig(); } /** @@ -201,7 +150,10 @@ public EncryptionConfig encryptionConfig() { * @return the CreateDataLakeStoreAccountParameters object itself. */ public CreateDataLakeStoreAccountParameters withEncryptionConfig(EncryptionConfig encryptionConfig) { - this.encryptionConfig = encryptionConfig; + if (this.innerProperties() == null) { + this.innerProperties = new CreateDataLakeStoreAccountProperties(); + } + this.innerProperties().withEncryptionConfig(encryptionConfig); return this; } @@ -211,7 +163,7 @@ public CreateDataLakeStoreAccountParameters withEncryptionConfig(EncryptionConfi * @return the encryptionState value. */ public EncryptionState encryptionState() { - return this.encryptionState; + return this.innerProperties() == null ? null : this.innerProperties().encryptionState(); } /** @@ -221,7 +173,10 @@ public EncryptionState encryptionState() { * @return the CreateDataLakeStoreAccountParameters object itself. */ public CreateDataLakeStoreAccountParameters withEncryptionState(EncryptionState encryptionState) { - this.encryptionState = encryptionState; + if (this.innerProperties() == null) { + this.innerProperties = new CreateDataLakeStoreAccountProperties(); + } + this.innerProperties().withEncryptionState(encryptionState); return this; } @@ -231,7 +186,7 @@ public CreateDataLakeStoreAccountParameters withEncryptionState(EncryptionState * @return the firewallRules value. */ public List firewallRules() { - return this.firewallRules; + return this.innerProperties() == null ? null : this.innerProperties().firewallRules(); } /** @@ -242,7 +197,10 @@ public List firewallRules() { */ public CreateDataLakeStoreAccountParameters withFirewallRules( List firewallRules) { - this.firewallRules = firewallRules; + if (this.innerProperties() == null) { + this.innerProperties = new CreateDataLakeStoreAccountProperties(); + } + this.innerProperties().withFirewallRules(firewallRules); return this; } @@ -253,7 +211,7 @@ public CreateDataLakeStoreAccountParameters withFirewallRules( * @return the virtualNetworkRules value. */ public List virtualNetworkRules() { - return this.virtualNetworkRules; + return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkRules(); } /** @@ -265,7 +223,10 @@ public List virtualNetworkRules() */ public CreateDataLakeStoreAccountParameters withVirtualNetworkRules( List virtualNetworkRules) { - this.virtualNetworkRules = virtualNetworkRules; + if (this.innerProperties() == null) { + this.innerProperties = new CreateDataLakeStoreAccountProperties(); + } + this.innerProperties().withVirtualNetworkRules(virtualNetworkRules); return this; } @@ -275,7 +236,7 @@ public CreateDataLakeStoreAccountParameters withVirtualNetworkRules( * @return the firewallState value. */ public FirewallState firewallState() { - return this.firewallState; + return this.innerProperties() == null ? null : this.innerProperties().firewallState(); } /** @@ -285,7 +246,10 @@ public FirewallState firewallState() { * @return the CreateDataLakeStoreAccountParameters object itself. */ public CreateDataLakeStoreAccountParameters withFirewallState(FirewallState firewallState) { - this.firewallState = firewallState; + if (this.innerProperties() == null) { + this.innerProperties = new CreateDataLakeStoreAccountProperties(); + } + this.innerProperties().withFirewallState(firewallState); return this; } @@ -296,7 +260,7 @@ public CreateDataLakeStoreAccountParameters withFirewallState(FirewallState fire * @return the firewallAllowAzureIps value. */ public FirewallAllowAzureIpsState firewallAllowAzureIps() { - return this.firewallAllowAzureIps; + return this.innerProperties() == null ? null : this.innerProperties().firewallAllowAzureIps(); } /** @@ -308,7 +272,10 @@ public FirewallAllowAzureIpsState firewallAllowAzureIps() { */ public CreateDataLakeStoreAccountParameters withFirewallAllowAzureIps( FirewallAllowAzureIpsState firewallAllowAzureIps) { - this.firewallAllowAzureIps = firewallAllowAzureIps; + if (this.innerProperties() == null) { + this.innerProperties = new CreateDataLakeStoreAccountProperties(); + } + this.innerProperties().withFirewallAllowAzureIps(firewallAllowAzureIps); return this; } @@ -319,7 +286,7 @@ public CreateDataLakeStoreAccountParameters withFirewallAllowAzureIps( * @return the trustedIdProviders value. */ public List trustedIdProviders() { - return this.trustedIdProviders; + return this.innerProperties() == null ? null : this.innerProperties().trustedIdProviders(); } /** @@ -331,7 +298,10 @@ public List trustedIdProviders() { */ public CreateDataLakeStoreAccountParameters withTrustedIdProviders( List trustedIdProviders) { - this.trustedIdProviders = trustedIdProviders; + if (this.innerProperties() == null) { + this.innerProperties = new CreateDataLakeStoreAccountProperties(); + } + this.innerProperties().withTrustedIdProviders(trustedIdProviders); return this; } @@ -342,7 +312,7 @@ public CreateDataLakeStoreAccountParameters withTrustedIdProviders( * @return the trustedIdProviderState value. */ public TrustedIdProviderState trustedIdProviderState() { - return this.trustedIdProviderState; + return this.innerProperties() == null ? null : this.innerProperties().trustedIdProviderState(); } /** @@ -354,7 +324,10 @@ public TrustedIdProviderState trustedIdProviderState() { */ public CreateDataLakeStoreAccountParameters withTrustedIdProviderState( TrustedIdProviderState trustedIdProviderState) { - this.trustedIdProviderState = trustedIdProviderState; + if (this.innerProperties() == null) { + this.innerProperties = new CreateDataLakeStoreAccountProperties(); + } + this.innerProperties().withTrustedIdProviderState(trustedIdProviderState); return this; } @@ -364,7 +337,7 @@ public CreateDataLakeStoreAccountParameters withTrustedIdProviderState( * @return the newTier value. */ public TierType newTier() { - return this.newTier; + return this.innerProperties() == null ? null : this.innerProperties().newTier(); } /** @@ -374,7 +347,10 @@ public TierType newTier() { * @return the CreateDataLakeStoreAccountParameters object itself. */ public CreateDataLakeStoreAccountParameters withNewTier(TierType newTier) { - this.newTier = newTier; + if (this.innerProperties() == null) { + this.innerProperties = new CreateDataLakeStoreAccountProperties(); + } + this.innerProperties().withNewTier(newTier); return this; } @@ -385,7 +361,7 @@ public CreateDataLakeStoreAccountParameters withNewTier(TierType newTier) { */ public void validate() { if (location() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property location in model CreateDataLakeStoreAccountParameters")); @@ -393,17 +369,10 @@ public void validate() { if (identity() != null) { identity().validate(); } - if (encryptionConfig() != null) { - encryptionConfig().validate(); - } - if (firewallRules() != null) { - firewallRules().forEach(e -> e.validate()); - } - if (virtualNetworkRules() != null) { - virtualNetworkRules().forEach(e -> e.validate()); - } - if (trustedIdProviders() != null) { - trustedIdProviders().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(CreateDataLakeStoreAccountParameters.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateFirewallRuleWithAccountParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateFirewallRuleWithAccountParameters.java index 0e1cc6fd7cc02..1b831a4676edb 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateFirewallRuleWithAccountParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateFirewallRuleWithAccountParameters.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.CreateOrUpdateFirewallRuleProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** The parameters used to create a new firewall rule while creating a new Data Lake Store account. */ -@JsonFlatten @Fluent -public class CreateFirewallRuleWithAccountParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CreateFirewallRuleWithAccountParameters.class); - +public final class CreateFirewallRuleWithAccountParameters { /* * The unique name of the firewall rule to create. */ @@ -23,18 +19,10 @@ public class CreateFirewallRuleWithAccountParameters { private String name; /* - * The start IP address for the firewall rule. This can be either ipv4 or - * ipv6. Start and End should be in the same protocol. - */ - @JsonProperty(value = "properties.startIpAddress", required = true) - private String startIpAddress; - - /* - * The end IP address for the firewall rule. This can be either ipv4 or - * ipv6. Start and End should be in the same protocol. + * The firewall rule properties to use when creating a new firewall rule. */ - @JsonProperty(value = "properties.endIpAddress", required = true) - private String endIpAddress; + @JsonProperty(value = "properties", required = true) + private CreateOrUpdateFirewallRuleProperties innerProperties = new CreateOrUpdateFirewallRuleProperties(); /** * Get the name property: The unique name of the firewall rule to create. @@ -56,6 +44,15 @@ public CreateFirewallRuleWithAccountParameters withName(String name) { return this; } + /** + * Get the innerProperties property: The firewall rule properties to use when creating a new firewall rule. + * + * @return the innerProperties value. + */ + private CreateOrUpdateFirewallRuleProperties innerProperties() { + return this.innerProperties; + } + /** * Get the startIpAddress property: The start IP address for the firewall rule. This can be either ipv4 or ipv6. * Start and End should be in the same protocol. @@ -63,7 +60,7 @@ public CreateFirewallRuleWithAccountParameters withName(String name) { * @return the startIpAddress value. */ public String startIpAddress() { - return this.startIpAddress; + return this.innerProperties() == null ? null : this.innerProperties().startIpAddress(); } /** @@ -74,7 +71,10 @@ public String startIpAddress() { * @return the CreateFirewallRuleWithAccountParameters object itself. */ public CreateFirewallRuleWithAccountParameters withStartIpAddress(String startIpAddress) { - this.startIpAddress = startIpAddress; + if (this.innerProperties() == null) { + this.innerProperties = new CreateOrUpdateFirewallRuleProperties(); + } + this.innerProperties().withStartIpAddress(startIpAddress); return this; } @@ -85,7 +85,7 @@ public CreateFirewallRuleWithAccountParameters withStartIpAddress(String startIp * @return the endIpAddress value. */ public String endIpAddress() { - return this.endIpAddress; + return this.innerProperties() == null ? null : this.innerProperties().endIpAddress(); } /** @@ -96,7 +96,10 @@ public String endIpAddress() { * @return the CreateFirewallRuleWithAccountParameters object itself. */ public CreateFirewallRuleWithAccountParameters withEndIpAddress(String endIpAddress) { - this.endIpAddress = endIpAddress; + if (this.innerProperties() == null) { + this.innerProperties = new CreateOrUpdateFirewallRuleProperties(); + } + this.innerProperties().withEndIpAddress(endIpAddress); return this; } @@ -107,22 +110,20 @@ public CreateFirewallRuleWithAccountParameters withEndIpAddress(String endIpAddr */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model CreateFirewallRuleWithAccountParameters")); } - if (startIpAddress() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property startIpAddress in model CreateFirewallRuleWithAccountParameters")); - } - if (endIpAddress() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property endIpAddress in model CreateFirewallRuleWithAccountParameters")); + "Missing required property innerProperties in model CreateFirewallRuleWithAccountParameters")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(CreateFirewallRuleWithAccountParameters.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateOrUpdateFirewallRuleParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateOrUpdateFirewallRuleParameters.java index be77fce865d1e..49b671b295fdf 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateOrUpdateFirewallRuleParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateOrUpdateFirewallRuleParameters.java @@ -5,30 +5,27 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.CreateOrUpdateFirewallRuleProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** The parameters used to create a new firewall rule. */ -@JsonFlatten @Fluent -public class CreateOrUpdateFirewallRuleParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CreateOrUpdateFirewallRuleParameters.class); - +public final class CreateOrUpdateFirewallRuleParameters { /* - * The start IP address for the firewall rule. This can be either ipv4 or - * ipv6. Start and End should be in the same protocol. + * The firewall rule properties to use when creating a new firewall rule. */ - @JsonProperty(value = "properties.startIpAddress", required = true) - private String startIpAddress; + @JsonProperty(value = "properties", required = true) + private CreateOrUpdateFirewallRuleProperties innerProperties = new CreateOrUpdateFirewallRuleProperties(); - /* - * The end IP address for the firewall rule. This can be either ipv4 or - * ipv6. Start and End should be in the same protocol. + /** + * Get the innerProperties property: The firewall rule properties to use when creating a new firewall rule. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.endIpAddress", required = true) - private String endIpAddress; + private CreateOrUpdateFirewallRuleProperties innerProperties() { + return this.innerProperties; + } /** * Get the startIpAddress property: The start IP address for the firewall rule. This can be either ipv4 or ipv6. @@ -37,7 +34,7 @@ public class CreateOrUpdateFirewallRuleParameters { * @return the startIpAddress value. */ public String startIpAddress() { - return this.startIpAddress; + return this.innerProperties() == null ? null : this.innerProperties().startIpAddress(); } /** @@ -48,7 +45,10 @@ public String startIpAddress() { * @return the CreateOrUpdateFirewallRuleParameters object itself. */ public CreateOrUpdateFirewallRuleParameters withStartIpAddress(String startIpAddress) { - this.startIpAddress = startIpAddress; + if (this.innerProperties() == null) { + this.innerProperties = new CreateOrUpdateFirewallRuleProperties(); + } + this.innerProperties().withStartIpAddress(startIpAddress); return this; } @@ -59,7 +59,7 @@ public CreateOrUpdateFirewallRuleParameters withStartIpAddress(String startIpAdd * @return the endIpAddress value. */ public String endIpAddress() { - return this.endIpAddress; + return this.innerProperties() == null ? null : this.innerProperties().endIpAddress(); } /** @@ -70,7 +70,10 @@ public String endIpAddress() { * @return the CreateOrUpdateFirewallRuleParameters object itself. */ public CreateOrUpdateFirewallRuleParameters withEndIpAddress(String endIpAddress) { - this.endIpAddress = endIpAddress; + if (this.innerProperties() == null) { + this.innerProperties = new CreateOrUpdateFirewallRuleProperties(); + } + this.innerProperties().withEndIpAddress(endIpAddress); return this; } @@ -80,17 +83,15 @@ public CreateOrUpdateFirewallRuleParameters withEndIpAddress(String endIpAddress * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (startIpAddress() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property startIpAddress in model CreateOrUpdateFirewallRuleParameters")); - } - if (endIpAddress() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property endIpAddress in model CreateOrUpdateFirewallRuleParameters")); + "Missing required property innerProperties in model CreateOrUpdateFirewallRuleParameters")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(CreateOrUpdateFirewallRuleParameters.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateOrUpdateTrustedIdProviderParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateOrUpdateTrustedIdProviderParameters.java index db32aad3c3389..017e27f97a17a 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateOrUpdateTrustedIdProviderParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateOrUpdateTrustedIdProviderParameters.java @@ -5,22 +5,29 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.CreateOrUpdateTrustedIdProviderProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** The parameters used to create a new trusted identity provider. */ -@JsonFlatten @Fluent -public class CreateOrUpdateTrustedIdProviderParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CreateOrUpdateTrustedIdProviderParameters.class); - +public final class CreateOrUpdateTrustedIdProviderParameters { /* - * The URL of this trusted identity provider. + * The trusted identity provider properties to use when creating a new + * trusted identity provider. + */ + @JsonProperty(value = "properties", required = true) + private CreateOrUpdateTrustedIdProviderProperties innerProperties = new CreateOrUpdateTrustedIdProviderProperties(); + + /** + * Get the innerProperties property: The trusted identity provider properties to use when creating a new trusted + * identity provider. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.idProvider", required = true) - private String idProvider; + private CreateOrUpdateTrustedIdProviderProperties innerProperties() { + return this.innerProperties; + } /** * Get the idProvider property: The URL of this trusted identity provider. @@ -28,7 +35,7 @@ public class CreateOrUpdateTrustedIdProviderParameters { * @return the idProvider value. */ public String idProvider() { - return this.idProvider; + return this.innerProperties() == null ? null : this.innerProperties().idProvider(); } /** @@ -38,7 +45,10 @@ public String idProvider() { * @return the CreateOrUpdateTrustedIdProviderParameters object itself. */ public CreateOrUpdateTrustedIdProviderParameters withIdProvider(String idProvider) { - this.idProvider = idProvider; + if (this.innerProperties() == null) { + this.innerProperties = new CreateOrUpdateTrustedIdProviderProperties(); + } + this.innerProperties().withIdProvider(idProvider); return this; } @@ -48,11 +58,16 @@ public CreateOrUpdateTrustedIdProviderParameters withIdProvider(String idProvide * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (idProvider() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property idProvider in model CreateOrUpdateTrustedIdProviderParameters")); + "Missing required property innerProperties in model" + + " CreateOrUpdateTrustedIdProviderParameters")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(CreateOrUpdateTrustedIdProviderParameters.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateOrUpdateVirtualNetworkRuleParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateOrUpdateVirtualNetworkRuleParameters.java index 35543c9a013eb..a20fc10b537b5 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateOrUpdateVirtualNetworkRuleParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateOrUpdateVirtualNetworkRuleParameters.java @@ -5,22 +5,30 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.CreateOrUpdateVirtualNetworkRuleProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** The parameters used to create a new virtual network rule. */ -@JsonFlatten @Fluent -public class CreateOrUpdateVirtualNetworkRuleParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CreateOrUpdateVirtualNetworkRuleParameters.class); - +public final class CreateOrUpdateVirtualNetworkRuleParameters { /* - * The resource identifier for the subnet. + * The virtual network rule properties to use when creating a new virtual + * network rule. + */ + @JsonProperty(value = "properties", required = true) + private CreateOrUpdateVirtualNetworkRuleProperties innerProperties = + new CreateOrUpdateVirtualNetworkRuleProperties(); + + /** + * Get the innerProperties property: The virtual network rule properties to use when creating a new virtual network + * rule. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.subnetId", required = true) - private String subnetId; + private CreateOrUpdateVirtualNetworkRuleProperties innerProperties() { + return this.innerProperties; + } /** * Get the subnetId property: The resource identifier for the subnet. @@ -28,7 +36,7 @@ public class CreateOrUpdateVirtualNetworkRuleParameters { * @return the subnetId value. */ public String subnetId() { - return this.subnetId; + return this.innerProperties() == null ? null : this.innerProperties().subnetId(); } /** @@ -38,7 +46,10 @@ public String subnetId() { * @return the CreateOrUpdateVirtualNetworkRuleParameters object itself. */ public CreateOrUpdateVirtualNetworkRuleParameters withSubnetId(String subnetId) { - this.subnetId = subnetId; + if (this.innerProperties() == null) { + this.innerProperties = new CreateOrUpdateVirtualNetworkRuleProperties(); + } + this.innerProperties().withSubnetId(subnetId); return this; } @@ -48,11 +59,16 @@ public CreateOrUpdateVirtualNetworkRuleParameters withSubnetId(String subnetId) * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (subnetId() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property subnetId in model CreateOrUpdateVirtualNetworkRuleParameters")); + "Missing required property innerProperties in model" + + " CreateOrUpdateVirtualNetworkRuleParameters")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(CreateOrUpdateVirtualNetworkRuleParameters.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateTrustedIdProviderWithAccountParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateTrustedIdProviderWithAccountParameters.java index 1a84361a8f62a..c168ded2221c1 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateTrustedIdProviderWithAccountParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateTrustedIdProviderWithAccountParameters.java @@ -5,18 +5,13 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.CreateOrUpdateTrustedIdProviderProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** The parameters used to create a new trusted identity provider while creating a new Data Lake Store account. */ -@JsonFlatten @Fluent -public class CreateTrustedIdProviderWithAccountParameters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CreateTrustedIdProviderWithAccountParameters.class); - +public final class CreateTrustedIdProviderWithAccountParameters { /* * The unique name of the trusted identity provider to create. */ @@ -24,10 +19,11 @@ public class CreateTrustedIdProviderWithAccountParameters { private String name; /* - * The URL of this trusted identity provider. + * The trusted identity provider properties to use when creating a new + * trusted identity provider. */ - @JsonProperty(value = "properties.idProvider", required = true) - private String idProvider; + @JsonProperty(value = "properties", required = true) + private CreateOrUpdateTrustedIdProviderProperties innerProperties = new CreateOrUpdateTrustedIdProviderProperties(); /** * Get the name property: The unique name of the trusted identity provider to create. @@ -49,13 +45,23 @@ public CreateTrustedIdProviderWithAccountParameters withName(String name) { return this; } + /** + * Get the innerProperties property: The trusted identity provider properties to use when creating a new trusted + * identity provider. + * + * @return the innerProperties value. + */ + private CreateOrUpdateTrustedIdProviderProperties innerProperties() { + return this.innerProperties; + } + /** * Get the idProvider property: The URL of this trusted identity provider. * * @return the idProvider value. */ public String idProvider() { - return this.idProvider; + return this.innerProperties() == null ? null : this.innerProperties().idProvider(); } /** @@ -65,7 +71,10 @@ public String idProvider() { * @return the CreateTrustedIdProviderWithAccountParameters object itself. */ public CreateTrustedIdProviderWithAccountParameters withIdProvider(String idProvider) { - this.idProvider = idProvider; + if (this.innerProperties() == null) { + this.innerProperties = new CreateOrUpdateTrustedIdProviderProperties(); + } + this.innerProperties().withIdProvider(idProvider); return this; } @@ -76,16 +85,21 @@ public CreateTrustedIdProviderWithAccountParameters withIdProvider(String idProv */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model CreateTrustedIdProviderWithAccountParameters")); } - if (idProvider() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property idProvider in model CreateTrustedIdProviderWithAccountParameters")); + "Missing required property innerProperties in model" + + " CreateTrustedIdProviderWithAccountParameters")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(CreateTrustedIdProviderWithAccountParameters.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateVirtualNetworkRuleWithAccountParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateVirtualNetworkRuleWithAccountParameters.java index a78e7c309a81d..0370e191875c1 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateVirtualNetworkRuleWithAccountParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/CreateVirtualNetworkRuleWithAccountParameters.java @@ -5,18 +5,13 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.CreateOrUpdateVirtualNetworkRuleProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** The parameters used to create a new virtual network rule while creating a new Data Lake Store account. */ -@JsonFlatten @Fluent -public class CreateVirtualNetworkRuleWithAccountParameters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CreateVirtualNetworkRuleWithAccountParameters.class); - +public final class CreateVirtualNetworkRuleWithAccountParameters { /* * The unique name of the virtual network rule to create. */ @@ -24,10 +19,12 @@ public class CreateVirtualNetworkRuleWithAccountParameters { private String name; /* - * The resource identifier for the subnet. + * The virtual network rule properties to use when creating a new virtual + * network rule. */ - @JsonProperty(value = "properties.subnetId", required = true) - private String subnetId; + @JsonProperty(value = "properties", required = true) + private CreateOrUpdateVirtualNetworkRuleProperties innerProperties = + new CreateOrUpdateVirtualNetworkRuleProperties(); /** * Get the name property: The unique name of the virtual network rule to create. @@ -49,13 +46,23 @@ public CreateVirtualNetworkRuleWithAccountParameters withName(String name) { return this; } + /** + * Get the innerProperties property: The virtual network rule properties to use when creating a new virtual network + * rule. + * + * @return the innerProperties value. + */ + private CreateOrUpdateVirtualNetworkRuleProperties innerProperties() { + return this.innerProperties; + } + /** * Get the subnetId property: The resource identifier for the subnet. * * @return the subnetId value. */ public String subnetId() { - return this.subnetId; + return this.innerProperties() == null ? null : this.innerProperties().subnetId(); } /** @@ -65,7 +72,10 @@ public String subnetId() { * @return the CreateVirtualNetworkRuleWithAccountParameters object itself. */ public CreateVirtualNetworkRuleWithAccountParameters withSubnetId(String subnetId) { - this.subnetId = subnetId; + if (this.innerProperties() == null) { + this.innerProperties = new CreateOrUpdateVirtualNetworkRuleProperties(); + } + this.innerProperties().withSubnetId(subnetId); return this; } @@ -76,16 +86,21 @@ public CreateVirtualNetworkRuleWithAccountParameters withSubnetId(String subnetI */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model CreateVirtualNetworkRuleWithAccountParameters")); } - if (subnetId() == null) { - throw logger + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property subnetId in model CreateVirtualNetworkRuleWithAccountParameters")); + "Missing required property innerProperties in model" + + " CreateVirtualNetworkRuleWithAccountParameters")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(CreateVirtualNetworkRuleWithAccountParameters.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccount.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccount.java index 5a15b7ab98991..e44e5b1917704 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccount.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccount.java @@ -57,48 +57,6 @@ public interface DataLakeStoreAccount { */ EncryptionIdentity identity(); - /** - * Gets the accountId property: The unique identifier associated with this Data Lake Store account. - * - * @return the accountId value. - */ - UUID accountId(); - - /** - * Gets the provisioningState property: The provisioning status of the Data Lake Store account. - * - * @return the provisioningState value. - */ - DataLakeStoreAccountStatus provisioningState(); - - /** - * Gets the state property: The state of the Data Lake Store account. - * - * @return the state value. - */ - DataLakeStoreAccountState state(); - - /** - * Gets the creationTime property: The account creation time. - * - * @return the creationTime value. - */ - OffsetDateTime creationTime(); - - /** - * Gets the lastModifiedTime property: The account last modified time. - * - * @return the lastModifiedTime value. - */ - OffsetDateTime lastModifiedTime(); - - /** - * Gets the endpoint property: The full CName endpoint for this account. - * - * @return the endpoint value. - */ - String endpoint(); - /** * Gets the defaultGroup property: The default owner group for all new folders and files created in the Data Lake * Store account. @@ -189,6 +147,48 @@ public interface DataLakeStoreAccount { */ TierType currentTier(); + /** + * Gets the accountId property: The unique identifier associated with this Data Lake Store account. + * + * @return the accountId value. + */ + UUID accountId(); + + /** + * Gets the provisioningState property: The provisioning status of the Data Lake Store account. + * + * @return the provisioningState value. + */ + DataLakeStoreAccountStatus provisioningState(); + + /** + * Gets the state property: The state of the Data Lake Store account. + * + * @return the state value. + */ + DataLakeStoreAccountState state(); + + /** + * Gets the creationTime property: The account creation time. + * + * @return the creationTime value. + */ + OffsetDateTime creationTime(); + + /** + * Gets the lastModifiedTime property: The account last modified time. + * + * @return the lastModifiedTime value. + */ + OffsetDateTime lastModifiedTime(); + + /** + * Gets the endpoint property: The full CName endpoint for this account. + * + * @return the endpoint value. + */ + String endpoint(); + /** * Gets the region of the resource. * @@ -604,7 +604,7 @@ interface WithNewTier { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response enableKeyVaultWithResponse(Context context); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccountListResult.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccountListResult.java index fc5c75a671992..823a9fc258a58 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccountListResult.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/DataLakeStoreAccountListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.fluent.models.DataLakeStoreAccountBasicInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Data Lake Store account list information response. */ @Immutable public final class DataLakeStoreAccountListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataLakeStoreAccountListResult.class); - /* * The results of the list operation. */ diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/EncryptionConfig.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/EncryptionConfig.java index 10a5134ae6adb..6249db12462fb 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/EncryptionConfig.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/EncryptionConfig.java @@ -6,14 +6,11 @@ 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; /** The encryption configuration for the account. */ @Fluent public final class EncryptionConfig { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EncryptionConfig.class); - /* * The type of encryption configuration being used. Currently the only * supported types are 'UserManaged' and 'ServiceManaged'. @@ -77,7 +74,7 @@ public EncryptionConfig withKeyVaultMetaInfo(KeyVaultMetaInfo keyVaultMetaInfo) */ public void validate() { if (type() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property type in model EncryptionConfig")); } @@ -85,4 +82,6 @@ public void validate() { keyVaultMetaInfo().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(EncryptionConfig.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/EncryptionIdentity.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/EncryptionIdentity.java index eb34e11b496b2..205676a23a828 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/EncryptionIdentity.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/EncryptionIdentity.java @@ -5,22 +5,18 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; /** The encryption identity properties. */ @Fluent public class EncryptionIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EncryptionIdentity.class); - /* * The type of encryption being used. Currently the only supported type is * 'SystemAssigned'. */ @JsonProperty(value = "type", required = true) - private String type; + private String type = "SystemAssigned"; /* * The principal identifier associated with the encryption. diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/FirewallRule.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/FirewallRule.java index d6083e0e3e700..4e1a3b693b877 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/FirewallRule.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/FirewallRule.java @@ -17,34 +17,34 @@ public interface FirewallRule { String id(); /** - * Gets the startIpAddress property: The start IP address for the firewall rule. This can be either ipv4 or ipv6. - * Start and End should be in the same protocol. + * Gets the name property: The resource name. * - * @return the startIpAddress value. + * @return the name value. */ - String startIpAddress(); + String name(); /** - * Gets the endIpAddress property: The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start - * and End should be in the same protocol. + * Gets the type property: The resource type. * - * @return the endIpAddress value. + * @return the type value. */ - String endIpAddress(); + String type(); /** - * Gets the name property: The resource name. + * Gets the startIpAddress property: The start IP address for the firewall rule. This can be either ipv4 or ipv6. + * Start and End should be in the same protocol. * - * @return the name value. + * @return the startIpAddress value. */ - String name(); + String startIpAddress(); /** - * Gets the type property: The resource type. + * Gets the endIpAddress property: The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start + * and End should be in the same protocol. * - * @return the type value. + * @return the endIpAddress value. */ - String type(); + String endIpAddress(); /** * Gets the inner com.azure.resourcemanager.datalakestore.fluent.models.FirewallRuleInner object. diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/FirewallRuleListResult.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/FirewallRuleListResult.java index 692071e32eb48..3254fa93ac74f 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/FirewallRuleListResult.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/FirewallRuleListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.fluent.models.FirewallRuleInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Data Lake Store firewall rule list information. */ @Immutable public final class FirewallRuleListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FirewallRuleListResult.class); - /* * The results of the list operation. */ diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/FirewallRules.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/FirewallRules.java index 2269a2718b96b..f72179d66063c 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/FirewallRules.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/FirewallRules.java @@ -18,7 +18,7 @@ public interface FirewallRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule list information. + * @return data Lake Store firewall rule list information as paginated response with {@link PagedIterable}. */ PagedIterable listByAccount(String resourceGroupName, String accountName); @@ -31,7 +31,7 @@ public interface FirewallRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store firewall rule list information. + * @return data Lake Store firewall rule list information as paginated response with {@link PagedIterable}. */ PagedIterable listByAccount(String resourceGroupName, String accountName, Context context); @@ -58,7 +58,7 @@ public interface FirewallRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store firewall rule. + * @return the specified Data Lake Store firewall rule along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String firewallRuleName, Context context); @@ -85,7 +85,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String accountName, String firewallRuleName, Context context); @@ -97,7 +97,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store firewall rule. + * @return the specified Data Lake Store firewall rule along with {@link Response}. */ FirewallRule getById(String id); @@ -109,7 +109,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store firewall rule. + * @return the specified Data Lake Store firewall rule along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -131,7 +131,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/KeyVaultMetaInfo.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/KeyVaultMetaInfo.java index 49b0c4f4565b8..e2eec18bd88c8 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/KeyVaultMetaInfo.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/KeyVaultMetaInfo.java @@ -6,14 +6,11 @@ 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; /** Metadata information used by account encryption. */ @Fluent public final class KeyVaultMetaInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyVaultMetaInfo.class); - /* * The resource identifier for the user managed Key Vault being used to * encrypt. @@ -102,22 +99,24 @@ public KeyVaultMetaInfo withEncryptionKeyVersion(String encryptionKeyVersion) { */ public void validate() { if (keyVaultResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property keyVaultResourceId in model KeyVaultMetaInfo")); } if (encryptionKeyName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property encryptionKeyName in model KeyVaultMetaInfo")); } if (encryptionKeyVersion() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property encryptionKeyVersion in model KeyVaultMetaInfo")); } } + + private static final ClientLogger LOGGER = new ClientLogger(KeyVaultMetaInfo.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Locations.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Locations.java index 9c865af7e8fd8..7bf20d70ba9f6 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Locations.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Locations.java @@ -29,7 +29,8 @@ public interface Locations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return subscription-level properties and limits for Data Lake Store specified by resource location. + * @return subscription-level properties and limits for Data Lake Store specified by resource location along with + * {@link Response}. */ Response getCapabilityWithResponse(String location, Context context); @@ -40,7 +41,8 @@ public interface Locations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage count and the limit for the resources of the location under the subscription. + * @return the current usage count and the limit for the resources of the location under the subscription as + * paginated response with {@link PagedIterable}. */ PagedIterable getUsage(String location); @@ -52,7 +54,8 @@ public interface Locations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage count and the limit for the resources of the location under the subscription. + * @return the current usage count and the limit for the resources of the location under the subscription as + * paginated response with {@link PagedIterable}. */ PagedIterable getUsage(String location, Context context); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Operation.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Operation.java index 96ab99d6dee3a..7cd1fba1e4e43 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Operation.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Operation.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** An available operation for Data Lake Store. */ @Fluent public final class Operation { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Operation.class); - /* * The name of the operation. */ diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/OperationDisplay.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/OperationDisplay.java index 453bbc14ddcca..095d4856c47d3 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/OperationDisplay.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/OperationDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datalakestore.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; /** The display information for a particular operation. */ @Immutable public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * The resource provider of the operation. */ diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Operations.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Operations.java index 22b5550d42f71..6dc6991a2ea5a 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Operations.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/Operations.java @@ -25,7 +25,7 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available operations for Data Lake Store. + * @return the list of available operations for Data Lake Store along with {@link Response}. */ Response listWithResponse(Context context); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/TrustedIdProvider.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/TrustedIdProvider.java index 7625c1e438a9a..063917364ba7d 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/TrustedIdProvider.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/TrustedIdProvider.java @@ -16,13 +16,6 @@ public interface TrustedIdProvider { */ String id(); - /** - * Gets the idProvider property: The URL of this trusted identity provider. - * - * @return the idProvider value. - */ - String idProvider(); - /** * Gets the name property: The resource name. * @@ -37,6 +30,13 @@ public interface TrustedIdProvider { */ String type(); + /** + * Gets the idProvider property: The URL of this trusted identity provider. + * + * @return the idProvider value. + */ + String idProvider(); + /** * Gets the inner com.azure.resourcemanager.datalakestore.fluent.models.TrustedIdProviderInner object. * diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/TrustedIdProviderListResult.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/TrustedIdProviderListResult.java index f58a462c43a59..0349e5a2de8c9 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/TrustedIdProviderListResult.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/TrustedIdProviderListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.fluent.models.TrustedIdProviderInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Data Lake Store trusted identity provider list information. */ @Immutable public final class TrustedIdProviderListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TrustedIdProviderListResult.class); - /* * The results of the list operation. */ diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/TrustedIdProviders.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/TrustedIdProviders.java index 59d1175438d78..bc35f8fb25e5a 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/TrustedIdProviders.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/TrustedIdProviders.java @@ -18,7 +18,8 @@ public interface TrustedIdProviders { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider list information. + * @return data Lake Store trusted identity provider list information as paginated response with {@link + * PagedIterable}. */ PagedIterable listByAccount(String resourceGroupName, String accountName); @@ -31,7 +32,8 @@ public interface TrustedIdProviders { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store trusted identity provider list information. + * @return data Lake Store trusted identity provider list information as paginated response with {@link + * PagedIterable}. */ PagedIterable listByAccount(String resourceGroupName, String accountName, Context context); @@ -58,7 +60,7 @@ public interface TrustedIdProviders { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store trusted identity provider. + * @return the specified Data Lake Store trusted identity provider along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String trustedIdProviderName, Context context); @@ -85,7 +87,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String accountName, String trustedIdProviderName, Context context); @@ -97,7 +99,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store trusted identity provider. + * @return the specified Data Lake Store trusted identity provider along with {@link Response}. */ TrustedIdProvider getById(String id); @@ -109,7 +111,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store trusted identity provider. + * @return the specified Data Lake Store trusted identity provider along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -131,7 +133,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateDataLakeStoreAccountParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateDataLakeStoreAccountParameters.java index bddfb6b56abf4..e39e7505c77a1 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateDataLakeStoreAccountParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateDataLakeStoreAccountParameters.java @@ -5,89 +5,27 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.UpdateDataLakeStoreAccountProperties; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; /** Data Lake Store account information to update. */ -@JsonFlatten @Fluent -public class UpdateDataLakeStoreAccountParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateDataLakeStoreAccountParameters.class); - +public final class UpdateDataLakeStoreAccountParameters { /* * Resource tags */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* - * The default owner group for all new folders and files created in the - * Data Lake Store account. - */ - @JsonProperty(value = "properties.defaultGroup") - private String defaultGroup; - - /* - * Used for rotation of user managed Key Vault keys. Can only be used to - * rotate a user managed encryption Key Vault key. - */ - @JsonProperty(value = "properties.encryptionConfig") - private UpdateEncryptionConfig encryptionConfig; - - /* - * The list of firewall rules associated with this Data Lake Store account. - */ - @JsonProperty(value = "properties.firewallRules") - private List firewallRules; - - /* - * The list of virtual network rules associated with this Data Lake Store - * account. - */ - @JsonProperty(value = "properties.virtualNetworkRules") - private List virtualNetworkRules; - - /* - * The current state of the IP address firewall for this Data Lake Store - * account. Disabling the firewall does not remove existing rules, they - * will just be ignored until the firewall is re-enabled. - */ - @JsonProperty(value = "properties.firewallState") - private FirewallState firewallState; - - /* - * The current state of allowing or disallowing IPs originating within - * Azure through the firewall. If the firewall is disabled, this is not - * enforced. - */ - @JsonProperty(value = "properties.firewallAllowAzureIps") - private FirewallAllowAzureIpsState firewallAllowAzureIps; - - /* - * The list of trusted identity providers associated with this Data Lake - * Store account. - */ - @JsonProperty(value = "properties.trustedIdProviders") - private List trustedIdProviders; - - /* - * The current state of the trusted identity provider feature for this Data - * Lake Store account. Disabling trusted identity provider functionality - * does not remove the providers, they will just be ignored until this - * feature is re-enabled. - */ - @JsonProperty(value = "properties.trustedIdProviderState") - private TrustedIdProviderState trustedIdProviderState; - - /* - * The commitment tier to use for next month. + * The Data Lake Store account properties to update. */ - @JsonProperty(value = "properties.newTier") - private TierType newTier; + @JsonProperty(value = "properties") + private UpdateDataLakeStoreAccountProperties innerProperties; /** * Get the tags property: Resource tags. @@ -109,6 +47,15 @@ public UpdateDataLakeStoreAccountParameters withTags(Map tags) { return this; } + /** + * Get the innerProperties property: The Data Lake Store account properties to update. + * + * @return the innerProperties value. + */ + private UpdateDataLakeStoreAccountProperties innerProperties() { + return this.innerProperties; + } + /** * Get the defaultGroup property: The default owner group for all new folders and files created in the Data Lake * Store account. @@ -116,7 +63,7 @@ public UpdateDataLakeStoreAccountParameters withTags(Map tags) { * @return the defaultGroup value. */ public String defaultGroup() { - return this.defaultGroup; + return this.innerProperties() == null ? null : this.innerProperties().defaultGroup(); } /** @@ -127,7 +74,10 @@ public String defaultGroup() { * @return the UpdateDataLakeStoreAccountParameters object itself. */ public UpdateDataLakeStoreAccountParameters withDefaultGroup(String defaultGroup) { - this.defaultGroup = defaultGroup; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateDataLakeStoreAccountProperties(); + } + this.innerProperties().withDefaultGroup(defaultGroup); return this; } @@ -138,7 +88,7 @@ public UpdateDataLakeStoreAccountParameters withDefaultGroup(String defaultGroup * @return the encryptionConfig value. */ public UpdateEncryptionConfig encryptionConfig() { - return this.encryptionConfig; + return this.innerProperties() == null ? null : this.innerProperties().encryptionConfig(); } /** @@ -149,7 +99,10 @@ public UpdateEncryptionConfig encryptionConfig() { * @return the UpdateDataLakeStoreAccountParameters object itself. */ public UpdateDataLakeStoreAccountParameters withEncryptionConfig(UpdateEncryptionConfig encryptionConfig) { - this.encryptionConfig = encryptionConfig; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateDataLakeStoreAccountProperties(); + } + this.innerProperties().withEncryptionConfig(encryptionConfig); return this; } @@ -159,7 +112,7 @@ public UpdateDataLakeStoreAccountParameters withEncryptionConfig(UpdateEncryptio * @return the firewallRules value. */ public List firewallRules() { - return this.firewallRules; + return this.innerProperties() == null ? null : this.innerProperties().firewallRules(); } /** @@ -170,7 +123,10 @@ public List firewallRules() { */ public UpdateDataLakeStoreAccountParameters withFirewallRules( List firewallRules) { - this.firewallRules = firewallRules; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateDataLakeStoreAccountProperties(); + } + this.innerProperties().withFirewallRules(firewallRules); return this; } @@ -181,7 +137,7 @@ public UpdateDataLakeStoreAccountParameters withFirewallRules( * @return the virtualNetworkRules value. */ public List virtualNetworkRules() { - return this.virtualNetworkRules; + return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkRules(); } /** @@ -193,7 +149,10 @@ public List virtualNetworkRules() */ public UpdateDataLakeStoreAccountParameters withVirtualNetworkRules( List virtualNetworkRules) { - this.virtualNetworkRules = virtualNetworkRules; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateDataLakeStoreAccountProperties(); + } + this.innerProperties().withVirtualNetworkRules(virtualNetworkRules); return this; } @@ -205,7 +164,7 @@ public UpdateDataLakeStoreAccountParameters withVirtualNetworkRules( * @return the firewallState value. */ public FirewallState firewallState() { - return this.firewallState; + return this.innerProperties() == null ? null : this.innerProperties().firewallState(); } /** @@ -217,7 +176,10 @@ public FirewallState firewallState() { * @return the UpdateDataLakeStoreAccountParameters object itself. */ public UpdateDataLakeStoreAccountParameters withFirewallState(FirewallState firewallState) { - this.firewallState = firewallState; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateDataLakeStoreAccountProperties(); + } + this.innerProperties().withFirewallState(firewallState); return this; } @@ -228,7 +190,7 @@ public UpdateDataLakeStoreAccountParameters withFirewallState(FirewallState fire * @return the firewallAllowAzureIps value. */ public FirewallAllowAzureIpsState firewallAllowAzureIps() { - return this.firewallAllowAzureIps; + return this.innerProperties() == null ? null : this.innerProperties().firewallAllowAzureIps(); } /** @@ -240,7 +202,10 @@ public FirewallAllowAzureIpsState firewallAllowAzureIps() { */ public UpdateDataLakeStoreAccountParameters withFirewallAllowAzureIps( FirewallAllowAzureIpsState firewallAllowAzureIps) { - this.firewallAllowAzureIps = firewallAllowAzureIps; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateDataLakeStoreAccountProperties(); + } + this.innerProperties().withFirewallAllowAzureIps(firewallAllowAzureIps); return this; } @@ -251,7 +216,7 @@ public UpdateDataLakeStoreAccountParameters withFirewallAllowAzureIps( * @return the trustedIdProviders value. */ public List trustedIdProviders() { - return this.trustedIdProviders; + return this.innerProperties() == null ? null : this.innerProperties().trustedIdProviders(); } /** @@ -263,7 +228,10 @@ public List trustedIdProviders() { */ public UpdateDataLakeStoreAccountParameters withTrustedIdProviders( List trustedIdProviders) { - this.trustedIdProviders = trustedIdProviders; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateDataLakeStoreAccountProperties(); + } + this.innerProperties().withTrustedIdProviders(trustedIdProviders); return this; } @@ -275,7 +243,7 @@ public UpdateDataLakeStoreAccountParameters withTrustedIdProviders( * @return the trustedIdProviderState value. */ public TrustedIdProviderState trustedIdProviderState() { - return this.trustedIdProviderState; + return this.innerProperties() == null ? null : this.innerProperties().trustedIdProviderState(); } /** @@ -288,7 +256,10 @@ public TrustedIdProviderState trustedIdProviderState() { */ public UpdateDataLakeStoreAccountParameters withTrustedIdProviderState( TrustedIdProviderState trustedIdProviderState) { - this.trustedIdProviderState = trustedIdProviderState; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateDataLakeStoreAccountProperties(); + } + this.innerProperties().withTrustedIdProviderState(trustedIdProviderState); return this; } @@ -298,7 +269,7 @@ public UpdateDataLakeStoreAccountParameters withTrustedIdProviderState( * @return the newTier value. */ public TierType newTier() { - return this.newTier; + return this.innerProperties() == null ? null : this.innerProperties().newTier(); } /** @@ -308,7 +279,10 @@ public TierType newTier() { * @return the UpdateDataLakeStoreAccountParameters object itself. */ public UpdateDataLakeStoreAccountParameters withNewTier(TierType newTier) { - this.newTier = newTier; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateDataLakeStoreAccountProperties(); + } + this.innerProperties().withNewTier(newTier); return this; } @@ -318,17 +292,8 @@ public UpdateDataLakeStoreAccountParameters withNewTier(TierType newTier) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (encryptionConfig() != null) { - encryptionConfig().validate(); - } - if (firewallRules() != null) { - firewallRules().forEach(e -> e.validate()); - } - if (virtualNetworkRules() != null) { - virtualNetworkRules().forEach(e -> e.validate()); - } - if (trustedIdProviders() != null) { - trustedIdProviders().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateEncryptionConfig.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateEncryptionConfig.java index 72350a2f58251..52ebc3f13b103 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateEncryptionConfig.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateEncryptionConfig.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The encryption configuration used to update a user managed Key Vault key. */ @Fluent public final class UpdateEncryptionConfig { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateEncryptionConfig.class); - /* * The updated Key Vault key to use in user managed key rotation. */ diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateFirewallRuleParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateFirewallRuleParameters.java index afe8bcbfd8486..af8c6f2ceead1 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateFirewallRuleParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateFirewallRuleParameters.java @@ -5,30 +5,26 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.UpdateFirewallRuleProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** The parameters used to update a firewall rule. */ -@JsonFlatten @Fluent -public class UpdateFirewallRuleParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateFirewallRuleParameters.class); - +public final class UpdateFirewallRuleParameters { /* - * The start IP address for the firewall rule. This can be either ipv4 or - * ipv6. Start and End should be in the same protocol. + * The firewall rule properties to use when updating a firewall rule. */ - @JsonProperty(value = "properties.startIpAddress") - private String startIpAddress; + @JsonProperty(value = "properties") + private UpdateFirewallRuleProperties innerProperties; - /* - * The end IP address for the firewall rule. This can be either ipv4 or - * ipv6. Start and End should be in the same protocol. + /** + * Get the innerProperties property: The firewall rule properties to use when updating a firewall rule. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.endIpAddress") - private String endIpAddress; + private UpdateFirewallRuleProperties innerProperties() { + return this.innerProperties; + } /** * Get the startIpAddress property: The start IP address for the firewall rule. This can be either ipv4 or ipv6. @@ -37,7 +33,7 @@ public class UpdateFirewallRuleParameters { * @return the startIpAddress value. */ public String startIpAddress() { - return this.startIpAddress; + return this.innerProperties() == null ? null : this.innerProperties().startIpAddress(); } /** @@ -48,7 +44,10 @@ public String startIpAddress() { * @return the UpdateFirewallRuleParameters object itself. */ public UpdateFirewallRuleParameters withStartIpAddress(String startIpAddress) { - this.startIpAddress = startIpAddress; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateFirewallRuleProperties(); + } + this.innerProperties().withStartIpAddress(startIpAddress); return this; } @@ -59,7 +58,7 @@ public UpdateFirewallRuleParameters withStartIpAddress(String startIpAddress) { * @return the endIpAddress value. */ public String endIpAddress() { - return this.endIpAddress; + return this.innerProperties() == null ? null : this.innerProperties().endIpAddress(); } /** @@ -70,7 +69,10 @@ public String endIpAddress() { * @return the UpdateFirewallRuleParameters object itself. */ public UpdateFirewallRuleParameters withEndIpAddress(String endIpAddress) { - this.endIpAddress = endIpAddress; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateFirewallRuleProperties(); + } + this.innerProperties().withEndIpAddress(endIpAddress); return this; } @@ -80,5 +82,8 @@ public UpdateFirewallRuleParameters withEndIpAddress(String endIpAddress) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateFirewallRuleWithAccountParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateFirewallRuleWithAccountParameters.java index 0c475c249cc6d..c78caa076b72f 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateFirewallRuleWithAccountParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateFirewallRuleWithAccountParameters.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.UpdateFirewallRuleProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** The parameters used to update a firewall rule while updating a Data Lake Store account. */ -@JsonFlatten @Fluent -public class UpdateFirewallRuleWithAccountParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateFirewallRuleWithAccountParameters.class); - +public final class UpdateFirewallRuleWithAccountParameters { /* * The unique name of the firewall rule to update. */ @@ -23,18 +19,10 @@ public class UpdateFirewallRuleWithAccountParameters { private String name; /* - * The start IP address for the firewall rule. This can be either ipv4 or - * ipv6. Start and End should be in the same protocol. - */ - @JsonProperty(value = "properties.startIpAddress") - private String startIpAddress; - - /* - * The end IP address for the firewall rule. This can be either ipv4 or - * ipv6. Start and End should be in the same protocol. + * The firewall rule properties to use when updating a firewall rule. */ - @JsonProperty(value = "properties.endIpAddress") - private String endIpAddress; + @JsonProperty(value = "properties") + private UpdateFirewallRuleProperties innerProperties; /** * Get the name property: The unique name of the firewall rule to update. @@ -56,6 +44,15 @@ public UpdateFirewallRuleWithAccountParameters withName(String name) { return this; } + /** + * Get the innerProperties property: The firewall rule properties to use when updating a firewall rule. + * + * @return the innerProperties value. + */ + private UpdateFirewallRuleProperties innerProperties() { + return this.innerProperties; + } + /** * Get the startIpAddress property: The start IP address for the firewall rule. This can be either ipv4 or ipv6. * Start and End should be in the same protocol. @@ -63,7 +60,7 @@ public UpdateFirewallRuleWithAccountParameters withName(String name) { * @return the startIpAddress value. */ public String startIpAddress() { - return this.startIpAddress; + return this.innerProperties() == null ? null : this.innerProperties().startIpAddress(); } /** @@ -74,7 +71,10 @@ public String startIpAddress() { * @return the UpdateFirewallRuleWithAccountParameters object itself. */ public UpdateFirewallRuleWithAccountParameters withStartIpAddress(String startIpAddress) { - this.startIpAddress = startIpAddress; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateFirewallRuleProperties(); + } + this.innerProperties().withStartIpAddress(startIpAddress); return this; } @@ -85,7 +85,7 @@ public UpdateFirewallRuleWithAccountParameters withStartIpAddress(String startIp * @return the endIpAddress value. */ public String endIpAddress() { - return this.endIpAddress; + return this.innerProperties() == null ? null : this.innerProperties().endIpAddress(); } /** @@ -96,7 +96,10 @@ public String endIpAddress() { * @return the UpdateFirewallRuleWithAccountParameters object itself. */ public UpdateFirewallRuleWithAccountParameters withEndIpAddress(String endIpAddress) { - this.endIpAddress = endIpAddress; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateFirewallRuleProperties(); + } + this.innerProperties().withEndIpAddress(endIpAddress); return this; } @@ -107,10 +110,15 @@ public UpdateFirewallRuleWithAccountParameters withEndIpAddress(String endIpAddr */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model UpdateFirewallRuleWithAccountParameters")); } + if (innerProperties() != null) { + innerProperties().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(UpdateFirewallRuleWithAccountParameters.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateKeyVaultMetaInfo.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateKeyVaultMetaInfo.java index 06f6305c07ed4..fc0c7b8087af4 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateKeyVaultMetaInfo.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateKeyVaultMetaInfo.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The Key Vault update information used for user managed key rotation. */ @Fluent public final class UpdateKeyVaultMetaInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateKeyVaultMetaInfo.class); - /* * The version of the user managed encryption key to update through a key * rotation. diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateTrustedIdProviderParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateTrustedIdProviderParameters.java index f1ebe13d600c3..9bb22ef6d5f41 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateTrustedIdProviderParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateTrustedIdProviderParameters.java @@ -5,22 +5,28 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.UpdateTrustedIdProviderProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** The parameters used to update a trusted identity provider. */ -@JsonFlatten @Fluent -public class UpdateTrustedIdProviderParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateTrustedIdProviderParameters.class); - +public final class UpdateTrustedIdProviderParameters { /* - * The URL of this trusted identity provider. + * The trusted identity provider properties to use when updating a trusted + * identity provider. + */ + @JsonProperty(value = "properties") + private UpdateTrustedIdProviderProperties innerProperties; + + /** + * Get the innerProperties property: The trusted identity provider properties to use when updating a trusted + * identity provider. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.idProvider") - private String idProvider; + private UpdateTrustedIdProviderProperties innerProperties() { + return this.innerProperties; + } /** * Get the idProvider property: The URL of this trusted identity provider. @@ -28,7 +34,7 @@ public class UpdateTrustedIdProviderParameters { * @return the idProvider value. */ public String idProvider() { - return this.idProvider; + return this.innerProperties() == null ? null : this.innerProperties().idProvider(); } /** @@ -38,7 +44,10 @@ public String idProvider() { * @return the UpdateTrustedIdProviderParameters object itself. */ public UpdateTrustedIdProviderParameters withIdProvider(String idProvider) { - this.idProvider = idProvider; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateTrustedIdProviderProperties(); + } + this.innerProperties().withIdProvider(idProvider); return this; } @@ -48,5 +57,8 @@ public UpdateTrustedIdProviderParameters withIdProvider(String idProvider) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateTrustedIdProviderWithAccountParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateTrustedIdProviderWithAccountParameters.java index 2f68bad69f8ee..595aaf9318e1c 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateTrustedIdProviderWithAccountParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateTrustedIdProviderWithAccountParameters.java @@ -5,18 +5,13 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.UpdateTrustedIdProviderProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** The parameters used to update a trusted identity provider while updating a Data Lake Store account. */ -@JsonFlatten @Fluent -public class UpdateTrustedIdProviderWithAccountParameters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UpdateTrustedIdProviderWithAccountParameters.class); - +public final class UpdateTrustedIdProviderWithAccountParameters { /* * The unique name of the trusted identity provider to update. */ @@ -24,10 +19,11 @@ public class UpdateTrustedIdProviderWithAccountParameters { private String name; /* - * The URL of this trusted identity provider. + * The trusted identity provider properties to use when updating a trusted + * identity provider. */ - @JsonProperty(value = "properties.idProvider") - private String idProvider; + @JsonProperty(value = "properties") + private UpdateTrustedIdProviderProperties innerProperties; /** * Get the name property: The unique name of the trusted identity provider to update. @@ -49,13 +45,23 @@ public UpdateTrustedIdProviderWithAccountParameters withName(String name) { return this; } + /** + * Get the innerProperties property: The trusted identity provider properties to use when updating a trusted + * identity provider. + * + * @return the innerProperties value. + */ + private UpdateTrustedIdProviderProperties innerProperties() { + return this.innerProperties; + } + /** * Get the idProvider property: The URL of this trusted identity provider. * * @return the idProvider value. */ public String idProvider() { - return this.idProvider; + return this.innerProperties() == null ? null : this.innerProperties().idProvider(); } /** @@ -65,7 +71,10 @@ public String idProvider() { * @return the UpdateTrustedIdProviderWithAccountParameters object itself. */ public UpdateTrustedIdProviderWithAccountParameters withIdProvider(String idProvider) { - this.idProvider = idProvider; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateTrustedIdProviderProperties(); + } + this.innerProperties().withIdProvider(idProvider); return this; } @@ -76,10 +85,15 @@ public UpdateTrustedIdProviderWithAccountParameters withIdProvider(String idProv */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model UpdateTrustedIdProviderWithAccountParameters")); } + if (innerProperties() != null) { + innerProperties().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(UpdateTrustedIdProviderWithAccountParameters.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateVirtualNetworkRuleParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateVirtualNetworkRuleParameters.java index 1f39fbc89a054..74b2f8cc2aa71 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateVirtualNetworkRuleParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateVirtualNetworkRuleParameters.java @@ -5,22 +5,28 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.UpdateVirtualNetworkRuleProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** The parameters used to update a virtual network rule. */ -@JsonFlatten @Fluent -public class UpdateVirtualNetworkRuleParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateVirtualNetworkRuleParameters.class); - +public final class UpdateVirtualNetworkRuleParameters { /* - * The resource identifier for the subnet. + * The virtual network rule properties to use when updating a virtual + * network rule. + */ + @JsonProperty(value = "properties") + private UpdateVirtualNetworkRuleProperties innerProperties; + + /** + * Get the innerProperties property: The virtual network rule properties to use when updating a virtual network + * rule. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.subnetId") - private String subnetId; + private UpdateVirtualNetworkRuleProperties innerProperties() { + return this.innerProperties; + } /** * Get the subnetId property: The resource identifier for the subnet. @@ -28,7 +34,7 @@ public class UpdateVirtualNetworkRuleParameters { * @return the subnetId value. */ public String subnetId() { - return this.subnetId; + return this.innerProperties() == null ? null : this.innerProperties().subnetId(); } /** @@ -38,7 +44,10 @@ public String subnetId() { * @return the UpdateVirtualNetworkRuleParameters object itself. */ public UpdateVirtualNetworkRuleParameters withSubnetId(String subnetId) { - this.subnetId = subnetId; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateVirtualNetworkRuleProperties(); + } + this.innerProperties().withSubnetId(subnetId); return this; } @@ -48,5 +57,8 @@ public UpdateVirtualNetworkRuleParameters withSubnetId(String subnetId) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateVirtualNetworkRuleWithAccountParameters.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateVirtualNetworkRuleWithAccountParameters.java index a2e34927822d6..5f995722da9b1 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateVirtualNetworkRuleWithAccountParameters.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UpdateVirtualNetworkRuleWithAccountParameters.java @@ -5,18 +5,13 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.datalakestore.fluent.models.UpdateVirtualNetworkRuleProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** The parameters used to update a virtual network rule while updating a Data Lake Store account. */ -@JsonFlatten @Fluent -public class UpdateVirtualNetworkRuleWithAccountParameters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UpdateVirtualNetworkRuleWithAccountParameters.class); - +public final class UpdateVirtualNetworkRuleWithAccountParameters { /* * The unique name of the virtual network rule to update. */ @@ -24,10 +19,11 @@ public class UpdateVirtualNetworkRuleWithAccountParameters { private String name; /* - * The resource identifier for the subnet. + * The virtual network rule properties to use when updating a virtual + * network rule. */ - @JsonProperty(value = "properties.subnetId") - private String subnetId; + @JsonProperty(value = "properties") + private UpdateVirtualNetworkRuleProperties innerProperties; /** * Get the name property: The unique name of the virtual network rule to update. @@ -49,13 +45,23 @@ public UpdateVirtualNetworkRuleWithAccountParameters withName(String name) { return this; } + /** + * Get the innerProperties property: The virtual network rule properties to use when updating a virtual network + * rule. + * + * @return the innerProperties value. + */ + private UpdateVirtualNetworkRuleProperties innerProperties() { + return this.innerProperties; + } + /** * Get the subnetId property: The resource identifier for the subnet. * * @return the subnetId value. */ public String subnetId() { - return this.subnetId; + return this.innerProperties() == null ? null : this.innerProperties().subnetId(); } /** @@ -65,7 +71,10 @@ public String subnetId() { * @return the UpdateVirtualNetworkRuleWithAccountParameters object itself. */ public UpdateVirtualNetworkRuleWithAccountParameters withSubnetId(String subnetId) { - this.subnetId = subnetId; + if (this.innerProperties() == null) { + this.innerProperties = new UpdateVirtualNetworkRuleProperties(); + } + this.innerProperties().withSubnetId(subnetId); return this; } @@ -76,10 +85,15 @@ public UpdateVirtualNetworkRuleWithAccountParameters withSubnetId(String subnetI */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model UpdateVirtualNetworkRuleWithAccountParameters")); } + if (innerProperties() != null) { + innerProperties().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(UpdateVirtualNetworkRuleWithAccountParameters.class); } diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UsageListResult.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UsageListResult.java index 0bccc409fda82..2d9d6ecbe7f0f 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UsageListResult.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UsageListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.fluent.models.UsageInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response from the List Usages operation. */ @Fluent public final class UsageListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageListResult.class); - /* * Gets or sets the list of Storage Resource Usages. */ diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UsageName.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UsageName.java index 18b3e8225e13e..351bcbfcf2c70 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UsageName.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/UsageName.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datalakestore.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; /** The usage names that can be used. */ @Immutable public final class UsageName { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageName.class); - /* * Gets a string describing the resource name. */ diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/VirtualNetworkRule.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/VirtualNetworkRule.java index 7f11647cf4b0b..040f4f5de750d 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/VirtualNetworkRule.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/VirtualNetworkRule.java @@ -16,13 +16,6 @@ public interface VirtualNetworkRule { */ String id(); - /** - * Gets the subnetId property: The resource identifier for the subnet. - * - * @return the subnetId value. - */ - String subnetId(); - /** * Gets the name property: The resource name. * @@ -37,6 +30,13 @@ public interface VirtualNetworkRule { */ String type(); + /** + * Gets the subnetId property: The resource identifier for the subnet. + * + * @return the subnetId value. + */ + String subnetId(); + /** * Gets the inner com.azure.resourcemanager.datalakestore.fluent.models.VirtualNetworkRuleInner object. * diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/VirtualNetworkRuleListResult.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/VirtualNetworkRuleListResult.java index 8fb836119a127..2377446acae8b 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/VirtualNetworkRuleListResult.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/VirtualNetworkRuleListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datalakestore.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datalakestore.fluent.models.VirtualNetworkRuleInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Data Lake Store virtual network rule list information. */ @Immutable public final class VirtualNetworkRuleListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkRuleListResult.class); - /* * The results of the list operation. */ diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/VirtualNetworkRules.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/VirtualNetworkRules.java index f813819050d9c..14997f76c3ed0 100644 --- a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/VirtualNetworkRules.java +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/models/VirtualNetworkRules.java @@ -18,7 +18,7 @@ public interface VirtualNetworkRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule list information. + * @return data Lake Store virtual network rule list information as paginated response with {@link PagedIterable}. */ PagedIterable listByAccount(String resourceGroupName, String accountName); @@ -31,7 +31,7 @@ public interface VirtualNetworkRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data Lake Store virtual network rule list information. + * @return data Lake Store virtual network rule list information as paginated response with {@link PagedIterable}. */ PagedIterable listByAccount(String resourceGroupName, String accountName, Context context); @@ -58,7 +58,7 @@ public interface VirtualNetworkRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store virtual network rule. + * @return the specified Data Lake Store virtual network rule along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String virtualNetworkRuleName, Context context); @@ -85,7 +85,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String accountName, String virtualNetworkRuleName, Context context); @@ -97,7 +97,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store virtual network rule. + * @return the specified Data Lake Store virtual network rule along with {@link Response}. */ VirtualNetworkRule getById(String id); @@ -109,7 +109,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Data Lake Store virtual network rule. + * @return the specified Data Lake Store virtual network rule along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -131,7 +131,7 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsCheckNameAvailabilitySamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsCheckNameAvailabilitySamples.java new file mode 100644 index 0000000000000..fbdd12c758aeb --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsCheckNameAvailabilitySamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.datalakestore.models.CheckNameAvailabilityParameters; + +/** Samples for Accounts CheckNameAvailability. */ +public final class AccountsCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_CheckNameAvailability.json + */ + /** + * Sample code: Checks whether the specified account name is available or taken. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void checksWhetherTheSpecifiedAccountNameIsAvailableOrTaken( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .accounts() + .checkNameAvailabilityWithResponse( + "EastUS2", new CheckNameAvailabilityParameters().withName("contosoadla"), Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsCreateSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsCreateSamples.java new file mode 100644 index 0000000000000..30a87241eaab2 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsCreateSamples.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.resourcemanager.datalakestore.models.CreateFirewallRuleWithAccountParameters; +import com.azure.resourcemanager.datalakestore.models.CreateTrustedIdProviderWithAccountParameters; +import com.azure.resourcemanager.datalakestore.models.EncryptionConfig; +import com.azure.resourcemanager.datalakestore.models.EncryptionConfigType; +import com.azure.resourcemanager.datalakestore.models.EncryptionIdentity; +import com.azure.resourcemanager.datalakestore.models.EncryptionState; +import com.azure.resourcemanager.datalakestore.models.FirewallAllowAzureIpsState; +import com.azure.resourcemanager.datalakestore.models.FirewallState; +import com.azure.resourcemanager.datalakestore.models.KeyVaultMetaInfo; +import com.azure.resourcemanager.datalakestore.models.TierType; +import com.azure.resourcemanager.datalakestore.models.TrustedIdProviderState; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Accounts Create. */ +public final class AccountsCreateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_Create.json + */ + /** + * Sample code: Creates the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void createsTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .accounts() + .define("contosoadla") + .withRegion("eastus2") + .withExistingResourceGroup("contosorg") + .withTags(mapOf("test_key", "test_value")) + .withIdentity(new EncryptionIdentity()) + .withDefaultGroup("test_default_group") + .withEncryptionConfig( + new EncryptionConfig() + .withType(EncryptionConfigType.USER_MANAGED) + .withKeyVaultMetaInfo( + new KeyVaultMetaInfo() + .withKeyVaultResourceId("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345") + .withEncryptionKeyName("test_encryption_key_name") + .withEncryptionKeyVersion("encryption_key_version"))) + .withEncryptionState(EncryptionState.ENABLED) + .withFirewallRules( + Arrays + .asList( + new CreateFirewallRuleWithAccountParameters() + .withName("test_rule") + .withStartIpAddress("1.1.1.1") + .withEndIpAddress("2.2.2.2"))) + .withFirewallState(FirewallState.ENABLED) + .withFirewallAllowAzureIps(FirewallAllowAzureIpsState.ENABLED) + .withTrustedIdProviders( + Arrays + .asList( + new CreateTrustedIdProviderWithAccountParameters() + .withName("test_trusted_id_provider_name") + .withIdProvider("https://sts.windows.net/ea9ec534-a3e3-4e45-ad36-3afc5bb291c1"))) + .withTrustedIdProviderState(TrustedIdProviderState.ENABLED) + .withNewTier(TierType.CONSUMPTION) + .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; + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsDeleteSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsDeleteSamples.java new file mode 100644 index 0000000000000..f99baada45ffb --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for Accounts Delete. */ +public final class AccountsDeleteSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_Delete.json + */ + /** + * Sample code: Deletes the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void deletesTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.accounts().delete("contosorg", "contosoadla", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsEnableKeyVaultSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsEnableKeyVaultSamples.java new file mode 100644 index 0000000000000..121c34de8a5b2 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsEnableKeyVaultSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for Accounts EnableKeyVault. */ +public final class AccountsEnableKeyVaultSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_EnableKeyVault.json + */ + /** + * Sample code: Attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void attemptsToEnableAUserManagedKeyVaultForEncryptionOfTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.accounts().enableKeyVaultWithResponse("contosorg", "contosoadla", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsGetByResourceGroupSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..70d560e69e866 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for Accounts GetByResourceGroup. */ +public final class AccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_Get.json + */ + /** + * Sample code: Gets the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void getsTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.accounts().getByResourceGroupWithResponse("contosorg", "contosoadla", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsListByResourceGroupSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsListByResourceGroupSamples.java new file mode 100644 index 0000000000000..128e08c112676 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsListByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for Accounts ListByResourceGroup. */ +public final class AccountsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_ListByResourceGroup.json + */ + /** + * Sample code: Lists the Data Lake Store accounts within a specific resource group. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void listsTheDataLakeStoreAccountsWithinASpecificResourceGroup( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .accounts() + .listByResourceGroup("contosorg", "test_filter", 1, 1, "test_select", "test_orderby", false, Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsListSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsListSamples.java new file mode 100644 index 0000000000000..d91784776b5e4 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for Accounts List. */ +public final class AccountsListSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_List.json + */ + /** + * Sample code: Lists the Data Lake Store accounts within the subscription. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void listsTheDataLakeStoreAccountsWithinTheSubscription( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.accounts().list("test_filter", 1, 1, "test_select", "test_orderby", false, Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsUpdateSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsUpdateSamples.java new file mode 100644 index 0000000000000..b55bd7390c023 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/AccountsUpdateSamples.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.datalakestore.models.DataLakeStoreAccount; +import com.azure.resourcemanager.datalakestore.models.FirewallAllowAzureIpsState; +import com.azure.resourcemanager.datalakestore.models.FirewallState; +import com.azure.resourcemanager.datalakestore.models.TierType; +import com.azure.resourcemanager.datalakestore.models.TrustedIdProviderState; +import com.azure.resourcemanager.datalakestore.models.UpdateEncryptionConfig; +import com.azure.resourcemanager.datalakestore.models.UpdateKeyVaultMetaInfo; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Accounts Update. */ +public final class AccountsUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_Update.json + */ + /** + * Sample code: Updates the specified Data Lake Store account information. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void updatesTheSpecifiedDataLakeStoreAccountInformation( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + DataLakeStoreAccount resource = + manager.accounts().getByResourceGroupWithResponse("contosorg", "contosoadla", Context.NONE).getValue(); + resource + .update() + .withTags(mapOf("test_key", "test_value")) + .withDefaultGroup("test_default_group") + .withEncryptionConfig( + new UpdateEncryptionConfig() + .withKeyVaultMetaInfo( + new UpdateKeyVaultMetaInfo().withEncryptionKeyVersion("encryption_key_version"))) + .withFirewallState(FirewallState.ENABLED) + .withFirewallAllowAzureIps(FirewallAllowAzureIpsState.ENABLED) + .withTrustedIdProviderState(TrustedIdProviderState.ENABLED) + .withNewTier(TierType.CONSUMPTION) + .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; + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesCreateOrUpdateSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..8abcfd7ed8322 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesCreateOrUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +/** Samples for FirewallRules CreateOrUpdate. */ +public final class FirewallRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_CreateOrUpdate.json + */ + /** + * Sample code: Creates or updates the specified firewall rule. During update, the firewall rule with the specified + * name will be replaced with this new firewall rule. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void + createsOrUpdatesTheSpecifiedFirewallRuleDuringUpdateTheFirewallRuleWithTheSpecifiedNameWillBeReplacedWithThisNewFirewallRule( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .firewallRules() + .define("test_rule") + .withExistingAccount("contosorg", "contosoadla") + .withStartIpAddress("1.1.1.1") + .withEndIpAddress("2.2.2.2") + .create(); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesDeleteSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesDeleteSamples.java new file mode 100644 index 0000000000000..2499097de3b8a --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for FirewallRules Delete. */ +public final class FirewallRulesDeleteSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_Delete.json + */ + /** + * Sample code: Deletes the specified firewall rule from the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void deletesTheSpecifiedFirewallRuleFromTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.firewallRules().deleteWithResponse("contosorg", "contosoadla", "test_rule", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesGetSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesGetSamples.java new file mode 100644 index 0000000000000..04c987c4a9339 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for FirewallRules Get. */ +public final class FirewallRulesGetSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_Get.json + */ + /** + * Sample code: Gets the specified Data Lake Store firewall rule. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void getsTheSpecifiedDataLakeStoreFirewallRule( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.firewallRules().getWithResponse("contosorg", "contosoadla", "test_rule", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesListByAccountSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesListByAccountSamples.java new file mode 100644 index 0000000000000..b527c9d2b0172 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesListByAccountSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for FirewallRules ListByAccount. */ +public final class FirewallRulesListByAccountSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_ListByAccount.json + */ + /** + * Sample code: Lists the Data Lake Store firewall rules within the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void listsTheDataLakeStoreFirewallRulesWithinTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.firewallRules().listByAccount("contosorg", "contosoadla", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesUpdateSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesUpdateSamples.java new file mode 100644 index 0000000000000..d8278ba4a64bd --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/FirewallRulesUpdateSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.datalakestore.models.FirewallRule; + +/** Samples for FirewallRules Update. */ +public final class FirewallRulesUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_Update.json + */ + /** + * Sample code: Updates the specified firewall rule. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void updatesTheSpecifiedFirewallRule( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + FirewallRule resource = + manager.firewallRules().getWithResponse("contosorg", "contosoadla", "test_rule", Context.NONE).getValue(); + resource.update().withStartIpAddress("1.1.1.1").withEndIpAddress("2.2.2.2").apply(); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/LocationsGetCapabilitySamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/LocationsGetCapabilitySamples.java new file mode 100644 index 0000000000000..6f1d4dc8d055c --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/LocationsGetCapabilitySamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for Locations GetCapability. */ +public final class LocationsGetCapabilitySamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Locations_GetCapability.json + */ + /** + * Sample code: Gets subscription-level properties and limits for Data Lake Store specified by resource location. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void getsSubscriptionLevelPropertiesAndLimitsForDataLakeStoreSpecifiedByResourceLocation( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.locations().getCapabilityWithResponse("EastUS2", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/LocationsGetUsageSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/LocationsGetUsageSamples.java new file mode 100644 index 0000000000000..7cac08a8de387 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/LocationsGetUsageSamples.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.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for Locations GetUsage. */ +public final class LocationsGetUsageSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Locations_GetUsage.json + */ + /** + * Sample code: UsageList. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void usageList(com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.locations().getUsage("WestUS", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/OperationsListSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/OperationsListSamples.java new file mode 100644 index 0000000000000..b7f981dfa6859 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/OperationsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Operations_List.json + */ + /** + * Sample code: Lists all of the available Data Lake Store REST API operations. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void listsAllOfTheAvailableDataLakeStoreRESTAPIOperations( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.operations().listWithResponse(Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersCreateOrUpdateSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..f7161ce460d9e --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersCreateOrUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +/** Samples for TrustedIdProviders CreateOrUpdate. */ +public final class TrustedIdProvidersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_CreateOrUpdate.json + */ + /** + * Sample code: Creates or updates the specified trusted identity provider. During update, the trusted identity + * provider with the specified name will be replaced with this new provider. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void + createsOrUpdatesTheSpecifiedTrustedIdentityProviderDuringUpdateTheTrustedIdentityProviderWithTheSpecifiedNameWillBeReplacedWithThisNewProvider( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .trustedIdProviders() + .define("test_trusted_id_provider_name") + .withExistingAccount("contosorg", "contosoadla") + .withIdProvider("https://sts.windows.net/ea9ec534-a3e3-4e45-ad36-3afc5bb291c1") + .create(); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersDeleteSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersDeleteSamples.java new file mode 100644 index 0000000000000..bf0a2b1c4125d --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for TrustedIdProviders Delete. */ +public final class TrustedIdProvidersDeleteSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_Delete.json + */ + /** + * Sample code: Deletes the specified trusted identity provider from the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void deletesTheSpecifiedTrustedIdentityProviderFromTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .trustedIdProviders() + .deleteWithResponse("contosorg", "contosoadla", "test_trusted_id_provider_name", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersGetSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersGetSamples.java new file mode 100644 index 0000000000000..a0b44cf8d57ad --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for TrustedIdProviders Get. */ +public final class TrustedIdProvidersGetSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_Get.json + */ + /** + * Sample code: Gets the specified Data Lake Store trusted identity provider. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void getsTheSpecifiedDataLakeStoreTrustedIdentityProvider( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .trustedIdProviders() + .getWithResponse("contosorg", "contosoadla", "test_trusted_id_provider_name", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersListByAccountSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersListByAccountSamples.java new file mode 100644 index 0000000000000..c9373fbb4c792 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersListByAccountSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for TrustedIdProviders ListByAccount. */ +public final class TrustedIdProvidersListByAccountSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_ListByAccount.json + */ + /** + * Sample code: Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void listsTheDataLakeStoreTrustedIdentityProvidersWithinTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.trustedIdProviders().listByAccount("contosorg", "contosoadla", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersUpdateSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersUpdateSamples.java new file mode 100644 index 0000000000000..7026118dd2a2d --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/TrustedIdProvidersUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.datalakestore.models.TrustedIdProvider; + +/** Samples for TrustedIdProviders Update. */ +public final class TrustedIdProvidersUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_Update.json + */ + /** + * Sample code: Updates the specified trusted identity provider. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void updatesTheSpecifiedTrustedIdentityProvider( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + TrustedIdProvider resource = + manager + .trustedIdProviders() + .getWithResponse("contosorg", "contosoadla", "test_trusted_id_provider_name", Context.NONE) + .getValue(); + resource.update().withIdProvider("https://sts.windows.net/ea9ec534-a3e3-4e45-ad36-3afc5bb291c1").apply(); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesCreateOrUpdateSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..e6f64f2688d96 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesCreateOrUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +/** Samples for VirtualNetworkRules CreateOrUpdate. */ +public final class VirtualNetworkRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_CreateOrUpdate.json + */ + /** + * Sample code: Creates or updates the specified virtual network rule. During update, the virtual network rule with + * the specified name will be replaced with this new virtual network rule. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void + createsOrUpdatesTheSpecifiedVirtualNetworkRuleDuringUpdateTheVirtualNetworkRuleWithTheSpecifiedNameWillBeReplacedWithThisNewVirtualNetworkRule( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .virtualNetworkRules() + .define("test_virtual_network_rules_name") + .withExistingAccount("contosorg", "contosoadla") + .withSubnetId("test_subnetId") + .create(); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesDeleteSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesDeleteSamples.java new file mode 100644 index 0000000000000..a0e626438d059 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualNetworkRules Delete. */ +public final class VirtualNetworkRulesDeleteSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_Delete.json + */ + /** + * Sample code: Deletes the specified virtual network rule from the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void deletesTheSpecifiedVirtualNetworkRuleFromTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .virtualNetworkRules() + .deleteWithResponse("contosorg", "contosoadla", "test_virtual_network_rules_name", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesGetSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesGetSamples.java new file mode 100644 index 0000000000000..97877cf16835b --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualNetworkRules Get. */ +public final class VirtualNetworkRulesGetSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_Get.json + */ + /** + * Sample code: Gets the specified Data Lake Store virtual network rule. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void getsTheSpecifiedDataLakeStoreVirtualNetworkRule( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager + .virtualNetworkRules() + .getWithResponse("contosorg", "contosoadla", "test_virtual_network_rules_name", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesListByAccountSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesListByAccountSamples.java new file mode 100644 index 0000000000000..e9e1d5d0627ae --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesListByAccountSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualNetworkRules ListByAccount. */ +public final class VirtualNetworkRulesListByAccountSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_ListByAccount.json + */ + /** + * Sample code: Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void listsTheDataLakeStoreVirtualNetworkRulesWithinTheSpecifiedDataLakeStoreAccount( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + manager.virtualNetworkRules().listByAccount("contosorg", "contosoadla", Context.NONE); + } +} diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesUpdateSamples.java b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesUpdateSamples.java new file mode 100644 index 0000000000000..a82eebd00dce2 --- /dev/null +++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/src/samples/java/com/azure/resourcemanager/datalakestore/generated/VirtualNetworkRulesUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datalakestore.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.datalakestore.models.VirtualNetworkRule; + +/** Samples for VirtualNetworkRules Update. */ +public final class VirtualNetworkRulesUpdateSamples { + /* + * x-ms-original-file: specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_Update.json + */ + /** + * Sample code: Updates the specified virtual network rule. + * + * @param manager Entry point to DataLakeStoreManager. + */ + public static void updatesTheSpecifiedVirtualNetworkRule( + com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) { + VirtualNetworkRule resource = + manager + .virtualNetworkRules() + .getWithResponse("contosorg", "contosoadla", "test_virtual_network_rules_name", Context.NONE) + .getValue(); + resource.update().withSubnetId("test_subnetId").apply(); + } +}