diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index f06868d8191e..9543e1bb2832 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -396,7 +396,7 @@ com.azure.resourcemanager:azure-resourcemanager-automanage;1.0.0-beta.2;1.0.0-be com.azure.resourcemanager:azure-resourcemanager-edgeorder;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-securityinsights;1.0.0-beta.5;1.0.0-beta.6 com.azure.resourcemanager:azure-resourcemanager-oep;1.0.0-beta.2;1.0.0-beta.3 -com.azure.resourcemanager:azure-resourcemanager-dnsresolver;1.0.0-beta.4;1.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-dnsresolver;1.0.0-beta.4;1.0.0 com.azure.resourcemanager:azure-resourcemanager-mobilenetwork;1.3.0;1.4.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-azureadexternalidentities;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dashboard;1.1.0;1.2.0-beta.1 diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/CHANGELOG.md b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/CHANGELOG.md index 63d4ae93787c..3356b099d604 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/CHANGELOG.md +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/CHANGELOG.md @@ -1,15 +1,13 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0 (2025-01-02) -### Features Added - -### Breaking Changes - -### Bugs Fixed +- Azure Resource Manager DnsResolver client library for Java. This package contains Microsoft Azure SDK for DnsResolver Management SDK. DNS Resolver Client. Package tag package-2022-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Other Changes +- Release for Azure Resource Manager DnsResolver client library for Java. + ## 1.0.0-beta.4 (2024-10-23) - Azure Resource Manager DnsResolver client library for Java. This package contains Microsoft Azure SDK for DnsResolver Management SDK. DNS Resolver Client. Package tag package-preview-2023-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/README.md b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/README.md index a71194a74fa4..d04a7d469018 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/README.md +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/README.md @@ -2,7 +2,7 @@ Azure Resource Manager DnsResolver client library for Java. -This package contains Microsoft Azure SDK for DnsResolver Management SDK. DNS Resolver Client. Package tag package-preview-2023-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for DnsResolver Management SDK. DNS Resolver Client. Package tag package-2022-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-dnsresolver - 1.0.0-beta.4 + 1.0.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/SAMPLE.md b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/SAMPLE.md index 9f8f569d51f8..df864d82c760 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/SAMPLE.md +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/SAMPLE.md @@ -11,33 +11,6 @@ - [ListByVirtualNetwork](#dnsforwardingrulesets_listbyvirtualnetwork) - [Update](#dnsforwardingrulesets_update) -## DnsResolverDomainLists - -- [CreateOrUpdate](#dnsresolverdomainlists_createorupdate) -- [Delete](#dnsresolverdomainlists_delete) -- [GetByResourceGroup](#dnsresolverdomainlists_getbyresourcegroup) -- [List](#dnsresolverdomainlists_list) -- [ListByResourceGroup](#dnsresolverdomainlists_listbyresourcegroup) -- [Update](#dnsresolverdomainlists_update) - -## DnsResolverPolicies - -- [CreateOrUpdate](#dnsresolverpolicies_createorupdate) -- [Delete](#dnsresolverpolicies_delete) -- [GetByResourceGroup](#dnsresolverpolicies_getbyresourcegroup) -- [List](#dnsresolverpolicies_list) -- [ListByResourceGroup](#dnsresolverpolicies_listbyresourcegroup) -- [ListByVirtualNetwork](#dnsresolverpolicies_listbyvirtualnetwork) -- [Update](#dnsresolverpolicies_update) - -## DnsResolverPolicyVirtualNetworkLinks - -- [CreateOrUpdate](#dnsresolverpolicyvirtualnetworklinks_createorupdate) -- [Delete](#dnsresolverpolicyvirtualnetworklinks_delete) -- [Get](#dnsresolverpolicyvirtualnetworklinks_get) -- [List](#dnsresolverpolicyvirtualnetworklinks_list) -- [Update](#dnsresolverpolicyvirtualnetworklinks_update) - ## DnsResolvers - [CreateOrUpdate](#dnsresolvers_createorupdate) @@ -48,14 +21,6 @@ - [ListByVirtualNetwork](#dnsresolvers_listbyvirtualnetwork) - [Update](#dnsresolvers_update) -## DnsSecurityRules - -- [CreateOrUpdate](#dnssecurityrules_createorupdate) -- [Delete](#dnssecurityrules_delete) -- [Get](#dnssecurityrules_get) -- [List](#dnssecurityrules_list) -- [Update](#dnssecurityrules_update) - ## ForwardingRules - [CreateOrUpdate](#forwardingrules_createorupdate) @@ -82,610 +47,44 @@ ## VirtualNetworkLinks -- [CreateOrUpdate](#virtualnetworklinks_createorupdate) -- [Delete](#virtualnetworklinks_delete) -- [Get](#virtualnetworklinks_get) -- [List](#virtualnetworklinks_list) -- [Update](#virtualnetworklinks_update) -### DnsForwardingRulesets_CreateOrUpdate - -```java -import com.azure.core.management.SubResource; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsForwardingRulesets CreateOrUpdate. - */ -public final class DnsForwardingRulesetsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsForwardingRuleset_Put.json - */ - /** - * Sample code: Upsert DNS forwarding ruleset. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void upsertDNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsForwardingRulesets() - .define("samplednsForwardingRuleset") - .withRegion("westus2") - .withExistingResourceGroup("sampleResourceGroup") - .withDnsResolverOutboundEndpoints(Arrays.asList(new SubResource().withId( - "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint0"), - new SubResource().withId( - "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint1"))) - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### DnsForwardingRulesets_Delete - -```java -/** - * Samples for DnsForwardingRulesets Delete. - */ -public final class DnsForwardingRulesetsDeleteSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsForwardingRuleset_Delete.json - */ - /** - * Sample code: Delete DNS forwarding ruleset. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void deleteDNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsForwardingRulesets() - .delete("sampleResourceGroup", "samplednsForwardingRulesetName", null, com.azure.core.util.Context.NONE); - } -} -``` - -### DnsForwardingRulesets_GetByResourceGroup - -```java -/** - * Samples for DnsForwardingRulesets GetByResourceGroup. - */ -public final class DnsForwardingRulesetsGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsForwardingRuleset_Get.json - */ - /** - * Sample code: Retrieve DNS forwarding ruleset. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void retrieveDNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsForwardingRulesets() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", - com.azure.core.util.Context.NONE); - } -} -``` - -### DnsForwardingRulesets_List - -```java -/** - * Samples for DnsForwardingRulesets List. - */ -public final class DnsForwardingRulesetsListSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsForwardingRuleset_ListBySubscription.json - */ - /** - * Sample code: List DNS forwarding rulesets by subscription. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSForwardingRulesetsBySubscription(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsForwardingRulesets().list(null, com.azure.core.util.Context.NONE); - } -} -``` - -### DnsForwardingRulesets_ListByResourceGroup - -```java -/** - * Samples for DnsForwardingRulesets ListByResourceGroup. - */ -public final class DnsForwardingRulesetsListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsForwardingRuleset_ListByResourceGroup.json - */ - /** - * Sample code: List DNS forwarding rulesets by resource group. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSForwardingRulesetsByResourceGroup(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsForwardingRulesets() - .listByResourceGroup("sampleResourceGroup", null, com.azure.core.util.Context.NONE); - } -} -``` - -### DnsForwardingRulesets_ListByVirtualNetwork - -```java -/** - * Samples for DnsForwardingRulesets ListByVirtualNetwork. - */ -public final class DnsForwardingRulesetsListByVirtualNetworkSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsForwardingRuleset_ListByVirtualNetwork.json - */ - /** - * Sample code: List DNS forwarding rulesets by virtual network. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSForwardingRulesetsByVirtualNetwork(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsForwardingRulesets() - .listByVirtualNetwork("sampleResourceGroup", "sampleVirtualNetwork", null, - com.azure.core.util.Context.NONE); - } -} -``` - -### DnsForwardingRulesets_Update - -```java -import com.azure.resourcemanager.dnsresolver.models.DnsForwardingRuleset; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsForwardingRulesets Update. - */ -public final class DnsForwardingRulesetsUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsForwardingRuleset_Patch.json - */ - /** - * Sample code: Update DNS forwarding ruleset. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void updateDNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - DnsForwardingRuleset resource = manager.dnsForwardingRulesets() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### DnsResolverDomainLists_CreateOrUpdate - -```java -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsResolverDomainLists CreateOrUpdate. - */ -public final class DnsResolverDomainListsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverDomainList_Put.json - */ - /** - * Sample code: Upsert DNS resolver domain list. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void upsertDNSResolverDomainList(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists() - .define("sampleDnsResolverDomainList") - .withRegion("westus2") - .withExistingResourceGroup("sampleResourceGroup") - .withDomains(Arrays.asList("contoso.com")) - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### DnsResolverDomainLists_Delete - -```java -/** - * Samples for DnsResolverDomainLists Delete. - */ -public final class DnsResolverDomainListsDeleteSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverDomainList_Delete.json - */ - /** - * Sample code: Delete DNS resolver domain list. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void deleteDNSResolverDomainList(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists() - .delete("sampleResourceGroup", "sampleDnsResolverDomainList", null, com.azure.core.util.Context.NONE); - } -} -``` - -### DnsResolverDomainLists_GetByResourceGroup - -```java -/** - * Samples for DnsResolverDomainLists GetByResourceGroup. - */ -public final class DnsResolverDomainListsGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverDomainList_Get.json - */ - /** - * Sample code: Retrieve DNS resolver domain list. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void retrieveDNSResolverDomainList(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverDomainList", - com.azure.core.util.Context.NONE); - } -} -``` - -### DnsResolverDomainLists_List - -```java -/** - * Samples for DnsResolverDomainLists List. - */ -public final class DnsResolverDomainListsListSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverDomainList_ListBySubscription.json - */ - /** - * Sample code: List DNS resolver domain lists by subscription. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSResolverDomainListsBySubscription(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists().list(null, com.azure.core.util.Context.NONE); - } -} -``` - -### DnsResolverDomainLists_ListByResourceGroup - -```java -/** - * Samples for DnsResolverDomainLists ListByResourceGroup. - */ -public final class DnsResolverDomainListsListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverDomainList_ListByResourceGroup.json - */ - /** - * Sample code: List DNS resolver domain lists by resource group. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSResolverDomainListsByResourceGroup(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists() - .listByResourceGroup("sampleResourceGroup", null, com.azure.core.util.Context.NONE); - } -} -``` - -### DnsResolverDomainLists_Update - -```java -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsResolverDomainLists Update. - */ -public final class DnsResolverDomainListsUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverDomainList_Patch.json - */ - /** - * Sample code: Update DNS resolver domain list. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void updateDNSResolverDomainList(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - DnsResolverDomainList resource = manager.dnsResolverDomainLists() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverDomainList", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withDomains(Arrays.asList("contoso.com")) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### DnsResolverPolicies_CreateOrUpdate - -```java -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsResolverPolicies CreateOrUpdate. - */ -public final class DnsResolverPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_Put.json - */ - /** - * Sample code: Upsert DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void upsertDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicies() - .define("sampleDnsResolverPolicy") - .withRegion("westus2") - .withExistingResourceGroup("sampleResourceGroup") - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### DnsResolverPolicies_Delete - -```java -/** - * Samples for DnsResolverPolicies Delete. - */ -public final class DnsResolverPoliciesDeleteSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_Delete.json - */ - /** - * Sample code: Delete DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void deleteDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicies() - .delete("sampleResourceGroup", "sampleDnsResolverPolicy", null, com.azure.core.util.Context.NONE); - } -} -``` - -### DnsResolverPolicies_GetByResourceGroup - -```java -/** - * Samples for DnsResolverPolicies GetByResourceGroup. - */ -public final class DnsResolverPoliciesGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_Get.json - */ - /** - * Sample code: Retrieve DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void retrieveDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicies() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", - com.azure.core.util.Context.NONE); - } -} -``` - -### DnsResolverPolicies_List - -```java -/** - * Samples for DnsResolverPolicies List. - */ -public final class DnsResolverPoliciesListSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_ListBySubscription.json - */ - /** - * Sample code: List DNS resolver policies by subscription. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSResolverPoliciesBySubscription(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicies().list(null, com.azure.core.util.Context.NONE); - } -} -``` - -### DnsResolverPolicies_ListByResourceGroup - -```java -/** - * Samples for DnsResolverPolicies ListByResourceGroup. - */ -public final class DnsResolverPoliciesListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_ListByResourceGroup.json - */ - /** - * Sample code: List DNS resolver policies by resource group. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSResolverPoliciesByResourceGroup(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicies() - .listByResourceGroup("sampleResourceGroup", null, com.azure.core.util.Context.NONE); - } -} -``` - -### DnsResolverPolicies_ListByVirtualNetwork - -```java -/** - * Samples for DnsResolverPolicies ListByVirtualNetwork. - */ -public final class DnsResolverPoliciesListByVirtualNetworkSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_ListByVirtualNetwork.json - */ - /** - * Sample code: List DNS resolver policies by virtual network. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSResolverPoliciesByVirtualNetwork(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicies() - .listByVirtualNetwork("sampleResourceGroup", "sampleVirtualNetwork", com.azure.core.util.Context.NONE); - } -} -``` - -### DnsResolverPolicies_Update +- [CreateOrUpdate](#virtualnetworklinks_createorupdate) +- [Delete](#virtualnetworklinks_delete) +- [Get](#virtualnetworklinks_get) +- [List](#virtualnetworklinks_list) +- [Update](#virtualnetworklinks_update) +### DnsForwardingRulesets_CreateOrUpdate ```java -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicy; +import com.azure.core.management.SubResource; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for DnsResolverPolicies Update. + * Samples for DnsForwardingRulesets CreateOrUpdate. */ -public final class DnsResolverPoliciesUpdateSamples { +public final class DnsForwardingRulesetsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_Patch.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DnsForwardingRuleset_Put. + * json */ /** - * Sample code: Update DNS resolver policy. + * Sample code: Upsert DNS forwarding ruleset. * * @param manager Entry point to DnsResolverManager. */ - public static void updateDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - DnsResolverPolicy resource = manager.dnsResolverPolicies() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder")).apply(); + public static void upsertDNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsForwardingRulesets() + .define("samplednsForwardingRuleset") + .withRegion("westus2") + .withExistingResourceGroup("sampleResourceGroup") + .withDnsResolverOutboundEndpoints(Arrays.asList(new SubResource().withId( + "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint0"), + new SubResource().withId( + "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint1"))) + .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .create(); } // Use "Map.of" if available @@ -702,155 +101,149 @@ public final class DnsResolverPoliciesUpdateSamples { } ``` -### DnsResolverPolicyVirtualNetworkLinks_CreateOrUpdate +### DnsForwardingRulesets_Delete ```java -import com.azure.core.management.SubResource; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for DnsResolverPolicyVirtualNetworkLinks CreateOrUpdate. + * Samples for DnsForwardingRulesets Delete. */ -public final class DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateSamples { +public final class DnsForwardingRulesetsDeleteSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicyVirtualNetworkLink_Put.json + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ + * DnsForwardingRuleset_Delete.json */ /** - * Sample code: Upsert DNS resolver policy virtual network link. + * Sample code: Delete DNS forwarding ruleset. * * @param manager Entry point to DnsResolverManager. */ - public static void - upsertDNSResolverPolicyVirtualNetworkLink(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicyVirtualNetworkLinks() - .define("sampleVirtualNetworkLink") - .withRegion("westus2") - .withExistingDnsResolverPolicy("sampleResourceGroup", "sampleDnsResolverPolicy") - .withVirtualNetwork(new SubResource().withId( - "/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork")) - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .create(); + public static void deleteDNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsForwardingRulesets() + .delete("sampleResourceGroup", "samplednsForwardingRulesetName", null, com.azure.core.util.Context.NONE); } +} +``` - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; +### DnsForwardingRulesets_GetByResourceGroup + +```java +/** + * Samples for DnsForwardingRulesets GetByResourceGroup. + */ +public final class DnsForwardingRulesetsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DnsForwardingRuleset_Get. + * json + */ + /** + * Sample code: Retrieve DNS forwarding ruleset. + * + * @param manager Entry point to DnsResolverManager. + */ + public static void retrieveDNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsForwardingRulesets() + .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", + com.azure.core.util.Context.NONE); } } ``` -### DnsResolverPolicyVirtualNetworkLinks_Delete +### DnsForwardingRulesets_List ```java /** - * Samples for DnsResolverPolicyVirtualNetworkLinks Delete. + * Samples for DnsForwardingRulesets List. */ -public final class DnsResolverPolicyVirtualNetworkLinksDeleteSamples { +public final class DnsForwardingRulesetsListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicyVirtualNetworkLink_Delete.json + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ + * DnsForwardingRuleset_ListBySubscription.json */ /** - * Sample code: Delete DNS resolver policy virtual network link. + * Sample code: List DNS forwarding rulesets by subscription. * * @param manager Entry point to DnsResolverManager. */ public static void - deleteDNSResolverPolicyVirtualNetworkLink(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicyVirtualNetworkLinks() - .delete("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleVirtualNetworkLink", null, - com.azure.core.util.Context.NONE); + listDNSForwardingRulesetsBySubscription(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsForwardingRulesets().list(null, com.azure.core.util.Context.NONE); } } ``` -### DnsResolverPolicyVirtualNetworkLinks_Get +### DnsForwardingRulesets_ListByResourceGroup ```java /** - * Samples for DnsResolverPolicyVirtualNetworkLinks Get. + * Samples for DnsForwardingRulesets ListByResourceGroup. */ -public final class DnsResolverPolicyVirtualNetworkLinksGetSamples { +public final class DnsForwardingRulesetsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicyVirtualNetworkLink_Get.json + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ + * DnsForwardingRuleset_ListByResourceGroup.json */ /** - * Sample code: Retrieve DNS resolver policy virtual network link. + * Sample code: List DNS forwarding rulesets by resource group. * * @param manager Entry point to DnsResolverManager. */ public static void - retrieveDNSResolverPolicyVirtualNetworkLink(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicyVirtualNetworkLinks() - .getWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleVirtualNetworkLink", - com.azure.core.util.Context.NONE); + listDNSForwardingRulesetsByResourceGroup(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsForwardingRulesets() + .listByResourceGroup("sampleResourceGroup", null, com.azure.core.util.Context.NONE); } } ``` -### DnsResolverPolicyVirtualNetworkLinks_List +### DnsForwardingRulesets_ListByVirtualNetwork ```java /** - * Samples for DnsResolverPolicyVirtualNetworkLinks List. + * Samples for DnsForwardingRulesets ListByVirtualNetwork. */ -public final class DnsResolverPolicyVirtualNetworkLinksListSamples { +public final class DnsForwardingRulesetsListByVirtualNetworkSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicyVirtualNetworkLink_List.json + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ + * DnsForwardingRuleset_ListByVirtualNetwork.json */ /** - * Sample code: List DNS resolver policy virtual network links by DNS resolver policy. + * Sample code: List DNS forwarding rulesets by virtual network. * * @param manager Entry point to DnsResolverManager. */ - public static void listDNSResolverPolicyVirtualNetworkLinksByDNSResolverPolicy( - com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicyVirtualNetworkLinks() - .list("sampleResourceGroup", "sampleDnsResolverPolicy", null, com.azure.core.util.Context.NONE); + public static void + listDNSForwardingRulesetsByVirtualNetwork(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsForwardingRulesets() + .listByVirtualNetwork("sampleResourceGroup", "sampleVirtualNetwork", null, + com.azure.core.util.Context.NONE); } } ``` -### DnsResolverPolicyVirtualNetworkLinks_Update +### DnsForwardingRulesets_Update ```java -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLink; +import com.azure.resourcemanager.dnsresolver.models.DnsForwardingRuleset; import java.util.HashMap; import java.util.Map; /** - * Samples for DnsResolverPolicyVirtualNetworkLinks Update. + * Samples for DnsForwardingRulesets Update. */ -public final class DnsResolverPolicyVirtualNetworkLinksUpdateSamples { +public final class DnsForwardingRulesetsUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicyVirtualNetworkLink_Patch.json + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ + * DnsForwardingRuleset_Patch.json */ /** - * Sample code: Update DNS resolver policy virtual network link. + * Sample code: Update DNS forwarding ruleset. * * @param manager Entry point to DnsResolverManager. */ - public static void - updateDNSResolverPolicyVirtualNetworkLink(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - DnsResolverPolicyVirtualNetworkLink resource = manager.dnsResolverPolicyVirtualNetworkLinks() - .getWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleVirtualNetworkLink", + public static void updateDNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + DnsForwardingRuleset resource = manager.dnsForwardingRulesets() + .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder")).apply(); @@ -883,8 +276,7 @@ import java.util.Map; public final class DnsResolversCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolver_Put. - * json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DnsResolver_Put.json */ /** * Sample code: Upsert DNS resolver. @@ -925,8 +317,7 @@ public final class DnsResolversCreateOrUpdateSamples { public final class DnsResolversDeleteSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolver_Delete.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DnsResolver_Delete.json */ /** * Sample code: Delete DNS resolver. @@ -949,8 +340,7 @@ public final class DnsResolversDeleteSamples { public final class DnsResolversGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolver_Get. - * json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DnsResolver_Get.json */ /** * Sample code: Retrieve DNS resolver. @@ -973,8 +363,7 @@ public final class DnsResolversGetByResourceGroupSamples { */ public final class DnsResolversListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ * DnsResolver_ListBySubscription.json */ /** @@ -997,8 +386,7 @@ public final class DnsResolversListSamples { */ public final class DnsResolversListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ * DnsResolver_ListByResourceGroup.json */ /** @@ -1021,8 +409,7 @@ public final class DnsResolversListByResourceGroupSamples { */ public final class DnsResolversListByVirtualNetworkSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ * DnsResolver_ListByVirtualNetwork.json */ /** @@ -1052,8 +439,7 @@ import java.util.Map; public final class DnsResolversUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolver_Patch.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DnsResolver_Patch.json */ /** * Sample code: Update DNS resolver. @@ -1082,186 +468,6 @@ public final class DnsResolversUpdateSamples { } ``` -### DnsSecurityRules_CreateOrUpdate - -```java -import com.azure.core.management.SubResource; -import com.azure.resourcemanager.dnsresolver.models.ActionType; -import com.azure.resourcemanager.dnsresolver.models.BlockResponseCode; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsSecurityRules CreateOrUpdate. - */ -public final class DnsSecurityRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsSecurityRule_Put.json - */ - /** - * Sample code: Upsert DNS security rule. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void upsertDNSSecurityRule(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsSecurityRules() - .define("sampleDnsSecurityRule") - .withRegion("westus2") - .withExistingDnsResolverPolicy("sampleResourceGroup", "sampleDnsResolverPolicy") - .withPriority(100) - .withAction(new DnsSecurityRuleAction().withActionType(ActionType.BLOCK) - .withBlockResponseCode(BlockResponseCode.SERVFAIL)) - .withDnsResolverDomainLists(Arrays.asList(new SubResource().withId( - "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList"))) - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withDnsSecurityRuleState(DnsSecurityRuleState.ENABLED) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### DnsSecurityRules_Delete - -```java -/** - * Samples for DnsSecurityRules Delete. - */ -public final class DnsSecurityRulesDeleteSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsSecurityRule_Delete.json - */ - /** - * Sample code: Delete DNS security rule for DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - deleteDNSSecurityRuleForDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsSecurityRules() - .delete("sampleResourceGroup", "sampleDnsDnsResolverPolicy", "sampleDnsSecurityRule", null, - com.azure.core.util.Context.NONE); - } -} -``` - -### DnsSecurityRules_Get - -```java -/** - * Samples for DnsSecurityRules Get. - */ -public final class DnsSecurityRulesGetSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsSecurityRule_Get.json - */ - /** - * Sample code: Retrieve DNS security rule for DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - retrieveDNSSecurityRuleForDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsSecurityRules() - .getWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleDnsSecurityRule", - com.azure.core.util.Context.NONE); - } -} -``` - -### DnsSecurityRules_List - -```java -/** - * Samples for DnsSecurityRules List. - */ -public final class DnsSecurityRulesListSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsSecurityRule_List.json - */ - /** - * Sample code: List DNS security rules by DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSSecurityRulesByDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsSecurityRules() - .list("sampleResourceGroup", "sampleDnsResolverPolicy", null, com.azure.core.util.Context.NONE); - } -} -``` - -### DnsSecurityRules_Update - -```java -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRule; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsSecurityRules Update. - */ -public final class DnsSecurityRulesUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsSecurityRule_Patch.json - */ - /** - * Sample code: Update DNS security rule for DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - updateDNSSecurityRuleForDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - DnsSecurityRule resource = manager.dnsSecurityRules() - .getWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleDnsSecurityRule", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withDnsSecurityRuleState(DnsSecurityRuleState.DISABLED) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - ### ForwardingRules_CreateOrUpdate ```java @@ -1277,8 +483,7 @@ import java.util.Map; public final class ForwardingRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * ForwardingRule_Put.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ForwardingRule_Put.json */ /** * Sample code: Upsert forwarding rule in a DNS forwarding ruleset. @@ -1321,8 +526,8 @@ public final class ForwardingRulesCreateOrUpdateSamples { public final class ForwardingRulesDeleteSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * ForwardingRule_Delete.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ForwardingRule_Delete. + * json */ /** * Sample code: Delete forwarding rule in a DNS forwarding ruleset. @@ -1347,8 +552,7 @@ public final class ForwardingRulesDeleteSamples { public final class ForwardingRulesGetSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * ForwardingRule_Get.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ForwardingRule_Get.json */ /** * Sample code: Retrieve forwarding rule in a DNS forwarding ruleset. @@ -1373,8 +577,7 @@ public final class ForwardingRulesGetSamples { public final class ForwardingRulesListSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * ForwardingRule_List.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ForwardingRule_List.json */ /** * Sample code: List forwarding rules in a DNS forwarding ruleset. @@ -1403,8 +606,7 @@ import java.util.Map; public final class ForwardingRulesUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * ForwardingRule_Patch.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ForwardingRule_Patch.json */ /** * Sample code: Update forwarding rule in a DNS forwarding ruleset. @@ -1453,8 +655,7 @@ import java.util.Map; public final class InboundEndpointsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * InboundEndpoint_Put.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundEndpoint_Put.json */ /** * Sample code: Upsert inbound endpoint for DNS resolver. @@ -1497,8 +698,8 @@ public final class InboundEndpointsCreateOrUpdateSamples { public final class InboundEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * InboundEndpoint_Delete.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundEndpoint_Delete. + * json */ /** * Sample code: Delete inbound endpoint for DNS resolver. @@ -1523,8 +724,7 @@ public final class InboundEndpointsDeleteSamples { public final class InboundEndpointsGetSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * InboundEndpoint_Get.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundEndpoint_Get.json */ /** * Sample code: Retrieve inbound endpoint for DNS resolver. @@ -1549,8 +749,7 @@ public final class InboundEndpointsGetSamples { public final class InboundEndpointsListSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * InboundEndpoint_List.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundEndpoint_List.json */ /** * Sample code: List inbound endpoints by DNS resolver. @@ -1578,8 +777,8 @@ import java.util.Map; public final class InboundEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * InboundEndpoint_Patch.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundEndpoint_Patch. + * json */ /** * Sample code: Update inbound endpoint for DNS resolver. @@ -1622,8 +821,7 @@ import java.util.Map; public final class OutboundEndpointsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * OutboundEndpoint_Put.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/OutboundEndpoint_Put.json */ /** * Sample code: Upsert outbound endpoint for DNS resolver. @@ -1665,8 +863,8 @@ public final class OutboundEndpointsCreateOrUpdateSamples { public final class OutboundEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * OutboundEndpoint_Delete.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/OutboundEndpoint_Delete. + * json */ /** * Sample code: Delete outbound endpoint for DNS resolver. @@ -1691,8 +889,7 @@ public final class OutboundEndpointsDeleteSamples { public final class OutboundEndpointsGetSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * OutboundEndpoint_Get.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/OutboundEndpoint_Get.json */ /** * Sample code: Retrieve outbound endpoint for DNS resolver. @@ -1717,8 +914,8 @@ public final class OutboundEndpointsGetSamples { public final class OutboundEndpointsListSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * OutboundEndpoint_List.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/OutboundEndpoint_List. + * json */ /** * Sample code: List outbound endpoints by DNS resolver. @@ -1746,8 +943,8 @@ import java.util.Map; public final class OutboundEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * OutboundEndpoint_Patch.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/OutboundEndpoint_Patch. + * json */ /** * Sample code: Update outbound endpoint for DNS resolver. @@ -1790,8 +987,8 @@ import java.util.Map; public final class VirtualNetworkLinksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * VirtualNetworkLink_Put.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkLink_Put. + * json */ /** * Sample code: Upsert virtual network link to a DNS forwarding ruleset. @@ -1832,8 +1029,8 @@ public final class VirtualNetworkLinksCreateOrUpdateSamples { public final class VirtualNetworkLinksDeleteSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * VirtualNetworkLink_Delete.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkLink_Delete + * .json */ /** * Sample code: Delete virtual network link to a DNS forwarding ruleset. @@ -1858,8 +1055,8 @@ public final class VirtualNetworkLinksDeleteSamples { public final class VirtualNetworkLinksGetSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * VirtualNetworkLink_Get.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkLink_Get. + * json */ /** * Sample code: Retrieve virtual network link to a DNS forwarding ruleset. @@ -1884,8 +1081,8 @@ public final class VirtualNetworkLinksGetSamples { public final class VirtualNetworkLinksListSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * VirtualNetworkLink_List.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkLink_List. + * json */ /** * Sample code: List virtual network links to a DNS forwarding ruleset. @@ -1913,8 +1110,8 @@ import java.util.Map; public final class VirtualNetworkLinksUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * VirtualNetworkLink_Patch.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkLink_Patch. + * json */ /** * Sample code: Update virtual network link to a DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/pom.xml b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/pom.xml index c433e1c451f3..f0b1dadf42d5 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/pom.xml +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-dnsresolver - 1.0.0-beta.5 + 1.0.0 jar Microsoft Azure SDK for DnsResolver Management - This package contains Microsoft Azure SDK for DnsResolver Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. DNS Resolver Client. Package tag package-preview-2023-07. + This package contains Microsoft Azure SDK for DnsResolver Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. DNS Resolver Client. Package tag package-2022-07. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - true + false diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/DnsResolverManager.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/DnsResolverManager.java index dacacd28e919..cf22fa6b8581 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/DnsResolverManager.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/DnsResolverManager.java @@ -11,6 +11,7 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; +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; @@ -19,28 +20,19 @@ import com.azure.core.http.policy.RetryOptions; 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; import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverManagementClient; import com.azure.resourcemanager.dnsresolver.implementation.DnsForwardingRulesetsImpl; -import com.azure.resourcemanager.dnsresolver.implementation.DnsResolverDomainListsImpl; import com.azure.resourcemanager.dnsresolver.implementation.DnsResolverManagementClientBuilder; -import com.azure.resourcemanager.dnsresolver.implementation.DnsResolverPoliciesImpl; -import com.azure.resourcemanager.dnsresolver.implementation.DnsResolverPolicyVirtualNetworkLinksImpl; import com.azure.resourcemanager.dnsresolver.implementation.DnsResolversImpl; -import com.azure.resourcemanager.dnsresolver.implementation.DnsSecurityRulesImpl; import com.azure.resourcemanager.dnsresolver.implementation.ForwardingRulesImpl; import com.azure.resourcemanager.dnsresolver.implementation.InboundEndpointsImpl; import com.azure.resourcemanager.dnsresolver.implementation.OutboundEndpointsImpl; import com.azure.resourcemanager.dnsresolver.implementation.VirtualNetworkLinksImpl; import com.azure.resourcemanager.dnsresolver.models.DnsForwardingRulesets; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainLists; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicies; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLinks; import com.azure.resourcemanager.dnsresolver.models.DnsResolvers; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRules; import com.azure.resourcemanager.dnsresolver.models.ForwardingRules; import com.azure.resourcemanager.dnsresolver.models.InboundEndpoints; import com.azure.resourcemanager.dnsresolver.models.OutboundEndpoints; @@ -69,14 +61,6 @@ public final class DnsResolverManager { private VirtualNetworkLinks virtualNetworkLinks; - private DnsResolverPolicies dnsResolverPolicies; - - private DnsSecurityRules dnsSecurityRules; - - private DnsResolverPolicyVirtualNetworkLinks dnsResolverPolicyVirtualNetworkLinks; - - private DnsResolverDomainLists dnsResolverDomainLists; - private final DnsResolverManagementClient clientObject; private DnsResolverManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -241,7 +225,7 @@ public DnsResolverManager authenticate(TokenCredential credential, AzureProfile .append("-") .append("com.azure.resourcemanager.dnsresolver") .append("/") - .append("1.0.0-beta.4"); + .append("1.0.0"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -274,7 +258,7 @@ public DnsResolverManager authenticate(TokenCredential credential, AzureProfile 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, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); @@ -359,57 +343,6 @@ public VirtualNetworkLinks virtualNetworkLinks() { return virtualNetworkLinks; } - /** - * Gets the resource collection API of DnsResolverPolicies. It manages DnsResolverPolicy. - * - * @return Resource collection API of DnsResolverPolicies. - */ - public DnsResolverPolicies dnsResolverPolicies() { - if (this.dnsResolverPolicies == null) { - this.dnsResolverPolicies = new DnsResolverPoliciesImpl(clientObject.getDnsResolverPolicies(), this); - } - return dnsResolverPolicies; - } - - /** - * Gets the resource collection API of DnsSecurityRules. It manages DnsSecurityRule. - * - * @return Resource collection API of DnsSecurityRules. - */ - public DnsSecurityRules dnsSecurityRules() { - if (this.dnsSecurityRules == null) { - this.dnsSecurityRules = new DnsSecurityRulesImpl(clientObject.getDnsSecurityRules(), this); - } - return dnsSecurityRules; - } - - /** - * Gets the resource collection API of DnsResolverPolicyVirtualNetworkLinks. It manages - * DnsResolverPolicyVirtualNetworkLink. - * - * @return Resource collection API of DnsResolverPolicyVirtualNetworkLinks. - */ - public DnsResolverPolicyVirtualNetworkLinks dnsResolverPolicyVirtualNetworkLinks() { - if (this.dnsResolverPolicyVirtualNetworkLinks == null) { - this.dnsResolverPolicyVirtualNetworkLinks = new DnsResolverPolicyVirtualNetworkLinksImpl( - clientObject.getDnsResolverPolicyVirtualNetworkLinks(), this); - } - return dnsResolverPolicyVirtualNetworkLinks; - } - - /** - * Gets the resource collection API of DnsResolverDomainLists. It manages DnsResolverDomainList. - * - * @return Resource collection API of DnsResolverDomainLists. - */ - public DnsResolverDomainLists dnsResolverDomainLists() { - if (this.dnsResolverDomainLists == null) { - this.dnsResolverDomainLists - = new DnsResolverDomainListsImpl(clientObject.getDnsResolverDomainLists(), this); - } - return dnsResolverDomainLists; - } - /** * Gets wrapped service client DnsResolverManagementClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverDomainListsClient.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverDomainListsClient.java deleted file mode 100644 index defaab4f6116..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverDomainListsClient.java +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListPatch; - -/** - * An instance of this class provides access to all the operations defined in DnsResolverDomainListsClient. - */ -public interface DnsResolverDomainListsClient { - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsResolverDomainListInner> beginCreateOrUpdate( - String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListInner parameters); - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsResolverDomainListInner> beginCreateOrUpdate( - String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListInner parameters, - String ifMatch, String ifNoneMatch, Context context); - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverDomainListInner createOrUpdate(String resourceGroupName, String dnsResolverDomainListName, - DnsResolverDomainListInner parameters); - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverDomainListInner createOrUpdate(String resourceGroupName, String dnsResolverDomainListName, - DnsResolverDomainListInner parameters, String ifMatch, String ifNoneMatch, Context context); - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsResolverDomainListInner> beginUpdate(String resourceGroupName, - String dnsResolverDomainListName, DnsResolverDomainListPatch parameters); - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsResolverDomainListInner> beginUpdate(String resourceGroupName, - String dnsResolverDomainListName, DnsResolverDomainListPatch parameters, String ifMatch, Context context); - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverDomainListInner update(String resourceGroupName, String dnsResolverDomainListName, - DnsResolverDomainListPatch parameters); - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverDomainListInner update(String resourceGroupName, String dnsResolverDomainListName, - DnsResolverDomainListPatch parameters, String ifMatch, Context context); - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain 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 the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverDomainListName); - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverDomainListName, - String ifMatch, Context context); - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String dnsResolverDomainListName); - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String dnsResolverDomainListName, String ifMatch, Context context); - - /** - * Gets properties of a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver domain list along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String dnsResolverDomainListName, Context context); - - /** - * Gets properties of a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain 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 properties of a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverDomainListInner getByResourceGroup(String resourceGroupName, String dnsResolverDomainListName); - - /** - * Lists DNS resolver domain lists within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists DNS resolver domain lists within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - Context context); - - /** - * Lists DNS resolver domain lists in all resource groups of a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists DNS resolver domain lists in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, Context context); -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverManagementClient.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverManagementClient.java index 92c2ed7c0326..4662ebc559b1 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverManagementClient.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverManagementClient.java @@ -12,7 +12,7 @@ */ public interface DnsResolverManagementClient { /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets The ID of the target subscription. * * @return the subscriptionId value. */ @@ -87,32 +87,4 @@ public interface DnsResolverManagementClient { * @return the VirtualNetworkLinksClient object. */ VirtualNetworkLinksClient getVirtualNetworkLinks(); - - /** - * Gets the DnsResolverPoliciesClient object to access its operations. - * - * @return the DnsResolverPoliciesClient object. - */ - DnsResolverPoliciesClient getDnsResolverPolicies(); - - /** - * Gets the DnsSecurityRulesClient object to access its operations. - * - * @return the DnsSecurityRulesClient object. - */ - DnsSecurityRulesClient getDnsSecurityRules(); - - /** - * Gets the DnsResolverPolicyVirtualNetworkLinksClient object to access its operations. - * - * @return the DnsResolverPolicyVirtualNetworkLinksClient object. - */ - DnsResolverPolicyVirtualNetworkLinksClient getDnsResolverPolicyVirtualNetworkLinks(); - - /** - * Gets the DnsResolverDomainListsClient object to access its operations. - * - * @return the DnsResolverDomainListsClient object. - */ - DnsResolverDomainListsClient getDnsResolverDomainLists(); } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverPoliciesClient.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverPoliciesClient.java deleted file mode 100644 index b3b44ca08c5e..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverPoliciesClient.java +++ /dev/null @@ -1,326 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.SubResource; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyPatch; - -/** - * An instance of this class provides access to all the operations defined in DnsResolverPoliciesClient. - */ -public interface DnsResolverPoliciesClient { - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsResolverPolicyInner> beginCreateOrUpdate(String resourceGroupName, - String dnsResolverPolicyName, DnsResolverPolicyInner parameters); - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsResolverPolicyInner> beginCreateOrUpdate(String resourceGroupName, - String dnsResolverPolicyName, DnsResolverPolicyInner parameters, String ifMatch, String ifNoneMatch, - Context context); - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverPolicyInner createOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyInner parameters); - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverPolicyInner createOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyInner parameters, String ifMatch, String ifNoneMatch, Context context); - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsResolverPolicyInner> beginUpdate(String resourceGroupName, - String dnsResolverPolicyName, DnsResolverPolicyPatch parameters); - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsResolverPolicyInner> beginUpdate(String resourceGroupName, - String dnsResolverPolicyName, DnsResolverPolicyPatch parameters, String ifMatch, Context context); - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverPolicyInner update(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyPatch parameters); - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverPolicyInner update(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyPatch parameters, String ifMatch, Context context); - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverPolicyName); - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverPolicyName, - String ifMatch, Context context); - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String dnsResolverPolicyName); - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String dnsResolverPolicyName, String ifMatch, Context context); - - /** - * Gets properties of a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String dnsResolverPolicyName, Context context); - - /** - * Gets properties of a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @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 properties of a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverPolicyInner getByResourceGroup(String resourceGroupName, String dnsResolverPolicyName); - - /** - * Lists DNS resolver policies within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists DNS resolver policies within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, Context context); - - /** - * Lists DNS resolver policies in all resource groups of a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists DNS resolver policies in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer top, Context context); - - /** - * Lists DNS resolver policy resource IDs linked to a virtual network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName The name of the virtual network. - * @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 to an enumeration operation on sub-resources as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVirtualNetwork(String resourceGroupName, String virtualNetworkName); - - /** - * Lists DNS resolver policy resource IDs linked to a virtual network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName The name of the virtual network. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on sub-resources as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVirtualNetwork(String resourceGroupName, String virtualNetworkName, - Context context); -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverPolicyVirtualNetworkLinksClient.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverPolicyVirtualNetworkLinksClient.java deleted file mode 100644 index df84398966d6..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverPolicyVirtualNetworkLinksClient.java +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLinkPatch; - -/** - * An instance of this class provides access to all the operations defined in - * DnsResolverPolicyVirtualNetworkLinksClient. - */ -public interface DnsResolverPolicyVirtualNetworkLinksClient { - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsResolverPolicyVirtualNetworkLinkInner> - beginCreateOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkInner parameters); - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsResolverPolicyVirtualNetworkLinkInner> - beginCreateOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkInner parameters, - String ifMatch, String ifNoneMatch, Context context); - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverPolicyVirtualNetworkLinkInner createOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkInner parameters); - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverPolicyVirtualNetworkLinkInner createOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkInner parameters, - String ifMatch, String ifNoneMatch, Context context); - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsResolverPolicyVirtualNetworkLinkInner> - beginUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch parameters); - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsResolverPolicyVirtualNetworkLinkInner> - beginUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch parameters, - String ifMatch, Context context); - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverPolicyVirtualNetworkLinkInner update(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch parameters); - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverPolicyVirtualNetworkLinkInner update(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch parameters, - String ifMatch, Context context); - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName); - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, String ifMatch, Context context); - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName); - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - String ifMatch, Context context); - - /** - * Gets properties of a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy virtual network link along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, Context context); - - /** - * Gets properties of a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @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 properties of a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverPolicyVirtualNetworkLinkInner get(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName); - - /** - * Lists DNS resolver policy virtual network links. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @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 to an enumeration operation on DNS resolver policy virtual network links as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, - String dnsResolverPolicyName); - - /** - * Lists DNS resolver policy virtual network links. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policy virtual network links as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String dnsResolverPolicyName, - Integer top, Context context); -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsSecurityRulesClient.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsSecurityRulesClient.java deleted file mode 100644 index ba6eaafa6dd1..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsSecurityRulesClient.java +++ /dev/null @@ -1,291 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRuleInner; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRulePatch; - -/** - * An instance of this class provides access to all the operations defined in DnsSecurityRulesClient. - */ -public interface DnsSecurityRulesClient { - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsSecurityRuleInner> beginCreateOrUpdate(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRuleInner parameters); - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsSecurityRuleInner> beginCreateOrUpdate(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRuleInner parameters, String ifMatch, - String ifNoneMatch, Context context); - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsSecurityRuleInner createOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, DnsSecurityRuleInner parameters); - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsSecurityRuleInner createOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, DnsSecurityRuleInner parameters, String ifMatch, String ifNoneMatch, - Context context); - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsSecurityRuleInner> beginUpdate(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRulePatch parameters); - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DnsSecurityRuleInner> beginUpdate(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRulePatch parameters, String ifMatch, - Context context); - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsSecurityRuleInner update(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - DnsSecurityRulePatch parameters); - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsSecurityRuleInner update(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - DnsSecurityRulePatch parameters, String ifMatch, Context context); - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName); - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, String ifMatch, Context context); - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName); - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, String ifMatch, - Context context); - - /** - * Gets properties of a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS security rule for a DNS resolver policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, Context context); - - /** - * Gets properties of a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @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 properties of a DNS security rule for a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsSecurityRuleInner get(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName); - - /** - * Lists DNS security rules for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @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 to an enumeration operation on DNS security rules within a DNS resolver policy as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String dnsResolverPolicyName); - - /** - * Lists DNS security rules for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS security rules within a DNS resolver policy as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String dnsResolverPolicyName, Integer top, - Context context); -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsForwardingRulesetInner.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsForwardingRulesetInner.java index 2aeba5108b93..d1698e130d44 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsForwardingRulesetInner.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsForwardingRulesetInner.java @@ -33,7 +33,7 @@ public final class DnsForwardingRulesetInner extends Resource { private DnsForwardingRulesetProperties innerProperties = new DnsForwardingRulesetProperties(); /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Metadata pertaining to creation and last modification of the resource. */ private SystemData systemData; @@ -77,7 +77,7 @@ private DnsForwardingRulesetProperties innerProperties() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListInner.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListInner.java deleted file mode 100644 index afe8f07ae003..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListInner.java +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Describes a DNS resolver domain list. - */ -@Fluent -public final class DnsResolverDomainListInner extends Resource { - /* - * ETag of the DNS resolver domain list. - */ - private String etag; - - /* - * Properties of the DNS resolver domain list. - */ - private DnsResolverDomainListProperties innerProperties = new DnsResolverDomainListProperties(); - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of DnsResolverDomainListInner class. - */ - public DnsResolverDomainListInner() { - } - - /** - * Get the etag property: ETag of the DNS resolver domain list. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the innerProperties property: Properties of the DNS resolver domain list. - * - * @return the innerProperties value. - */ - private DnsResolverDomainListProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public DnsResolverDomainListInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DnsResolverDomainListInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the domains property: The domains in the domain list. - * - * @return the domains value. - */ - public List domains() { - return this.innerProperties() == null ? null : this.innerProperties().domains(); - } - - /** - * Set the domains property: The domains in the domain list. - * - * @param domains the domains value to set. - * @return the DnsResolverDomainListInner object itself. - */ - public DnsResolverDomainListInner withDomains(List domains) { - if (this.innerProperties() == null) { - this.innerProperties = new DnsResolverDomainListProperties(); - } - this.innerProperties().withDomains(domains); - return this; - } - - /** - * Get the provisioningState property: The current provisioning state of the DNS resolver domain list. This is a - * read-only property and any attempt to set this value will be ignored. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the resourceGuid property: The resourceGuid property of the DNS resolver domain list resource. - * - * @return the resourceGuid value. - */ - public String resourceGuid() { - return this.innerProperties() == null ? null : this.innerProperties().resourceGuid(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model DnsResolverDomainListInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverDomainListInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsResolverDomainListInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsResolverDomainListInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DnsResolverDomainListInner. - */ - public static DnsResolverDomainListInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsResolverDomainListInner deserializedDnsResolverDomainListInner = new DnsResolverDomainListInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDnsResolverDomainListInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDnsResolverDomainListInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDnsResolverDomainListInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedDnsResolverDomainListInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDnsResolverDomainListInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedDnsResolverDomainListInner.innerProperties - = DnsResolverDomainListProperties.fromJson(reader); - } else if ("etag".equals(fieldName)) { - deserializedDnsResolverDomainListInner.etag = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedDnsResolverDomainListInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsResolverDomainListInner; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListPatchProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListPatchProperties.java deleted file mode 100644 index 1c26ccda650b..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListPatchProperties.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Represents the updatable properties of a DNS resolver domain list. - */ -@Fluent -public final class DnsResolverDomainListPatchProperties - implements JsonSerializable { - /* - * The domains in the domain list. - */ - private List domains; - - /** - * Creates an instance of DnsResolverDomainListPatchProperties class. - */ - public DnsResolverDomainListPatchProperties() { - } - - /** - * Get the domains property: The domains in the domain list. - * - * @return the domains value. - */ - public List domains() { - return this.domains; - } - - /** - * Set the domains property: The domains in the domain list. - * - * @param domains the domains value to set. - * @return the DnsResolverDomainListPatchProperties object itself. - */ - public DnsResolverDomainListPatchProperties withDomains(List domains) { - this.domains = domains; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("domains", this.domains, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsResolverDomainListPatchProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsResolverDomainListPatchProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DnsResolverDomainListPatchProperties. - */ - public static DnsResolverDomainListPatchProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsResolverDomainListPatchProperties deserializedDnsResolverDomainListPatchProperties - = new DnsResolverDomainListPatchProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("domains".equals(fieldName)) { - List domains = reader.readArray(reader1 -> reader1.getString()); - deserializedDnsResolverDomainListPatchProperties.domains = domains; - } else { - reader.skipChildren(); - } - } - - return deserializedDnsResolverDomainListPatchProperties; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListProperties.java deleted file mode 100644 index ad79266e323f..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListProperties.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; -import java.io.IOException; -import java.util.List; - -/** - * Represents the properties of a DNS resolver domain list. - */ -@Fluent -public final class DnsResolverDomainListProperties implements JsonSerializable { - /* - * The domains in the domain list. - */ - private List domains; - - /* - * The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to - * set this value will be ignored. - */ - private ProvisioningState provisioningState; - - /* - * The resourceGuid property of the DNS resolver domain list resource. - */ - private String resourceGuid; - - /** - * Creates an instance of DnsResolverDomainListProperties class. - */ - public DnsResolverDomainListProperties() { - } - - /** - * Get the domains property: The domains in the domain list. - * - * @return the domains value. - */ - public List domains() { - return this.domains; - } - - /** - * Set the domains property: The domains in the domain list. - * - * @param domains the domains value to set. - * @return the DnsResolverDomainListProperties object itself. - */ - public DnsResolverDomainListProperties withDomains(List domains) { - this.domains = domains; - return this; - } - - /** - * Get the provisioningState property: The current provisioning state of the DNS resolver domain list. This is a - * read-only property and any attempt to set this value will be ignored. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the resourceGuid property: The resourceGuid property of the DNS resolver domain list resource. - * - * @return the resourceGuid value. - */ - public String resourceGuid() { - return this.resourceGuid; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (domains() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property domains in model DnsResolverDomainListProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverDomainListProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("domains", this.domains, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsResolverDomainListProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsResolverDomainListProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DnsResolverDomainListProperties. - */ - public static DnsResolverDomainListProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsResolverDomainListProperties deserializedDnsResolverDomainListProperties - = new DnsResolverDomainListProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("domains".equals(fieldName)) { - List domains = reader.readArray(reader1 -> reader1.getString()); - deserializedDnsResolverDomainListProperties.domains = domains; - } else if ("provisioningState".equals(fieldName)) { - deserializedDnsResolverDomainListProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("resourceGuid".equals(fieldName)) { - deserializedDnsResolverDomainListProperties.resourceGuid = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsResolverDomainListProperties; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverInner.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverInner.java index 41799f3d7f87..30710c2db57e 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverInner.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverInner.java @@ -33,7 +33,7 @@ public final class DnsResolverInner extends Resource { private DnsResolverProperties innerProperties = new DnsResolverProperties(); /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Metadata pertaining to creation and last modification of the resource. */ private SystemData systemData; @@ -77,7 +77,7 @@ private DnsResolverProperties innerProperties() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyInner.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyInner.java deleted file mode 100644 index 64bb31a64bf2..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyInner.java +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; -import java.io.IOException; -import java.util.Map; - -/** - * Describes a DNS resolver policy. - */ -@Fluent -public final class DnsResolverPolicyInner extends Resource { - /* - * ETag of the DNS resolver policy. - */ - private String etag; - - /* - * Properties of the DNS resolver policy. - */ - private DnsResolverPolicyProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of DnsResolverPolicyInner class. - */ - public DnsResolverPolicyInner() { - } - - /** - * Get the etag property: ETag of the DNS resolver policy. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the innerProperties property: Properties of the DNS resolver policy. - * - * @return the innerProperties value. - */ - private DnsResolverPolicyProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public DnsResolverPolicyInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DnsResolverPolicyInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: The current provisioning state of the DNS resolver policy. This is a - * read-only property and any attempt to set this value will be ignored. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the resourceGuid property: The resourceGuid property of the DNS resolver policy resource. - * - * @return the resourceGuid value. - */ - public String resourceGuid() { - return this.innerProperties() == null ? null : this.innerProperties().resourceGuid(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsResolverPolicyInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsResolverPolicyInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DnsResolverPolicyInner. - */ - public static DnsResolverPolicyInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsResolverPolicyInner deserializedDnsResolverPolicyInner = new DnsResolverPolicyInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDnsResolverPolicyInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDnsResolverPolicyInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDnsResolverPolicyInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedDnsResolverPolicyInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDnsResolverPolicyInner.withTags(tags); - } else if ("etag".equals(fieldName)) { - deserializedDnsResolverPolicyInner.etag = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDnsResolverPolicyInner.innerProperties = DnsResolverPolicyProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDnsResolverPolicyInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsResolverPolicyInner; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyProperties.java deleted file mode 100644 index 414be94a5b72..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyProperties.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; -import java.io.IOException; - -/** - * Represents the properties of a DNS resolver policy. - */ -@Immutable -public final class DnsResolverPolicyProperties implements JsonSerializable { - /* - * The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set - * this value will be ignored. - */ - private ProvisioningState provisioningState; - - /* - * The resourceGuid property of the DNS resolver policy resource. - */ - private String resourceGuid; - - /** - * Creates an instance of DnsResolverPolicyProperties class. - */ - public DnsResolverPolicyProperties() { - } - - /** - * Get the provisioningState property: The current provisioning state of the DNS resolver policy. This is a - * read-only property and any attempt to set this value will be ignored. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the resourceGuid property: The resourceGuid property of the DNS resolver policy resource. - * - * @return the resourceGuid value. - */ - public String resourceGuid() { - return this.resourceGuid; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsResolverPolicyProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsResolverPolicyProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DnsResolverPolicyProperties. - */ - public static DnsResolverPolicyProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsResolverPolicyProperties deserializedDnsResolverPolicyProperties = new DnsResolverPolicyProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedDnsResolverPolicyProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("resourceGuid".equals(fieldName)) { - deserializedDnsResolverPolicyProperties.resourceGuid = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsResolverPolicyProperties; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyVirtualNetworkLinkInner.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyVirtualNetworkLinkInner.java deleted file mode 100644 index 177a2f383415..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyVirtualNetworkLinkInner.java +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SubResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; -import java.io.IOException; -import java.util.Map; - -/** - * Describes a DNS resolver policy virtual network link. - */ -@Fluent -public final class DnsResolverPolicyVirtualNetworkLinkInner extends Resource { - /* - * ETag of the DNS resolver policy virtual network link. - */ - private String etag; - - /* - * Properties of the DNS resolver policy virtual network link. - */ - private DnsResolverPolicyVirtualNetworkLinkProperties innerProperties - = new DnsResolverPolicyVirtualNetworkLinkProperties(); - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of DnsResolverPolicyVirtualNetworkLinkInner class. - */ - public DnsResolverPolicyVirtualNetworkLinkInner() { - } - - /** - * Get the etag property: ETag of the DNS resolver policy virtual network link. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the innerProperties property: Properties of the DNS resolver policy virtual network link. - * - * @return the innerProperties value. - */ - private DnsResolverPolicyVirtualNetworkLinkProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public DnsResolverPolicyVirtualNetworkLinkInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DnsResolverPolicyVirtualNetworkLinkInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the virtualNetwork property: The reference to the virtual network. This cannot be changed after creation. - * - * @return the virtualNetwork value. - */ - public SubResource virtualNetwork() { - return this.innerProperties() == null ? null : this.innerProperties().virtualNetwork(); - } - - /** - * Set the virtualNetwork property: The reference to the virtual network. This cannot be changed after creation. - * - * @param virtualNetwork the virtualNetwork value to set. - * @return the DnsResolverPolicyVirtualNetworkLinkInner object itself. - */ - public DnsResolverPolicyVirtualNetworkLinkInner withVirtualNetwork(SubResource virtualNetwork) { - if (this.innerProperties() == null) { - this.innerProperties = new DnsResolverPolicyVirtualNetworkLinkProperties(); - } - this.innerProperties().withVirtualNetwork(virtualNetwork); - return this; - } - - /** - * Get the provisioningState property: The current provisioning state of the DNS resolver policy virtual network - * link. This is a read-only property and any attempt to set this value will be ignored. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model DnsResolverPolicyVirtualNetworkLinkInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverPolicyVirtualNetworkLinkInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsResolverPolicyVirtualNetworkLinkInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsResolverPolicyVirtualNetworkLinkInner if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DnsResolverPolicyVirtualNetworkLinkInner. - */ - public static DnsResolverPolicyVirtualNetworkLinkInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsResolverPolicyVirtualNetworkLinkInner deserializedDnsResolverPolicyVirtualNetworkLinkInner - = new DnsResolverPolicyVirtualNetworkLinkInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDnsResolverPolicyVirtualNetworkLinkInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDnsResolverPolicyVirtualNetworkLinkInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDnsResolverPolicyVirtualNetworkLinkInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedDnsResolverPolicyVirtualNetworkLinkInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDnsResolverPolicyVirtualNetworkLinkInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedDnsResolverPolicyVirtualNetworkLinkInner.innerProperties - = DnsResolverPolicyVirtualNetworkLinkProperties.fromJson(reader); - } else if ("etag".equals(fieldName)) { - deserializedDnsResolverPolicyVirtualNetworkLinkInner.etag = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedDnsResolverPolicyVirtualNetworkLinkInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsResolverPolicyVirtualNetworkLinkInner; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyVirtualNetworkLinkProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyVirtualNetworkLinkProperties.java deleted file mode 100644 index d98d10ff57f1..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyVirtualNetworkLinkProperties.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; -import java.io.IOException; - -/** - * Represents the properties of a DNS resolver policy virtual network link. - */ -@Fluent -public final class DnsResolverPolicyVirtualNetworkLinkProperties - implements JsonSerializable { - /* - * The reference to the virtual network. This cannot be changed after creation. - */ - private SubResource virtualNetwork; - - /* - * The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and - * any attempt to set this value will be ignored. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of DnsResolverPolicyVirtualNetworkLinkProperties class. - */ - public DnsResolverPolicyVirtualNetworkLinkProperties() { - } - - /** - * Get the virtualNetwork property: The reference to the virtual network. This cannot be changed after creation. - * - * @return the virtualNetwork value. - */ - public SubResource virtualNetwork() { - return this.virtualNetwork; - } - - /** - * Set the virtualNetwork property: The reference to the virtual network. This cannot be changed after creation. - * - * @param virtualNetwork the virtualNetwork value to set. - * @return the DnsResolverPolicyVirtualNetworkLinkProperties object itself. - */ - public DnsResolverPolicyVirtualNetworkLinkProperties withVirtualNetwork(SubResource virtualNetwork) { - this.virtualNetwork = virtualNetwork; - return this; - } - - /** - * Get the provisioningState property: The current provisioning state of the DNS resolver policy virtual network - * link. This is a read-only property and any attempt to set this value will be ignored. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (virtualNetwork() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property virtualNetwork in model DnsResolverPolicyVirtualNetworkLinkProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverPolicyVirtualNetworkLinkProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("virtualNetwork", this.virtualNetwork); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsResolverPolicyVirtualNetworkLinkProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsResolverPolicyVirtualNetworkLinkProperties if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DnsResolverPolicyVirtualNetworkLinkProperties. - */ - public static DnsResolverPolicyVirtualNetworkLinkProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsResolverPolicyVirtualNetworkLinkProperties deserializedDnsResolverPolicyVirtualNetworkLinkProperties - = new DnsResolverPolicyVirtualNetworkLinkProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("virtualNetwork".equals(fieldName)) { - deserializedDnsResolverPolicyVirtualNetworkLinkProperties.virtualNetwork - = SubResource.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedDnsResolverPolicyVirtualNetworkLinkProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsResolverPolicyVirtualNetworkLinkProperties; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsSecurityRuleInner.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsSecurityRuleInner.java deleted file mode 100644 index 758794a34fb2..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsSecurityRuleInner.java +++ /dev/null @@ -1,310 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SubResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; -import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Describes a DNS security rule. - */ -@Fluent -public final class DnsSecurityRuleInner extends Resource { - /* - * ETag of the DNS security rule. - */ - private String etag; - - /* - * Properties of the DNS security rule. - */ - private DnsSecurityRuleProperties innerProperties = new DnsSecurityRuleProperties(); - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of DnsSecurityRuleInner class. - */ - public DnsSecurityRuleInner() { - } - - /** - * Get the etag property: ETag of the DNS security rule. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the innerProperties property: Properties of the DNS security rule. - * - * @return the innerProperties value. - */ - private DnsSecurityRuleProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public DnsSecurityRuleInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DnsSecurityRuleInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the priority property: The priority of the DNS security rule. - * - * @return the priority value. - */ - public int priority() { - return this.innerProperties() == null ? 0 : this.innerProperties().priority(); - } - - /** - * Set the priority property: The priority of the DNS security rule. - * - * @param priority the priority value to set. - * @return the DnsSecurityRuleInner object itself. - */ - public DnsSecurityRuleInner withPriority(int priority) { - if (this.innerProperties() == null) { - this.innerProperties = new DnsSecurityRuleProperties(); - } - this.innerProperties().withPriority(priority); - return this; - } - - /** - * Get the action property: The action to take on DNS requests that match the DNS security rule. - * - * @return the action value. - */ - public DnsSecurityRuleAction action() { - return this.innerProperties() == null ? null : this.innerProperties().action(); - } - - /** - * Set the action property: The action to take on DNS requests that match the DNS security rule. - * - * @param action the action value to set. - * @return the DnsSecurityRuleInner object itself. - */ - public DnsSecurityRuleInner withAction(DnsSecurityRuleAction action) { - if (this.innerProperties() == null) { - this.innerProperties = new DnsSecurityRuleProperties(); - } - this.innerProperties().withAction(action); - return this; - } - - /** - * Get the dnsResolverDomainLists property: DNS resolver policy domains lists that the DNS security rule applies to. - * - * @return the dnsResolverDomainLists value. - */ - public List dnsResolverDomainLists() { - return this.innerProperties() == null ? null : this.innerProperties().dnsResolverDomainLists(); - } - - /** - * Set the dnsResolverDomainLists property: DNS resolver policy domains lists that the DNS security rule applies to. - * - * @param dnsResolverDomainLists the dnsResolverDomainLists value to set. - * @return the DnsSecurityRuleInner object itself. - */ - public DnsSecurityRuleInner withDnsResolverDomainLists(List dnsResolverDomainLists) { - if (this.innerProperties() == null) { - this.innerProperties = new DnsSecurityRuleProperties(); - } - this.innerProperties().withDnsResolverDomainLists(dnsResolverDomainLists); - return this; - } - - /** - * Get the dnsSecurityRuleState property: The state of DNS security rule. - * - * @return the dnsSecurityRuleState value. - */ - public DnsSecurityRuleState dnsSecurityRuleState() { - return this.innerProperties() == null ? null : this.innerProperties().dnsSecurityRuleState(); - } - - /** - * Set the dnsSecurityRuleState property: The state of DNS security rule. - * - * @param dnsSecurityRuleState the dnsSecurityRuleState value to set. - * @return the DnsSecurityRuleInner object itself. - */ - public DnsSecurityRuleInner withDnsSecurityRuleState(DnsSecurityRuleState dnsSecurityRuleState) { - if (this.innerProperties() == null) { - this.innerProperties = new DnsSecurityRuleProperties(); - } - this.innerProperties().withDnsSecurityRuleState(dnsSecurityRuleState); - return this; - } - - /** - * Get the provisioningState property: The current provisioning state of the DNS security rule. This is a read-only - * property and any attempt to set this value will be ignored. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model DnsSecurityRuleInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DnsSecurityRuleInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsSecurityRuleInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsSecurityRuleInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DnsSecurityRuleInner. - */ - public static DnsSecurityRuleInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsSecurityRuleInner deserializedDnsSecurityRuleInner = new DnsSecurityRuleInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDnsSecurityRuleInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDnsSecurityRuleInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDnsSecurityRuleInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedDnsSecurityRuleInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDnsSecurityRuleInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedDnsSecurityRuleInner.innerProperties = DnsSecurityRuleProperties.fromJson(reader); - } else if ("etag".equals(fieldName)) { - deserializedDnsSecurityRuleInner.etag = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedDnsSecurityRuleInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsSecurityRuleInner; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsSecurityRulePatchProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsSecurityRulePatchProperties.java deleted file mode 100644 index 113cc7f19fc8..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsSecurityRulePatchProperties.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; -import java.io.IOException; -import java.util.List; - -/** - * Represents the updatable properties of a DNS security rule. - */ -@Fluent -public final class DnsSecurityRulePatchProperties implements JsonSerializable { - /* - * The action to take on DNS requests that match the DNS security rule. - */ - private DnsSecurityRuleAction action; - - /* - * DNS resolver policy domains lists that the DNS security rule applies to. - */ - private List dnsResolverDomainLists; - - /* - * The state of DNS security rule. - */ - private DnsSecurityRuleState dnsSecurityRuleState; - - /* - * The priority of the DNS security rule. - */ - private Integer priority; - - /** - * Creates an instance of DnsSecurityRulePatchProperties class. - */ - public DnsSecurityRulePatchProperties() { - } - - /** - * Get the action property: The action to take on DNS requests that match the DNS security rule. - * - * @return the action value. - */ - public DnsSecurityRuleAction action() { - return this.action; - } - - /** - * Set the action property: The action to take on DNS requests that match the DNS security rule. - * - * @param action the action value to set. - * @return the DnsSecurityRulePatchProperties object itself. - */ - public DnsSecurityRulePatchProperties withAction(DnsSecurityRuleAction action) { - this.action = action; - return this; - } - - /** - * Get the dnsResolverDomainLists property: DNS resolver policy domains lists that the DNS security rule applies to. - * - * @return the dnsResolverDomainLists value. - */ - public List dnsResolverDomainLists() { - return this.dnsResolverDomainLists; - } - - /** - * Set the dnsResolverDomainLists property: DNS resolver policy domains lists that the DNS security rule applies to. - * - * @param dnsResolverDomainLists the dnsResolverDomainLists value to set. - * @return the DnsSecurityRulePatchProperties object itself. - */ - public DnsSecurityRulePatchProperties withDnsResolverDomainLists(List dnsResolverDomainLists) { - this.dnsResolverDomainLists = dnsResolverDomainLists; - return this; - } - - /** - * Get the dnsSecurityRuleState property: The state of DNS security rule. - * - * @return the dnsSecurityRuleState value. - */ - public DnsSecurityRuleState dnsSecurityRuleState() { - return this.dnsSecurityRuleState; - } - - /** - * Set the dnsSecurityRuleState property: The state of DNS security rule. - * - * @param dnsSecurityRuleState the dnsSecurityRuleState value to set. - * @return the DnsSecurityRulePatchProperties object itself. - */ - public DnsSecurityRulePatchProperties withDnsSecurityRuleState(DnsSecurityRuleState dnsSecurityRuleState) { - this.dnsSecurityRuleState = dnsSecurityRuleState; - return this; - } - - /** - * Get the priority property: The priority of the DNS security rule. - * - * @return the priority value. - */ - public Integer priority() { - return this.priority; - } - - /** - * Set the priority property: The priority of the DNS security rule. - * - * @param priority the priority value to set. - * @return the DnsSecurityRulePatchProperties object itself. - */ - public DnsSecurityRulePatchProperties withPriority(Integer priority) { - this.priority = priority; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (action() != null) { - action().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("action", this.action); - jsonWriter.writeArrayField("dnsResolverDomainLists", this.dnsResolverDomainLists, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("dnsSecurityRuleState", - this.dnsSecurityRuleState == null ? null : this.dnsSecurityRuleState.toString()); - jsonWriter.writeNumberField("priority", this.priority); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsSecurityRulePatchProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsSecurityRulePatchProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DnsSecurityRulePatchProperties. - */ - public static DnsSecurityRulePatchProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsSecurityRulePatchProperties deserializedDnsSecurityRulePatchProperties - = new DnsSecurityRulePatchProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("action".equals(fieldName)) { - deserializedDnsSecurityRulePatchProperties.action = DnsSecurityRuleAction.fromJson(reader); - } else if ("dnsResolverDomainLists".equals(fieldName)) { - List dnsResolverDomainLists - = reader.readArray(reader1 -> SubResource.fromJson(reader1)); - deserializedDnsSecurityRulePatchProperties.dnsResolverDomainLists = dnsResolverDomainLists; - } else if ("dnsSecurityRuleState".equals(fieldName)) { - deserializedDnsSecurityRulePatchProperties.dnsSecurityRuleState - = DnsSecurityRuleState.fromString(reader.getString()); - } else if ("priority".equals(fieldName)) { - deserializedDnsSecurityRulePatchProperties.priority = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsSecurityRulePatchProperties; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsSecurityRuleProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsSecurityRuleProperties.java deleted file mode 100644 index 540ebd07d5a9..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsSecurityRuleProperties.java +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; -import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; -import java.io.IOException; -import java.util.List; - -/** - * Represents the properties of a DNS security rule. - */ -@Fluent -public final class DnsSecurityRuleProperties implements JsonSerializable { - /* - * The priority of the DNS security rule. - */ - private int priority; - - /* - * The action to take on DNS requests that match the DNS security rule. - */ - private DnsSecurityRuleAction action; - - /* - * DNS resolver policy domains lists that the DNS security rule applies to. - */ - private List dnsResolverDomainLists; - - /* - * The state of DNS security rule. - */ - private DnsSecurityRuleState dnsSecurityRuleState; - - /* - * The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this - * value will be ignored. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of DnsSecurityRuleProperties class. - */ - public DnsSecurityRuleProperties() { - } - - /** - * Get the priority property: The priority of the DNS security rule. - * - * @return the priority value. - */ - public int priority() { - return this.priority; - } - - /** - * Set the priority property: The priority of the DNS security rule. - * - * @param priority the priority value to set. - * @return the DnsSecurityRuleProperties object itself. - */ - public DnsSecurityRuleProperties withPriority(int priority) { - this.priority = priority; - return this; - } - - /** - * Get the action property: The action to take on DNS requests that match the DNS security rule. - * - * @return the action value. - */ - public DnsSecurityRuleAction action() { - return this.action; - } - - /** - * Set the action property: The action to take on DNS requests that match the DNS security rule. - * - * @param action the action value to set. - * @return the DnsSecurityRuleProperties object itself. - */ - public DnsSecurityRuleProperties withAction(DnsSecurityRuleAction action) { - this.action = action; - return this; - } - - /** - * Get the dnsResolverDomainLists property: DNS resolver policy domains lists that the DNS security rule applies to. - * - * @return the dnsResolverDomainLists value. - */ - public List dnsResolverDomainLists() { - return this.dnsResolverDomainLists; - } - - /** - * Set the dnsResolverDomainLists property: DNS resolver policy domains lists that the DNS security rule applies to. - * - * @param dnsResolverDomainLists the dnsResolverDomainLists value to set. - * @return the DnsSecurityRuleProperties object itself. - */ - public DnsSecurityRuleProperties withDnsResolverDomainLists(List dnsResolverDomainLists) { - this.dnsResolverDomainLists = dnsResolverDomainLists; - return this; - } - - /** - * Get the dnsSecurityRuleState property: The state of DNS security rule. - * - * @return the dnsSecurityRuleState value. - */ - public DnsSecurityRuleState dnsSecurityRuleState() { - return this.dnsSecurityRuleState; - } - - /** - * Set the dnsSecurityRuleState property: The state of DNS security rule. - * - * @param dnsSecurityRuleState the dnsSecurityRuleState value to set. - * @return the DnsSecurityRuleProperties object itself. - */ - public DnsSecurityRuleProperties withDnsSecurityRuleState(DnsSecurityRuleState dnsSecurityRuleState) { - this.dnsSecurityRuleState = dnsSecurityRuleState; - return this; - } - - /** - * Get the provisioningState property: The current provisioning state of the DNS security rule. This is a read-only - * property and any attempt to set this value will be ignored. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property action in model DnsSecurityRuleProperties")); - } else { - action().validate(); - } - if (dnsResolverDomainLists() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property dnsResolverDomainLists in model DnsSecurityRuleProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DnsSecurityRuleProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("priority", this.priority); - jsonWriter.writeJsonField("action", this.action); - jsonWriter.writeArrayField("dnsResolverDomainLists", this.dnsResolverDomainLists, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("dnsSecurityRuleState", - this.dnsSecurityRuleState == null ? null : this.dnsSecurityRuleState.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsSecurityRuleProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsSecurityRuleProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DnsSecurityRuleProperties. - */ - public static DnsSecurityRuleProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsSecurityRuleProperties deserializedDnsSecurityRuleProperties = new DnsSecurityRuleProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("priority".equals(fieldName)) { - deserializedDnsSecurityRuleProperties.priority = reader.getInt(); - } else if ("action".equals(fieldName)) { - deserializedDnsSecurityRuleProperties.action = DnsSecurityRuleAction.fromJson(reader); - } else if ("dnsResolverDomainLists".equals(fieldName)) { - List dnsResolverDomainLists - = reader.readArray(reader1 -> SubResource.fromJson(reader1)); - deserializedDnsSecurityRuleProperties.dnsResolverDomainLists = dnsResolverDomainLists; - } else if ("dnsSecurityRuleState".equals(fieldName)) { - deserializedDnsSecurityRuleProperties.dnsSecurityRuleState - = DnsSecurityRuleState.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedDnsSecurityRuleProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsSecurityRuleProperties; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRuleInner.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRuleInner.java index e5e198ebdbcd..7f2dce472996 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRuleInner.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRuleInner.java @@ -34,7 +34,7 @@ public final class ForwardingRuleInner extends ProxyResource { private ForwardingRuleProperties innerProperties = new ForwardingRuleProperties(); /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Metadata pertaining to creation and last modification of the resource. */ private SystemData systemData; @@ -78,7 +78,7 @@ private ForwardingRuleProperties innerProperties() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/InboundEndpointInner.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/InboundEndpointInner.java index 5430ce6c870f..aefcffade1f3 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/InboundEndpointInner.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/InboundEndpointInner.java @@ -33,7 +33,7 @@ public final class InboundEndpointInner extends Resource { private InboundEndpointProperties innerProperties = new InboundEndpointProperties(); /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Metadata pertaining to creation and last modification of the resource. */ private SystemData systemData; @@ -77,7 +77,7 @@ private InboundEndpointProperties innerProperties() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/OutboundEndpointInner.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/OutboundEndpointInner.java index bcbb4387da03..c185c55f019f 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/OutboundEndpointInner.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/OutboundEndpointInner.java @@ -32,7 +32,7 @@ public final class OutboundEndpointInner extends Resource { private OutboundEndpointProperties innerProperties = new OutboundEndpointProperties(); /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Metadata pertaining to creation and last modification of the resource. */ private SystemData systemData; @@ -76,7 +76,7 @@ private OutboundEndpointProperties innerProperties() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkInner.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkInner.java index 662a01f6024e..b5408efd7f31 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkInner.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkInner.java @@ -32,7 +32,7 @@ public final class VirtualNetworkLinkInner extends ProxyResource { private VirtualNetworkLinkProperties innerProperties = new VirtualNetworkLinkProperties(); /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Metadata pertaining to creation and last modification of the resource. */ private SystemData systemData; @@ -76,7 +76,7 @@ private VirtualNetworkLinkProperties innerProperties() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverDomainListImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverDomainListImpl.java deleted file mode 100644 index ed9835fe78df..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverDomainListImpl.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainList; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListPatch; -import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class DnsResolverDomainListImpl - implements DnsResolverDomainList, DnsResolverDomainList.Definition, DnsResolverDomainList.Update { - private DnsResolverDomainListInner innerObject; - - private final com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public List domains() { - List inner = this.innerModel().domains(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String resourceGuid() { - return this.innerModel().resourceGuid(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DnsResolverDomainListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.dnsresolver.DnsResolverManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String dnsResolverDomainListName; - - private String createIfMatch; - - private String createIfNoneMatch; - - private String updateIfMatch; - - private DnsResolverDomainListPatch updateParameters; - - public DnsResolverDomainListImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public DnsResolverDomainList create() { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverDomainLists() - .createOrUpdate(resourceGroupName, dnsResolverDomainListName, this.innerModel(), createIfMatch, - createIfNoneMatch, Context.NONE); - return this; - } - - public DnsResolverDomainList create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverDomainLists() - .createOrUpdate(resourceGroupName, dnsResolverDomainListName, this.innerModel(), createIfMatch, - createIfNoneMatch, context); - return this; - } - - DnsResolverDomainListImpl(String name, com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager) { - this.innerObject = new DnsResolverDomainListInner(); - this.serviceManager = serviceManager; - this.dnsResolverDomainListName = name; - this.createIfMatch = null; - this.createIfNoneMatch = null; - } - - public DnsResolverDomainListImpl update() { - this.updateIfMatch = null; - this.updateParameters = new DnsResolverDomainListPatch(); - return this; - } - - public DnsResolverDomainList apply() { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverDomainLists() - .update(resourceGroupName, dnsResolverDomainListName, updateParameters, updateIfMatch, Context.NONE); - return this; - } - - public DnsResolverDomainList apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverDomainLists() - .update(resourceGroupName, dnsResolverDomainListName, updateParameters, updateIfMatch, context); - return this; - } - - DnsResolverDomainListImpl(DnsResolverDomainListInner innerObject, - com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.dnsResolverDomainListName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsResolverDomainLists"); - } - - public DnsResolverDomainList refresh() { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverDomainLists() - .getByResourceGroupWithResponse(resourceGroupName, dnsResolverDomainListName, Context.NONE) - .getValue(); - return this; - } - - public DnsResolverDomainList refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverDomainLists() - .getByResourceGroupWithResponse(resourceGroupName, dnsResolverDomainListName, context) - .getValue(); - return this; - } - - public DnsResolverDomainListImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public DnsResolverDomainListImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public DnsResolverDomainListImpl withDomains(List domains) { - if (isInCreateMode()) { - this.innerModel().withDomains(domains); - return this; - } else { - this.updateParameters.withDomains(domains); - return this; - } - } - - public DnsResolverDomainListImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public DnsResolverDomainListImpl withIfMatch(String ifMatch) { - if (isInCreateMode()) { - this.createIfMatch = ifMatch; - return this; - } else { - this.updateIfMatch = ifMatch; - return this; - } - } - - public DnsResolverDomainListImpl withIfNoneMatch(String ifNoneMatch) { - this.createIfNoneMatch = ifNoneMatch; - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverDomainListsClientImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverDomainListsClientImpl.java deleted file mode 100644 index 3f96c6d7d4be..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverDomainListsClientImpl.java +++ /dev/null @@ -1,1572 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListPatch; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in DnsResolverDomainListsClient. - */ -public final class DnsResolverDomainListsClientImpl implements DnsResolverDomainListsClient { - /** - * The proxy service used to perform REST calls. - */ - private final DnsResolverDomainListsService service; - - /** - * The service client containing this operation class. - */ - private final DnsResolverManagementClientImpl client; - - /** - * Initializes an instance of DnsResolverDomainListsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DnsResolverDomainListsClientImpl(DnsResolverManagementClientImpl client) { - this.service = RestProxy.create(DnsResolverDomainListsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DnsResolverManagementClientDnsResolverDomainLists to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DnsResolverManagemen") - public interface DnsResolverDomainListsService { - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverDomainListName") String dnsResolverDomainListName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") DnsResolverDomainListInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverDomainListName") String dnsResolverDomainListName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") DnsResolverDomainListPatch parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverDomainListName") String dnsResolverDomainListName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverDomainListName") String dnsResolverDomainListName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsResolverDomainLists") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String dnsResolverDomainListName, DnsResolverDomainListInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsResolverDomainListName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, ifNoneMatch, - parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String dnsResolverDomainListName, DnsResolverDomainListInner parameters, String ifMatch, String ifNoneMatch, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsResolverDomainListName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, context); - } - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverDomainListInner> beginCreateOrUpdateAsync( - String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListInner parameters, - String ifMatch, String ifNoneMatch) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - dnsResolverDomainListName, parameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverDomainListInner.class, DnsResolverDomainListInner.class, - this.client.getContext()); - } - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverDomainListInner> beginCreateOrUpdateAsync( - String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - dnsResolverDomainListName, parameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverDomainListInner.class, DnsResolverDomainListInner.class, - this.client.getContext()); - } - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverDomainListInner> beginCreateOrUpdateAsync( - String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListInner parameters, - String ifMatch, String ifNoneMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - dnsResolverDomainListName, parameters, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverDomainListInner.class, DnsResolverDomainListInner.class, context); - } - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsResolverDomainListInner> beginCreateOrUpdate( - String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return this - .beginCreateOrUpdateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch, ifNoneMatch) - .getSyncPoller(); - } - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsResolverDomainListInner> beginCreateOrUpdate( - String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListInner parameters, - String ifMatch, String ifNoneMatch, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch, ifNoneMatch, - context) - .getSyncPoller(); - } - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String dnsResolverDomainListName, DnsResolverDomainListInner parameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch, ifNoneMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String dnsResolverDomainListName, DnsResolverDomainListInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch, ifNoneMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String dnsResolverDomainListName, DnsResolverDomainListInner parameters, String ifMatch, String ifNoneMatch, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch, ifNoneMatch, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverDomainListInner createOrUpdate(String resourceGroupName, String dnsResolverDomainListName, - DnsResolverDomainListInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch, ifNoneMatch) - .block(); - } - - /** - * Creates or updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverDomainListInner createOrUpdate(String resourceGroupName, String dnsResolverDomainListName, - DnsResolverDomainListInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return createOrUpdateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch, ifNoneMatch, - context).block(); - } - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String dnsResolverDomainListName, DnsResolverDomainListPatch parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsResolverDomainListName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String dnsResolverDomainListName, DnsResolverDomainListPatch parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsResolverDomainListName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, parameters, accept, context); - } - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverDomainListInner> beginUpdateAsync( - String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListPatch parameters, - String ifMatch) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverDomainListInner.class, DnsResolverDomainListInner.class, - this.client.getContext()); - } - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverDomainListInner> beginUpdateAsync( - String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListPatch parameters) { - final String ifMatch = null; - Mono>> mono - = updateWithResponseAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverDomainListInner.class, DnsResolverDomainListInner.class, - this.client.getContext()); - } - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverDomainListInner> beginUpdateAsync( - String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListPatch parameters, - String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverDomainListInner.class, DnsResolverDomainListInner.class, context); - } - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsResolverDomainListInner> - beginUpdate(String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListPatch parameters) { - final String ifMatch = null; - return this.beginUpdateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch).getSyncPoller(); - } - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsResolverDomainListInner> beginUpdate( - String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListPatch parameters, - String ifMatch, Context context) { - return this.beginUpdateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch, context) - .getSyncPoller(); - } - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String dnsResolverDomainListName, - DnsResolverDomainListPatch parameters, String ifMatch) { - return beginUpdateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String dnsResolverDomainListName, - DnsResolverDomainListPatch parameters) { - final String ifMatch = null; - return beginUpdateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String dnsResolverDomainListName, - DnsResolverDomainListPatch parameters, String ifMatch, Context context) { - return beginUpdateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverDomainListInner update(String resourceGroupName, String dnsResolverDomainListName, - DnsResolverDomainListPatch parameters) { - final String ifMatch = null; - return updateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch).block(); - } - - /** - * Updates a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverDomainListInner update(String resourceGroupName, String dnsResolverDomainListName, - DnsResolverDomainListPatch parameters, String ifMatch, Context context) { - return updateAsync(resourceGroupName, dnsResolverDomainListName, parameters, ifMatch, context).block(); - } - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String dnsResolverDomainListName, String ifMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsResolverDomainListName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String dnsResolverDomainListName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsResolverDomainListName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, accept, context); - } - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String dnsResolverDomainListName, String ifMatch) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, dnsResolverDomainListName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain 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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String dnsResolverDomainListName) { - final String ifMatch = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, dnsResolverDomainListName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String dnsResolverDomainListName, String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, dnsResolverDomainListName, ifMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverDomainListName) { - final String ifMatch = null; - return this.beginDeleteAsync(resourceGroupName, dnsResolverDomainListName, ifMatch).getSyncPoller(); - } - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverDomainListName, - String ifMatch, Context context) { - return this.beginDeleteAsync(resourceGroupName, dnsResolverDomainListName, ifMatch, context).getSyncPoller(); - } - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dnsResolverDomainListName, String ifMatch) { - return beginDeleteAsync(resourceGroupName, dnsResolverDomainListName, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dnsResolverDomainListName) { - final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, dnsResolverDomainListName, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dnsResolverDomainListName, String ifMatch, - Context context) { - return beginDeleteAsync(resourceGroupName, dnsResolverDomainListName, ifMatch, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String dnsResolverDomainListName) { - final String ifMatch = null; - deleteAsync(resourceGroupName, dnsResolverDomainListName, ifMatch).block(); - } - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String dnsResolverDomainListName, String ifMatch, Context context) { - deleteAsync(resourceGroupName, dnsResolverDomainListName, ifMatch, context).block(); - } - - /** - * Gets properties of a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain 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 properties of a DNS resolver domain list along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String dnsResolverDomainListName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsResolverDomainListName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverDomainListName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets properties of a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver domain list along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String dnsResolverDomainListName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsResolverDomainListName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverDomainListName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets properties of a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain 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 properties of a DNS resolver domain list on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String dnsResolverDomainListName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, dnsResolverDomainListName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets properties of a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver domain list along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String dnsResolverDomainListName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, dnsResolverDomainListName, context).block(); - } - - /** - * Gets properties of a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain 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 properties of a DNS resolver domain list. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverDomainListInner getByResourceGroup(String resourceGroupName, String dnsResolverDomainListName) { - return getByResourceGroupWithResponse(resourceGroupName, dnsResolverDomainListName, Context.NONE).getValue(); - } - - /** - * Lists DNS resolver domain lists within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver domain lists along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists DNS resolver domain lists within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer top, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists DNS resolver domain lists within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists DNS resolver domain lists within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists DNS resolver domain lists within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists DNS resolver domain lists within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, top)); - } - - /** - * Lists DNS resolver domain lists within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, top, context)); - } - - /** - * Lists DNS resolver domain lists in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver domain lists along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists DNS resolver domain lists in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), top, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists DNS resolver domain lists in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(top), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists DNS resolver domain lists in all resource groups of a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(top), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists DNS resolver domain lists in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(top, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists DNS resolver domain lists in all resource groups of a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - return new PagedIterable<>(listAsync(top)); - } - - /** - * Lists DNS resolver domain lists in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, Context context) { - return new PagedIterable<>(listAsync(top, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver domain lists along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver domain lists along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverDomainListsImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverDomainListsImpl.java deleted file mode 100644 index 65fc03af4614..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverDomainListsImpl.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainList; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainLists; - -public final class DnsResolverDomainListsImpl implements DnsResolverDomainLists { - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverDomainListsImpl.class); - - private final DnsResolverDomainListsClient innerClient; - - private final com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager; - - public DnsResolverDomainListsImpl(DnsResolverDomainListsClient innerClient, - com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public void delete(String resourceGroupName, String dnsResolverDomainListName) { - this.serviceClient().delete(resourceGroupName, dnsResolverDomainListName); - } - - public void delete(String resourceGroupName, String dnsResolverDomainListName, String ifMatch, Context context) { - this.serviceClient().delete(resourceGroupName, dnsResolverDomainListName, ifMatch, context); - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, - String dnsResolverDomainListName, Context context) { - Response inner = this.serviceClient() - .getByResourceGroupWithResponse(resourceGroupName, dnsResolverDomainListName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DnsResolverDomainListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DnsResolverDomainList getByResourceGroup(String resourceGroupName, String dnsResolverDomainListName) { - DnsResolverDomainListInner inner - = this.serviceClient().getByResourceGroup(resourceGroupName, dnsResolverDomainListName); - if (inner != null) { - return new DnsResolverDomainListImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsResolverDomainListImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsResolverDomainListImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsResolverDomainListImpl(inner1, this.manager())); - } - - public PagedIterable list(Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsResolverDomainListImpl(inner1, this.manager())); - } - - public DnsResolverDomainList getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverDomainListName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverDomainLists"); - if (dnsResolverDomainListName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverDomainLists'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, dnsResolverDomainListName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverDomainListName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverDomainLists"); - if (dnsResolverDomainListName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverDomainLists'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, dnsResolverDomainListName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverDomainListName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverDomainLists"); - if (dnsResolverDomainListName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverDomainLists'.", id))); - } - String localIfMatch = null; - this.delete(resourceGroupName, dnsResolverDomainListName, localIfMatch, Context.NONE); - } - - public void deleteByIdWithResponse(String id, String ifMatch, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverDomainListName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverDomainLists"); - if (dnsResolverDomainListName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverDomainLists'.", id))); - } - this.delete(resourceGroupName, dnsResolverDomainListName, ifMatch, context); - } - - private DnsResolverDomainListsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.dnsresolver.DnsResolverManager manager() { - return this.serviceManager; - } - - public DnsResolverDomainListImpl define(String name) { - return new DnsResolverDomainListImpl(name, this.manager()); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverManagementClientBuilder.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverManagementClientBuilder.java index fa02eec4c469..a2b124e24e79 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverManagementClientBuilder.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverManagementClientBuilder.java @@ -20,12 +20,12 @@ @ServiceClientBuilder(serviceClients = { DnsResolverManagementClientImpl.class }) public final class DnsResolverManagementClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * The ID of the target subscription. */ private String subscriptionId; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets The ID of the target subscription. * * @param subscriptionId the subscriptionId value. * @return the DnsResolverManagementClientBuilder. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverManagementClientImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverManagementClientImpl.java index 22322499d9aa..b8f6ad4e772c 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverManagementClientImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverManagementClientImpl.java @@ -24,12 +24,8 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient; -import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient; import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverManagementClient; -import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient; -import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient; import com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient; -import com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient; import com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient; import com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient; import com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient; @@ -49,12 +45,12 @@ @ServiceClient(builder = DnsResolverManagementClientBuilder.class) public final class DnsResolverManagementClientImpl implements DnsResolverManagementClient { /** - * The ID of the target subscription. The value must be an UUID. + * The ID of the target subscription. */ private final String subscriptionId; /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets The ID of the target subscription. * * @return the subscriptionId value. */ @@ -216,62 +212,6 @@ public VirtualNetworkLinksClient getVirtualNetworkLinks() { return this.virtualNetworkLinks; } - /** - * The DnsResolverPoliciesClient object to access its operations. - */ - private final DnsResolverPoliciesClient dnsResolverPolicies; - - /** - * Gets the DnsResolverPoliciesClient object to access its operations. - * - * @return the DnsResolverPoliciesClient object. - */ - public DnsResolverPoliciesClient getDnsResolverPolicies() { - return this.dnsResolverPolicies; - } - - /** - * The DnsSecurityRulesClient object to access its operations. - */ - private final DnsSecurityRulesClient dnsSecurityRules; - - /** - * Gets the DnsSecurityRulesClient object to access its operations. - * - * @return the DnsSecurityRulesClient object. - */ - public DnsSecurityRulesClient getDnsSecurityRules() { - return this.dnsSecurityRules; - } - - /** - * The DnsResolverPolicyVirtualNetworkLinksClient object to access its operations. - */ - private final DnsResolverPolicyVirtualNetworkLinksClient dnsResolverPolicyVirtualNetworkLinks; - - /** - * Gets the DnsResolverPolicyVirtualNetworkLinksClient object to access its operations. - * - * @return the DnsResolverPolicyVirtualNetworkLinksClient object. - */ - public DnsResolverPolicyVirtualNetworkLinksClient getDnsResolverPolicyVirtualNetworkLinks() { - return this.dnsResolverPolicyVirtualNetworkLinks; - } - - /** - * The DnsResolverDomainListsClient object to access its operations. - */ - private final DnsResolverDomainListsClient dnsResolverDomainLists; - - /** - * Gets the DnsResolverDomainListsClient object to access its operations. - * - * @return the DnsResolverDomainListsClient object. - */ - public DnsResolverDomainListsClient getDnsResolverDomainLists() { - return this.dnsResolverDomainLists; - } - /** * Initializes an instance of DnsResolverManagementClient client. * @@ -279,7 +219,7 @@ public DnsResolverDomainListsClient getDnsResolverDomainLists() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ DnsResolverManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, @@ -289,17 +229,13 @@ public DnsResolverDomainListsClient getDnsResolverDomainLists() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-07-01-preview"; + this.apiVersion = "2022-07-01"; this.dnsResolvers = new DnsResolversClientImpl(this); this.inboundEndpoints = new InboundEndpointsClientImpl(this); this.outboundEndpoints = new OutboundEndpointsClientImpl(this); this.dnsForwardingRulesets = new DnsForwardingRulesetsClientImpl(this); this.forwardingRules = new ForwardingRulesClientImpl(this); this.virtualNetworkLinks = new VirtualNetworkLinksClientImpl(this); - this.dnsResolverPolicies = new DnsResolverPoliciesClientImpl(this); - this.dnsSecurityRules = new DnsSecurityRulesClientImpl(this); - this.dnsResolverPolicyVirtualNetworkLinks = new DnsResolverPolicyVirtualNetworkLinksClientImpl(this); - this.dnsResolverDomainLists = new DnsResolverDomainListsClientImpl(this); } /** diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPoliciesClientImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPoliciesClientImpl.java deleted file mode 100644 index b632112473ac..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPoliciesClientImpl.java +++ /dev/null @@ -1,1786 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.SubResource; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyListResult; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyPatch; -import com.azure.resourcemanager.dnsresolver.models.SubResourceListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in DnsResolverPoliciesClient. - */ -public final class DnsResolverPoliciesClientImpl implements DnsResolverPoliciesClient { - /** - * The proxy service used to perform REST calls. - */ - private final DnsResolverPoliciesService service; - - /** - * The service client containing this operation class. - */ - private final DnsResolverManagementClientImpl client; - - /** - * Initializes an instance of DnsResolverPoliciesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DnsResolverPoliciesClientImpl(DnsResolverManagementClientImpl client) { - this.service = RestProxy.create(DnsResolverPoliciesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DnsResolverManagementClientDnsResolverPolicies to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DnsResolverManagemen") - public interface DnsResolverPoliciesService { - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") DnsResolverPolicyInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") DnsResolverPolicyPatch parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsResolverPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByVirtualNetwork(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualNetworkName") String virtualNetworkName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByVirtualNetworkNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, DnsResolverPolicyInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverPolicyName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, DnsResolverPolicyInner parameters, String ifMatch, String ifNoneMatch, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, context); - } - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, String dnsResolverPolicyName, DnsResolverPolicyInner parameters, String ifMatch, - String ifNoneMatch) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - dnsResolverPolicyName, parameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverPolicyInner.class, DnsResolverPolicyInner.class, - this.client.getContext()); - } - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, String dnsResolverPolicyName, DnsResolverPolicyInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - dnsResolverPolicyName, parameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverPolicyInner.class, DnsResolverPolicyInner.class, - this.client.getContext()); - } - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, String dnsResolverPolicyName, DnsResolverPolicyInner parameters, String ifMatch, - String ifNoneMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - dnsResolverPolicyName, parameters, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverPolicyInner.class, DnsResolverPolicyInner.class, context); - } - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsResolverPolicyInner> - beginCreateOrUpdate(String resourceGroupName, String dnsResolverPolicyName, DnsResolverPolicyInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return this.beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch, ifNoneMatch) - .getSyncPoller(); - } - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsResolverPolicyInner> beginCreateOrUpdate( - String resourceGroupName, String dnsResolverPolicyName, DnsResolverPolicyInner parameters, String ifMatch, - String ifNoneMatch, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch, ifNoneMatch, - context) - .getSyncPoller(); - } - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyInner parameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch, ifNoneMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch, ifNoneMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch, ifNoneMatch, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverPolicyInner createOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch, ifNoneMatch).block(); - } - - /** - * Creates or updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverPolicyInner createOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return createOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch, ifNoneMatch, context) - .block(); - } - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, DnsResolverPolicyPatch parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), ifMatch, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, DnsResolverPolicyPatch parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), ifMatch, parameters, accept, context); - } - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverPolicyInner> beginUpdateAsync( - String resourceGroupName, String dnsResolverPolicyName, DnsResolverPolicyPatch parameters, String ifMatch) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverPolicyInner.class, DnsResolverPolicyInner.class, - this.client.getContext()); - } - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverPolicyInner> - beginUpdateAsync(String resourceGroupName, String dnsResolverPolicyName, DnsResolverPolicyPatch parameters) { - final String ifMatch = null; - Mono>> mono - = updateWithResponseAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverPolicyInner.class, DnsResolverPolicyInner.class, - this.client.getContext()); - } - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverPolicyInner> beginUpdateAsync( - String resourceGroupName, String dnsResolverPolicyName, DnsResolverPolicyPatch parameters, String ifMatch, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverPolicyInner.class, DnsResolverPolicyInner.class, context); - } - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsResolverPolicyInner> beginUpdate(String resourceGroupName, - String dnsResolverPolicyName, DnsResolverPolicyPatch parameters) { - final String ifMatch = null; - return this.beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch).getSyncPoller(); - } - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsResolverPolicyInner> beginUpdate(String resourceGroupName, - String dnsResolverPolicyName, DnsResolverPolicyPatch parameters, String ifMatch, Context context) { - return this.beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch, context) - .getSyncPoller(); - } - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyPatch parameters, String ifMatch) { - return beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyPatch parameters) { - final String ifMatch = null; - return beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyPatch parameters, String ifMatch, Context context) { - return beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverPolicyInner update(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyPatch parameters) { - final String ifMatch = null; - return updateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch).block(); - } - - /** - * Updates a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverPolicyInner update(String resourceGroupName, String dnsResolverPolicyName, - DnsResolverPolicyPatch parameters, String ifMatch, Context context) { - return updateAsync(resourceGroupName, dnsResolverPolicyName, parameters, ifMatch, context).block(); - } - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String ifMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverPolicyName, this.client.getApiVersion(), ifMatch, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), ifMatch, accept, context); - } - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dnsResolverPolicyName, - String ifMatch) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, dnsResolverPolicyName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String dnsResolverPolicyName) { - final String ifMatch = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, dnsResolverPolicyName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dnsResolverPolicyName, - String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, dnsResolverPolicyName, ifMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverPolicyName) { - final String ifMatch = null; - return this.beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, ifMatch).getSyncPoller(); - } - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverPolicyName, - String ifMatch, Context context) { - return this.beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, ifMatch, context).getSyncPoller(); - } - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dnsResolverPolicyName, String ifMatch) { - return beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dnsResolverPolicyName) { - final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dnsResolverPolicyName, String ifMatch, - Context context) { - return beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, ifMatch, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String dnsResolverPolicyName) { - final String ifMatch = null; - deleteAsync(resourceGroupName, dnsResolverPolicyName, ifMatch).block(); - } - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String dnsResolverPolicyName, String ifMatch, Context context) { - deleteAsync(resourceGroupName, dnsResolverPolicyName, ifMatch, context).block(); - } - - /** - * Gets properties of a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverPolicyName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets properties of a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets properties of a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String dnsResolverPolicyName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, dnsResolverPolicyName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets properties of a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String dnsResolverPolicyName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, dnsResolverPolicyName, context).block(); - } - - /** - * Gets properties of a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverPolicyInner getByResourceGroup(String resourceGroupName, String dnsResolverPolicyName) { - return getByResourceGroupWithResponse(resourceGroupName, dnsResolverPolicyName, Context.NONE).getValue(); - } - - /** - * Lists DNS resolver policies within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver policies along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists DNS resolver policies within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer top, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists DNS resolver policies within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists DNS resolver policies within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer top = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists DNS resolver policies within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists DNS resolver policies within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer top = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, top)); - } - - /** - * Lists DNS resolver policies within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, top, context)); - } - - /** - * Lists DNS resolver policies in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver policies along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists DNS resolver policies in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer top, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), top, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists DNS resolver policies in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(top), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists DNS resolver policies in all resource groups of a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(top), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists DNS resolver policies in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer top, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(top, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists DNS resolver policies in all resource groups of a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer top = null; - return new PagedIterable<>(listAsync(top)); - } - - /** - * Lists DNS resolver policies in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer top, Context context) { - return new PagedIterable<>(listAsync(top, context)); - } - - /** - * Lists DNS resolver policy resource IDs linked to a virtual network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on sub-resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVirtualNetworkSinglePageAsync(String resourceGroupName, - String virtualNetworkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByVirtualNetwork(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, virtualNetworkName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists DNS resolver policy resource IDs linked to a virtual network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName The name of the virtual network. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on sub-resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVirtualNetworkSinglePageAsync(String resourceGroupName, - String virtualNetworkName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByVirtualNetwork(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - virtualNetworkName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists DNS resolver policy resource IDs linked to a virtual network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on sub-resources as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVirtualNetworkAsync(String resourceGroupName, String virtualNetworkName) { - return new PagedFlux<>(() -> listByVirtualNetworkSinglePageAsync(resourceGroupName, virtualNetworkName), - nextLink -> listByVirtualNetworkNextSinglePageAsync(nextLink)); - } - - /** - * Lists DNS resolver policy resource IDs linked to a virtual network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName The name of the virtual network. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on sub-resources as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVirtualNetworkAsync(String resourceGroupName, String virtualNetworkName, - Context context) { - return new PagedFlux<>( - () -> listByVirtualNetworkSinglePageAsync(resourceGroupName, virtualNetworkName, context), - nextLink -> listByVirtualNetworkNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists DNS resolver policy resource IDs linked to a virtual network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on sub-resources as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVirtualNetwork(String resourceGroupName, String virtualNetworkName) { - return new PagedIterable<>(listByVirtualNetworkAsync(resourceGroupName, virtualNetworkName)); - } - - /** - * Lists DNS resolver policy resource IDs linked to a virtual network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName The name of the virtual network. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on sub-resources as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVirtualNetwork(String resourceGroupName, String virtualNetworkName, - Context context) { - return new PagedIterable<>(listByVirtualNetworkAsync(resourceGroupName, virtualNetworkName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver policies along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver policies along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on sub-resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVirtualNetworkNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByVirtualNetworkNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on sub-resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVirtualNetworkNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByVirtualNetworkNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPoliciesImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPoliciesImpl.java deleted file mode 100644 index 9d753f443782..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPoliciesImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.management.SubResource; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicies; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicy; - -public final class DnsResolverPoliciesImpl implements DnsResolverPolicies { - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverPoliciesImpl.class); - - private final DnsResolverPoliciesClient innerClient; - - private final com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager; - - public DnsResolverPoliciesImpl(DnsResolverPoliciesClient innerClient, - com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public void delete(String resourceGroupName, String dnsResolverPolicyName) { - this.serviceClient().delete(resourceGroupName, dnsResolverPolicyName); - } - - public void delete(String resourceGroupName, String dnsResolverPolicyName, String ifMatch, Context context) { - this.serviceClient().delete(resourceGroupName, dnsResolverPolicyName, ifMatch, context); - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, - String dnsResolverPolicyName, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, dnsResolverPolicyName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DnsResolverPolicyImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DnsResolverPolicy getByResourceGroup(String resourceGroupName, String dnsResolverPolicyName) { - DnsResolverPolicyInner inner - = this.serviceClient().getByResourceGroup(resourceGroupName, dnsResolverPolicyName); - if (inner != null) { - return new DnsResolverPolicyImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsResolverPolicyImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsResolverPolicyImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsResolverPolicyImpl(inner1, this.manager())); - } - - public PagedIterable list(Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsResolverPolicyImpl(inner1, this.manager())); - } - - public PagedIterable listByVirtualNetwork(String resourceGroupName, String virtualNetworkName) { - return this.serviceClient().listByVirtualNetwork(resourceGroupName, virtualNetworkName); - } - - public PagedIterable listByVirtualNetwork(String resourceGroupName, String virtualNetworkName, - Context context) { - return this.serviceClient().listByVirtualNetwork(resourceGroupName, virtualNetworkName, context); - } - - public DnsResolverPolicy getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverPolicies"); - if (dnsResolverPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverPolicies'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, dnsResolverPolicyName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverPolicies"); - if (dnsResolverPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverPolicies'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, dnsResolverPolicyName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverPolicies"); - if (dnsResolverPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverPolicies'.", id))); - } - String localIfMatch = null; - this.delete(resourceGroupName, dnsResolverPolicyName, localIfMatch, Context.NONE); - } - - public void deleteByIdWithResponse(String id, String ifMatch, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverPolicies"); - if (dnsResolverPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverPolicies'.", id))); - } - this.delete(resourceGroupName, dnsResolverPolicyName, ifMatch, context); - } - - private DnsResolverPoliciesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.dnsresolver.DnsResolverManager manager() { - return this.serviceManager; - } - - public DnsResolverPolicyImpl define(String name) { - return new DnsResolverPolicyImpl(name, this.manager()); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyImpl.java deleted file mode 100644 index 91877475129a..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyImpl.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicy; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyPatch; -import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; -import java.util.Collections; -import java.util.Map; - -public final class DnsResolverPolicyImpl - implements DnsResolverPolicy, DnsResolverPolicy.Definition, DnsResolverPolicy.Update { - private DnsResolverPolicyInner innerObject; - - private final com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String resourceGuid() { - return this.innerModel().resourceGuid(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DnsResolverPolicyInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.dnsresolver.DnsResolverManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String dnsResolverPolicyName; - - private String createIfMatch; - - private String createIfNoneMatch; - - private String updateIfMatch; - - private DnsResolverPolicyPatch updateParameters; - - public DnsResolverPolicyImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public DnsResolverPolicy create() { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverPolicies() - .createOrUpdate(resourceGroupName, dnsResolverPolicyName, this.innerModel(), createIfMatch, - createIfNoneMatch, Context.NONE); - return this; - } - - public DnsResolverPolicy create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverPolicies() - .createOrUpdate(resourceGroupName, dnsResolverPolicyName, this.innerModel(), createIfMatch, - createIfNoneMatch, context); - return this; - } - - DnsResolverPolicyImpl(String name, com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager) { - this.innerObject = new DnsResolverPolicyInner(); - this.serviceManager = serviceManager; - this.dnsResolverPolicyName = name; - this.createIfMatch = null; - this.createIfNoneMatch = null; - } - - public DnsResolverPolicyImpl update() { - this.updateIfMatch = null; - this.updateParameters = new DnsResolverPolicyPatch(); - return this; - } - - public DnsResolverPolicy apply() { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverPolicies() - .update(resourceGroupName, dnsResolverPolicyName, updateParameters, updateIfMatch, Context.NONE); - return this; - } - - public DnsResolverPolicy apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverPolicies() - .update(resourceGroupName, dnsResolverPolicyName, updateParameters, updateIfMatch, context); - return this; - } - - DnsResolverPolicyImpl(DnsResolverPolicyInner innerObject, - com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsResolverPolicies"); - } - - public DnsResolverPolicy refresh() { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverPolicies() - .getByResourceGroupWithResponse(resourceGroupName, dnsResolverPolicyName, Context.NONE) - .getValue(); - return this; - } - - public DnsResolverPolicy refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverPolicies() - .getByResourceGroupWithResponse(resourceGroupName, dnsResolverPolicyName, context) - .getValue(); - return this; - } - - public DnsResolverPolicyImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public DnsResolverPolicyImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public DnsResolverPolicyImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public DnsResolverPolicyImpl withIfMatch(String ifMatch) { - if (isInCreateMode()) { - this.createIfMatch = ifMatch; - return this; - } else { - this.updateIfMatch = ifMatch; - return this; - } - } - - public DnsResolverPolicyImpl withIfNoneMatch(String ifNoneMatch) { - this.createIfNoneMatch = ifNoneMatch; - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyVirtualNetworkLinkImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyVirtualNetworkLinkImpl.java deleted file mode 100644 index 682cd57bc24e..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyVirtualNetworkLinkImpl.java +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SubResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLink; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLinkPatch; -import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; -import java.util.Collections; -import java.util.Map; - -public final class DnsResolverPolicyVirtualNetworkLinkImpl implements DnsResolverPolicyVirtualNetworkLink, - DnsResolverPolicyVirtualNetworkLink.Definition, DnsResolverPolicyVirtualNetworkLink.Update { - private DnsResolverPolicyVirtualNetworkLinkInner innerObject; - - private final com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public SubResource virtualNetwork() { - return this.innerModel().virtualNetwork(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DnsResolverPolicyVirtualNetworkLinkInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.dnsresolver.DnsResolverManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String dnsResolverPolicyName; - - private String dnsResolverPolicyVirtualNetworkLinkName; - - private String createIfMatch; - - private String createIfNoneMatch; - - private String updateIfMatch; - - private DnsResolverPolicyVirtualNetworkLinkPatch updateParameters; - - public DnsResolverPolicyVirtualNetworkLinkImpl withExistingDnsResolverPolicy(String resourceGroupName, - String dnsResolverPolicyName) { - this.resourceGroupName = resourceGroupName; - this.dnsResolverPolicyName = dnsResolverPolicyName; - return this; - } - - public DnsResolverPolicyVirtualNetworkLink create() { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverPolicyVirtualNetworkLinks() - .createOrUpdate(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - this.innerModel(), createIfMatch, createIfNoneMatch, Context.NONE); - return this; - } - - public DnsResolverPolicyVirtualNetworkLink create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverPolicyVirtualNetworkLinks() - .createOrUpdate(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - this.innerModel(), createIfMatch, createIfNoneMatch, context); - return this; - } - - DnsResolverPolicyVirtualNetworkLinkImpl(String name, - com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager) { - this.innerObject = new DnsResolverPolicyVirtualNetworkLinkInner(); - this.serviceManager = serviceManager; - this.dnsResolverPolicyVirtualNetworkLinkName = name; - this.createIfMatch = null; - this.createIfNoneMatch = null; - } - - public DnsResolverPolicyVirtualNetworkLinkImpl update() { - this.updateIfMatch = null; - this.updateParameters = new DnsResolverPolicyVirtualNetworkLinkPatch(); - return this; - } - - public DnsResolverPolicyVirtualNetworkLink apply() { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverPolicyVirtualNetworkLinks() - .update(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, updateParameters, - updateIfMatch, Context.NONE); - return this; - } - - public DnsResolverPolicyVirtualNetworkLink apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverPolicyVirtualNetworkLinks() - .update(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, updateParameters, - updateIfMatch, context); - return this; - } - - DnsResolverPolicyVirtualNetworkLinkImpl(DnsResolverPolicyVirtualNetworkLinkInner innerObject, - com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsResolverPolicies"); - this.dnsResolverPolicyVirtualNetworkLinkName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "virtualNetworkLinks"); - } - - public DnsResolverPolicyVirtualNetworkLink refresh() { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverPolicyVirtualNetworkLinks() - .getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - Context.NONE) - .getValue(); - return this; - } - - public DnsResolverPolicyVirtualNetworkLink refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDnsResolverPolicyVirtualNetworkLinks() - .getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, context) - .getValue(); - return this; - } - - public DnsResolverPolicyVirtualNetworkLinkImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public DnsResolverPolicyVirtualNetworkLinkImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public DnsResolverPolicyVirtualNetworkLinkImpl withVirtualNetwork(SubResource virtualNetwork) { - this.innerModel().withVirtualNetwork(virtualNetwork); - return this; - } - - public DnsResolverPolicyVirtualNetworkLinkImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public DnsResolverPolicyVirtualNetworkLinkImpl withIfMatch(String ifMatch) { - if (isInCreateMode()) { - this.createIfMatch = ifMatch; - return this; - } else { - this.updateIfMatch = ifMatch; - return this; - } - } - - public DnsResolverPolicyVirtualNetworkLinkImpl withIfNoneMatch(String ifNoneMatch) { - this.createIfNoneMatch = ifNoneMatch; - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyVirtualNetworkLinksClientImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyVirtualNetworkLinksClientImpl.java deleted file mode 100644 index 771ad2288800..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyVirtualNetworkLinksClientImpl.java +++ /dev/null @@ -1,1566 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLinkListResult; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLinkPatch; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * DnsResolverPolicyVirtualNetworkLinksClient. - */ -public final class DnsResolverPolicyVirtualNetworkLinksClientImpl - implements DnsResolverPolicyVirtualNetworkLinksClient { - /** - * The proxy service used to perform REST calls. - */ - private final DnsResolverPolicyVirtualNetworkLinksService service; - - /** - * The service client containing this operation class. - */ - private final DnsResolverManagementClientImpl client; - - /** - * Initializes an instance of DnsResolverPolicyVirtualNetworkLinksClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DnsResolverPolicyVirtualNetworkLinksClientImpl(DnsResolverManagementClientImpl client) { - this.service = RestProxy.create(DnsResolverPolicyVirtualNetworkLinksService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DnsResolverManagementClientDnsResolverPolicyVirtualNetworkLinks to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DnsResolverManagemen") - public interface DnsResolverPolicyVirtualNetworkLinksService { - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @PathParam("dnsResolverPolicyVirtualNetworkLinkName") String dnsResolverPolicyVirtualNetworkLinkName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") DnsResolverPolicyVirtualNetworkLinkInner parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @PathParam("dnsResolverPolicyVirtualNetworkLinkName") String dnsResolverPolicyVirtualNetworkLinkName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") DnsResolverPolicyVirtualNetworkLinkPatch parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @PathParam("dnsResolverPolicyVirtualNetworkLinkName") String dnsResolverPolicyVirtualNetworkLinkName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @PathParam("dnsResolverPolicyVirtualNetworkLinkName") String dnsResolverPolicyVirtualNetworkLinkName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - DnsResolverPolicyVirtualNetworkLinkInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - DnsResolverPolicyVirtualNetworkLinkInner parameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, this.client.getApiVersion(), ifMatch, - ifNoneMatch, parameters, accept, context); - } - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverPolicyVirtualNetworkLinkInner> - beginCreateOrUpdateAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkInner parameters, - String ifMatch, String ifNoneMatch) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, parameters, ifMatch, ifNoneMatch); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverPolicyVirtualNetworkLinkInner.class, - DnsResolverPolicyVirtualNetworkLinkInner.class, this.client.getContext()); - } - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverPolicyVirtualNetworkLinkInner> - beginCreateOrUpdateAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, parameters, ifMatch, ifNoneMatch); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverPolicyVirtualNetworkLinkInner.class, - DnsResolverPolicyVirtualNetworkLinkInner.class, this.client.getContext()); - } - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverPolicyVirtualNetworkLinkInner> - beginCreateOrUpdateAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkInner parameters, - String ifMatch, String ifNoneMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, parameters, ifMatch, ifNoneMatch, context); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverPolicyVirtualNetworkLinkInner.class, - DnsResolverPolicyVirtualNetworkLinkInner.class, context); - } - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsResolverPolicyVirtualNetworkLinkInner> - beginCreateOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return this - .beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - parameters, ifMatch, ifNoneMatch) - .getSyncPoller(); - } - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsResolverPolicyVirtualNetworkLinkInner> - beginCreateOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkInner parameters, - String ifMatch, String ifNoneMatch, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - parameters, ifMatch, ifNoneMatch, context) - .getSyncPoller(); - } - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - DnsResolverPolicyVirtualNetworkLinkInner parameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, - dnsResolverPolicyVirtualNetworkLinkName, parameters, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - DnsResolverPolicyVirtualNetworkLinkInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, - dnsResolverPolicyVirtualNetworkLinkName, parameters, ifMatch, ifNoneMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - DnsResolverPolicyVirtualNetworkLinkInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, - dnsResolverPolicyVirtualNetworkLinkName, parameters, ifMatch, ifNoneMatch, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverPolicyVirtualNetworkLinkInner createOrUpdate(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - DnsResolverPolicyVirtualNetworkLinkInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - parameters, ifMatch, ifNoneMatch).block(); - } - - /** - * Creates or updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverPolicyVirtualNetworkLinkInner createOrUpdate(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - DnsResolverPolicyVirtualNetworkLinkInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return createOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - parameters, ifMatch, ifNoneMatch, context).block(); - } - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - DnsResolverPolicyVirtualNetworkLinkPatch parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - this.client.getApiVersion(), ifMatch, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - DnsResolverPolicyVirtualNetworkLinkPatch parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, this.client.getApiVersion(), ifMatch, - parameters, accept, context); - } - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverPolicyVirtualNetworkLinkInner> - beginUpdateAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch parameters, - String ifMatch) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, dnsResolverPolicyName, - dnsResolverPolicyVirtualNetworkLinkName, parameters, ifMatch); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverPolicyVirtualNetworkLinkInner.class, - DnsResolverPolicyVirtualNetworkLinkInner.class, this.client.getContext()); - } - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverPolicyVirtualNetworkLinkInner> - beginUpdateAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch parameters) { - final String ifMatch = null; - Mono>> mono = updateWithResponseAsync(resourceGroupName, dnsResolverPolicyName, - dnsResolverPolicyVirtualNetworkLinkName, parameters, ifMatch); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverPolicyVirtualNetworkLinkInner.class, - DnsResolverPolicyVirtualNetworkLinkInner.class, this.client.getContext()); - } - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsResolverPolicyVirtualNetworkLinkInner> - beginUpdateAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch parameters, - String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, dnsResolverPolicyName, - dnsResolverPolicyVirtualNetworkLinkName, parameters, ifMatch, context); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), DnsResolverPolicyVirtualNetworkLinkInner.class, - DnsResolverPolicyVirtualNetworkLinkInner.class, context); - } - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsResolverPolicyVirtualNetworkLinkInner> - beginUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch parameters) { - final String ifMatch = null; - return this - .beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - parameters, ifMatch) - .getSyncPoller(); - } - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsResolverPolicyVirtualNetworkLinkInner> - beginUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch parameters, - String ifMatch, Context context) { - return this - .beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - parameters, ifMatch, context) - .getSyncPoller(); - } - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - DnsResolverPolicyVirtualNetworkLinkPatch parameters, String ifMatch) { - return beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - parameters, ifMatch).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - DnsResolverPolicyVirtualNetworkLinkPatch parameters) { - final String ifMatch = null; - return beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - parameters, ifMatch).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - DnsResolverPolicyVirtualNetworkLinkPatch parameters, String ifMatch, Context context) { - return beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - parameters, ifMatch, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverPolicyVirtualNetworkLinkInner update(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch parameters) { - final String ifMatch = null; - return updateAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - parameters, ifMatch).block(); - } - - /** - * Updates a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverPolicyVirtualNetworkLinkInner update(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch parameters, - String ifMatch, Context context) { - return updateAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - parameters, ifMatch, context).block(); - } - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, String ifMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - this.client.getApiVersion(), ifMatch, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, this.client.getApiVersion(), ifMatch, - accept, context); - } - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, String ifMatch) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, dnsResolverPolicyName, - dnsResolverPolicyVirtualNetworkLinkName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName) { - final String ifMatch = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, dnsResolverPolicyName, - dnsResolverPolicyVirtualNetworkLinkName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, dnsResolverPolicyName, - dnsResolverPolicyVirtualNetworkLinkName, ifMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName) { - final String ifMatch = null; - return this - .beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - ifMatch) - .getSyncPoller(); - } - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, String ifMatch, Context context) { - return this - .beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - ifMatch, context) - .getSyncPoller(); - } - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, String ifMatch) { - return beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - ifMatch).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName) { - final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - ifMatch).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, String ifMatch, Context context) { - return beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - ifMatch, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName) { - final String ifMatch = null; - deleteAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, ifMatch).block(); - } - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, String ifMatch, Context context) { - deleteAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, ifMatch, context) - .block(); - } - - /** - * Gets properties of a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy virtual network link along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets properties of a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy virtual network link along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, this.client.getApiVersion(), accept, - context); - } - - /** - * Gets properties of a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy virtual network link on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName) { - return getWithResponseAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets properties of a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy virtual network link along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, Context context) { - return getWithResponseAsync(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - context).block(); - } - - /** - * Gets properties of a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy virtual network link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverPolicyVirtualNetworkLinkInner get(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName) { - return getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - Context.NONE).getValue(); - } - - /** - * Lists DNS resolver policy virtual network links. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver policy virtual network links along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String dnsResolverPolicyName, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverPolicyName, this.client.getApiVersion(), top, accept, context)) - .>map( - res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists DNS resolver policy virtual network links. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policy virtual network links along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String dnsResolverPolicyName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, - this.client.getApiVersion(), top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists DNS resolver policy virtual network links. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver policy virtual network links as paginated - * response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, - String dnsResolverPolicyName, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, dnsResolverPolicyName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists DNS resolver policy virtual network links. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver policy virtual network links as paginated - * response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, - String dnsResolverPolicyName) { - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, dnsResolverPolicyName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists DNS resolver policy virtual network links. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policy virtual network links as paginated - * response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, - String dnsResolverPolicyName, Integer top, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, dnsResolverPolicyName, top, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists DNS resolver policy virtual network links. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver policy virtual network links as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, - String dnsResolverPolicyName) { - final Integer top = null; - return new PagedIterable<>(listAsync(resourceGroupName, dnsResolverPolicyName, top)); - } - - /** - * Lists DNS resolver policy virtual network links. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policy virtual network links as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, - String dnsResolverPolicyName, Integer top, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, dnsResolverPolicyName, top, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS resolver policy virtual network links along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policy virtual network links along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyVirtualNetworkLinksImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyVirtualNetworkLinksImpl.java deleted file mode 100644 index e49f4bf35246..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyVirtualNetworkLinksImpl.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLink; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLinks; - -public final class DnsResolverPolicyVirtualNetworkLinksImpl implements DnsResolverPolicyVirtualNetworkLinks { - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverPolicyVirtualNetworkLinksImpl.class); - - private final DnsResolverPolicyVirtualNetworkLinksClient innerClient; - - private final com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager; - - public DnsResolverPolicyVirtualNetworkLinksImpl(DnsResolverPolicyVirtualNetworkLinksClient innerClient, - com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public void delete(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName) { - this.serviceClient().delete(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName); - } - - public void delete(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName, String ifMatch, Context context) { - this.serviceClient() - .delete(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, ifMatch, - context); - } - - public Response getWithResponse(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DnsResolverPolicyVirtualNetworkLinkImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DnsResolverPolicyVirtualNetworkLink get(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName) { - DnsResolverPolicyVirtualNetworkLinkInner inner = this.serviceClient() - .get(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName); - if (inner != null) { - return new DnsResolverPolicyVirtualNetworkLinkImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, - String dnsResolverPolicyName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, dnsResolverPolicyName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new DnsResolverPolicyVirtualNetworkLinkImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, - String dnsResolverPolicyName, Integer top, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, dnsResolverPolicyName, top, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new DnsResolverPolicyVirtualNetworkLinkImpl(inner1, this.manager())); - } - - public DnsResolverPolicyVirtualNetworkLink getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverPolicies"); - if (dnsResolverPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverPolicies'.", id))); - } - String dnsResolverPolicyVirtualNetworkLinkName - = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworkLinks"); - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworkLinks'.", id))); - } - return this - .getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverPolicies"); - if (dnsResolverPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverPolicies'.", id))); - } - String dnsResolverPolicyVirtualNetworkLinkName - = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworkLinks"); - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworkLinks'.", id))); - } - return this.getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, - context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverPolicies"); - if (dnsResolverPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverPolicies'.", id))); - } - String dnsResolverPolicyVirtualNetworkLinkName - = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworkLinks"); - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworkLinks'.", id))); - } - String localIfMatch = null; - this.delete(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, localIfMatch, - Context.NONE); - } - - public void deleteByIdWithResponse(String id, String ifMatch, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverPolicies"); - if (dnsResolverPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverPolicies'.", id))); - } - String dnsResolverPolicyVirtualNetworkLinkName - = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworkLinks"); - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworkLinks'.", id))); - } - this.delete(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, ifMatch, - context); - } - - private DnsResolverPolicyVirtualNetworkLinksClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.dnsresolver.DnsResolverManager manager() { - return this.serviceManager; - } - - public DnsResolverPolicyVirtualNetworkLinkImpl define(String name) { - return new DnsResolverPolicyVirtualNetworkLinkImpl(name, this.manager()); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsSecurityRuleImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsSecurityRuleImpl.java deleted file mode 100644 index 49122e34e8af..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsSecurityRuleImpl.java +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SubResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRuleInner; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRule; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRulePatch; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; -import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class DnsSecurityRuleImpl implements DnsSecurityRule, DnsSecurityRule.Definition, DnsSecurityRule.Update { - private DnsSecurityRuleInner innerObject; - - private final com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public int priority() { - return this.innerModel().priority(); - } - - public DnsSecurityRuleAction action() { - return this.innerModel().action(); - } - - public List dnsResolverDomainLists() { - List inner = this.innerModel().dnsResolverDomainLists(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public DnsSecurityRuleState dnsSecurityRuleState() { - return this.innerModel().dnsSecurityRuleState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DnsSecurityRuleInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.dnsresolver.DnsResolverManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String dnsResolverPolicyName; - - private String dnsSecurityRuleName; - - private String createIfMatch; - - private String createIfNoneMatch; - - private String updateIfMatch; - - private DnsSecurityRulePatch updateParameters; - - public DnsSecurityRuleImpl withExistingDnsResolverPolicy(String resourceGroupName, String dnsResolverPolicyName) { - this.resourceGroupName = resourceGroupName; - this.dnsResolverPolicyName = dnsResolverPolicyName; - return this; - } - - public DnsSecurityRule create() { - this.innerObject = serviceManager.serviceClient() - .getDnsSecurityRules() - .createOrUpdate(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, this.innerModel(), - createIfMatch, createIfNoneMatch, Context.NONE); - return this; - } - - public DnsSecurityRule create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDnsSecurityRules() - .createOrUpdate(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, this.innerModel(), - createIfMatch, createIfNoneMatch, context); - return this; - } - - DnsSecurityRuleImpl(String name, com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager) { - this.innerObject = new DnsSecurityRuleInner(); - this.serviceManager = serviceManager; - this.dnsSecurityRuleName = name; - this.createIfMatch = null; - this.createIfNoneMatch = null; - } - - public DnsSecurityRuleImpl update() { - this.updateIfMatch = null; - this.updateParameters = new DnsSecurityRulePatch(); - return this; - } - - public DnsSecurityRule apply() { - this.innerObject = serviceManager.serviceClient() - .getDnsSecurityRules() - .update(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, updateParameters, updateIfMatch, - Context.NONE); - return this; - } - - public DnsSecurityRule apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDnsSecurityRules() - .update(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, updateParameters, updateIfMatch, - context); - return this; - } - - DnsSecurityRuleImpl(DnsSecurityRuleInner innerObject, - com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsResolverPolicies"); - this.dnsSecurityRuleName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsSecurityRules"); - } - - public DnsSecurityRule refresh() { - this.innerObject = serviceManager.serviceClient() - .getDnsSecurityRules() - .getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, Context.NONE) - .getValue(); - return this; - } - - public DnsSecurityRule refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDnsSecurityRules() - .getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, context) - .getValue(); - return this; - } - - public DnsSecurityRuleImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public DnsSecurityRuleImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public DnsSecurityRuleImpl withPriority(int priority) { - this.innerModel().withPriority(priority); - return this; - } - - public DnsSecurityRuleImpl withAction(DnsSecurityRuleAction action) { - if (isInCreateMode()) { - this.innerModel().withAction(action); - return this; - } else { - this.updateParameters.withAction(action); - return this; - } - } - - public DnsSecurityRuleImpl withDnsResolverDomainLists(List dnsResolverDomainLists) { - if (isInCreateMode()) { - this.innerModel().withDnsResolverDomainLists(dnsResolverDomainLists); - return this; - } else { - this.updateParameters.withDnsResolverDomainLists(dnsResolverDomainLists); - return this; - } - } - - public DnsSecurityRuleImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public DnsSecurityRuleImpl withDnsSecurityRuleState(DnsSecurityRuleState dnsSecurityRuleState) { - if (isInCreateMode()) { - this.innerModel().withDnsSecurityRuleState(dnsSecurityRuleState); - return this; - } else { - this.updateParameters.withDnsSecurityRuleState(dnsSecurityRuleState); - return this; - } - } - - public DnsSecurityRuleImpl withIfMatch(String ifMatch) { - if (isInCreateMode()) { - this.createIfMatch = ifMatch; - return this; - } else { - this.updateIfMatch = ifMatch; - return this; - } - } - - public DnsSecurityRuleImpl withIfNoneMatch(String ifNoneMatch) { - this.createIfNoneMatch = ifNoneMatch; - return this; - } - - public DnsSecurityRuleImpl withPriority(Integer priority) { - this.updateParameters.withPriority(priority); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsSecurityRulesClientImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsSecurityRulesClientImpl.java deleted file mode 100644 index c2d3be877de3..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsSecurityRulesClientImpl.java +++ /dev/null @@ -1,1469 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRuleInner; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleListResult; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRulePatch; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in DnsSecurityRulesClient. - */ -public final class DnsSecurityRulesClientImpl implements DnsSecurityRulesClient { - /** - * The proxy service used to perform REST calls. - */ - private final DnsSecurityRulesService service; - - /** - * The service client containing this operation class. - */ - private final DnsResolverManagementClientImpl client; - - /** - * Initializes an instance of DnsSecurityRulesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DnsSecurityRulesClientImpl(DnsResolverManagementClientImpl client) { - this.service - = RestProxy.create(DnsSecurityRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DnsResolverManagementClientDnsSecurityRules to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DnsResolverManagemen") - public interface DnsSecurityRulesService { - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @PathParam("dnsSecurityRuleName") String dnsSecurityRuleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") DnsSecurityRuleInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @PathParam("dnsSecurityRuleName") String dnsSecurityRuleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @BodyParam("application/json") DnsSecurityRulePatch parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @PathParam("dnsSecurityRuleName") String dnsSecurityRuleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @PathParam("dnsSecurityRuleName") String dnsSecurityRuleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRuleInner parameters, String ifMatch, - String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), ifMatch, - ifNoneMatch, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRuleInner parameters, String ifMatch, - String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, - accept, context); - } - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsSecurityRuleInner> beginCreateOrUpdateAsync( - String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - DnsSecurityRuleInner parameters, String ifMatch, String ifNoneMatch) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, parameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DnsSecurityRuleInner.class, DnsSecurityRuleInner.class, this.client.getContext()); - } - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsSecurityRuleInner> beginCreateOrUpdateAsync( - String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - DnsSecurityRuleInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, parameters, ifMatch, ifNoneMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DnsSecurityRuleInner.class, DnsSecurityRuleInner.class, this.client.getContext()); - } - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsSecurityRuleInner> beginCreateOrUpdateAsync( - String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - DnsSecurityRuleInner parameters, String ifMatch, String ifNoneMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, parameters, ifMatch, ifNoneMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DnsSecurityRuleInner.class, DnsSecurityRuleInner.class, context); - } - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsSecurityRuleInner> beginCreateOrUpdate( - String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - DnsSecurityRuleInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return this - .beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, - ifMatch, ifNoneMatch) - .getSyncPoller(); - } - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsSecurityRuleInner> beginCreateOrUpdate( - String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - DnsSecurityRuleInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, - ifMatch, ifNoneMatch, context) - .getSyncPoller(); - } - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, DnsSecurityRuleInner parameters, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, - ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, DnsSecurityRuleInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, - ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, DnsSecurityRuleInner parameters, String ifMatch, String ifNoneMatch, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, - ifMatch, ifNoneMatch, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsSecurityRuleInner createOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, DnsSecurityRuleInner parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, ifMatch, - ifNoneMatch).block(); - } - - /** - * Creates or updates a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the CreateOrUpdate operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsSecurityRuleInner createOrUpdate(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, DnsSecurityRuleInner parameters, String ifMatch, String ifNoneMatch, - Context context) { - return createOrUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, ifMatch, - ifNoneMatch, context).block(); - } - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRulePatch parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), ifMatch, - parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRulePatch parameters, String ifMatch, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), ifMatch, parameters, accept, - context); - } - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsSecurityRuleInner> beginUpdateAsync( - String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - DnsSecurityRulePatch parameters, String ifMatch) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, dnsResolverPolicyName, - dnsSecurityRuleName, parameters, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DnsSecurityRuleInner.class, DnsSecurityRuleInner.class, this.client.getContext()); - } - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsSecurityRuleInner> beginUpdateAsync( - String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - DnsSecurityRulePatch parameters) { - final String ifMatch = null; - Mono>> mono = updateWithResponseAsync(resourceGroupName, dnsResolverPolicyName, - dnsSecurityRuleName, parameters, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DnsSecurityRuleInner.class, DnsSecurityRuleInner.class, this.client.getContext()); - } - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DnsSecurityRuleInner> beginUpdateAsync( - String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - DnsSecurityRulePatch parameters, String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, dnsResolverPolicyName, - dnsSecurityRuleName, parameters, ifMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DnsSecurityRuleInner.class, DnsSecurityRuleInner.class, context); - } - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsSecurityRuleInner> beginUpdate(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRulePatch parameters) { - final String ifMatch = null; - return this.beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, ifMatch) - .getSyncPoller(); - } - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DnsSecurityRuleInner> beginUpdate(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRulePatch parameters, String ifMatch, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, ifMatch, - context) - .getSyncPoller(); - } - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, DnsSecurityRulePatch parameters, String ifMatch) { - return beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, ifMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, DnsSecurityRulePatch parameters) { - final String ifMatch = null; - return beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, ifMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, DnsSecurityRulePatch parameters, String ifMatch, Context context) { - return beginUpdateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, ifMatch, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsSecurityRuleInner update(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, DnsSecurityRulePatch parameters) { - final String ifMatch = null; - return updateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, ifMatch).block(); - } - - /** - * Updates a DNS security rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param parameters Parameters supplied to the Update operation. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a DNS security rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsSecurityRuleInner update(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, DnsSecurityRulePatch parameters, String ifMatch, Context context) { - return updateAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, parameters, ifMatch, context) - .block(); - } - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName, String ifMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), ifMatch, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), ifMatch, accept, context); - } - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, String ifMatch) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName) { - final String ifMatch = null; - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName) { - final String ifMatch = null; - return this.beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch) - .getSyncPoller(); - } - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, String ifMatch, Context context) { - return this.beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, context) - .getSyncPoller(); - } - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - String ifMatch) { - return beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName) { - final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - String ifMatch, Context context) { - return beginDeleteAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName) { - final String ifMatch = null; - deleteAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch).block(); - } - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - String ifMatch, Context context) { - deleteAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, context).block(); - } - - /** - * Gets properties of a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS security rule for a DNS resolver policy along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets properties of a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS security rule for a DNS resolver policy along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String dnsResolverPolicyName, String dnsSecurityRuleName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets properties of a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS security rule for a DNS resolver policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName) { - return getWithResponseAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets properties of a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS security rule for a DNS resolver policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, Context context) { - return getWithResponseAsync(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, context).block(); - } - - /** - * Gets properties of a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS security rule for a DNS resolver policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsSecurityRuleInner get(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName) { - return getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, Context.NONE).getValue(); - } - - /** - * Lists DNS security rules for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS security rules within a DNS resolver policy along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String dnsResolverPolicyName, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverPolicyName, this.client.getApiVersion(), top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists DNS security rules for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS security rules within a DNS resolver policy along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String dnsResolverPolicyName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, - this.client.getApiVersion(), top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists DNS security rules for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS security rules within a DNS resolver policy as paginated - * response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String dnsResolverPolicyName, - Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, dnsResolverPolicyName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists DNS security rules for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS security rules within a DNS resolver policy as paginated - * response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String dnsResolverPolicyName) { - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, dnsResolverPolicyName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists DNS security rules for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS security rules within a DNS resolver policy as paginated - * response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String dnsResolverPolicyName, - Integer top, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, dnsResolverPolicyName, top, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists DNS security rules for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS security rules within a DNS resolver policy as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String dnsResolverPolicyName) { - final Integer top = null; - return new PagedIterable<>(listAsync(resourceGroupName, dnsResolverPolicyName, top)); - } - - /** - * Lists DNS security rules for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS security rules within a DNS resolver policy as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String dnsResolverPolicyName, Integer top, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, dnsResolverPolicyName, top, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 to an enumeration operation on DNS security rules within a DNS resolver policy along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS security rules within a DNS resolver policy along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsSecurityRulesImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsSecurityRulesImpl.java deleted file mode 100644 index d9ea98ca255f..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsSecurityRulesImpl.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRuleInner; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRule; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRules; - -public final class DnsSecurityRulesImpl implements DnsSecurityRules { - private static final ClientLogger LOGGER = new ClientLogger(DnsSecurityRulesImpl.class); - - private final DnsSecurityRulesClient innerClient; - - private final com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager; - - public DnsSecurityRulesImpl(DnsSecurityRulesClient innerClient, - com.azure.resourcemanager.dnsresolver.DnsResolverManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName) { - this.serviceClient().delete(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName); - } - - public void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, - String ifMatch, Context context) { - this.serviceClient().delete(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, context); - } - - public Response getWithResponse(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DnsSecurityRuleImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DnsSecurityRule get(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName) { - DnsSecurityRuleInner inner - = this.serviceClient().get(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName); - if (inner != null) { - return new DnsSecurityRuleImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String dnsResolverPolicyName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, dnsResolverPolicyName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsSecurityRuleImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String dnsResolverPolicyName, Integer top, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, dnsResolverPolicyName, top, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsSecurityRuleImpl(inner1, this.manager())); - } - - public DnsSecurityRule getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverPolicies"); - if (dnsResolverPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverPolicies'.", id))); - } - String dnsSecurityRuleName = ResourceManagerUtils.getValueFromIdByName(id, "dnsSecurityRules"); - if (dnsSecurityRuleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsSecurityRules'.", id))); - } - return this.getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverPolicies"); - if (dnsResolverPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverPolicies'.", id))); - } - String dnsSecurityRuleName = ResourceManagerUtils.getValueFromIdByName(id, "dnsSecurityRules"); - if (dnsSecurityRuleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsSecurityRules'.", id))); - } - return this.getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverPolicies"); - if (dnsResolverPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverPolicies'.", id))); - } - String dnsSecurityRuleName = ResourceManagerUtils.getValueFromIdByName(id, "dnsSecurityRules"); - if (dnsSecurityRuleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsSecurityRules'.", id))); - } - String localIfMatch = null; - this.delete(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, localIfMatch, Context.NONE); - } - - public void deleteByIdWithResponse(String id, String ifMatch, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsResolverPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "dnsResolverPolicies"); - if (dnsResolverPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsResolverPolicies'.", id))); - } - String dnsSecurityRuleName = ResourceManagerUtils.getValueFromIdByName(id, "dnsSecurityRules"); - if (dnsSecurityRuleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsSecurityRules'.", id))); - } - this.delete(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, context); - } - - private DnsSecurityRulesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.dnsresolver.DnsResolverManager manager() { - return this.serviceManager; - } - - public DnsSecurityRuleImpl define(String name) { - return new DnsSecurityRuleImpl(name, this.manager()); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ActionType.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ActionType.java deleted file mode 100644 index 06314d2db3f1..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ActionType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of action to take. - */ -public final class ActionType extends ExpandableStringEnum { - /** - * Static value Allow for ActionType. - */ - public static final ActionType ALLOW = fromString("Allow"); - - /** - * Static value Alert for ActionType. - */ - public static final ActionType ALERT = fromString("Alert"); - - /** - * Static value Block for ActionType. - */ - public static final ActionType BLOCK = fromString("Block"); - - /** - * Creates a new instance of ActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionType() { - } - - /** - * Creates or finds a ActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionType. - */ - public static ActionType fromString(String name) { - return fromString(name, ActionType.class); - } - - /** - * Gets known ActionType values. - * - * @return known ActionType values. - */ - public static Collection values() { - return values(ActionType.class); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/BlockResponseCode.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/BlockResponseCode.java deleted file mode 100644 index 999b413dc71b..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/BlockResponseCode.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The response code for block actions. - */ -public final class BlockResponseCode extends ExpandableStringEnum { - /** - * Static value SERVFAIL for BlockResponseCode. - */ - public static final BlockResponseCode SERVFAIL = fromString("SERVFAIL"); - - /** - * Creates a new instance of BlockResponseCode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BlockResponseCode() { - } - - /** - * Creates or finds a BlockResponseCode from its string representation. - * - * @param name a name to look for. - * @return the corresponding BlockResponseCode. - */ - public static BlockResponseCode fromString(String name) { - return fromString(name, BlockResponseCode.class); - } - - /** - * Gets known BlockResponseCode values. - * - * @return known BlockResponseCode values. - */ - public static Collection values() { - return values(BlockResponseCode.class); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRuleset.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRuleset.java index 4d21d3087e0e..7438e627d6e3 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRuleset.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRuleset.java @@ -59,7 +59,7 @@ public interface DnsForwardingRuleset { String etag(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolver.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolver.java index 5feafd5ca811..63cdc9745d99 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolver.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolver.java @@ -58,7 +58,7 @@ public interface DnsResolver { String etag(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainList.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainList.java deleted file mode 100644 index a0d590416c17..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainList.java +++ /dev/null @@ -1,334 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of DnsResolverDomainList. - */ -public interface DnsResolverDomainList { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the etag property: ETag of the DNS resolver domain list. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the domains property: The domains in the domain list. - * - * @return the domains value. - */ - List domains(); - - /** - * Gets the provisioningState property: The current provisioning state of the DNS resolver domain list. This is a - * read-only property and any attempt to set this value will be ignored. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the resourceGuid property: The resourceGuid property of the DNS resolver domain list resource. - * - * @return the resourceGuid value. - */ - String resourceGuid(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListInner object. - * - * @return the inner object. - */ - DnsResolverDomainListInner innerModel(); - - /** - * The entirety of the DnsResolverDomainList definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithDomains, DefinitionStages.WithCreate { - } - - /** - * The DnsResolverDomainList definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DnsResolverDomainList definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the DnsResolverDomainList definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the DnsResolverDomainList definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithDomains withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the DnsResolverDomainList definition allowing to specify domains. - */ - interface WithDomains { - /** - * Specifies the domains property: The domains in the domain list.. - * - * @param domains The domains in the domain list. - * @return the next definition stage. - */ - WithCreate withDomains(List domains); - } - - /** - * The stage of the DnsResolverDomainList definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { - /** - * Executes the create request. - * - * @return the created resource. - */ - DnsResolverDomainList create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DnsResolverDomainList create(Context context); - } - - /** - * The stage of the DnsResolverDomainList definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the DnsResolverDomainList definition allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: ETag of the resource. Omit this value to always overwrite the current - * resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.. - * - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @return the next definition stage. - */ - WithCreate withIfMatch(String ifMatch); - } - - /** - * The stage of the DnsResolverDomainList definition allowing to specify ifNoneMatch. - */ - interface WithIfNoneMatch { - /** - * Specifies the ifNoneMatch property: Set to '*' to allow a new resource to be created, but to prevent - * updating an existing resource. Other values will be ignored.. - * - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @return the next definition stage. - */ - WithCreate withIfNoneMatch(String ifNoneMatch); - } - } - - /** - * Begins update for the DnsResolverDomainList resource. - * - * @return the stage of resource update. - */ - DnsResolverDomainList.Update update(); - - /** - * The template for DnsResolverDomainList update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithDomains, UpdateStages.WithIfMatch { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DnsResolverDomainList apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DnsResolverDomainList apply(Context context); - } - - /** - * The DnsResolverDomainList update stages. - */ - interface UpdateStages { - /** - * The stage of the DnsResolverDomainList update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Tags for DNS resolver domain list.. - * - * @param tags Tags for DNS resolver domain list. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the DnsResolverDomainList update allowing to specify domains. - */ - interface WithDomains { - /** - * Specifies the domains property: The domains in the domain list.. - * - * @param domains The domains in the domain list. - * @return the next definition stage. - */ - Update withDomains(List domains); - } - - /** - * The stage of the DnsResolverDomainList update allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: ETag of the resource. Omit this value to always overwrite the current - * resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.. - * - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @return the next definition stage. - */ - Update withIfMatch(String ifMatch); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DnsResolverDomainList refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DnsResolverDomainList refresh(Context context); -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainListPatch.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainListPatch.java deleted file mode 100644 index 479423c9e330..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainListPatch.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListPatchProperties; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Describes a DNS resolver domain list for PATCH operation. - */ -@Fluent -public final class DnsResolverDomainListPatch implements JsonSerializable { - /* - * Updatable properties of the DNS resolver policy virtual network link. - */ - private DnsResolverDomainListPatchProperties innerProperties; - - /* - * Tags for DNS resolver domain list. - */ - private Map tags; - - /** - * Creates an instance of DnsResolverDomainListPatch class. - */ - public DnsResolverDomainListPatch() { - } - - /** - * Get the innerProperties property: Updatable properties of the DNS resolver policy virtual network link. - * - * @return the innerProperties value. - */ - private DnsResolverDomainListPatchProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the tags property: Tags for DNS resolver domain list. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Tags for DNS resolver domain list. - * - * @param tags the tags value to set. - * @return the DnsResolverDomainListPatch object itself. - */ - public DnsResolverDomainListPatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the domains property: The domains in the domain list. - * - * @return the domains value. - */ - public List domains() { - return this.innerProperties() == null ? null : this.innerProperties().domains(); - } - - /** - * Set the domains property: The domains in the domain list. - * - * @param domains the domains value to set. - * @return the DnsResolverDomainListPatch object itself. - */ - public DnsResolverDomainListPatch withDomains(List domains) { - if (this.innerProperties() == null) { - this.innerProperties = new DnsResolverDomainListPatchProperties(); - } - this.innerProperties().withDomains(domains); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsResolverDomainListPatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsResolverDomainListPatch if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DnsResolverDomainListPatch. - */ - public static DnsResolverDomainListPatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsResolverDomainListPatch deserializedDnsResolverDomainListPatch = new DnsResolverDomainListPatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedDnsResolverDomainListPatch.innerProperties - = DnsResolverDomainListPatchProperties.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDnsResolverDomainListPatch.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedDnsResolverDomainListPatch; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainListResult.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainListResult.java deleted file mode 100644 index 8f05b33734d8..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListInner; -import java.io.IOException; -import java.util.List; - -/** - * The response to an enumeration operation on DNS resolver domain lists. - */ -@Fluent -public final class DnsResolverDomainListResult implements JsonSerializable { - /* - * Enumeration of the DNS resolver domain lists. - */ - private List value; - - /* - * The continuation token for the next page of results. - */ - private String nextLink; - - /** - * Creates an instance of DnsResolverDomainListResult class. - */ - public DnsResolverDomainListResult() { - } - - /** - * Get the value property: Enumeration of the DNS resolver domain lists. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Enumeration of the DNS resolver domain lists. - * - * @param value the value value to set. - * @return the DnsResolverDomainListResult object itself. - */ - public DnsResolverDomainListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token for the next page of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsResolverDomainListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsResolverDomainListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DnsResolverDomainListResult. - */ - public static DnsResolverDomainListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsResolverDomainListResult deserializedDnsResolverDomainListResult = new DnsResolverDomainListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DnsResolverDomainListInner.fromJson(reader1)); - deserializedDnsResolverDomainListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDnsResolverDomainListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsResolverDomainListResult; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainLists.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainLists.java deleted file mode 100644 index 17da5a17c694..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainLists.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of DnsResolverDomainLists. - */ -public interface DnsResolverDomainLists { - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain 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. - */ - void delete(String resourceGroupName, String dnsResolverDomainListName); - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String dnsResolverDomainListName, String ifMatch, Context context); - - /** - * Gets properties of a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain list. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver domain list along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, - String dnsResolverDomainListName, Context context); - - /** - * Gets properties of a DNS resolver domain list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverDomainListName The name of the DNS resolver domain 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 properties of a DNS resolver domain list. - */ - DnsResolverDomainList getByResourceGroup(String resourceGroupName, String dnsResolverDomainListName); - - /** - * Lists DNS resolver domain lists within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists DNS resolver domain lists within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, Context context); - - /** - * Lists DNS resolver domain lists in all resource groups of a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Lists DNS resolver domain lists in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(Integer top, Context context); - - /** - * Gets properties of a DNS resolver domain list. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver domain list along with {@link Response}. - */ - DnsResolverDomainList getById(String id); - - /** - * Gets properties of a DNS resolver domain list. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver domain list along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. - * - * @param id the resource ID. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, String ifMatch, Context context); - - /** - * Begins definition for a new DnsResolverDomainList resource. - * - * @param name resource name. - * @return the first stage of the new DnsResolverDomainList definition. - */ - DnsResolverDomainList.DefinitionStages.Blank define(String name); -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicies.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicies.java deleted file mode 100644 index 69c273c124ce..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicies.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.SubResource; -import com.azure.core.util.Context; - -/** - * Resource collection API of DnsResolverPolicies. - */ -public interface DnsResolverPolicies { - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String dnsResolverPolicyName); - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String dnsResolverPolicyName, String ifMatch, Context context); - - /** - * Gets properties of a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String dnsResolverPolicyName, - Context context); - - /** - * Gets properties of a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @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 properties of a DNS resolver policy. - */ - DnsResolverPolicy getByResourceGroup(String resourceGroupName, String dnsResolverPolicyName); - - /** - * Lists DNS resolver policies within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists DNS resolver policies within a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Integer top, Context context); - - /** - * Lists DNS resolver policies in all resource groups of a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Lists DNS resolver policies in all resource groups of a subscription. - * - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(Integer top, Context context); - - /** - * Lists DNS resolver policy resource IDs linked to a virtual network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName The name of the virtual network. - * @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 to an enumeration operation on sub-resources as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByVirtualNetwork(String resourceGroupName, String virtualNetworkName); - - /** - * Lists DNS resolver policy resource IDs linked to a virtual network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualNetworkName The name of the virtual network. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on sub-resources as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByVirtualNetwork(String resourceGroupName, String virtualNetworkName, - Context context); - - /** - * Gets properties of a DNS resolver policy. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy along with {@link Response}. - */ - DnsResolverPolicy getById(String id); - - /** - * Gets properties of a DNS resolver policy. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param id the resource ID. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, String ifMatch, Context context); - - /** - * Begins definition for a new DnsResolverPolicy resource. - * - * @param name resource name. - * @return the first stage of the new DnsResolverPolicy definition. - */ - DnsResolverPolicy.DefinitionStages.Blank define(String name); -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicy.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicy.java deleted file mode 100644 index 10759d53bd18..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicy.java +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyInner; -import java.util.Map; - -/** - * An immutable client-side representation of DnsResolverPolicy. - */ -public interface DnsResolverPolicy { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the etag property: ETag of the DNS resolver policy. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: The current provisioning state of the DNS resolver policy. This is a - * read-only property and any attempt to set this value will be ignored. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the resourceGuid property: The resourceGuid property of the DNS resolver policy resource. - * - * @return the resourceGuid value. - */ - String resourceGuid(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyInner object. - * - * @return the inner object. - */ - DnsResolverPolicyInner innerModel(); - - /** - * The entirety of the DnsResolverPolicy definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The DnsResolverPolicy definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DnsResolverPolicy definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the DnsResolverPolicy definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the DnsResolverPolicy definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the DnsResolverPolicy definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { - /** - * Executes the create request. - * - * @return the created resource. - */ - DnsResolverPolicy create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DnsResolverPolicy create(Context context); - } - - /** - * The stage of the DnsResolverPolicy definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the DnsResolverPolicy definition allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: ETag of the resource. Omit this value to always overwrite the current - * resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.. - * - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @return the next definition stage. - */ - WithCreate withIfMatch(String ifMatch); - } - - /** - * The stage of the DnsResolverPolicy definition allowing to specify ifNoneMatch. - */ - interface WithIfNoneMatch { - /** - * Specifies the ifNoneMatch property: Set to '*' to allow a new resource to be created, but to prevent - * updating an existing resource. Other values will be ignored.. - * - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @return the next definition stage. - */ - WithCreate withIfNoneMatch(String ifNoneMatch); - } - } - - /** - * Begins update for the DnsResolverPolicy resource. - * - * @return the stage of resource update. - */ - DnsResolverPolicy.Update update(); - - /** - * The template for DnsResolverPolicy update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIfMatch { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DnsResolverPolicy apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DnsResolverPolicy apply(Context context); - } - - /** - * The DnsResolverPolicy update stages. - */ - interface UpdateStages { - /** - * The stage of the DnsResolverPolicy update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Tags for DNS resolver policy.. - * - * @param tags Tags for DNS resolver policy. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the DnsResolverPolicy update allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: ETag of the resource. Omit this value to always overwrite the current - * resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.. - * - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @return the next definition stage. - */ - Update withIfMatch(String ifMatch); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DnsResolverPolicy refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DnsResolverPolicy refresh(Context context); -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyListResult.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyListResult.java deleted file mode 100644 index 5192919eff41..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyInner; -import java.io.IOException; -import java.util.List; - -/** - * The response to an enumeration operation on DNS resolver policies. - */ -@Fluent -public final class DnsResolverPolicyListResult implements JsonSerializable { - /* - * Enumeration of the DNS resolver policies. - */ - private List value; - - /* - * The continuation token for the next page of results. - */ - private String nextLink; - - /** - * Creates an instance of DnsResolverPolicyListResult class. - */ - public DnsResolverPolicyListResult() { - } - - /** - * Get the value property: Enumeration of the DNS resolver policies. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Enumeration of the DNS resolver policies. - * - * @param value the value value to set. - * @return the DnsResolverPolicyListResult object itself. - */ - public DnsResolverPolicyListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token for the next page of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsResolverPolicyListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsResolverPolicyListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DnsResolverPolicyListResult. - */ - public static DnsResolverPolicyListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsResolverPolicyListResult deserializedDnsResolverPolicyListResult = new DnsResolverPolicyListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DnsResolverPolicyInner.fromJson(reader1)); - deserializedDnsResolverPolicyListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDnsResolverPolicyListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsResolverPolicyListResult; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyPatch.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyPatch.java deleted file mode 100644 index 4a400ebcf128..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyPatch.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Describes a DNS resolver policy for PATCH operation. - */ -@Fluent -public final class DnsResolverPolicyPatch implements JsonSerializable { - /* - * Tags for DNS resolver policy. - */ - private Map tags; - - /** - * Creates an instance of DnsResolverPolicyPatch class. - */ - public DnsResolverPolicyPatch() { - } - - /** - * Get the tags property: Tags for DNS resolver policy. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Tags for DNS resolver policy. - * - * @param tags the tags value to set. - * @return the DnsResolverPolicyPatch object itself. - */ - public DnsResolverPolicyPatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsResolverPolicyPatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsResolverPolicyPatch if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DnsResolverPolicyPatch. - */ - public static DnsResolverPolicyPatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsResolverPolicyPatch deserializedDnsResolverPolicyPatch = new DnsResolverPolicyPatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDnsResolverPolicyPatch.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedDnsResolverPolicyPatch; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLink.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLink.java deleted file mode 100644 index 249d197dffcf..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLink.java +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SubResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkInner; -import java.util.Map; - -/** - * An immutable client-side representation of DnsResolverPolicyVirtualNetworkLink. - */ -public interface DnsResolverPolicyVirtualNetworkLink { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the etag property: ETag of the DNS resolver policy virtual network link. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the virtualNetwork property: The reference to the virtual network. This cannot be changed after creation. - * - * @return the virtualNetwork value. - */ - SubResource virtualNetwork(); - - /** - * Gets the provisioningState property: The current provisioning state of the DNS resolver policy virtual network - * link. This is a read-only property and any attempt to set this value will be ignored. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkInner - * object. - * - * @return the inner object. - */ - DnsResolverPolicyVirtualNetworkLinkInner innerModel(); - - /** - * The entirety of the DnsResolverPolicyVirtualNetworkLink definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithVirtualNetwork, DefinitionStages.WithCreate { - } - - /** - * The DnsResolverPolicyVirtualNetworkLink definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DnsResolverPolicyVirtualNetworkLink definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the DnsResolverPolicyVirtualNetworkLink definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - - /** - * The stage of the DnsResolverPolicyVirtualNetworkLink definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, dnsResolverPolicyName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @return the next definition stage. - */ - WithVirtualNetwork withExistingDnsResolverPolicy(String resourceGroupName, String dnsResolverPolicyName); - } - - /** - * The stage of the DnsResolverPolicyVirtualNetworkLink definition allowing to specify virtualNetwork. - */ - interface WithVirtualNetwork { - /** - * Specifies the virtualNetwork property: The reference to the virtual network. This cannot be changed after - * creation.. - * - * @param virtualNetwork The reference to the virtual network. This cannot be changed after creation. - * @return the next definition stage. - */ - WithCreate withVirtualNetwork(SubResource virtualNetwork); - } - - /** - * The stage of the DnsResolverPolicyVirtualNetworkLink definition which contains all the minimum required - * properties for the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { - /** - * Executes the create request. - * - * @return the created resource. - */ - DnsResolverPolicyVirtualNetworkLink create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DnsResolverPolicyVirtualNetworkLink create(Context context); - } - - /** - * The stage of the DnsResolverPolicyVirtualNetworkLink definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the DnsResolverPolicyVirtualNetworkLink definition allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: ETag of the resource. Omit this value to always overwrite the current - * resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.. - * - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @return the next definition stage. - */ - WithCreate withIfMatch(String ifMatch); - } - - /** - * The stage of the DnsResolverPolicyVirtualNetworkLink definition allowing to specify ifNoneMatch. - */ - interface WithIfNoneMatch { - /** - * Specifies the ifNoneMatch property: Set to '*' to allow a new resource to be created, but to prevent - * updating an existing resource. Other values will be ignored.. - * - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @return the next definition stage. - */ - WithCreate withIfNoneMatch(String ifNoneMatch); - } - } - - /** - * Begins update for the DnsResolverPolicyVirtualNetworkLink resource. - * - * @return the stage of resource update. - */ - DnsResolverPolicyVirtualNetworkLink.Update update(); - - /** - * The template for DnsResolverPolicyVirtualNetworkLink update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIfMatch { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DnsResolverPolicyVirtualNetworkLink apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DnsResolverPolicyVirtualNetworkLink apply(Context context); - } - - /** - * The DnsResolverPolicyVirtualNetworkLink update stages. - */ - interface UpdateStages { - /** - * The stage of the DnsResolverPolicyVirtualNetworkLink update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Tags for the DNS resolver policy virtual network link.. - * - * @param tags Tags for the DNS resolver policy virtual network link. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the DnsResolverPolicyVirtualNetworkLink update allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: ETag of the resource. Omit this value to always overwrite the current - * resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.. - * - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @return the next definition stage. - */ - Update withIfMatch(String ifMatch); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DnsResolverPolicyVirtualNetworkLink refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DnsResolverPolicyVirtualNetworkLink refresh(Context context); -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLinkListResult.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLinkListResult.java deleted file mode 100644 index b17e3e8fa7ea..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLinkListResult.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkInner; -import java.io.IOException; -import java.util.List; - -/** - * The response to an enumeration operation on DNS resolver policy virtual network links. - */ -@Fluent -public final class DnsResolverPolicyVirtualNetworkLinkListResult - implements JsonSerializable { - /* - * Enumeration of the DNS resolver policy virtual network links. - */ - private List value; - - /* - * The continuation token for the next page of results. - */ - private String nextLink; - - /** - * Creates an instance of DnsResolverPolicyVirtualNetworkLinkListResult class. - */ - public DnsResolverPolicyVirtualNetworkLinkListResult() { - } - - /** - * Get the value property: Enumeration of the DNS resolver policy virtual network links. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Enumeration of the DNS resolver policy virtual network links. - * - * @param value the value value to set. - * @return the DnsResolverPolicyVirtualNetworkLinkListResult object itself. - */ - public DnsResolverPolicyVirtualNetworkLinkListResult - withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token for the next page of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsResolverPolicyVirtualNetworkLinkListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsResolverPolicyVirtualNetworkLinkListResult if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DnsResolverPolicyVirtualNetworkLinkListResult. - */ - public static DnsResolverPolicyVirtualNetworkLinkListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsResolverPolicyVirtualNetworkLinkListResult deserializedDnsResolverPolicyVirtualNetworkLinkListResult - = new DnsResolverPolicyVirtualNetworkLinkListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DnsResolverPolicyVirtualNetworkLinkInner.fromJson(reader1)); - deserializedDnsResolverPolicyVirtualNetworkLinkListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDnsResolverPolicyVirtualNetworkLinkListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsResolverPolicyVirtualNetworkLinkListResult; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLinkPatch.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLinkPatch.java deleted file mode 100644 index 5a6fdc9a899b..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLinkPatch.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Describes a DNS resolver policy virtual network link for PATCH operation. - */ -@Fluent -public final class DnsResolverPolicyVirtualNetworkLinkPatch - implements JsonSerializable { - /* - * Tags for the DNS resolver policy virtual network link. - */ - private Map tags; - - /** - * Creates an instance of DnsResolverPolicyVirtualNetworkLinkPatch class. - */ - public DnsResolverPolicyVirtualNetworkLinkPatch() { - } - - /** - * Get the tags property: Tags for the DNS resolver policy virtual network link. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Tags for the DNS resolver policy virtual network link. - * - * @param tags the tags value to set. - * @return the DnsResolverPolicyVirtualNetworkLinkPatch object itself. - */ - public DnsResolverPolicyVirtualNetworkLinkPatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsResolverPolicyVirtualNetworkLinkPatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsResolverPolicyVirtualNetworkLinkPatch if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DnsResolverPolicyVirtualNetworkLinkPatch. - */ - public static DnsResolverPolicyVirtualNetworkLinkPatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsResolverPolicyVirtualNetworkLinkPatch deserializedDnsResolverPolicyVirtualNetworkLinkPatch - = new DnsResolverPolicyVirtualNetworkLinkPatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDnsResolverPolicyVirtualNetworkLinkPatch.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedDnsResolverPolicyVirtualNetworkLinkPatch; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLinks.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLinks.java deleted file mode 100644 index 7b76e023143c..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLinks.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of DnsResolverPolicyVirtualNetworkLinks. - */ -public interface DnsResolverPolicyVirtualNetworkLinks { - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName); - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - String ifMatch, Context context); - - /** - * Gets properties of a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy virtual network link along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, - String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, Context context); - - /** - * Gets properties of a DNS resolver policy virtual network link. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsResolverPolicyVirtualNetworkLinkName The name of the DNS resolver policy virtual network link for the - * DNS resolver policy. - * @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 properties of a DNS resolver policy virtual network link. - */ - DnsResolverPolicyVirtualNetworkLink get(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName); - - /** - * Lists DNS resolver policy virtual network links. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @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 to an enumeration operation on DNS resolver policy virtual network links as paginated - * response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String dnsResolverPolicyName); - - /** - * Lists DNS resolver policy virtual network links. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policy virtual network links as paginated - * response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String dnsResolverPolicyName, - Integer top, Context context); - - /** - * Gets properties of a DNS resolver policy virtual network link. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy virtual network link along with {@link Response}. - */ - DnsResolverPolicyVirtualNetworkLink getById(String id); - - /** - * Gets properties of a DNS resolver policy virtual network link. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS resolver policy virtual network link along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. - * - * @param id the resource ID. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, String ifMatch, Context context); - - /** - * Begins definition for a new DnsResolverPolicyVirtualNetworkLink resource. - * - * @param name resource name. - * @return the first stage of the new DnsResolverPolicyVirtualNetworkLink definition. - */ - DnsResolverPolicyVirtualNetworkLink.DefinitionStages.Blank define(String name); -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRule.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRule.java deleted file mode 100644 index 07565c484c4b..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRule.java +++ /dev/null @@ -1,433 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SubResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRuleInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of DnsSecurityRule. - */ -public interface DnsSecurityRule { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the etag property: ETag of the DNS security rule. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the priority property: The priority of the DNS security rule. - * - * @return the priority value. - */ - int priority(); - - /** - * Gets the action property: The action to take on DNS requests that match the DNS security rule. - * - * @return the action value. - */ - DnsSecurityRuleAction action(); - - /** - * Gets the dnsResolverDomainLists property: DNS resolver policy domains lists that the DNS security rule applies - * to. - * - * @return the dnsResolverDomainLists value. - */ - List dnsResolverDomainLists(); - - /** - * Gets the dnsSecurityRuleState property: The state of DNS security rule. - * - * @return the dnsSecurityRuleState value. - */ - DnsSecurityRuleState dnsSecurityRuleState(); - - /** - * Gets the provisioningState property: The current provisioning state of the DNS security rule. This is a read-only - * property and any attempt to set this value will be ignored. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRuleInner object. - * - * @return the inner object. - */ - DnsSecurityRuleInner innerModel(); - - /** - * The entirety of the DnsSecurityRule definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithPriority, DefinitionStages.WithAction, - DefinitionStages.WithDnsResolverDomainLists, DefinitionStages.WithCreate { - } - - /** - * The DnsSecurityRule definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DnsSecurityRule definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the DnsSecurityRule definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - - /** - * The stage of the DnsSecurityRule definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, dnsResolverPolicyName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @return the next definition stage. - */ - WithPriority withExistingDnsResolverPolicy(String resourceGroupName, String dnsResolverPolicyName); - } - - /** - * The stage of the DnsSecurityRule definition allowing to specify priority. - */ - interface WithPriority { - /** - * Specifies the priority property: The priority of the DNS security rule.. - * - * @param priority The priority of the DNS security rule. - * @return the next definition stage. - */ - WithAction withPriority(int priority); - } - - /** - * The stage of the DnsSecurityRule definition allowing to specify action. - */ - interface WithAction { - /** - * Specifies the action property: The action to take on DNS requests that match the DNS security rule.. - * - * @param action The action to take on DNS requests that match the DNS security rule. - * @return the next definition stage. - */ - WithDnsResolverDomainLists withAction(DnsSecurityRuleAction action); - } - - /** - * The stage of the DnsSecurityRule definition allowing to specify dnsResolverDomainLists. - */ - interface WithDnsResolverDomainLists { - /** - * Specifies the dnsResolverDomainLists property: DNS resolver policy domains lists that the DNS security - * rule applies to.. - * - * @param dnsResolverDomainLists DNS resolver policy domains lists that the DNS security rule applies to. - * @return the next definition stage. - */ - WithCreate withDnsResolverDomainLists(List dnsResolverDomainLists); - } - - /** - * The stage of the DnsSecurityRule definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithDnsSecurityRuleState, - DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { - /** - * Executes the create request. - * - * @return the created resource. - */ - DnsSecurityRule create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DnsSecurityRule create(Context context); - } - - /** - * The stage of the DnsSecurityRule definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the DnsSecurityRule definition allowing to specify dnsSecurityRuleState. - */ - interface WithDnsSecurityRuleState { - /** - * Specifies the dnsSecurityRuleState property: The state of DNS security rule.. - * - * @param dnsSecurityRuleState The state of DNS security rule. - * @return the next definition stage. - */ - WithCreate withDnsSecurityRuleState(DnsSecurityRuleState dnsSecurityRuleState); - } - - /** - * The stage of the DnsSecurityRule definition allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: ETag of the resource. Omit this value to always overwrite the current - * resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.. - * - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @return the next definition stage. - */ - WithCreate withIfMatch(String ifMatch); - } - - /** - * The stage of the DnsSecurityRule definition allowing to specify ifNoneMatch. - */ - interface WithIfNoneMatch { - /** - * Specifies the ifNoneMatch property: Set to '*' to allow a new resource to be created, but to prevent - * updating an existing resource. Other values will be ignored.. - * - * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing - * resource. Other values will be ignored. - * @return the next definition stage. - */ - WithCreate withIfNoneMatch(String ifNoneMatch); - } - } - - /** - * Begins update for the DnsSecurityRule resource. - * - * @return the stage of resource update. - */ - DnsSecurityRule.Update update(); - - /** - * The template for DnsSecurityRule update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithAction, UpdateStages.WithDnsResolverDomainLists, - UpdateStages.WithDnsSecurityRuleState, UpdateStages.WithPriority, UpdateStages.WithIfMatch { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DnsSecurityRule apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DnsSecurityRule apply(Context context); - } - - /** - * The DnsSecurityRule update stages. - */ - interface UpdateStages { - /** - * The stage of the DnsSecurityRule update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Tags for DNS security rule.. - * - * @param tags Tags for DNS security rule. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the DnsSecurityRule update allowing to specify action. - */ - interface WithAction { - /** - * Specifies the action property: The action to take on DNS requests that match the DNS security rule.. - * - * @param action The action to take on DNS requests that match the DNS security rule. - * @return the next definition stage. - */ - Update withAction(DnsSecurityRuleAction action); - } - - /** - * The stage of the DnsSecurityRule update allowing to specify dnsResolverDomainLists. - */ - interface WithDnsResolverDomainLists { - /** - * Specifies the dnsResolverDomainLists property: DNS resolver policy domains lists that the DNS security - * rule applies to.. - * - * @param dnsResolverDomainLists DNS resolver policy domains lists that the DNS security rule applies to. - * @return the next definition stage. - */ - Update withDnsResolverDomainLists(List dnsResolverDomainLists); - } - - /** - * The stage of the DnsSecurityRule update allowing to specify dnsSecurityRuleState. - */ - interface WithDnsSecurityRuleState { - /** - * Specifies the dnsSecurityRuleState property: The state of DNS security rule.. - * - * @param dnsSecurityRuleState The state of DNS security rule. - * @return the next definition stage. - */ - Update withDnsSecurityRuleState(DnsSecurityRuleState dnsSecurityRuleState); - } - - /** - * The stage of the DnsSecurityRule update allowing to specify priority. - */ - interface WithPriority { - /** - * Specifies the priority property: The priority of the DNS security rule.. - * - * @param priority The priority of the DNS security rule. - * @return the next definition stage. - */ - Update withPriority(Integer priority); - } - - /** - * The stage of the DnsSecurityRule update allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: ETag of the resource. Omit this value to always overwrite the current - * resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.. - * - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify - * the last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @return the next definition stage. - */ - Update withIfMatch(String ifMatch); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DnsSecurityRule refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DnsSecurityRule refresh(Context context); -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRuleAction.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRuleAction.java deleted file mode 100644 index 00352f47d8b3..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRuleAction.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The action to take on DNS requests that match the DNS security rule. - */ -@Fluent -public final class DnsSecurityRuleAction implements JsonSerializable { - /* - * The type of action to take. - */ - private ActionType actionType; - - /* - * The response code for block actions. - */ - private BlockResponseCode blockResponseCode; - - /** - * Creates an instance of DnsSecurityRuleAction class. - */ - public DnsSecurityRuleAction() { - } - - /** - * Get the actionType property: The type of action to take. - * - * @return the actionType value. - */ - public ActionType actionType() { - return this.actionType; - } - - /** - * Set the actionType property: The type of action to take. - * - * @param actionType the actionType value to set. - * @return the DnsSecurityRuleAction object itself. - */ - public DnsSecurityRuleAction withActionType(ActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the blockResponseCode property: The response code for block actions. - * - * @return the blockResponseCode value. - */ - public BlockResponseCode blockResponseCode() { - return this.blockResponseCode; - } - - /** - * Set the blockResponseCode property: The response code for block actions. - * - * @param blockResponseCode the blockResponseCode value to set. - * @return the DnsSecurityRuleAction object itself. - */ - public DnsSecurityRuleAction withBlockResponseCode(BlockResponseCode blockResponseCode) { - this.blockResponseCode = blockResponseCode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("actionType", this.actionType == null ? null : this.actionType.toString()); - jsonWriter.writeStringField("blockResponseCode", - this.blockResponseCode == null ? null : this.blockResponseCode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsSecurityRuleAction from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsSecurityRuleAction if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DnsSecurityRuleAction. - */ - public static DnsSecurityRuleAction fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsSecurityRuleAction deserializedDnsSecurityRuleAction = new DnsSecurityRuleAction(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("actionType".equals(fieldName)) { - deserializedDnsSecurityRuleAction.actionType = ActionType.fromString(reader.getString()); - } else if ("blockResponseCode".equals(fieldName)) { - deserializedDnsSecurityRuleAction.blockResponseCode - = BlockResponseCode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsSecurityRuleAction; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRuleListResult.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRuleListResult.java deleted file mode 100644 index f4df92bf0218..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRuleListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRuleInner; -import java.io.IOException; -import java.util.List; - -/** - * The response to an enumeration operation on DNS security rules within a DNS resolver policy. - */ -@Fluent -public final class DnsSecurityRuleListResult implements JsonSerializable { - /* - * Enumeration of the DNS security rules. - */ - private List value; - - /* - * The continuation token for the next page of results. - */ - private String nextLink; - - /** - * Creates an instance of DnsSecurityRuleListResult class. - */ - public DnsSecurityRuleListResult() { - } - - /** - * Get the value property: Enumeration of the DNS security rules. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Enumeration of the DNS security rules. - * - * @param value the value value to set. - * @return the DnsSecurityRuleListResult object itself. - */ - public DnsSecurityRuleListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token for the next page of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsSecurityRuleListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsSecurityRuleListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DnsSecurityRuleListResult. - */ - public static DnsSecurityRuleListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsSecurityRuleListResult deserializedDnsSecurityRuleListResult = new DnsSecurityRuleListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DnsSecurityRuleInner.fromJson(reader1)); - deserializedDnsSecurityRuleListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDnsSecurityRuleListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDnsSecurityRuleListResult; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRulePatch.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRulePatch.java deleted file mode 100644 index b4595b9020cf..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRulePatch.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SubResource; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRulePatchProperties; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Describes a DNS security rule for PATCH operation. - */ -@Fluent -public final class DnsSecurityRulePatch implements JsonSerializable { - /* - * Updatable properties of the DNS security rule. - */ - private DnsSecurityRulePatchProperties innerProperties; - - /* - * Tags for DNS security rule. - */ - private Map tags; - - /** - * Creates an instance of DnsSecurityRulePatch class. - */ - public DnsSecurityRulePatch() { - } - - /** - * Get the innerProperties property: Updatable properties of the DNS security rule. - * - * @return the innerProperties value. - */ - private DnsSecurityRulePatchProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the tags property: Tags for DNS security rule. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Tags for DNS security rule. - * - * @param tags the tags value to set. - * @return the DnsSecurityRulePatch object itself. - */ - public DnsSecurityRulePatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the action property: The action to take on DNS requests that match the DNS security rule. - * - * @return the action value. - */ - public DnsSecurityRuleAction action() { - return this.innerProperties() == null ? null : this.innerProperties().action(); - } - - /** - * Set the action property: The action to take on DNS requests that match the DNS security rule. - * - * @param action the action value to set. - * @return the DnsSecurityRulePatch object itself. - */ - public DnsSecurityRulePatch withAction(DnsSecurityRuleAction action) { - if (this.innerProperties() == null) { - this.innerProperties = new DnsSecurityRulePatchProperties(); - } - this.innerProperties().withAction(action); - return this; - } - - /** - * Get the dnsResolverDomainLists property: DNS resolver policy domains lists that the DNS security rule applies to. - * - * @return the dnsResolverDomainLists value. - */ - public List dnsResolverDomainLists() { - return this.innerProperties() == null ? null : this.innerProperties().dnsResolverDomainLists(); - } - - /** - * Set the dnsResolverDomainLists property: DNS resolver policy domains lists that the DNS security rule applies to. - * - * @param dnsResolverDomainLists the dnsResolverDomainLists value to set. - * @return the DnsSecurityRulePatch object itself. - */ - public DnsSecurityRulePatch withDnsResolverDomainLists(List dnsResolverDomainLists) { - if (this.innerProperties() == null) { - this.innerProperties = new DnsSecurityRulePatchProperties(); - } - this.innerProperties().withDnsResolverDomainLists(dnsResolverDomainLists); - return this; - } - - /** - * Get the dnsSecurityRuleState property: The state of DNS security rule. - * - * @return the dnsSecurityRuleState value. - */ - public DnsSecurityRuleState dnsSecurityRuleState() { - return this.innerProperties() == null ? null : this.innerProperties().dnsSecurityRuleState(); - } - - /** - * Set the dnsSecurityRuleState property: The state of DNS security rule. - * - * @param dnsSecurityRuleState the dnsSecurityRuleState value to set. - * @return the DnsSecurityRulePatch object itself. - */ - public DnsSecurityRulePatch withDnsSecurityRuleState(DnsSecurityRuleState dnsSecurityRuleState) { - if (this.innerProperties() == null) { - this.innerProperties = new DnsSecurityRulePatchProperties(); - } - this.innerProperties().withDnsSecurityRuleState(dnsSecurityRuleState); - return this; - } - - /** - * Get the priority property: The priority of the DNS security rule. - * - * @return the priority value. - */ - public Integer priority() { - return this.innerProperties() == null ? null : this.innerProperties().priority(); - } - - /** - * Set the priority property: The priority of the DNS security rule. - * - * @param priority the priority value to set. - * @return the DnsSecurityRulePatch object itself. - */ - public DnsSecurityRulePatch withPriority(Integer priority) { - if (this.innerProperties() == null) { - this.innerProperties = new DnsSecurityRulePatchProperties(); - } - this.innerProperties().withPriority(priority); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DnsSecurityRulePatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DnsSecurityRulePatch if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DnsSecurityRulePatch. - */ - public static DnsSecurityRulePatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DnsSecurityRulePatch deserializedDnsSecurityRulePatch = new DnsSecurityRulePatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedDnsSecurityRulePatch.innerProperties = DnsSecurityRulePatchProperties.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDnsSecurityRulePatch.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedDnsSecurityRulePatch; - }); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRuleState.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRuleState.java deleted file mode 100644 index 6f2f82ce8462..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRuleState.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The state of DNS security rule. - */ -public final class DnsSecurityRuleState extends ExpandableStringEnum { - /** - * Static value Enabled for DnsSecurityRuleState. - */ - public static final DnsSecurityRuleState ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for DnsSecurityRuleState. - */ - public static final DnsSecurityRuleState DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of DnsSecurityRuleState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DnsSecurityRuleState() { - } - - /** - * Creates or finds a DnsSecurityRuleState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DnsSecurityRuleState. - */ - public static DnsSecurityRuleState fromString(String name) { - return fromString(name, DnsSecurityRuleState.class); - } - - /** - * Gets known DnsSecurityRuleState values. - * - * @return known DnsSecurityRuleState values. - */ - public static Collection values() { - return values(DnsSecurityRuleState.class); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRules.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRules.java deleted file mode 100644 index 51a36ea7cdd0..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRules.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of DnsSecurityRules. - */ -public interface DnsSecurityRules { - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName); - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, String ifMatch, - Context context); - - /** - * Gets properties of a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS security rule for a DNS resolver policy along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String dnsResolverPolicyName, - String dnsSecurityRuleName, Context context); - - /** - * Gets properties of a DNS security rule for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param dnsSecurityRuleName The name of the DNS security rule. - * @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 properties of a DNS security rule for a DNS resolver policy. - */ - DnsSecurityRule get(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName); - - /** - * Lists DNS security rules for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @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 to an enumeration operation on DNS security rules within a DNS resolver policy as paginated - * response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String dnsResolverPolicyName); - - /** - * Lists DNS security rules for a DNS resolver policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverPolicyName The name of the DNS resolver policy. - * @param top The maximum number of results to return. If not specified, returns up to 100 results. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS security rules within a DNS resolver policy as paginated - * response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String dnsResolverPolicyName, Integer top, - Context context); - - /** - * Gets properties of a DNS security rule for a DNS resolver policy. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS security rule for a DNS resolver policy along with {@link Response}. - */ - DnsSecurityRule getById(String id); - - /** - * Gets properties of a DNS security rule for a DNS resolver policy. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return properties of a DNS security rule for a DNS resolver policy along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. - * - * @param id the resource ID. - * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify the - * last-seen ETag value to prevent accidentally overwriting any concurrent changes. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, String ifMatch, Context context); - - /** - * Begins definition for a new DnsSecurityRule resource. - * - * @param name resource name. - * @return the first stage of the new DnsSecurityRule definition. - */ - DnsSecurityRule.DefinitionStages.Blank define(String name); -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRule.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRule.java index d11e38deaeed..c700f607edfa 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRule.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRule.java @@ -43,7 +43,7 @@ public interface ForwardingRule { String etag(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpoint.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpoint.java index 553cc68eec4c..e078120e36c8 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpoint.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpoint.java @@ -58,7 +58,7 @@ public interface InboundEndpoint { String etag(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpoint.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpoint.java index d32470dcb898..110e0177907b 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpoint.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpoint.java @@ -58,7 +58,7 @@ public interface OutboundEndpoint { String etag(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLink.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLink.java index feb7e3fa2c60..7c98fdf3740f 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLink.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLink.java @@ -43,7 +43,7 @@ public interface VirtualNetworkLink { String etag(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dnsresolver/proxy-config.json b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dnsresolver/proxy-config.json index dfcb8dc8dfd6..8e3b2805416b 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dnsresolver/proxy-config.json +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dnsresolver/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.dnsresolver.implementation.DnsForwardingRulesetsClientImpl$DnsForwardingRulesetsService"],["com.azure.resourcemanager.dnsresolver.implementation.DnsResolverDomainListsClientImpl$DnsResolverDomainListsService"],["com.azure.resourcemanager.dnsresolver.implementation.DnsResolverPoliciesClientImpl$DnsResolverPoliciesService"],["com.azure.resourcemanager.dnsresolver.implementation.DnsResolverPolicyVirtualNetworkLinksClientImpl$DnsResolverPolicyVirtualNetworkLinksService"],["com.azure.resourcemanager.dnsresolver.implementation.DnsResolversClientImpl$DnsResolversService"],["com.azure.resourcemanager.dnsresolver.implementation.DnsSecurityRulesClientImpl$DnsSecurityRulesService"],["com.azure.resourcemanager.dnsresolver.implementation.ForwardingRulesClientImpl$ForwardingRulesService"],["com.azure.resourcemanager.dnsresolver.implementation.InboundEndpointsClientImpl$InboundEndpointsService"],["com.azure.resourcemanager.dnsresolver.implementation.OutboundEndpointsClientImpl$OutboundEndpointsService"],["com.azure.resourcemanager.dnsresolver.implementation.VirtualNetworkLinksClientImpl$VirtualNetworkLinksService"]] \ No newline at end of file +[["com.azure.resourcemanager.dnsresolver.implementation.DnsForwardingRulesetsClientImpl$DnsForwardingRulesetsService"],["com.azure.resourcemanager.dnsresolver.implementation.DnsResolversClientImpl$DnsResolversService"],["com.azure.resourcemanager.dnsresolver.implementation.ForwardingRulesClientImpl$ForwardingRulesService"],["com.azure.resourcemanager.dnsresolver.implementation.InboundEndpointsClientImpl$InboundEndpointsService"],["com.azure.resourcemanager.dnsresolver.implementation.OutboundEndpointsClientImpl$OutboundEndpointsService"],["com.azure.resourcemanager.dnsresolver.implementation.VirtualNetworkLinksClientImpl$VirtualNetworkLinksService"]] \ No newline at end of file diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsCreateOrUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsCreateOrUpdateSamples.java index 749a044d7b84..ab430ab23310 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsCreateOrUpdateSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsCreateOrUpdateSamples.java @@ -15,8 +15,8 @@ public final class DnsForwardingRulesetsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsForwardingRuleset_Put.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DnsForwardingRuleset_Put. + * json */ /** * Sample code: Upsert DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsDeleteSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsDeleteSamples.java index c4791813fdb5..4ce05cd7ca98 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsDeleteSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class DnsForwardingRulesetsDeleteSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ * DnsForwardingRuleset_Delete.json */ /** diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsGetByResourceGroupSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsGetByResourceGroupSamples.java index a939401e4610..8499625733b7 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsGetByResourceGroupSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsGetByResourceGroupSamples.java @@ -10,8 +10,8 @@ public final class DnsForwardingRulesetsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsForwardingRuleset_Get.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DnsForwardingRuleset_Get. + * json */ /** * Sample code: Retrieve DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByResourceGroupSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByResourceGroupSamples.java index d1cb794a6e4f..654ce2837b0a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByResourceGroupSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByResourceGroupSamples.java @@ -9,8 +9,7 @@ */ public final class DnsForwardingRulesetsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ * DnsForwardingRuleset_ListByResourceGroup.json */ /** diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByVirtualNetworkSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByVirtualNetworkSamples.java index a28401addd87..ed5e62dfac03 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByVirtualNetworkSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByVirtualNetworkSamples.java @@ -9,8 +9,7 @@ */ public final class DnsForwardingRulesetsListByVirtualNetworkSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ * DnsForwardingRuleset_ListByVirtualNetwork.json */ /** diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListSamples.java index dc5ababb306a..46864af1d934 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListSamples.java @@ -9,8 +9,7 @@ */ public final class DnsForwardingRulesetsListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ * DnsForwardingRuleset_ListBySubscription.json */ /** diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsUpdateSamples.java index 95e6e431f632..5fb4c02dc225 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsUpdateSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsUpdateSamples.java @@ -13,8 +13,7 @@ */ public final class DnsForwardingRulesetsUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ * DnsForwardingRuleset_Patch.json */ /** diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsCreateOrUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsCreateOrUpdateSamples.java deleted file mode 100644 index 72c33d5233be..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsCreateOrUpdateSamples.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsResolverDomainLists CreateOrUpdate. - */ -public final class DnsResolverDomainListsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverDomainList_Put.json - */ - /** - * Sample code: Upsert DNS resolver domain list. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void upsertDNSResolverDomainList(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists() - .define("sampleDnsResolverDomainList") - .withRegion("westus2") - .withExistingResourceGroup("sampleResourceGroup") - .withDomains(Arrays.asList("contoso.com")) - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsDeleteSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsDeleteSamples.java deleted file mode 100644 index d78061ca51fd..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsResolverDomainLists Delete. - */ -public final class DnsResolverDomainListsDeleteSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverDomainList_Delete.json - */ - /** - * Sample code: Delete DNS resolver domain list. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void deleteDNSResolverDomainList(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists() - .delete("sampleResourceGroup", "sampleDnsResolverDomainList", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsGetByResourceGroupSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsGetByResourceGroupSamples.java deleted file mode 100644 index f1538b02ea48..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsGetByResourceGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsResolverDomainLists GetByResourceGroup. - */ -public final class DnsResolverDomainListsGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverDomainList_Get.json - */ - /** - * Sample code: Retrieve DNS resolver domain list. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void retrieveDNSResolverDomainList(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverDomainList", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsListByResourceGroupSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsListByResourceGroupSamples.java deleted file mode 100644 index 39ecbcb995d4..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsListByResourceGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsResolverDomainLists ListByResourceGroup. - */ -public final class DnsResolverDomainListsListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverDomainList_ListByResourceGroup.json - */ - /** - * Sample code: List DNS resolver domain lists by resource group. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSResolverDomainListsByResourceGroup(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists() - .listByResourceGroup("sampleResourceGroup", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsListSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsListSamples.java deleted file mode 100644 index 376f4ff74fd6..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsResolverDomainLists List. - */ -public final class DnsResolverDomainListsListSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverDomainList_ListBySubscription.json - */ - /** - * Sample code: List DNS resolver domain lists by subscription. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSResolverDomainListsBySubscription(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists().list(null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsUpdateSamples.java deleted file mode 100644 index 6bbacec1eda4..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsUpdateSamples.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsResolverDomainLists Update. - */ -public final class DnsResolverDomainListsUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverDomainList_Patch.json - */ - /** - * Sample code: Update DNS resolver domain list. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void updateDNSResolverDomainList(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - DnsResolverDomainList resource = manager.dnsResolverDomainLists() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverDomainList", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withDomains(Arrays.asList("contoso.com")) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesCreateOrUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 73af281ec817..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsResolverPolicies CreateOrUpdate. - */ -public final class DnsResolverPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_Put.json - */ - /** - * Sample code: Upsert DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void upsertDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicies() - .define("sampleDnsResolverPolicy") - .withRegion("westus2") - .withExistingResourceGroup("sampleResourceGroup") - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesDeleteSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesDeleteSamples.java deleted file mode 100644 index e8919341b227..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsResolverPolicies Delete. - */ -public final class DnsResolverPoliciesDeleteSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_Delete.json - */ - /** - * Sample code: Delete DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void deleteDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicies() - .delete("sampleResourceGroup", "sampleDnsResolverPolicy", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesGetByResourceGroupSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesGetByResourceGroupSamples.java deleted file mode 100644 index 1d69a39486f1..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesGetByResourceGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsResolverPolicies GetByResourceGroup. - */ -public final class DnsResolverPoliciesGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_Get.json - */ - /** - * Sample code: Retrieve DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void retrieveDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicies() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListByResourceGroupSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListByResourceGroupSamples.java deleted file mode 100644 index 7f36fb53307b..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListByResourceGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsResolverPolicies ListByResourceGroup. - */ -public final class DnsResolverPoliciesListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_ListByResourceGroup.json - */ - /** - * Sample code: List DNS resolver policies by resource group. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSResolverPoliciesByResourceGroup(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicies() - .listByResourceGroup("sampleResourceGroup", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListByVirtualNetworkSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListByVirtualNetworkSamples.java deleted file mode 100644 index 5243a62e082c..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListByVirtualNetworkSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsResolverPolicies ListByVirtualNetwork. - */ -public final class DnsResolverPoliciesListByVirtualNetworkSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_ListByVirtualNetwork.json - */ - /** - * Sample code: List DNS resolver policies by virtual network. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSResolverPoliciesByVirtualNetwork(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicies() - .listByVirtualNetwork("sampleResourceGroup", "sampleVirtualNetwork", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListSamples.java deleted file mode 100644 index 76cd601b14a7..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsResolverPolicies List. - */ -public final class DnsResolverPoliciesListSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_ListBySubscription.json - */ - /** - * Sample code: List DNS resolver policies by subscription. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSResolverPoliciesBySubscription(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicies().list(null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesUpdateSamples.java deleted file mode 100644 index feb58e4ea4b4..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesUpdateSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicy; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsResolverPolicies Update. - */ -public final class DnsResolverPoliciesUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicy_Patch.json - */ - /** - * Sample code: Update DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void updateDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - DnsResolverPolicy resource = manager.dnsResolverPolicies() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateSamples.java deleted file mode 100644 index 0d5259083da4..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateSamples.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.management.SubResource; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsResolverPolicyVirtualNetworkLinks CreateOrUpdate. - */ -public final class DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicyVirtualNetworkLink_Put.json - */ - /** - * Sample code: Upsert DNS resolver policy virtual network link. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - upsertDNSResolverPolicyVirtualNetworkLink(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicyVirtualNetworkLinks() - .define("sampleVirtualNetworkLink") - .withRegion("westus2") - .withExistingDnsResolverPolicy("sampleResourceGroup", "sampleDnsResolverPolicy") - .withVirtualNetwork(new SubResource().withId( - "/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork")) - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksDeleteSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksDeleteSamples.java deleted file mode 100644 index 861404c130ea..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsResolverPolicyVirtualNetworkLinks Delete. - */ -public final class DnsResolverPolicyVirtualNetworkLinksDeleteSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicyVirtualNetworkLink_Delete.json - */ - /** - * Sample code: Delete DNS resolver policy virtual network link. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - deleteDNSResolverPolicyVirtualNetworkLink(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicyVirtualNetworkLinks() - .delete("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleVirtualNetworkLink", null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksGetSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksGetSamples.java deleted file mode 100644 index 67ca0daae8f5..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsResolverPolicyVirtualNetworkLinks Get. - */ -public final class DnsResolverPolicyVirtualNetworkLinksGetSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicyVirtualNetworkLink_Get.json - */ - /** - * Sample code: Retrieve DNS resolver policy virtual network link. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - retrieveDNSResolverPolicyVirtualNetworkLink(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicyVirtualNetworkLinks() - .getWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleVirtualNetworkLink", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksListSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksListSamples.java deleted file mode 100644 index afb6d91e7a47..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksListSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsResolverPolicyVirtualNetworkLinks List. - */ -public final class DnsResolverPolicyVirtualNetworkLinksListSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicyVirtualNetworkLink_List.json - */ - /** - * Sample code: List DNS resolver policy virtual network links by DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void listDNSResolverPolicyVirtualNetworkLinksByDNSResolverPolicy( - com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicyVirtualNetworkLinks() - .list("sampleResourceGroup", "sampleDnsResolverPolicy", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksUpdateSamples.java deleted file mode 100644 index 49c9d54e9174..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksUpdateSamples.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLink; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsResolverPolicyVirtualNetworkLinks Update. - */ -public final class DnsResolverPolicyVirtualNetworkLinksUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolverPolicyVirtualNetworkLink_Patch.json - */ - /** - * Sample code: Update DNS resolver policy virtual network link. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - updateDNSResolverPolicyVirtualNetworkLink(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - DnsResolverPolicyVirtualNetworkLink resource = manager.dnsResolverPolicyVirtualNetworkLinks() - .getWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleVirtualNetworkLink", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversCreateOrUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversCreateOrUpdateSamples.java index 63d25e566d7f..79b77c514cd0 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversCreateOrUpdateSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversCreateOrUpdateSamples.java @@ -14,8 +14,7 @@ public final class DnsResolversCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolver_Put. - * json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DnsResolver_Put.json */ /** * Sample code: Upsert DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversDeleteSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversDeleteSamples.java index dc3774f757cc..d1ea2af6a252 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversDeleteSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversDeleteSamples.java @@ -10,8 +10,7 @@ public final class DnsResolversDeleteSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolver_Delete.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DnsResolver_Delete.json */ /** * Sample code: Delete DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversGetByResourceGroupSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversGetByResourceGroupSamples.java index 9108de3692c7..4d2beff6c3fa 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversGetByResourceGroupSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversGetByResourceGroupSamples.java @@ -10,8 +10,7 @@ public final class DnsResolversGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolver_Get. - * json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DnsResolver_Get.json */ /** * Sample code: Retrieve DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByResourceGroupSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByResourceGroupSamples.java index 7ffa3f57e296..696c5d99a0b4 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByResourceGroupSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByResourceGroupSamples.java @@ -9,8 +9,7 @@ */ public final class DnsResolversListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ * DnsResolver_ListByResourceGroup.json */ /** diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByVirtualNetworkSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByVirtualNetworkSamples.java index 14011c2dfef5..19b16b46ae3b 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByVirtualNetworkSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByVirtualNetworkSamples.java @@ -9,8 +9,7 @@ */ public final class DnsResolversListByVirtualNetworkSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ * DnsResolver_ListByVirtualNetwork.json */ /** diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListSamples.java index 461c5042001e..4176a463495f 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListSamples.java @@ -9,8 +9,7 @@ */ public final class DnsResolversListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ + * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ * DnsResolver_ListBySubscription.json */ /** diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversUpdateSamples.java index 5f327f878013..a28185687803 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversUpdateSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversUpdateSamples.java @@ -14,8 +14,7 @@ public final class DnsResolversUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsResolver_Patch.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DnsResolver_Patch.json */ /** * Sample code: Update DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesCreateOrUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesCreateOrUpdateSamples.java deleted file mode 100644 index 715bdb2cc8b2..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.management.SubResource; -import com.azure.resourcemanager.dnsresolver.models.ActionType; -import com.azure.resourcemanager.dnsresolver.models.BlockResponseCode; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsSecurityRules CreateOrUpdate. - */ -public final class DnsSecurityRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsSecurityRule_Put.json - */ - /** - * Sample code: Upsert DNS security rule. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void upsertDNSSecurityRule(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsSecurityRules() - .define("sampleDnsSecurityRule") - .withRegion("westus2") - .withExistingDnsResolverPolicy("sampleResourceGroup", "sampleDnsResolverPolicy") - .withPriority(100) - .withAction(new DnsSecurityRuleAction().withActionType(ActionType.BLOCK) - .withBlockResponseCode(BlockResponseCode.SERVFAIL)) - .withDnsResolverDomainLists(Arrays.asList(new SubResource().withId( - "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList"))) - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withDnsSecurityRuleState(DnsSecurityRuleState.ENABLED) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesDeleteSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesDeleteSamples.java deleted file mode 100644 index 4287bbb76648..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsSecurityRules Delete. - */ -public final class DnsSecurityRulesDeleteSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsSecurityRule_Delete.json - */ - /** - * Sample code: Delete DNS security rule for DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - deleteDNSSecurityRuleForDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsSecurityRules() - .delete("sampleResourceGroup", "sampleDnsDnsResolverPolicy", "sampleDnsSecurityRule", null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesGetSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesGetSamples.java deleted file mode 100644 index 68de029b940b..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsSecurityRules Get. - */ -public final class DnsSecurityRulesGetSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsSecurityRule_Get.json - */ - /** - * Sample code: Retrieve DNS security rule for DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - retrieveDNSSecurityRuleForDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsSecurityRules() - .getWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleDnsSecurityRule", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesListSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesListSamples.java deleted file mode 100644 index 15e0e38024fa..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesListSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -/** - * Samples for DnsSecurityRules List. - */ -public final class DnsSecurityRulesListSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsSecurityRule_List.json - */ - /** - * Sample code: List DNS security rules by DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSSecurityRulesByDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsSecurityRules() - .list("sampleResourceGroup", "sampleDnsResolverPolicy", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesUpdateSamples.java deleted file mode 100644 index 75ef840fde32..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesUpdateSamples.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRule; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DnsSecurityRules Update. - */ -public final class DnsSecurityRulesUpdateSamples { - /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * DnsSecurityRule_Patch.json - */ - /** - * Sample code: Update DNS security rule for DNS resolver policy. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - updateDNSSecurityRuleForDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - DnsSecurityRule resource = manager.dnsSecurityRules() - .getWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleDnsSecurityRule", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withDnsSecurityRuleState(DnsSecurityRuleState.DISABLED) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesCreateOrUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesCreateOrUpdateSamples.java index f00bc2af8182..7386b9d3a142 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesCreateOrUpdateSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesCreateOrUpdateSamples.java @@ -16,8 +16,7 @@ public final class ForwardingRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * ForwardingRule_Put.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ForwardingRule_Put.json */ /** * Sample code: Upsert forwarding rule in a DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesDeleteSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesDeleteSamples.java index f321f75a5e90..a6174957c388 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesDeleteSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesDeleteSamples.java @@ -10,8 +10,8 @@ public final class ForwardingRulesDeleteSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * ForwardingRule_Delete.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ForwardingRule_Delete. + * json */ /** * Sample code: Delete forwarding rule in a DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesGetSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesGetSamples.java index 014e18356971..086345a9908b 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesGetSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesGetSamples.java @@ -10,8 +10,7 @@ public final class ForwardingRulesGetSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * ForwardingRule_Get.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ForwardingRule_Get.json */ /** * Sample code: Retrieve forwarding rule in a DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesListSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesListSamples.java index 64554edcb4b1..4820f9cbc362 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesListSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesListSamples.java @@ -10,8 +10,7 @@ public final class ForwardingRulesListSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * ForwardingRule_List.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ForwardingRule_List.json */ /** * Sample code: List forwarding rules in a DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesUpdateSamples.java index 7a33c7e4c889..2935c66eb537 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesUpdateSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesUpdateSamples.java @@ -15,8 +15,7 @@ public final class ForwardingRulesUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * ForwardingRule_Patch.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ForwardingRule_Patch.json */ /** * Sample code: Update forwarding rule in a DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsCreateOrUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsCreateOrUpdateSamples.java index a9a4906962f7..92a13fb9f28a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsCreateOrUpdateSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsCreateOrUpdateSamples.java @@ -17,8 +17,7 @@ public final class InboundEndpointsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * InboundEndpoint_Put.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundEndpoint_Put.json */ /** * Sample code: Upsert inbound endpoint for DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsDeleteSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsDeleteSamples.java index f5025aef592b..b3c0466ccfbf 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsDeleteSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsDeleteSamples.java @@ -10,8 +10,8 @@ public final class InboundEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * InboundEndpoint_Delete.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundEndpoint_Delete. + * json */ /** * Sample code: Delete inbound endpoint for DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsGetSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsGetSamples.java index cb0960f3f4e7..fe367b20913b 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsGetSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsGetSamples.java @@ -10,8 +10,7 @@ public final class InboundEndpointsGetSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * InboundEndpoint_Get.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundEndpoint_Get.json */ /** * Sample code: Retrieve inbound endpoint for DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsListSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsListSamples.java index 27d587978371..7fb3e0190999 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsListSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsListSamples.java @@ -10,8 +10,7 @@ public final class InboundEndpointsListSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * InboundEndpoint_List.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundEndpoint_List.json */ /** * Sample code: List inbound endpoints by DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsUpdateSamples.java index 79df85061eb4..1332642fedf0 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsUpdateSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsUpdateSamples.java @@ -14,8 +14,8 @@ public final class InboundEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * InboundEndpoint_Patch.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundEndpoint_Patch. + * json */ /** * Sample code: Update inbound endpoint for DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsCreateOrUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsCreateOrUpdateSamples.java index 30f9afdc2933..0490e31fc943 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsCreateOrUpdateSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsCreateOrUpdateSamples.java @@ -14,8 +14,7 @@ public final class OutboundEndpointsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * OutboundEndpoint_Put.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/OutboundEndpoint_Put.json */ /** * Sample code: Upsert outbound endpoint for DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsDeleteSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsDeleteSamples.java index 7dc18bc6c310..6d29d92ee986 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsDeleteSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsDeleteSamples.java @@ -10,8 +10,8 @@ public final class OutboundEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * OutboundEndpoint_Delete.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/OutboundEndpoint_Delete. + * json */ /** * Sample code: Delete outbound endpoint for DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsGetSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsGetSamples.java index 623c8c62b9c0..113c77313ff9 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsGetSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsGetSamples.java @@ -10,8 +10,7 @@ public final class OutboundEndpointsGetSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * OutboundEndpoint_Get.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/OutboundEndpoint_Get.json */ /** * Sample code: Retrieve outbound endpoint for DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsListSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsListSamples.java index d2e7a1b4236c..444079935507 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsListSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsListSamples.java @@ -10,8 +10,8 @@ public final class OutboundEndpointsListSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * OutboundEndpoint_List.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/OutboundEndpoint_List. + * json */ /** * Sample code: List outbound endpoints by DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsUpdateSamples.java index f2fa5fcfc0fc..f1a5645ba987 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsUpdateSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsUpdateSamples.java @@ -14,8 +14,8 @@ public final class OutboundEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * OutboundEndpoint_Patch.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/OutboundEndpoint_Patch. + * json */ /** * Sample code: Update outbound endpoint for DNS resolver. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksCreateOrUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksCreateOrUpdateSamples.java index 1f77923e6225..be168eb2aea0 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksCreateOrUpdateSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksCreateOrUpdateSamples.java @@ -14,8 +14,8 @@ public final class VirtualNetworkLinksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * VirtualNetworkLink_Put.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkLink_Put. + * json */ /** * Sample code: Upsert virtual network link to a DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksDeleteSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksDeleteSamples.java index 9929b2bcae2b..0877c054c4d0 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksDeleteSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksDeleteSamples.java @@ -10,8 +10,8 @@ public final class VirtualNetworkLinksDeleteSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * VirtualNetworkLink_Delete.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkLink_Delete + * .json */ /** * Sample code: Delete virtual network link to a DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksGetSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksGetSamples.java index 5687aff73a37..e2336d69a61c 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksGetSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksGetSamples.java @@ -10,8 +10,8 @@ public final class VirtualNetworkLinksGetSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * VirtualNetworkLink_Get.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkLink_Get. + * json */ /** * Sample code: Retrieve virtual network link to a DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksListSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksListSamples.java index 7d2fcc53a847..91cac330f0b1 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksListSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksListSamples.java @@ -10,8 +10,8 @@ public final class VirtualNetworkLinksListSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * VirtualNetworkLink_List.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkLink_List. + * json */ /** * Sample code: List virtual network links to a DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksUpdateSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksUpdateSamples.java index fd0e6987bcc2..3d88475757d9 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksUpdateSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksUpdateSamples.java @@ -14,8 +14,8 @@ public final class VirtualNetworkLinksUpdateSamples { /* * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ - * VirtualNetworkLink_Patch.json + * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkLink_Patch. + * json */ /** * Sample code: Update virtual network link to a DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsCreateOrUpdateMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsCreateOrUpdateMockTests.java index f663460cf5f3..9bcd5376029a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsCreateOrUpdateMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsCreateOrUpdateMockTests.java @@ -25,7 +25,7 @@ public final class DnsForwardingRulesetsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"vpsvuoymgcce\",\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"zrypqlmfeokerqw\"},{\"id\":\"hkobopgxedk\"},{\"id\":\"epbqpcrfkbw\"}],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"jvcdwxlpqekf\"},\"location\":\"khtj\",\"tags\":{\"dhtmdvypgikd\":\"ngwfqatm\"},\"id\":\"szywkbirryu\",\"name\":\"hlhkjoqrvqqaatj\",\"type\":\"nrvgoupmfiibfgg\"}"; + = "{\"etag\":\"jhemms\",\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"kcrodtjinfw\"},{\"id\":\"fltkacjv\"},{\"id\":\"kdlfoa\"}],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"fpagaowpulp\"},\"location\":\"lyls\",\"tags\":{\"xsdszuempsb\":\"qjnsjervtia\"},\"id\":\"kfzbeyvpnqicvi\",\"name\":\"v\",\"type\":\"jjxd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,18 +35,19 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); DnsForwardingRuleset response = manager.dnsForwardingRulesets() - .define("qhhahhxvrhmzkwpj") - .withRegion("hbotzingamvppho") - .withExistingResourceGroup("hfkvtvsexsowuel") - .withDnsResolverOutboundEndpoints(Arrays.asList(new SubResource().withId("ukndxdigrjgu"))) - .withTags(mapOf("nwcvtbvkayhmtnv", "zudphqamvdkfw", "zcjaesgvvsccy", "qiatkzwpcnp")) - .withIfMatch("semdwzrmu") - .withIfNoneMatch("apfcqdpsq") + .define("gsexne") + .withRegion("axhexiilivp") + .withExistingResourceGroup("zrtuzq") + .withDnsResolverOutboundEndpoints( + Arrays.asList(new SubResource().withId("ewzsyyceuzsoib"), new SubResource().withId("dpfrxtrthzvaytdw"))) + .withTags(mapOf("oruzfgsquyfxrxx", "irqtdqoa", "xje", "eptra")) + .withIfMatch("oo") + .withIfNoneMatch("bw") .create(); - Assertions.assertEquals("khtj", response.location()); - Assertions.assertEquals("ngwfqatm", response.tags().get("dhtmdvypgikd")); - Assertions.assertEquals("zrypqlmfeokerqw", response.dnsResolverOutboundEndpoints().get(0).id()); + Assertions.assertEquals("lyls", response.location()); + Assertions.assertEquals("qjnsjervtia", response.tags().get("xsdszuempsb")); + Assertions.assertEquals("kcrodtjinfw", response.dnsResolverOutboundEndpoints().get(0).id()); } // Use "Map.of" if available diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsDeleteMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsDeleteMockTests.java index 7df76730b203..351bb94e5f7b 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsDeleteMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsDeleteMockTests.java @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.dnsForwardingRulesets() - .delete("rgzdwmsweyp", "w", "xggicccnxqhuexmk", com.azure.core.util.Context.NONE); + manager.dnsForwardingRulesets().delete("rgjhxb", "dtlwwrlkd", "tncvokot", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsGetByResourceGroupWithResponseMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsGetByResourceGroupWithResponseMockTests.java index a3ec84aabc41..6134642a5fb5 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsGetByResourceGroupWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class DnsForwardingRulesetsGetByResourceGroupWithResponseMockTests @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"u\",\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"pbsfgytgu\"},{\"id\":\"feadcygq\"},{\"id\":\"yhejhzisxgfp\"},{\"id\":\"olppvksrpqvujz\"}],\"provisioningState\":\"Creating\",\"resourceGuid\":\"twdw\"},\"location\":\"tswiby\",\"tags\":{\"h\":\"l\"},\"id\":\"hfwpracstwit\",\"name\":\"khevxccedc\",\"type\":\"nmdyodnwzxl\"}"; + = "{\"etag\":\"dtbnnha\",\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"crkvcikhnv\"},{\"id\":\"mqg\"},{\"id\":\"queziky\"}],\"provisioningState\":\"Failed\",\"resourceGuid\":\"kallatmel\"},\"location\":\"ipicc\",\"tags\":{\"v\":\"z\",\"yrnxxmueedn\":\"vvcnayr\",\"alm\":\"rdvstkwqqtch\",\"gdv\":\"mtdaa\"},\"id\":\"vgpiohgwxrt\",\"name\":\"udxepxgyqagv\",\"type\":\"vmnpkukghimdblx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); DnsForwardingRuleset response = manager.dnsForwardingRulesets() - .getByResourceGroupWithResponse("tlstvlzywem", "zrncsdt", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("lxdy", "gsyocogj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("tswiby", response.location()); - Assertions.assertEquals("l", response.tags().get("h")); - Assertions.assertEquals("pbsfgytgu", response.dnsResolverOutboundEndpoints().get(0).id()); + Assertions.assertEquals("ipicc", response.location()); + Assertions.assertEquals("z", response.tags().get("v")); + Assertions.assertEquals("crkvcikhnv", response.dnsResolverOutboundEndpoints().get(0).id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByResourceGroupMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByResourceGroupMockTests.java index 6dd4beb55c35..edb66fd84fea 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByResourceGroupMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByResourceGroupMockTests.java @@ -22,7 +22,7 @@ public final class DnsForwardingRulesetsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"ltiugcxnavv\",\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"ibyqunyowxwlmdj\"}],\"provisioningState\":\"Failed\",\"resourceGuid\":\"g\"},\"location\":\"fvpdbo\",\"tags\":{\"bdeibqipqk\":\"izsjqlhkrr\",\"rwkq\":\"hvxndzwmkrefajpj\",\"sjabibs\":\"yhgbijtjivfx\",\"bjxbkzbzk\":\"stawfsdjpvkv\"},\"id\":\"vncjabudurgk\",\"name\":\"kmokz\",\"type\":\"jjklff\"}]}"; + = "{\"value\":[{\"etag\":\"jhfjxwm\",\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"kfoqreyfkzikfj\"}],\"provisioningState\":\"Creating\",\"resourceGuid\":\"a\"},\"location\":\"xwczelpcire\",\"tags\":{\"wabfatkl\":\"eae\",\"sphyoulpjrvxa\":\"dxbjhwuaanozj\"},\"id\":\"l\",\"name\":\"vimjwos\",\"type\":\"tx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,11 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.dnsForwardingRulesets().listByResourceGroup("jc", 424916927, com.azure.core.util.Context.NONE); + = manager.dnsForwardingRulesets().listByResourceGroup("wi", 1772217773, com.azure.core.util.Context.NONE); - Assertions.assertEquals("fvpdbo", response.iterator().next().location()); - Assertions.assertEquals("izsjqlhkrr", response.iterator().next().tags().get("bdeibqipqk")); - Assertions.assertEquals("ibyqunyowxwlmdj", + Assertions.assertEquals("xwczelpcire", response.iterator().next().location()); + Assertions.assertEquals("eae", response.iterator().next().tags().get("wabfatkl")); + Assertions.assertEquals("kfoqreyfkzikfj", response.iterator().next().dnsResolverOutboundEndpoints().get(0).id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByVirtualNetworkMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByVirtualNetworkMockTests.java index 9e00de7b89a9..bd3fffa6397e 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByVirtualNetworkMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListByVirtualNetworkMockTests.java @@ -22,7 +22,7 @@ public final class DnsForwardingRulesetsListByVirtualNetworkMockTests { @Test public void testListByVirtualNetwork() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"qhl\",\"properties\":{\"virtualNetworkLink\":{\"id\":\"iiojnal\"}}}]}"; + = "{\"value\":[{\"id\":\"baaa\",\"properties\":{\"virtualNetworkLink\":{\"id\":\"ayffim\"}}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByVirtualNetwork() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.dnsForwardingRulesets() - .listByVirtualNetwork("dhszfjv", "bgofeljag", 728576378, com.azure.core.util.Context.NONE); + .listByVirtualNetwork("sofwqmzqalkrmnji", "pxacqqudfn", 1238431927, com.azure.core.util.Context.NONE); - Assertions.assertEquals("qhl", response.iterator().next().id()); - Assertions.assertEquals("iiojnal", response.iterator().next().virtualNetworkLink().id()); + Assertions.assertEquals("baaa", response.iterator().next().id()); + Assertions.assertEquals("ayffim", response.iterator().next().virtualNetworkLink().id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListMockTests.java index 7cc8ffd2de26..fbd423f6af79 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetsListMockTests.java @@ -22,7 +22,7 @@ public final class DnsForwardingRulesetsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"uwqlgzrfzeey\",\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"zi\"},{\"id\":\"yuhqlbjbsybbqwrv\"},{\"id\":\"dgmfpgvmpipasl\"}],\"provisioningState\":\"Canceled\",\"resourceGuid\":\"fxssm\"},\"location\":\"twbdsrezpdrhn\",\"tags\":{\"ircgpikpz\":\"owqkdwytisi\",\"rmbzo\":\"mejzanlfzxia\",\"zpfrla\":\"okixrjqcir\",\"indfpwpjyl\":\"szrnwo\"},\"id\":\"bt\",\"name\":\"h\",\"type\":\"lsj\"}]}"; + = "{\"value\":[{\"etag\":\"skfc\",\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"umiekkezzi\"}],\"provisioningState\":\"Canceled\",\"resourceGuid\":\"fjhdg\"},\"location\":\"gebdunygaeq\",\"tags\":{\"a\":\"qfatpxllrxcyjm\",\"arm\":\"su\",\"rw\":\"wdmjsjqbjhhyx\",\"duhpk\":\"yc\"},\"id\":\"kgymareqnajxqug\",\"name\":\"hky\",\"type\":\"ubeddg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.dnsForwardingRulesets().list(1604322971, com.azure.core.util.Context.NONE); + = manager.dnsForwardingRulesets().list(802895356, com.azure.core.util.Context.NONE); - Assertions.assertEquals("twbdsrezpdrhn", response.iterator().next().location()); - Assertions.assertEquals("owqkdwytisi", response.iterator().next().tags().get("ircgpikpz")); - Assertions.assertEquals("zi", response.iterator().next().dnsResolverOutboundEndpoints().get(0).id()); + Assertions.assertEquals("gebdunygaeq", response.iterator().next().location()); + Assertions.assertEquals("qfatpxllrxcyjm", response.iterator().next().tags().get("a")); + Assertions.assertEquals("umiekkezzi", response.iterator().next().dnsResolverOutboundEndpoints().get(0).id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListInnerTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListInnerTests.java deleted file mode 100644 index 90818c06a6ec..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListInnerTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListInner; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DnsResolverDomainListInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsResolverDomainListInner model = BinaryData.fromString( - "{\"etag\":\"jhxxjyn\",\"properties\":{\"domains\":[\"divkrt\"],\"provisioningState\":\"Creating\",\"resourceGuid\":\"qzvszjf\"},\"location\":\"vjfdx\",\"tags\":{\"vtcqaqtdo\":\"e\",\"bhsfxob\":\"mcbxvwvxysl\"},\"id\":\"ytkblmpew\",\"name\":\"wfbkrvrns\",\"type\":\"shqjohxcrsbf\"}") - .toObject(DnsResolverDomainListInner.class); - Assertions.assertEquals("vjfdx", model.location()); - Assertions.assertEquals("e", model.tags().get("vtcqaqtdo")); - Assertions.assertEquals("divkrt", model.domains().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsResolverDomainListInner model = new DnsResolverDomainListInner().withLocation("vjfdx") - .withTags(mapOf("vtcqaqtdo", "e", "bhsfxob", "mcbxvwvxysl")) - .withDomains(Arrays.asList("divkrt")); - model = BinaryData.fromObject(model).toObject(DnsResolverDomainListInner.class); - Assertions.assertEquals("vjfdx", model.location()); - Assertions.assertEquals("e", model.tags().get("vtcqaqtdo")); - Assertions.assertEquals("divkrt", model.domains().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListPatchPropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListPatchPropertiesTests.java deleted file mode 100644 index 285de498c07d..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListPatchPropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListPatchProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DnsResolverDomainListPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsResolverDomainListPatchProperties model - = BinaryData.fromString("{\"domains\":[\"nqpeh\"]}").toObject(DnsResolverDomainListPatchProperties.class); - Assertions.assertEquals("nqpeh", model.domains().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsResolverDomainListPatchProperties model - = new DnsResolverDomainListPatchProperties().withDomains(Arrays.asList("nqpeh")); - model = BinaryData.fromObject(model).toObject(DnsResolverDomainListPatchProperties.class); - Assertions.assertEquals("nqpeh", model.domains().get(0)); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListPatchTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListPatchTests.java deleted file mode 100644 index 9f3cd4ad8575..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListPatchTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListPatch; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DnsResolverDomainListPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsResolverDomainListPatch model = BinaryData.fromString( - "{\"properties\":{\"domains\":[\"ftpvjzbexil\"]},\"tags\":{\"jmkcjhwqytj\":\"fqqnvwpmqtaruo\",\"jewgdrjerv\":\"ybn\"}}") - .toObject(DnsResolverDomainListPatch.class); - Assertions.assertEquals("fqqnvwpmqtaruo", model.tags().get("jmkcjhwqytj")); - Assertions.assertEquals("ftpvjzbexil", model.domains().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsResolverDomainListPatch model - = new DnsResolverDomainListPatch().withTags(mapOf("jmkcjhwqytj", "fqqnvwpmqtaruo", "jewgdrjerv", "ybn")) - .withDomains(Arrays.asList("ftpvjzbexil")); - model = BinaryData.fromObject(model).toObject(DnsResolverDomainListPatch.class); - Assertions.assertEquals("fqqnvwpmqtaruo", model.tags().get("jmkcjhwqytj")); - Assertions.assertEquals("ftpvjzbexil", model.domains().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListPropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListPropertiesTests.java deleted file mode 100644 index 162444b605b5..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DnsResolverDomainListPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsResolverDomainListProperties model = BinaryData.fromString( - "{\"domains\":[\"asrru\",\"wbhsqfsub\",\"gjb\"],\"provisioningState\":\"Updating\",\"resourceGuid\":\"pybsrfbjfdtw\"}") - .toObject(DnsResolverDomainListProperties.class); - Assertions.assertEquals("asrru", model.domains().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsResolverDomainListProperties model - = new DnsResolverDomainListProperties().withDomains(Arrays.asList("asrru", "wbhsqfsub", "gjb")); - model = BinaryData.fromObject(model).toObject(DnsResolverDomainListProperties.class); - Assertions.assertEquals("asrru", model.domains().get(0)); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListResultTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListResultTests.java deleted file mode 100644 index a398e2b92849..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListResultTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DnsResolverDomainListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsResolverDomainListResult model = BinaryData.fromString( - "{\"value\":[{\"etag\":\"ygmi\",\"properties\":{\"domains\":[\"hnzdndslgnayqi\",\"ynduha\"],\"provisioningState\":\"Canceled\",\"resourceGuid\":\"kthumaqolbgycdui\"},\"location\":\"tgccymvaolpss\",\"tags\":{\"zpswiydmc\":\"fmmdnbbg\",\"xssadbzmnvdf\":\"yhz\",\"daodvxzbncblyl\":\"n\",\"erscdntne\":\"stdbhhxsrzdzu\"},\"id\":\"fiwjmygtdssls\",\"name\":\"tmweriofzpyq\",\"type\":\"emwabnet\"}],\"nextLink\":\"hszhedplvwiwu\"}") - .toObject(DnsResolverDomainListResult.class); - Assertions.assertEquals("tgccymvaolpss", model.value().get(0).location()); - Assertions.assertEquals("fmmdnbbg", model.value().get(0).tags().get("zpswiydmc")); - Assertions.assertEquals("hnzdndslgnayqi", model.value().get(0).domains().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsResolverDomainListResult model = new DnsResolverDomainListResult() - .withValue(Arrays.asList(new DnsResolverDomainListInner().withLocation("tgccymvaolpss") - .withTags(mapOf("zpswiydmc", "fmmdnbbg", "xssadbzmnvdf", "yhz", "daodvxzbncblyl", "n", "erscdntne", - "stdbhhxsrzdzu")) - .withDomains(Arrays.asList("hnzdndslgnayqi", "ynduha")))); - model = BinaryData.fromObject(model).toObject(DnsResolverDomainListResult.class); - Assertions.assertEquals("tgccymvaolpss", model.value().get(0).location()); - Assertions.assertEquals("fmmdnbbg", model.value().get(0).tags().get("zpswiydmc")); - Assertions.assertEquals("hnzdndslgnayqi", model.value().get(0).domains().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsCreateOrUpdateMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsCreateOrUpdateMockTests.java deleted file mode 100644 index f9b8922f88b1..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.dnsresolver.DnsResolverManager; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainList; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsResolverDomainListsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"etag\":\"kfxcvhrfs\",\"properties\":{\"domains\":[\"uagrttikteusqc\",\"kvyklxubyjaffmm\",\"bl\",\"qcuubgqibrta\"],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"ttwgdsl\"},\"location\":\"ihhrmo\",\"tags\":{\"zhyrpeto\":\"qseypxiutcxa\"},\"id\":\"e\",\"name\":\"joxslhvnhla\",\"type\":\"rqnkkzjcjbtr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - DnsResolverManager manager = DnsResolverManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DnsResolverDomainList response = manager.dnsResolverDomainLists() - .define("zjvusfzldmo") - .withRegion("u") - .withExistingResourceGroup("ojocqwogf") - .withDomains(Arrays.asList("adpysownbt", "kb", "grjqctojcmi")) - .withTags(mapOf("ihlhzdsqtzb", "plcwkhi")) - .withIfMatch("wcluqovekqvgq") - .withIfNoneMatch("uwifzmpjwyiv") - .create(); - - Assertions.assertEquals("ihhrmo", response.location()); - Assertions.assertEquals("qseypxiutcxa", response.tags().get("zhyrpeto")); - Assertions.assertEquals("uagrttikteusqc", response.domains().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsGetByResourceGroupWithResponseMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 1687e7ac0d3b..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.dnsresolver.DnsResolverManager; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainList; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsResolverDomainListsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"etag\":\"pvz\",\"properties\":{\"domains\":[\"qtmldgxo\",\"firclnpkciayz\",\"iykhy\"],\"provisioningState\":\"Failed\",\"resourceGuid\":\"jlb\"},\"location\":\"qvkjlmxho\",\"tags\":{\"uzzptjazysdz\":\"nhdwdigumbnra\",\"iqyuvvfo\":\"ezwwv\",\"ikvylauya\":\"kphhq\"},\"id\":\"luwmncst\",\"name\":\"ijf\",\"type\":\"bvpoekrsgsgbdhu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - DnsResolverManager manager = DnsResolverManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DnsResolverDomainList response = manager.dnsResolverDomainLists() - .getByResourceGroupWithResponse("riglaec", "ndtic", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qvkjlmxho", response.location()); - Assertions.assertEquals("nhdwdigumbnra", response.tags().get("uzzptjazysdz")); - Assertions.assertEquals("qtmldgxo", response.domains().get(0)); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsListByResourceGroupMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsListByResourceGroupMockTests.java deleted file mode 100644 index 2ea801600269..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsListByResourceGroupMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.dnsresolver.DnsResolverManager; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainList; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsResolverDomainListsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"etag\":\"vhxnk\",\"properties\":{\"domains\":[\"tkubotppn\"],\"provisioningState\":\"Updating\",\"resourceGuid\":\"xhihfrbbcevqagtl\"},\"location\":\"hlfkqojpy\",\"tags\":{\"ymbrnysuxmpraf\":\"trdcnifmzzs\"},\"id\":\"g\",\"name\":\"khocxvdfffwaf\",\"type\":\"roud\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - DnsResolverManager manager = DnsResolverManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.dnsResolverDomainLists() - .listByResourceGroup("qgnjdgkynscli", 1532884453, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hlfkqojpy", response.iterator().next().location()); - Assertions.assertEquals("trdcnifmzzs", response.iterator().next().tags().get("ymbrnysuxmpraf")); - Assertions.assertEquals("tkubotppn", response.iterator().next().domains().get(0)); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsListMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsListMockTests.java deleted file mode 100644 index cf305451b69f..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsListMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.dnsresolver.DnsResolverManager; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainList; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsResolverDomainListsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"etag\":\"avehhrvkbunzo\",\"properties\":{\"domains\":[\"dhcxgkmoy\"],\"provisioningState\":\"Creating\",\"resourceGuid\":\"uibhmfdnbzydvfv\"},\"location\":\"jnaeois\",\"tags\":{\"w\":\"mgorffukisc\",\"tg\":\"zhwplefaxvxilc\",\"qxtjjfzqlqhyca\":\"hnze\",\"beesmieknlra\":\"odggx\"},\"id\":\"iaa\",\"name\":\"iuagydwqfbylyrfg\",\"type\":\"agt\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - DnsResolverManager manager = DnsResolverManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.dnsResolverDomainLists().list(1181286444, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jnaeois", response.iterator().next().location()); - Assertions.assertEquals("mgorffukisc", response.iterator().next().tags().get("w")); - Assertions.assertEquals("dhcxgkmoy", response.iterator().next().domains().get(0)); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesCreateOrUpdateMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesCreateOrUpdateMockTests.java deleted file mode 100644 index 1fdce66410b5..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.dnsresolver.DnsResolverManager; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsResolverPoliciesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"etag\":\"pwoqo\",\"properties\":{\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"ekni\"},\"location\":\"hqvcimpevfgmblr\",\"tags\":{\"rwfscjfnynszquj\":\"bywdxsmicc\",\"gyavu\":\"zdvoqytibyowbb\"},\"id\":\"pthjoxo\",\"name\":\"smsks\",\"type\":\"pi\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - DnsResolverManager manager = DnsResolverManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DnsResolverPolicy response = manager.dnsResolverPolicies() - .define("nb") - .withRegion("wbqpl") - .withExistingResourceGroup("qchiszep") - .withTags(mapOf("wzsoldweyuqdunv", "nuuepzlrp", "alywjhhgdn", "nnrwrbiork")) - .withIfMatch("otcubi") - .withIfNoneMatch("p") - .create(); - - Assertions.assertEquals("hqvcimpevfgmblr", response.location()); - Assertions.assertEquals("bywdxsmicc", response.tags().get("rwfscjfnynszquj")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesGetByResourceGroupWithResponseMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index dbce493f5e3d..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.dnsresolver.DnsResolverManager; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsResolverPoliciesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"etag\":\"nssxmojmsvpk\",\"properties\":{\"provisioningState\":\"Updating\",\"resourceGuid\":\"wcfzqljyxgt\"},\"location\":\"heyd\",\"tags\":{\"pltfnhtba\":\"shmkxmaehvbbxur\",\"kpyklyhp\":\"kgxywr\",\"uudl\":\"uodpv\",\"ostgkts\":\"zibt\"},\"id\":\"vdxec\",\"name\":\"zedqbcvhzlhplo\",\"type\":\"qkdlw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - DnsResolverManager manager = DnsResolverManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DnsResolverPolicy response = manager.dnsResolverPolicies() - .getByResourceGroupWithResponse("ltducea", "tmczuomejwcwwqi", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("heyd", response.location()); - Assertions.assertEquals("shmkxmaehvbbxur", response.tags().get("pltfnhtba")); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListByResourceGroupMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListByResourceGroupMockTests.java deleted file mode 100644 index 9ae06d62eff4..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListByResourceGroupMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.dnsresolver.DnsResolverManager; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsResolverPoliciesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"etag\":\"mbtxhwgf\",\"properties\":{\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"wcoezbrhub\"},\"location\":\"hud\",\"tags\":{\"fqjbvleo\":\"ookk\",\"qybaryeua\":\"fmluiqtqzfavyvn\"},\"id\":\"jkqa\",\"name\":\"qgzsles\",\"type\":\"cbhernntiewdj\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - DnsResolverManager manager = DnsResolverManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.dnsResolverPolicies() - .listByResourceGroup("qfbumlkxtrqjf", 1704279837, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hud", response.iterator().next().location()); - Assertions.assertEquals("ookk", response.iterator().next().tags().get("fqjbvleo")); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListByVirtualNetworkMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListByVirtualNetworkMockTests.java deleted file mode 100644 index 0789bb6a97fb..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListByVirtualNetworkMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.SubResource; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.dnsresolver.DnsResolverManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsResolverPoliciesListByVirtualNetworkMockTests { - @Test - public void testListByVirtualNetwork() throws Exception { - String responseStr = "{\"value\":[{\"id\":\"gdxpg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - DnsResolverManager manager = DnsResolverManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.dnsResolverPolicies().listByVirtualNetwork("orwmduvwpklv", "w", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gdxpg", response.iterator().next().id()); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListMockTests.java deleted file mode 100644 index c2d98ab0fb47..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesListMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.dnsresolver.DnsResolverManager; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsResolverPoliciesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"etag\":\"quwrbehwag\",\"properties\":{\"provisioningState\":\"Canceled\",\"resourceGuid\":\"fkmr\"},\"location\":\"mvvhmxtdrjfuta\",\"tags\":{\"ewzcjznmwcp\":\"bj\",\"v\":\"guaadraufactkahz\",\"eekulfgslqubkwd\":\"jjziuxxpsh\"},\"id\":\"enr\",\"name\":\"sutujba\",\"type\":\"pjuohminyfl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - DnsResolverManager manager = DnsResolverManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.dnsResolverPolicies().list(1433935156, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mvvhmxtdrjfuta", response.iterator().next().location()); - Assertions.assertEquals("bj", response.iterator().next().tags().get("ewzcjznmwcp")); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyInnerTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyInnerTests.java deleted file mode 100644 index a36d8f9f5985..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyInnerTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DnsResolverPolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsResolverPolicyInner model = BinaryData.fromString( - "{\"etag\":\"cn\",\"properties\":{\"provisioningState\":\"Updating\",\"resourceGuid\":\"tkphywpnvjtoqn\"},\"location\":\"mclfplphoxuscr\",\"tags\":{\"zq\":\"gyepsbjt\",\"fjz\":\"gxywpmue\"},\"id\":\"fqkquj\",\"name\":\"dsuyonobgla\",\"type\":\"cq\"}") - .toObject(DnsResolverPolicyInner.class); - Assertions.assertEquals("mclfplphoxuscr", model.location()); - Assertions.assertEquals("gyepsbjt", model.tags().get("zq")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsResolverPolicyInner model = new DnsResolverPolicyInner().withLocation("mclfplphoxuscr") - .withTags(mapOf("zq", "gyepsbjt", "fjz", "gxywpmue")); - model = BinaryData.fromObject(model).toObject(DnsResolverPolicyInner.class); - Assertions.assertEquals("mclfplphoxuscr", model.location()); - Assertions.assertEquals("gyepsbjt", model.tags().get("zq")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyListResultTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyListResultTests.java deleted file mode 100644 index e69eefe500b5..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyListResultTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DnsResolverPolicyListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsResolverPolicyListResult model = BinaryData.fromString( - "{\"value\":[{\"etag\":\"jbhckfrlhr\",\"properties\":{\"provisioningState\":\"Canceled\",\"resourceGuid\":\"vpycanuzbp\"},\"location\":\"afkuwb\",\"tags\":{\"hseyvju\":\"wbme\",\"hspkdeemao\":\"rts\"},\"id\":\"mx\",\"name\":\"gkvtmelmqkrhah\",\"type\":\"ljuahaquhcdh\"},{\"etag\":\"ualaexqpvfadmw\",\"properties\":{\"provisioningState\":\"Failed\",\"resourceGuid\":\"vxpvgomz\"},\"location\":\"misgwbnb\",\"tags\":{\"urqhaka\":\"dawkzbali\",\"xcug\":\"hashsfwxosow\",\"ovbvmeueciv\":\"cjooxdjebwpucwwf\",\"otwmcdyt\":\"hzceuojgjrwjue\"},\"id\":\"x\",\"name\":\"it\",\"type\":\"nrjawgqwg\"},{\"etag\":\"ni\",\"properties\":{\"provisioningState\":\"Updating\",\"resourceGuid\":\"kpycgklwndnhjd\"},\"location\":\"whvylw\",\"tags\":{\"uwprzql\":\"dhxujznbmpo\",\"obbc\":\"eualupjmkhf\",\"tghfgblcgwxzvl\":\"wsrtjriplrbpbe\",\"egibtnmxiebww\":\"qhjk\"},\"id\":\"loayqcgw\",\"name\":\"tzjuzgwyzmhtxo\",\"type\":\"gmtsavjcbpwxqpsr\"}],\"nextLink\":\"ftguv\"}") - .toObject(DnsResolverPolicyListResult.class); - Assertions.assertEquals("afkuwb", model.value().get(0).location()); - Assertions.assertEquals("wbme", model.value().get(0).tags().get("hseyvju")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsResolverPolicyListResult model = new DnsResolverPolicyListResult().withValue(Arrays.asList( - new DnsResolverPolicyInner().withLocation("afkuwb").withTags(mapOf("hseyvju", "wbme", "hspkdeemao", "rts")), - new DnsResolverPolicyInner().withLocation("misgwbnb") - .withTags(mapOf("urqhaka", "dawkzbali", "xcug", "hashsfwxosow", "ovbvmeueciv", "cjooxdjebwpucwwf", - "otwmcdyt", "hzceuojgjrwjue")), - new DnsResolverPolicyInner().withLocation("whvylw") - .withTags(mapOf("uwprzql", "dhxujznbmpo", "obbc", "eualupjmkhf", "tghfgblcgwxzvl", "wsrtjriplrbpbe", - "egibtnmxiebww", "qhjk")))); - model = BinaryData.fromObject(model).toObject(DnsResolverPolicyListResult.class); - Assertions.assertEquals("afkuwb", model.value().get(0).location()); - Assertions.assertEquals("wbme", model.value().get(0).tags().get("hseyvju")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyPatchTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyPatchTests.java deleted file mode 100644 index a1ec598b4916..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyPatchTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DnsResolverPolicyPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsResolverPolicyPatch model - = BinaryData.fromString("{\"tags\":{\"zntxhdz\":\"dw\"}}").toObject(DnsResolverPolicyPatch.class); - Assertions.assertEquals("dw", model.tags().get("zntxhdz")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsResolverPolicyPatch model = new DnsResolverPolicyPatch().withTags(mapOf("zntxhdz", "dw")); - model = BinaryData.fromObject(model).toObject(DnsResolverPolicyPatch.class); - Assertions.assertEquals("dw", model.tags().get("zntxhdz")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyPropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyPropertiesTests.java deleted file mode 100644 index f1287e4636e8..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyProperties; - -public final class DnsResolverPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsResolverPolicyProperties model - = BinaryData.fromString("{\"provisioningState\":\"Updating\",\"resourceGuid\":\"mgyudxytlmoyrxv\"}") - .toObject(DnsResolverPolicyProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsResolverPolicyProperties model = new DnsResolverPolicyProperties(); - model = BinaryData.fromObject(model).toObject(DnsResolverPolicyProperties.class); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkInnerTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkInnerTests.java deleted file mode 100644 index 1af2896f46c8..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkInnerTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.management.SubResource; -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DnsResolverPolicyVirtualNetworkLinkInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsResolverPolicyVirtualNetworkLinkInner model = BinaryData.fromString( - "{\"etag\":\"cjrvxdjzlmwlxkv\",\"properties\":{\"virtualNetwork\":{\"id\":\"fhzovawjvzunluth\"},\"provisioningState\":\"Canceled\"},\"location\":\"nxipeil\",\"tags\":{\"bbtdzumvee\":\"uaejxdultsk\",\"zuhkfpbsjyof\":\"gpw\"},\"id\":\"xl\",\"name\":\"us\",\"type\":\"ttouwaboekqvkel\"}") - .toObject(DnsResolverPolicyVirtualNetworkLinkInner.class); - Assertions.assertEquals("nxipeil", model.location()); - Assertions.assertEquals("uaejxdultsk", model.tags().get("bbtdzumvee")); - Assertions.assertEquals("fhzovawjvzunluth", model.virtualNetwork().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsResolverPolicyVirtualNetworkLinkInner model - = new DnsResolverPolicyVirtualNetworkLinkInner().withLocation("nxipeil") - .withTags(mapOf("bbtdzumvee", "uaejxdultsk", "zuhkfpbsjyof", "gpw")) - .withVirtualNetwork(new SubResource().withId("fhzovawjvzunluth")); - model = BinaryData.fromObject(model).toObject(DnsResolverPolicyVirtualNetworkLinkInner.class); - Assertions.assertEquals("nxipeil", model.location()); - Assertions.assertEquals("uaejxdultsk", model.tags().get("bbtdzumvee")); - Assertions.assertEquals("fhzovawjvzunluth", model.virtualNetwork().id()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkListResultTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkListResultTests.java deleted file mode 100644 index 7cdb15004ebd..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkListResultTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.management.SubResource; -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLinkListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DnsResolverPolicyVirtualNetworkLinkListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsResolverPolicyVirtualNetworkLinkListResult model = BinaryData.fromString( - "{\"value\":[{\"etag\":\"ztfolhbnxk\",\"properties\":{\"virtualNetwork\":{\"id\":\"laulppg\"},\"provisioningState\":\"Succeeded\"},\"location\":\"napnyiropuhpigv\",\"tags\":{\"txmedj\":\"lgqg\",\"lynqwwncwzzh\":\"c\",\"ellwptfdy\":\"gktrmgucnapkte\",\"rhhuaopppcqeqx\":\"pfqbuaceopzf\"},\"id\":\"lzdahzxctobgbkdm\",\"name\":\"izpost\",\"type\":\"grcfb\"}],\"nextLink\":\"rmfqjhhkxbpvj\"}") - .toObject(DnsResolverPolicyVirtualNetworkLinkListResult.class); - Assertions.assertEquals("napnyiropuhpigv", model.value().get(0).location()); - Assertions.assertEquals("lgqg", model.value().get(0).tags().get("txmedj")); - Assertions.assertEquals("laulppg", model.value().get(0).virtualNetwork().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsResolverPolicyVirtualNetworkLinkListResult model = new DnsResolverPolicyVirtualNetworkLinkListResult() - .withValue(Arrays.asList(new DnsResolverPolicyVirtualNetworkLinkInner().withLocation("napnyiropuhpigv") - .withTags(mapOf("txmedj", "lgqg", "lynqwwncwzzh", "c", "ellwptfdy", "gktrmgucnapkte", "rhhuaopppcqeqx", - "pfqbuaceopzf")) - .withVirtualNetwork(new SubResource().withId("laulppg")))); - model = BinaryData.fromObject(model).toObject(DnsResolverPolicyVirtualNetworkLinkListResult.class); - Assertions.assertEquals("napnyiropuhpigv", model.value().get(0).location()); - Assertions.assertEquals("lgqg", model.value().get(0).tags().get("txmedj")); - Assertions.assertEquals("laulppg", model.value().get(0).virtualNetwork().id()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkPatchTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkPatchTests.java deleted file mode 100644 index 543ca356d253..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkPatchTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLinkPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DnsResolverPolicyVirtualNetworkLinkPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsResolverPolicyVirtualNetworkLinkPatch model - = BinaryData.fromString("{\"tags\":{\"jixisxyawjoyaqcs\":\"flhhcaal\",\"eli\":\"yjpkiidzyexz\"}}") - .toObject(DnsResolverPolicyVirtualNetworkLinkPatch.class); - Assertions.assertEquals("flhhcaal", model.tags().get("jixisxyawjoyaqcs")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsResolverPolicyVirtualNetworkLinkPatch model = new DnsResolverPolicyVirtualNetworkLinkPatch() - .withTags(mapOf("jixisxyawjoyaqcs", "flhhcaal", "eli", "yjpkiidzyexz")); - model = BinaryData.fromObject(model).toObject(DnsResolverPolicyVirtualNetworkLinkPatch.class); - Assertions.assertEquals("flhhcaal", model.tags().get("jixisxyawjoyaqcs")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkPropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkPropertiesTests.java deleted file mode 100644 index f35b0ea8516b..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.management.SubResource; -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkProperties; -import org.junit.jupiter.api.Assertions; - -public final class DnsResolverPolicyVirtualNetworkLinkPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsResolverPolicyVirtualNetworkLinkProperties model - = BinaryData.fromString("{\"virtualNetwork\":{\"id\":\"mvb\"},\"provisioningState\":\"Deleting\"}") - .toObject(DnsResolverPolicyVirtualNetworkLinkProperties.class); - Assertions.assertEquals("mvb", model.virtualNetwork().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsResolverPolicyVirtualNetworkLinkProperties model - = new DnsResolverPolicyVirtualNetworkLinkProperties().withVirtualNetwork(new SubResource().withId("mvb")); - model = BinaryData.fromObject(model).toObject(DnsResolverPolicyVirtualNetworkLinkProperties.class); - Assertions.assertEquals("mvb", model.virtualNetwork().id()); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateMockTests.java deleted file mode 100644 index e594707c4230..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.SubResource; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.dnsresolver.DnsResolverManager; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLink; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"etag\":\"ilozapeewchpxlk\",\"properties\":{\"virtualNetwork\":{\"id\":\"kuziycsle\"},\"provisioningState\":\"Succeeded\"},\"location\":\"ztcktyh\",\"tags\":{\"ulwm\":\"edcg\",\"rjvpglydzgkrvqee\":\"rqzz\",\"nwy\":\"toepryu\"},\"id\":\"pzdm\",\"name\":\"vzvfvaawzqadfl\",\"type\":\"z\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - DnsResolverManager manager = DnsResolverManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DnsResolverPolicyVirtualNetworkLink response = manager.dnsResolverPolicyVirtualNetworkLinks() - .define("dao") - .withRegion("bzo") - .withExistingDnsResolverPolicy("sspuunnoxyhkx", "qddrihpfhoqcaae") - .withVirtualNetwork(new SubResource().withId("geivsiykzkdncj")) - .withTags( - mapOf("ogtqxepnylbf", "ulapzwyrp", "cib", "ajlyjtlvofqzhv", "uxrkjp", "fmo", "wiivwzjbhyzsx", "dwxf")) - .withIfMatch("tjb") - .withIfNoneMatch("kdmflvestmjlx") - .create(); - - Assertions.assertEquals("ztcktyh", response.location()); - Assertions.assertEquals("edcg", response.tags().get("ulwm")); - Assertions.assertEquals("kuziycsle", response.virtualNetwork().id()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksGetWithResponseMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksGetWithResponseMockTests.java deleted file mode 100644 index ef911427c72e..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksGetWithResponseMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.dnsresolver.DnsResolverManager; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLink; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsResolverPolicyVirtualNetworkLinksGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"etag\":\"qqfkuv\",\"properties\":{\"virtualNetwork\":{\"id\":\"xkdmligo\"},\"provisioningState\":\"Creating\"},\"location\":\"xk\",\"tags\":{\"ruocbgo\":\"oaz\",\"eoybfhjxakvvjgs\":\"rb\",\"dabg\":\"ordilmywwtkgkxny\",\"uwhcjyxccybv\":\"vudtjuewbcihx\"},\"id\":\"ayakkudzpx\",\"name\":\"wjplma\",\"type\":\"stcyohpfkyrkdbd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - DnsResolverManager manager = DnsResolverManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DnsResolverPolicyVirtualNetworkLink response = manager.dnsResolverPolicyVirtualNetworkLinks() - .getWithResponse("l", "rqttbajlkatnw", "yiopi", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xk", response.location()); - Assertions.assertEquals("oaz", response.tags().get("ruocbgo")); - Assertions.assertEquals("xkdmligo", response.virtualNetwork().id()); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksListMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksListMockTests.java deleted file mode 100644 index a7dc2fab13a9..000000000000 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinksListMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dnsresolver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.dnsresolver.DnsResolverManager; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLink; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsResolverPolicyVirtualNetworkLinksListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"etag\":\"tfpmvmemfnczdw\",\"properties\":{\"virtualNetwork\":{\"id\":\"b\"},\"provisioningState\":\"Updating\"},\"location\":\"l\",\"tags\":{\"ukuv\":\"podbzevwrdnh\",\"uluqypfc\":\"jcswsmys\"},\"id\":\"lerchpq\",\"name\":\"mfpjbabw\",\"type\":\"dfc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - DnsResolverManager manager = DnsResolverManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.dnsResolverPolicyVirtualNetworkLinks() - .list("iogsjkmnwq", "nobaiyhddviacegf", 266106906, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("l", response.iterator().next().location()); - Assertions.assertEquals("podbzevwrdnh", response.iterator().next().tags().get("ukuv")); - Assertions.assertEquals("b", response.iterator().next().virtualNetwork().id()); - } -} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversCreateOrUpdateMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversCreateOrUpdateMockTests.java index 381cc8247704..05ef588e2f31 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversCreateOrUpdateMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversCreateOrUpdateMockTests.java @@ -24,7 +24,7 @@ public final class DnsResolversCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"qxwbpokulpiu\",\"properties\":{\"virtualNetwork\":{\"id\":\"aasipqi\"},\"dnsResolverState\":\"Disconnected\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"erpqlpqwcciuqg\"},\"location\":\"butauvfb\",\"tags\":{\"afnn\":\"whhmhykojo\",\"ymkcdyhb\":\"lpichk\",\"ovljxywsu\":\"kkpwdreqnovvq\",\"aeneqnzarrwl\":\"syrsndsytgadgvra\"},\"id\":\"uu\",\"name\":\"jfqka\",\"type\":\"e\"}"; + = "{\"etag\":\"us\",\"properties\":{\"virtualNetwork\":{\"id\":\"touwaboekqv\"},\"dnsResolverState\":\"Connected\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"vbxwyjsflhh\"},\"location\":\"aln\",\"tags\":{\"kiidzyex\":\"isxyawjoyaqcslyj\",\"hb\":\"nelixhnrztfo\",\"dtpnapnyiropuhp\":\"xknalaulppg\",\"gqgitxmedjvcsl\":\"gvpgy\"},\"id\":\"n\",\"name\":\"wwncwzzhxgk\",\"type\":\"rmgucnap\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,18 +34,19 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); DnsResolver response = manager.dnsResolvers() - .define("ksmond") - .withRegion("glyatddckcbcuej") - .withExistingResourceGroup("xkp") - .withVirtualNetwork(new SubResource().withId("hojvpajqgxysmocm")) - .withTags(mapOf("sxsdqrhzoymibm", "gciqibrh")) - .withIfMatch("voqacpiexpbt") - .withIfNoneMatch("iwbwoenwashrtdtk") + .define("nmxiebwwaloayqc") + .withRegion("vriuhprwmdyvx") + .withExistingResourceGroup("xzvlvqhjkbegib") + .withVirtualNetwork(new SubResource().withId("wyzmhtxon")) + .withTags(mapOf("xrmcqibycnojvk", "yriwwroyqb", "vgqzcjrvxd", "mefqsgzvahapjyzh", "vawjvzunlu", + "zlmwlxkvugfhz", "xipeilpjzuaejx", "hnnpr")) + .withIfMatch("wozuhkf") + .withIfNoneMatch("bsjyofdx") .create(); - Assertions.assertEquals("butauvfb", response.location()); - Assertions.assertEquals("whhmhykojo", response.tags().get("afnn")); - Assertions.assertEquals("aasipqi", response.virtualNetwork().id()); + Assertions.assertEquals("aln", response.location()); + Assertions.assertEquals("isxyawjoyaqcslyj", response.tags().get("kiidzyex")); + Assertions.assertEquals("touwaboekqv", response.virtualNetwork().id()); } // Use "Map.of" if available diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversDeleteMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversDeleteMockTests.java index 3c03aa30f27d..13279cb7ede7 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversDeleteMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.dnsResolvers().delete("mwmbes", "dnkwwtppjflcxog", "okonzmnsikvmkqz", com.azure.core.util.Context.NONE); + manager.dnsResolvers().delete("k", "nxdhbt", "kphywpnvjto", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversGetByResourceGroupWithResponseMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversGetByResourceGroupWithResponseMockTests.java index 93164332565c..27454095e862 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversGetByResourceGroupWithResponseMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversGetByResourceGroupWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class DnsResolversGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"tibqdxbxwakb\",\"properties\":{\"virtualNetwork\":{\"id\":\"qxn\"},\"dnsResolverState\":\"Disconnected\",\"provisioningState\":\"Updating\",\"resourceGuid\":\"huri\"},\"location\":\"bpodxunkbebxm\",\"tags\":{\"koievseo\":\"yntwlrbq\",\"wzizxbmpgcjefuzm\":\"gqrlltmuwla\"},\"id\":\"vpbttd\",\"name\":\"morppxebmnzbtbh\",\"type\":\"pglkf\"}"; + = "{\"etag\":\"scrpabgyepsbjt\",\"properties\":{\"virtualNetwork\":{\"id\":\"qugxywpmueefjzwf\"},\"dnsResolverState\":\"Connected\",\"provisioningState\":\"Deleting\",\"resourceGuid\":\"dsuyonobgla\"},\"location\":\"qxtccmgyudx\",\"tags\":{\"txhdzh\":\"moyrxvwfudwpz\",\"rxsbkyvp\":\"rqjbhckfrl\"},\"id\":\"ca\",\"name\":\"uzbpzkafku\",\"type\":\"b\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); DnsResolver response = manager.dnsResolvers() - .getByResourceGroupWithResponse("qqkdltfzxmhhvhgu", "eodkwobda", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("nermcl", "plpho", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("bpodxunkbebxm", response.location()); - Assertions.assertEquals("yntwlrbq", response.tags().get("koievseo")); - Assertions.assertEquals("qxn", response.virtualNetwork().id()); + Assertions.assertEquals("qxtccmgyudx", response.location()); + Assertions.assertEquals("moyrxvwfudwpz", response.tags().get("txhdzh")); + Assertions.assertEquals("qugxywpmueefjzwf", response.virtualNetwork().id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByResourceGroupMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByResourceGroupMockTests.java index 296831034cb6..65cd1dee3758 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByResourceGroupMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByResourceGroupMockTests.java @@ -22,7 +22,7 @@ public final class DnsResolversListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"sdyhtozfikdowwq\",\"properties\":{\"virtualNetwork\":{\"id\":\"v\"},\"dnsResolverState\":\"Connected\",\"provisioningState\":\"Creating\",\"resourceGuid\":\"ithhqzon\"},\"location\":\"ggbhcohfwds\",\"tags\":{\"fgdkzzew\":\"aljutiiswac\"},\"id\":\"fvhqc\",\"name\":\"a\",\"type\":\"lvpnpp\"}]}"; + = "{\"value\":[{\"etag\":\"hseyvju\",\"properties\":{\"virtualNetwork\":{\"id\":\"tslhspkdeem\"},\"dnsResolverState\":\"Connected\",\"provisioningState\":\"Failed\",\"resourceGuid\":\"gkvtmelmqkrhah\"},\"location\":\"juahaquhcdhmdual\",\"tags\":{\"adm\":\"qpv\",\"r\":\"sr\",\"fmisg\":\"vxpvgomz\"},\"id\":\"bnbbeldawkz\",\"name\":\"ali\",\"type\":\"urqhaka\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.dnsResolvers().listByResourceGroup("ohdneuel", 1976701075, com.azure.core.util.Context.NONE); + = manager.dnsResolvers().listByResourceGroup("rnwb", 1267023941, com.azure.core.util.Context.NONE); - Assertions.assertEquals("ggbhcohfwds", response.iterator().next().location()); - Assertions.assertEquals("aljutiiswac", response.iterator().next().tags().get("fgdkzzew")); - Assertions.assertEquals("v", response.iterator().next().virtualNetwork().id()); + Assertions.assertEquals("juahaquhcdhmdual", response.iterator().next().location()); + Assertions.assertEquals("qpv", response.iterator().next().tags().get("adm")); + Assertions.assertEquals("tslhspkdeem", response.iterator().next().virtualNetwork().id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByVirtualNetworkMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByVirtualNetworkMockTests.java index 72b2bf18bf57..eee97c1fe9df 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByVirtualNetworkMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListByVirtualNetworkMockTests.java @@ -21,7 +21,7 @@ public final class DnsResolversListByVirtualNetworkMockTests { @Test public void testListByVirtualNetwork() throws Exception { - String responseStr = "{\"value\":[{\"id\":\"vqtmnub\"}]}"; + String responseStr = "{\"value\":[{\"id\":\"blcg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,8 +31,8 @@ public void testListByVirtualNetwork() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.dnsResolvers() - .listByVirtualNetwork("modfvuefywsbpfvm", "yhrfouyftaakcpw", 1209208693, com.azure.core.util.Context.NONE); + .listByVirtualNetwork("khfxobbcswsrt", "riplrbpbewtg", 628576431, com.azure.core.util.Context.NONE); - Assertions.assertEquals("vqtmnub", response.iterator().next().id()); + Assertions.assertEquals("blcg", response.iterator().next().id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListMockTests.java index 9163a4e0c776..025ff6c8c7e7 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolversListMockTests.java @@ -22,7 +22,7 @@ public final class DnsResolversListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"lrwdmhdlxyj\",\"properties\":{\"virtualNetwork\":{\"id\":\"sag\"},\"dnsResolverState\":\"Disconnected\",\"provisioningState\":\"Canceled\",\"resourceGuid\":\"gwq\"},\"location\":\"nedgfbc\",\"tags\":{\"pkeqdcvdrhvoo\":\"vq\",\"dopcjwvnh\":\"sotbob\",\"mgxcxrslpm\":\"ld\"},\"id\":\"twuoegrpkhjwni\",\"name\":\"qsluicp\",\"type\":\"ggkzzlvmbmpa\"}]}"; + = "{\"value\":[{\"etag\":\"shsfwxosowzxcu\",\"properties\":{\"virtualNetwork\":{\"id\":\"cjooxdjebwpucwwf\"},\"dnsResolverState\":\"Connected\",\"provisioningState\":\"Canceled\",\"resourceGuid\":\"euecivyhzceuoj\"},\"location\":\"rw\",\"tags\":{\"nrjawgqwg\":\"iotwmcdytdxwit\",\"klwndnhjdauwhv\":\"hniskxfbkpyc\",\"zbtd\":\"l\"},\"id\":\"xujznbmpowu\",\"name\":\"przqlveu\",\"type\":\"lupj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.dnsResolvers().list(1360002238, com.azure.core.util.Context.NONE); + PagedIterable response = manager.dnsResolvers().list(1039189909, com.azure.core.util.Context.NONE); - Assertions.assertEquals("nedgfbc", response.iterator().next().location()); - Assertions.assertEquals("vq", response.iterator().next().tags().get("pkeqdcvdrhvoo")); - Assertions.assertEquals("sag", response.iterator().next().virtualNetwork().id()); + Assertions.assertEquals("rw", response.iterator().next().location()); + Assertions.assertEquals("iotwmcdytdxwit", response.iterator().next().tags().get("nrjawgqwg")); + Assertions.assertEquals("cjooxdjebwpucwwf", response.iterator().next().virtualNetwork().id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesCreateOrUpdateWithResponseMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesCreateOrUpdateWithResponseMockTests.java index 04e876cf4c41..668e5313c41e 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesCreateOrUpdateWithResponseMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesCreateOrUpdateWithResponseMockTests.java @@ -26,7 +26,7 @@ public final class ForwardingRulesCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"etag\":\"fdntwjchrdgoih\",\"properties\":{\"domainName\":\"umwctondz\",\"targetDnsServers\":[{\"ipAddress\":\"uu\",\"port\":1575839239},{\"ipAddress\":\"lwg\",\"port\":950264717},{\"ipAddress\":\"sb\",\"port\":1284513946},{\"ipAddress\":\"vvt\",\"port\":1304318948}],\"metadata\":{\"fxqknpirgneptt\":\"qfi\",\"lpijnkrxfrd\":\"qmsniffcdmqnro\",\"zzronasx\":\"hcrat\"},\"forwardingRuleState\":\"Disabled\",\"provisioningState\":\"Creating\"},\"id\":\"yzhftwesgogczh\",\"name\":\"nnxk\",\"type\":\"lgnyhmo\"}"; + = "{\"etag\":\"yylhalnswhccsp\",\"properties\":{\"domainName\":\"kaivwit\",\"targetDnsServers\":[{\"ipAddress\":\"cywuggwol\",\"port\":1226562367},{\"ipAddress\":\"zbwemh\",\"port\":200585156},{\"ipAddress\":\"sbrgz\",\"port\":1820040321},{\"ipAddress\":\"swe\",\"port\":151812446}],\"metadata\":{\"tlstvlzywem\":\"xggicccnxqhuexmk\",\"lusiy\":\"zrncsdt\",\"cy\":\"bsfgytguslfea\",\"xgfpelolppv\":\"qukyhejhzi\"},\"forwardingRuleState\":\"Enabled\",\"provisioningState\":\"Updating\"},\"id\":\"ujzra\",\"name\":\"htwdwrftswibyrcd\",\"type\":\"bhshfwpracstwity\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,22 +36,22 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ForwardingRule response = manager.forwardingRules() - .define("j") - .withExistingDnsForwardingRuleset("qjjlwuen", "rkpyouaibrebqaay") - .withDomainName("tezlwff") - .withTargetDnsServers( - Arrays.asList(new TargetDnsServer().withIpAddress("akpjpqqmtedlt").withPort(997938264))) - .withMetadata(mapOf("upkvipmdsc", "yeozphvwauyqncy", "totxhojujb", "xqupevzhf", "n", "pelmcuvhixbjxyf")) + .define("r") + .withExistingDnsForwardingRuleset("uximerqfobw", "znkbykutwpfhpagm") + .withDomainName("kkze") + .withTargetDnsServers(Arrays.asList(new TargetDnsServer().withIpAddress("l").withPort(1094584073), + new TargetDnsServer().withIpAddress("pusdstt").withPort(1072941550))) + .withMetadata(mapOf("akufgmjz", "bbejdcngqqm", "grtwae", "wr", "zkopb", "u")) .withForwardingRuleState(ForwardingRuleState.ENABLED) - .withIfMatch("iwii") - .withIfNoneMatch("htywubxcbihwq") + .withIfMatch("equi") + .withIfNoneMatch("hxicslfaoqz") .create(); - Assertions.assertEquals("umwctondz", response.domainName()); - Assertions.assertEquals("uu", response.targetDnsServers().get(0).ipAddress()); - Assertions.assertEquals(1575839239, response.targetDnsServers().get(0).port()); - Assertions.assertEquals("qfi", response.metadata().get("fxqknpirgneptt")); - Assertions.assertEquals(ForwardingRuleState.DISABLED, response.forwardingRuleState()); + Assertions.assertEquals("kaivwit", response.domainName()); + Assertions.assertEquals("cywuggwol", response.targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(1226562367, response.targetDnsServers().get(0).port()); + Assertions.assertEquals("xggicccnxqhuexmk", response.metadata().get("tlstvlzywem")); + Assertions.assertEquals(ForwardingRuleState.ENABLED, response.forwardingRuleState()); } // Use "Map.of" if available diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesDeleteWithResponseMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesDeleteWithResponseMockTests.java index 7fdce1dffb9b..04be5b5ab237 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesDeleteWithResponseMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesDeleteWithResponseMockTests.java @@ -28,8 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.forwardingRules() - .deleteWithResponse("ioolvrwxkvtkkgll", "wjygvjayvblmhvk", "uhbxvvy", "gsopbyrqufegxu", - com.azure.core.util.Context.NONE); + .deleteWithResponse("rbuukzclewyhmlwp", "ztzp", "fn", "ckw", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesGetWithResponseMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesGetWithResponseMockTests.java index 0ba4082948fc..f88ee73cb44c 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesGetWithResponseMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ForwardingRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"etag\":\"ngitvgbmhrixkwm\",\"properties\":{\"domainName\":\"ijejvegrhbpn\",\"targetDnsServers\":[{\"ipAddress\":\"xexccbdreaxhcexd\",\"port\":894068250},{\"ipAddress\":\"qahqkghtpwijn\",\"port\":1759061120}],\"metadata\":{\"cxzbfvoowvr\":\"f\",\"qp\":\"mtg\"},\"forwardingRuleState\":\"Enabled\",\"provisioningState\":\"Creating\"},\"id\":\"on\",\"name\":\"myhgfipnsxkmc\",\"type\":\"a\"}"; + = "{\"etag\":\"rjaltolmncw\",\"properties\":{\"domainName\":\"obqwcsdbnwdcfh\",\"targetDnsServers\":[{\"ipAddress\":\"qdpfuvglsbjjca\",\"port\":1995846414},{\"ipAddress\":\"bvtvudutncormr\",\"port\":1360670450}],\"metadata\":{\"dknnqvsazn\":\"cofudflvkgjub\",\"orudsgsa\":\"n\"},\"forwardingRuleState\":\"Disabled\",\"provisioningState\":\"Creating\"},\"id\":\"rauwjuetaebu\",\"name\":\"u\",\"type\":\"dmovsm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ForwardingRule response = manager.forwardingRules() - .getWithResponse("wz", "bnhlmc", "l", com.azure.core.util.Context.NONE) + .getWithResponse("fz", "whxxbuyqax", "feqztppriol", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ijejvegrhbpn", response.domainName()); - Assertions.assertEquals("xexccbdreaxhcexd", response.targetDnsServers().get(0).ipAddress()); - Assertions.assertEquals(894068250, response.targetDnsServers().get(0).port()); - Assertions.assertEquals("f", response.metadata().get("cxzbfvoowvr")); - Assertions.assertEquals(ForwardingRuleState.ENABLED, response.forwardingRuleState()); + Assertions.assertEquals("obqwcsdbnwdcfh", response.domainName()); + Assertions.assertEquals("qdpfuvglsbjjca", response.targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(1995846414, response.targetDnsServers().get(0).port()); + Assertions.assertEquals("cofudflvkgjub", response.metadata().get("dknnqvsazn")); + Assertions.assertEquals(ForwardingRuleState.DISABLED, response.forwardingRuleState()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesListMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesListMockTests.java index 1a87a48b2d6a..e83d808c9d6a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesListMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesListMockTests.java @@ -23,7 +23,7 @@ public final class ForwardingRulesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"mhjglikkxwslolb\",\"properties\":{\"domainName\":\"pvuzlmv\",\"targetDnsServers\":[{\"ipAddress\":\"lfktgplcrpwjxe\",\"port\":282428927}],\"metadata\":{\"pn\":\"brnjwmw\"},\"forwardingRuleState\":\"Enabled\",\"provisioningState\":\"Updating\"},\"id\":\"joqkagfhsxt\",\"name\":\"augzxnfaazpxdtn\",\"type\":\"dm\"}]}"; + = "{\"value\":[{\"etag\":\"fkifr\",\"properties\":{\"domainName\":\"tpuqujmq\",\"targetDnsServers\":[{\"ipAddress\":\"kfbtndoaongbjc\",\"port\":905406491},{\"ipAddress\":\"jitcjedftwwaez\",\"port\":1301478988},{\"ipAddress\":\"v\",\"port\":2090841381}],\"metadata\":{\"oxciqopidoamcio\":\"oqouicybxarzgszu\",\"zxkhnzbonlwnto\":\"hkh\",\"zcmrvexztvb\":\"gokdwbwhks\"},\"forwardingRuleState\":\"Disabled\",\"provisioningState\":\"Failed\"},\"id\":\"aoyzkoow\",\"name\":\"lmnguxaw\",\"type\":\"aldsy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.forwardingRules().list("krrjrea", "xt", 1090066080, com.azure.core.util.Context.NONE); + = manager.forwardingRules().list("l", "wabm", 1200703069, com.azure.core.util.Context.NONE); - Assertions.assertEquals("pvuzlmv", response.iterator().next().domainName()); - Assertions.assertEquals("lfktgplcrpwjxe", response.iterator().next().targetDnsServers().get(0).ipAddress()); - Assertions.assertEquals(282428927, response.iterator().next().targetDnsServers().get(0).port()); - Assertions.assertEquals("brnjwmw", response.iterator().next().metadata().get("pn")); - Assertions.assertEquals(ForwardingRuleState.ENABLED, response.iterator().next().forwardingRuleState()); + Assertions.assertEquals("tpuqujmq", response.iterator().next().domainName()); + Assertions.assertEquals("kfbtndoaongbjc", response.iterator().next().targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(905406491, response.iterator().next().targetDnsServers().get(0).port()); + Assertions.assertEquals("oqouicybxarzgszu", response.iterator().next().metadata().get("oxciqopidoamcio")); + Assertions.assertEquals(ForwardingRuleState.DISABLED, response.iterator().next().forwardingRuleState()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsCreateOrUpdateMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsCreateOrUpdateMockTests.java index 0b8878a7e086..327eb3533183 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsCreateOrUpdateMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsCreateOrUpdateMockTests.java @@ -27,7 +27,7 @@ public final class InboundEndpointsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"zvaytdwkqbr\",\"properties\":{\"ipConfigurations\":[{\"subnet\":{\"id\":\"paxh\"},\"privateIpAddress\":\"iilivpdtiirqtd\",\"privateIpAllocationMethod\":\"Dynamic\"},{\"subnet\":{\"id\":\"oruzfgsquyfxrxx\"},\"privateIpAddress\":\"ptramxj\",\"privateIpAllocationMethod\":\"Dynamic\"}],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"wxuqlcvydypatdoo\"},\"location\":\"jkniodko\",\"tags\":{\"rodtjinfwjlfl\":\"wnujhemmsbvdk\"},\"id\":\"kacjvefkdlfo\",\"name\":\"kggkfpa\",\"type\":\"ao\"}"; + = "{\"etag\":\"ibqdxbxwakbogqx\",\"properties\":{\"ipConfigurations\":[{\"subnet\":{\"id\":\"kzgxhurip\"},\"privateIpAddress\":\"podxunkb\",\"privateIpAllocationMethod\":\"Dynamic\"},{\"subnet\":{\"id\":\"ubyyntw\"},\"privateIpAddress\":\"bqtkoievseotgqr\",\"privateIpAllocationMethod\":\"Dynamic\"},{\"subnet\":{\"id\":\"u\"},\"privateIpAddress\":\"auwzizxbmpgc\",\"privateIpAllocationMethod\":\"Dynamic\"}],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"uvpb\"},\"location\":\"d\",\"tags\":{\"xe\":\"rp\",\"bhjpglkfgohdne\":\"mnzb\",\"phsdyhto\":\"el\",\"v\":\"fikdowwqu\"},\"id\":\"zx\",\"name\":\"lvithhqzonosgg\",\"type\":\"hcohfwdsjnk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,31 +37,21 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); InboundEndpoint response = manager.inboundEndpoints() - .define("cktqumiekkezzi") - .withRegion("ajxq") - .withExistingDnsResolver("ag", "rvimjwosytxitcsk") - .withIpConfigurations(Arrays.asList( - new IpConfiguration().withSubnet(new SubResource().withId("dgqggebdu")) - .withPrivateIpAddress("g") - .withPrivateIpAllocationMethod(IpAllocationMethod.DYNAMIC), - new IpConfiguration().withSubnet(new SubResource().withId("db")) - .withPrivateIpAddress("atpxl") - .withPrivateIpAllocationMethod(IpAllocationMethod.DYNAMIC), - new IpConfiguration().withSubnet(new SubResource().withId("yjmoadsu")) - .withPrivateIpAddress("r") - .withPrivateIpAllocationMethod(IpAllocationMethod.DYNAMIC), - new IpConfiguration().withSubnet(new SubResource().withId("mjsjqb")) - .withPrivateIpAddress("hyxxrwlycoduhpk") - .withPrivateIpAllocationMethod(IpAllocationMethod.STATIC))) - .withTags(mapOf("ubeddg", "hky", "pxacqqudfn", "sofwqmzqalkrmnji")) - .withIfMatch("vfdnwnwmewzsyyce") - .withIfNoneMatch("zsoibjudpfrxtr") + .define("qlfmmdnbb") + .withRegion("zdzucerscdntnevf") + .withExistingDnsResolver("uie", "tgccymvaolpss") + .withIpConfigurations(Arrays.asList(new IpConfiguration().withSubnet(new SubResource().withId("zdxss")) + .withPrivateIpAddress("bzmnvdfznud") + .withPrivateIpAllocationMethod(IpAllocationMethod.DYNAMIC))) + .withTags(mapOf("tmweriofzpyq", "mygtdssls", "hhszh", "emwabnet", "lvwiwubmwmbesl", "d", "pp", "nkww")) + .withIfMatch("v") + .withIfNoneMatch("gureodkwobdag") .create(); - Assertions.assertEquals("jkniodko", response.location()); - Assertions.assertEquals("wnujhemmsbvdk", response.tags().get("rodtjinfwjlfl")); - Assertions.assertEquals("paxh", response.ipConfigurations().get(0).subnet().id()); - Assertions.assertEquals("iilivpdtiirqtd", response.ipConfigurations().get(0).privateIpAddress()); + Assertions.assertEquals("d", response.location()); + Assertions.assertEquals("rp", response.tags().get("xe")); + Assertions.assertEquals("kzgxhurip", response.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals("podxunkb", response.ipConfigurations().get(0).privateIpAddress()); Assertions.assertEquals(IpAllocationMethod.DYNAMIC, response.ipConfigurations().get(0).privateIpAllocationMethod()); } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsDeleteMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsDeleteMockTests.java index bca877a628b0..044df5bed348 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsDeleteMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsDeleteMockTests.java @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.inboundEndpoints() - .delete("iipfpubj", "bwwift", "hqkvpuvksgplsak", "ynfs", com.azure.core.util.Context.NONE); + manager.inboundEndpoints().delete("t", "oellwp", "fdygpfqbuaceopz", "qrhhu", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsGetWithResponseMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsGetWithResponseMockTests.java index 98498481bedb..8adb0914084c 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsGetWithResponseMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class InboundEndpointsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"etag\":\"lyzrpzbchckqqzqi\",\"properties\":{\"ipConfigurations\":[{\"subnet\":{\"id\":\"ysuiizynkedya\"},\"privateIpAddress\":\"wyhqmibzyhwits\",\"privateIpAllocationMethod\":\"Static\"}],\"provisioningState\":\"Failed\",\"resourceGuid\":\"pcdpumnz\"},\"location\":\"wznm\",\"tags\":{\"gj\":\"knso\",\"vokotllxdyh\":\"xbldtlwwrlkdmtn\",\"oocrkvcikhnv\":\"syocogjltdtbnnha\"},\"id\":\"amqgxqquezikyw\",\"name\":\"gxk\",\"type\":\"lla\"}"; + = "{\"etag\":\"dmoizpostmg\",\"properties\":{\"ipConfigurations\":[{\"subnet\":{\"id\":\"bunrmfqjhhk\"},\"privateIpAddress\":\"pvjymjhxxjyng\",\"privateIpAllocationMethod\":\"Static\"}],\"provisioningState\":\"Updating\",\"resourceGuid\":\"tswb\"},\"location\":\"zvszj\",\"tags\":{\"ivetvtcq\":\"vjfdx\",\"mcbxvwvxysl\":\"qtdo\",\"ytkblmpew\":\"bhsfxob\"},\"id\":\"wfbkrvrns\",\"name\":\"shqjohxcrsbf\",\"type\":\"vasrruvwb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); InboundEndpoint response = manager.inboundEndpoints() - .getWithResponse("n", "jphuopxodlqi", "ntorzihleosjswsr", com.azure.core.util.Context.NONE) + .getWithResponse("opppcqeq", "ol", "dahzxctobg", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wznm", response.location()); - Assertions.assertEquals("knso", response.tags().get("gj")); - Assertions.assertEquals("ysuiizynkedya", response.ipConfigurations().get(0).subnet().id()); - Assertions.assertEquals("wyhqmibzyhwits", response.ipConfigurations().get(0).privateIpAddress()); + Assertions.assertEquals("zvszj", response.location()); + Assertions.assertEquals("vjfdx", response.tags().get("ivetvtcq")); + Assertions.assertEquals("bunrmfqjhhk", response.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals("pvjymjhxxjyng", response.ipConfigurations().get(0).privateIpAddress()); Assertions.assertEquals(IpAllocationMethod.STATIC, response.ipConfigurations().get(0).privateIpAllocationMethod()); } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsListMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsListMockTests.java index 672d743f8ea1..0306af162ad0 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsListMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsListMockTests.java @@ -23,7 +23,7 @@ public final class InboundEndpointsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"vvcnayr\",\"properties\":{\"ipConfigurations\":[{\"subnet\":{\"id\":\"nxxmueedndrdv\"},\"privateIpAddress\":\"kwqqtchealmf\",\"privateIpAllocationMethod\":\"Static\"},{\"subnet\":{\"id\":\"aygdvwvgpioh\"},\"privateIpAddress\":\"xrtfudxep\",\"privateIpAllocationMethod\":\"Static\"},{\"subnet\":{\"id\":\"agvrvmnpkuk\"},\"privateIpAddress\":\"i\",\"privateIpAllocationMethod\":\"Static\"}],\"provisioningState\":\"Updating\",\"resourceGuid\":\"wi\"},\"location\":\"njhf\",\"tags\":{\"rey\":\"mszkkfo\",\"elpcirelsfeaenwa\":\"kzikfjawneaivxwc\"},\"id\":\"fatkld\",\"name\":\"xbjhwuaanozjosph\",\"type\":\"oulpjrv\"}]}"; + = "{\"value\":[{\"etag\":\"tpvjzbexilzznfqq\",\"properties\":{\"ipConfigurations\":[{\"subnet\":{\"id\":\"pmqtaru\"},\"privateIpAddress\":\"jmkcjhwqytj\",\"privateIpAllocationMethod\":\"Static\"}],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"ewgdrjervn\"},\"location\":\"nqpeh\",\"tags\":{\"nzdndslgna\":\"oygmift\"},\"id\":\"qig\",\"name\":\"nduhavhqlkthum\",\"type\":\"qolbgyc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,13 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.inboundEndpoints().list("melwuipiccjz", "z", 154268521, com.azure.core.util.Context.NONE); + PagedIterable response = manager.inboundEndpoints() + .list("sqfsubcgjbirxb", "ybsrfbjfdtwss", 22179172, com.azure.core.util.Context.NONE); - Assertions.assertEquals("njhf", response.iterator().next().location()); - Assertions.assertEquals("mszkkfo", response.iterator().next().tags().get("rey")); - Assertions.assertEquals("nxxmueedndrdv", response.iterator().next().ipConfigurations().get(0).subnet().id()); - Assertions.assertEquals("kwqqtchealmf", - response.iterator().next().ipConfigurations().get(0).privateIpAddress()); + Assertions.assertEquals("nqpeh", response.iterator().next().location()); + Assertions.assertEquals("oygmift", response.iterator().next().tags().get("nzdndslgna")); + Assertions.assertEquals("pmqtaru", response.iterator().next().ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals("jmkcjhwqytj", response.iterator().next().ipConfigurations().get(0).privateIpAddress()); Assertions.assertEquals(IpAllocationMethod.STATIC, response.iterator().next().ipConfigurations().get(0).privateIpAllocationMethod()); } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsCreateOrUpdateMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsCreateOrUpdateMockTests.java index 135fd6a093d8..55cdc4aac56e 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsCreateOrUpdateMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsCreateOrUpdateMockTests.java @@ -24,7 +24,7 @@ public final class OutboundEndpointsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"fgmjzrwrdgrt\",\"properties\":{\"subnet\":{\"id\":\"enuuzkopbm\"},\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"dwoyuhhziuiefoz\"},\"location\":\"dmsmlm\",\"tags\":{\"xicslfao\":\"oftrmaequia\",\"iyylhalnswhccsp\":\"z\"},\"id\":\"kaivwit\",\"name\":\"scywuggwoluhc\",\"type\":\"bwemhairs\"}"; + = "{\"etag\":\"qkvpuvksgplsakn\",\"properties\":{\"subnet\":{\"id\":\"fsynljphuop\"},\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"qiy\"},\"location\":\"orzihle\",\"tags\":{\"yzrpzbchckqqzq\":\"swsrms\",\"ysuiizynkedya\":\"ox\",\"pyy\":\"rwyhqmibzyhwitsm\"},\"id\":\"pcdpumnz\",\"name\":\"mwzn\",\"type\":\"abikns\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,18 +34,19 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); OutboundEndpoint response = manager.outboundEndpoints() - .define("zxkhnzbonlwnto") - .withRegion("tlmngu") - .withExistingDnsResolver("oxciqopidoamcio", "hkh") - .withSubnet(new SubResource().withId("kszzcmrvexztv")) - .withTags(mapOf("ldsyuuximerqfob", "q", "utwpfhp", "yznkby")) - .withIfMatch("gvbbejdcng") - .withIfNoneMatch("qmoa") + .define("nqxwbp") + .withRegion("butauvfb") + .withExistingDnsResolver("voqacpiexpbt", "iwbwoenwashrtdtk") + .withSubnet(new SubResource().withId("asipqiio")) + .withTags(mapOf("afnn", "whhmhykojo", "ymkcdyhb", "lpichk", "ovljxywsu", "kkpwdreqnovvq", "aeneqnzarrwl", + "syrsndsytgadgvra")) + .withIfMatch("iipfpubj") + .withIfNoneMatch("bwwift") .create(); - Assertions.assertEquals("dmsmlm", response.location()); - Assertions.assertEquals("oftrmaequia", response.tags().get("xicslfao")); - Assertions.assertEquals("enuuzkopbm", response.subnet().id()); + Assertions.assertEquals("orzihle", response.location()); + Assertions.assertEquals("swsrms", response.tags().get("yzrpzbchckqqzq")); + Assertions.assertEquals("fsynljphuop", response.subnet().id()); } // Use "Map.of" if available diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsDeleteMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsDeleteMockTests.java index dd63d2e11c61..e458a6186a59 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsDeleteMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsDeleteMockTests.java @@ -28,8 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.outboundEndpoints() - .delete("pulpqblylsyxk", "jnsjervtiagxsd", "zuempsbzkf", "beyvpnqicvinvkjj", - com.azure.core.util.Context.NONE); + .delete("ljuti", "swacffgdkzz", "wkfvhqcrailvp", "ppfufl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsGetWithResponseMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsGetWithResponseMockTests.java index 72f3d9b18d2f..16ab368676f7 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsGetWithResponseMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class OutboundEndpointsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"etag\":\"kwyfzqwhxxbuyqax\",\"properties\":{\"subnet\":{\"id\":\"eqz\"},\"provisioningState\":\"Updating\",\"resourceGuid\":\"iolxor\"},\"location\":\"lt\",\"tags\":{\"wcsdbnwdcfhucq\":\"ncwsob\",\"vxb\":\"pfuvglsbjjca\",\"udutnco\":\"t\",\"xqtvcofu\":\"mr\"},\"id\":\"f\",\"name\":\"vkg\",\"type\":\"u\"}"; + = "{\"etag\":\"vdrhvoo\",\"properties\":{\"subnet\":{\"id\":\"otbobzdopcj\"},\"provisioningState\":\"Updating\",\"resourceGuid\":\"dldwmgxc\"},\"location\":\"slpmutwuo\",\"tags\":{\"qsluicp\":\"pkhjwni\",\"modfvuefywsbpfvm\":\"ggkzzlvmbmpa\"},\"id\":\"yhrfouyftaakcpw\",\"name\":\"yzvqt\",\"type\":\"nubexk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); OutboundEndpoint response = manager.outboundEndpoints() - .getWithResponse("dxrbuukzcle", "yhmlwpaztzp", "fn", com.azure.core.util.Context.NONE) + .getWithResponse("wdmhdlxyjrxs", "gafcnihgwqapnedg", "bcvkcvqvpkeq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("lt", response.location()); - Assertions.assertEquals("ncwsob", response.tags().get("wcsdbnwdcfhucq")); - Assertions.assertEquals("eqz", response.subnet().id()); + Assertions.assertEquals("slpmutwuo", response.location()); + Assertions.assertEquals("pkhjwni", response.tags().get("qsluicp")); + Assertions.assertEquals("otbobzdopcj", response.subnet().id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsListMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsListMockTests.java index 602df4ee2248..a9ecf2832225 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsListMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointsListMockTests.java @@ -22,7 +22,7 @@ public final class OutboundEndpointsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"sahmky\",\"properties\":{\"subnet\":{\"id\":\"rauwjuetaebu\"},\"provisioningState\":\"Deleting\",\"resourceGuid\":\"movsmzlxwabmqoe\"},\"location\":\"ifrvtpu\",\"tags\":{\"btndo\":\"mqlgk\",\"jitcjedftwwaez\":\"ongbjcnt\"},\"id\":\"ojvdcpzfoqo\",\"name\":\"i\",\"type\":\"ybxarzgszu\"}]}"; + = "{\"value\":[{\"etag\":\"ojvpa\",\"properties\":{\"subnet\":{\"id\":\"gxysmocmbqfqvm\"},\"provisioningState\":\"Creating\",\"resourceGuid\":\"zapvhelx\"},\"location\":\"glyatddckcbcuej\",\"tags\":{\"sxsdqrhzoymibm\":\"gciqibrh\"},\"id\":\"qyib\",\"name\":\"hwflu\",\"type\":\"zdtmhrkwofy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.outboundEndpoints().list("gdknnqv", "aznqntoru", 761865502, com.azure.core.util.Context.NONE); + PagedIterable response = manager.outboundEndpoints() + .list("zksmondj", "quxvypomgkop", 1364703724, com.azure.core.util.Context.NONE); - Assertions.assertEquals("ifrvtpu", response.iterator().next().location()); - Assertions.assertEquals("mqlgk", response.iterator().next().tags().get("btndo")); - Assertions.assertEquals("rauwjuetaebu", response.iterator().next().subnet().id()); + Assertions.assertEquals("glyatddckcbcuej", response.iterator().next().location()); + Assertions.assertEquals("gciqibrh", response.iterator().next().tags().get("sxsdqrhzoymibm")); + Assertions.assertEquals("gxysmocmbqfqvm", response.iterator().next().subnet().id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksCreateOrUpdateMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksCreateOrUpdateMockTests.java index b3132de387e5..6112660caf2a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksCreateOrUpdateMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksCreateOrUpdateMockTests.java @@ -24,7 +24,7 @@ public final class VirtualNetworkLinksCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"dyftumrtwna\",\"properties\":{\"virtualNetwork\":{\"id\":\"slbi\"},\"metadata\":{\"qphchqnrnrpxehuw\":\"jgcyztsfmznba\",\"bydvkhbejdz\":\"ykqgaifmvik\"},\"provisioningState\":\"Succeeded\"},\"id\":\"dsrhnjiv\",\"name\":\"lvtno\",\"type\":\"qfzgemjdftul\"}"; + = "{\"etag\":\"ho\",\"properties\":{\"virtualNetwork\":{\"id\":\"qzudphq\"},\"metadata\":{\"nwcvtbvkayhmtnv\":\"dkfw\",\"zcjaesgvvsccy\":\"qiatkzwpcnp\",\"hwyg\":\"jguq\",\"semdwzrmu\":\"lvdnkfx\"},\"provisioningState\":\"Succeeded\"},\"id\":\"cqdpsqxqvpsvuoym\",\"name\":\"ccelve\",\"type\":\"rypqlmfeo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,16 +34,17 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); VirtualNetworkLink response = manager.virtualNetworkLinks() - .define("mrsreuzvxurisjnh") - .withExistingDnsForwardingRuleset("asdvl", "fwdgzxulucvp") - .withVirtualNetwork(new SubResource().withId("xmrhu")) - .withMetadata(mapOf("upauut", "pcesutrg")) - .withIfMatch("zjxvydfcea") - .withIfNoneMatch("vlhv") + .define("rgz") + .withExistingDnsForwardingRuleset("lfzxiavrmbzonoki", "rjqc") + .withVirtualNetwork(new SubResource().withId("indfpwpjyl")) + .withMetadata(mapOf("gofel", "lhflsjcdhszfjvf", "rqmq", "a", "tvsexsowuel", "ldvriiiojnalghfk", "wws", + "qhhahhxvrhmzkwpj")) + .withIfMatch("syqtfi") + .withIfNoneMatch("whbotzingamv") .create(); - Assertions.assertEquals("slbi", response.virtualNetwork().id()); - Assertions.assertEquals("jgcyztsfmznba", response.metadata().get("qphchqnrnrpxehuw")); + Assertions.assertEquals("qzudphq", response.virtualNetwork().id()); + Assertions.assertEquals("dkfw", response.metadata().get("nwcvtbvkayhmtnv")); } // Use "Map.of" if available diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksDeleteMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksDeleteMockTests.java index 8e95e7c182d4..e7fa03a716ee 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksDeleteMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksDeleteMockTests.java @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.virtualNetworkLinks() - .delete("sxkkg", "h", "rghxjb", "hqxvcxgfrpdsofbs", com.azure.core.util.Context.NONE); + .delete("hevxcced", "pnmdyodnwzxltjcv", "hlt", "ugcxnavvwxq", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksGetWithResponseMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksGetWithResponseMockTests.java index d5866a3e7253..32281eed4394 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksGetWithResponseMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class VirtualNetworkLinksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"etag\":\"tkfa\",\"properties\":{\"virtualNetwork\":{\"id\":\"opqgikyzirtxdyux\"},\"metadata\":{\"wgioilqukry\":\"ntps\",\"gufhyaomtbg\":\"xtqmieoxor\",\"fo\":\"havgrvk\",\"mv\":\"jzhpjbibgjmfx\"},\"provisioningState\":\"Deleting\"},\"id\":\"yo\",\"name\":\"wxnb\",\"type\":\"fezzxscyhwzdg\"}"; + = "{\"etag\":\"fvpdbo\",\"properties\":{\"virtualNetwork\":{\"id\":\"cizsjqlhkrribdei\"},\"metadata\":{\"kghv\":\"p\",\"pjorwkqnyhg\":\"ndzwmkrefa\",\"jivfxzsjabib\":\"ij\",\"jxbkzbzkdvn\":\"ystawfsdjpvkvp\"},\"provisioningState\":\"Succeeded\"},\"id\":\"udurgkakmokz\",\"name\":\"jjklff\",\"type\":\"mouwqlgzrfzeey\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); VirtualNetworkLink response = manager.virtualNetworkLinks() - .getWithResponse("rnsvbuswd", "z", "ybycnunvj", com.azure.core.util.Context.NONE) + .getWithResponse("byqunyow", "wlmdjrkv", "g", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("opqgikyzirtxdyux", response.virtualNetwork().id()); - Assertions.assertEquals("ntps", response.metadata().get("wgioilqukry")); + Assertions.assertEquals("cizsjqlhkrribdei", response.virtualNetwork().id()); + Assertions.assertEquals("p", response.metadata().get("kghv")); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksListMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksListMockTests.java index d63b74a2ef4c..dfc5923cb060 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksListMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinksListMockTests.java @@ -22,7 +22,7 @@ public final class VirtualNetworkLinksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"ujviylwdshfs\",\"properties\":{\"virtualNetwork\":{\"id\":\"rbgyefry\"},\"metadata\":{\"nc\":\"aojfm\",\"hirctymoxoftpipi\":\"tmr\"},\"provisioningState\":\"Creating\"},\"id\":\"uh\",\"name\":\"a\",\"type\":\"pqjlihhyusps\"}]}"; + = "{\"value\":[{\"etag\":\"vtldgmfpgvmpip\",\"properties\":{\"virtualNetwork\":{\"id\":\"ltha\"},\"metadata\":{\"wutwbdsre\":\"ss\"},\"provisioningState\":\"Succeeded\"},\"id\":\"hneuyowqkd\",\"name\":\"ytisibir\",\"type\":\"gpikpzimejza\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.virtualNetworkLinks().list("rujbzbomvzzbtdc", "vp", 1569127875, com.azure.core.util.Context.NONE); + = manager.virtualNetworkLinks().list("bizikayuhq", "bjbsybb", 549914749, com.azure.core.util.Context.NONE); - Assertions.assertEquals("rbgyefry", response.iterator().next().virtualNetwork().id()); - Assertions.assertEquals("aojfm", response.iterator().next().metadata().get("nc")); + Assertions.assertEquals("ltha", response.iterator().next().virtualNetwork().id()); + Assertions.assertEquals("ss", response.iterator().next().metadata().get("wutwbdsre")); } }