diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/CHANGELOG.md b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/CHANGELOG.md index cc29420bbb37..4fb46f871b93 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/CHANGELOG.md +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/CHANGELOG.md @@ -1,14 +1,143 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0-beta.1 (2025-10-07) -### Features Added +- Azure Resource Manager Dns Resolver client library for Java. This package contains Microsoft Azure SDK for Dns Resolver Management SDK. The DNS Resolver Management Client. Package api-version 2025-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.DnsResolverPolicyListResult` was removed -### Other Changes +#### `models.VirtualNetworkLinkListResult` was removed + +#### `models.VirtualNetworkDnsForwardingRulesetListResult` was removed + +#### `models.OutboundEndpointListResult` was removed + +#### `models.DnsResolverDomainListResult` was removed + +#### `models.DnsSecurityRuleListResult` was removed + +#### `models.SubResourceListResult` was removed + +#### `models.ForwardingRuleListResult` was removed + +#### `models.DnsForwardingRulesetListResult` was removed + +#### `models.DnsResolverPolicyVirtualNetworkLinkListResult` was removed + +#### `models.DnsResolverListResult` was removed + +#### `models.InboundEndpointListResult` was removed + +#### `models.VirtualNetworkLinkPatch` was modified + +* `validate()` was removed + +#### `models.DnsSecurityRuleAction` was modified + +* `validate()` was removed + +#### `models.DnsResolvers` was modified + +* `delete(java.lang.String,java.lang.String)` was removed + +#### `models.OutboundEndpointPatch` was modified + +* `validate()` was removed + +#### `models.DnsForwardingRulesets` was modified + +* `delete(java.lang.String,java.lang.String)` was removed + +#### `models.DnsResolverPolicies` was modified + +* `delete(java.lang.String,java.lang.String)` was removed + +#### `models.TargetDnsServer` was modified + +* `validate()` was removed + +#### `models.IpConfiguration` was modified + +* `validate()` was removed + +#### `models.DnsSecurityRulePatch` was modified + +* `validate()` was removed + +#### `models.DnsResolverDomainLists` was modified + +* `delete(java.lang.String,java.lang.String)` was removed + +#### `models.DnsResolverDomainListPatch` was modified + +* `validate()` was removed + +#### `models.DnsResolverPolicyPatch` was modified + +* `validate()` was removed + +#### `models.DnsForwardingRulesetPatch` was modified + +* `validate()` was removed + +#### `models.DnsResolverDomainListBulk` was modified + +* `validate()` was removed + +#### `models.InboundEndpointPatch` was modified + +* `validate()` was removed + +#### `models.DnsResolverPolicyVirtualNetworkLinkPatch` was modified + +* `validate()` was removed + +#### `models.DnsResolverPatch` was modified + +* `validate()` was removed + +#### `models.ForwardingRulePatch` was modified + +* `validate()` was removed + +### Features Added + +* `models.ManagedDomainList` was added + +#### `models.DnsSecurityRule$Definition` was modified + +* `withManagedDomainLists(java.util.List)` was added + +#### `models.DnsResolvers` was modified + +* `deleteByResourceGroup(java.lang.String,java.lang.String)` was added + +#### `models.DnsForwardingRulesets` was modified + +* `deleteByResourceGroup(java.lang.String,java.lang.String)` was added + +#### `models.DnsResolverPolicies` was modified + +* `deleteByResourceGroup(java.lang.String,java.lang.String)` was added + +#### `models.DnsSecurityRule$Update` was modified + +* `withManagedDomainLists(java.util.List)` was added + +#### `models.DnsSecurityRule` was modified + +* `managedDomainLists()` was added + +#### `models.DnsSecurityRulePatch` was modified + +* `managedDomainLists()` was added +* `withManagedDomainLists(java.util.List)` was added + +#### `models.DnsResolverDomainLists` was modified + +* `deleteByResourceGroup(java.lang.String,java.lang.String)` was added ## 1.1.0 (2025-06-16) diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/README.md b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/README.md index 1a323a39e49b..250e1979316e 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/README.md +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/README.md @@ -1,8 +1,8 @@ -# Azure Resource Manager DnsResolver client library for Java +# Azure Resource Manager Dns Resolver client library for Java -Azure Resource Manager DnsResolver client library for Java. +Azure Resource Manager Dns Resolver client library for Java. -This package contains Microsoft Azure SDK for DnsResolver Management SDK. DNS Resolver Client. Package tag package-2025-05. 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 Dns Resolver Management SDK. The DNS Resolver Management Client. Package api-version 2025-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-dnsresolver - 1.1.0 + 1.2.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/SAMPLE.md b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/SAMPLE.md index c31241f47d54..94aba172f8ce 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/SAMPLE.md +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/SAMPLE.md @@ -91,24 +91,46 @@ ### DnsForwardingRulesets_CreateOrUpdate ```java +import com.azure.core.management.SubResource; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for InboundEndpoints Get. + * Samples for DnsForwardingRulesets CreateOrUpdate. */ -public final class InboundEndpointsGetSamples { +public final class DnsForwardingRulesetsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Get.json + * x-ms-original-file: 2025-10-01-preview/DnsForwardingRuleset_Put.json */ /** - * Sample code: Retrieve inbound endpoint for DNS resolver. + * Sample code: Upsert DNS forwarding ruleset. * * @param manager Entry point to DnsResolverManager. */ - public static void - retrieveInboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.inboundEndpoints() - .getWithResponse("sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", - com.azure.core.util.Context.NONE); + 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; } } ``` @@ -121,8 +143,7 @@ public final class InboundEndpointsGetSamples { */ public final class DnsForwardingRulesetsDeleteSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsForwardingRuleset_Delete.json + * x-ms-original-file: 2025-10-01-preview/DnsForwardingRuleset_Delete.json */ /** * Sample code: Delete DNS forwarding ruleset. @@ -140,23 +161,20 @@ public final class DnsForwardingRulesetsDeleteSamples { ```java /** - * Samples for VirtualNetworkLinks Delete. + * Samples for DnsForwardingRulesets GetByResourceGroup. */ -public final class VirtualNetworkLinksDeleteSamples { +public final class DnsForwardingRulesetsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Delete - * .json + * x-ms-original-file: 2025-10-01-preview/DnsForwardingRuleset_Get.json */ /** - * Sample code: Delete virtual network link to a DNS forwarding ruleset. + * Sample code: Retrieve DNS forwarding ruleset. * * @param manager Entry point to DnsResolverManager. */ - public static void deleteVirtualNetworkLinkToADNSForwardingRuleset( - com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.virtualNetworkLinks() - .delete("sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", null, + public static void retrieveDNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsForwardingRulesets() + .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", com.azure.core.util.Context.NONE); } } @@ -166,23 +184,20 @@ public final class VirtualNetworkLinksDeleteSamples { ```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/stable/2025-05-01/examples/ - * DnsResolverPolicyVirtualNetworkLink_Delete.json + * x-ms-original-file: 2025-10-01-preview/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); } } ``` @@ -191,22 +206,21 @@ public final class DnsResolverPolicyVirtualNetworkLinksDeleteSamples { ```java /** - * Samples for InboundEndpoints List. + * Samples for DnsForwardingRulesets ListByResourceGroup. */ -public final class InboundEndpointsListSamples { +public final class DnsForwardingRulesetsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_List.json + * x-ms-original-file: 2025-10-01-preview/DnsForwardingRuleset_ListByResourceGroup.json */ /** - * Sample code: List inbound endpoints by DNS resolver. + * Sample code: List DNS forwarding rulesets by resource group. * * @param manager Entry point to DnsResolverManager. */ public static void - listInboundEndpointsByDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.inboundEndpoints() - .list("sampleResourceGroup", "sampleDnsResolver", null, com.azure.core.util.Context.NONE); + listDNSForwardingRulesetsByResourceGroup(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsForwardingRulesets() + .listByResourceGroup("sampleResourceGroup", null, com.azure.core.util.Context.NONE); } } ``` @@ -215,23 +229,21 @@ public final class InboundEndpointsListSamples { ```java /** - * Samples for VirtualNetworkLinks Get. + * Samples for DnsForwardingRulesets ListByVirtualNetwork. */ -public final class VirtualNetworkLinksGetSamples { +public final class DnsForwardingRulesetsListByVirtualNetworkSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Get. - * json + * x-ms-original-file: 2025-10-01-preview/DnsForwardingRuleset_ListByVirtualNetwork.json */ /** - * Sample code: Retrieve virtual network link to a DNS forwarding ruleset. + * Sample code: List DNS forwarding rulesets by virtual network. * * @param manager Entry point to DnsResolverManager. */ - public static void retrieveVirtualNetworkLinkToADNSForwardingRuleset( - com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.virtualNetworkLinks() - .getWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", + public static void + listDNSForwardingRulesetsByVirtualNetwork(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsForwardingRulesets() + .listByVirtualNetwork("sampleResourceGroup", "sampleVirtualNetwork", null, com.azure.core.util.Context.NONE); } } @@ -240,51 +252,25 @@ public final class VirtualNetworkLinksGetSamples { ### DnsForwardingRulesets_Update ```java -/** - * Samples for DnsForwardingRulesets List. - */ -public final class DnsForwardingRulesetsListSamples { - /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/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); - } -} -``` - -### DnsResolverDomainLists_Bulk - -```java -import com.azure.resourcemanager.dnsresolver.models.OutboundEndpoint; +import com.azure.resourcemanager.dnsresolver.models.DnsForwardingRuleset; import java.util.HashMap; import java.util.Map; /** - * Samples for OutboundEndpoints Update. + * Samples for DnsForwardingRulesets Update. */ -public final class OutboundEndpointsUpdateSamples { +public final class DnsForwardingRulesetsUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Patch. - * json + * x-ms-original-file: 2025-10-01-preview/DnsForwardingRuleset_Patch.json */ /** - * Sample code: Update outbound endpoint for DNS resolver. + * Sample code: Update DNS forwarding ruleset. * * @param manager Entry point to DnsResolverManager. */ - public static void - updateOutboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - OutboundEndpoint resource = manager.outboundEndpoints() - .getWithResponse("sampleResourceGroup", "sampleDnsResolver", "sampleOutboundEndpoint", + 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(); @@ -304,127 +290,96 @@ public final class OutboundEndpointsUpdateSamples { } ``` -### DnsResolverDomainLists_CreateOrUpdate +### DnsResolverDomainLists_Bulk ```java +import com.azure.resourcemanager.dnsresolver.models.Action; +import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListBulk; + /** - * Samples for InboundEndpoints Delete. + * Samples for DnsResolverDomainLists Bulk. */ -public final class InboundEndpointsDeleteSamples { +public final class DnsResolverDomainListsBulkSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Delete. - * json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_BulkUpload.json */ /** - * Sample code: Delete inbound endpoint for DNS resolver. + * Sample code: Upload DNS resolver domain list domains. * * @param manager Entry point to DnsResolverManager. */ public static void - deleteInboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.inboundEndpoints() - .delete("sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", null, - com.azure.core.util.Context.NONE); + uploadDNSResolverDomainListDomains(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverDomainLists() + .bulk("sampleResourceGroup", "sampleDnsResolverDomainList", new DnsResolverDomainListBulk().withStorageUrl( + "https://sampleStorageAccount.blob.core.windows.net/sample-container/sampleBlob.txt?sv=2022-11-02&sr=b&sig=39Up9jzHkxhUIhFEjEh9594DJxe7w6cIRCgOV6ICGS0%3A377&sp=rcw") + .withAction(Action.UPLOAD), null, null, com.azure.core.util.Context.NONE); } -} -``` -### DnsResolverDomainLists_Delete - -```java -/** - * Samples for DnsResolvers List. - */ -public final class DnsResolversListSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolver_ListBySubscription.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_BulkDownload.json */ /** - * Sample code: List DNS resolvers by subscription. + * Sample code: Download DNS resolver domain list domains. * * @param manager Entry point to DnsResolverManager. */ public static void - listDNSResolversBySubscription(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolvers().list(null, com.azure.core.util.Context.NONE); + downloadDNSResolverDomainListDomains(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverDomainLists() + .bulk("sampleResourceGroup", "sampleDnsResolverDomainList", new DnsResolverDomainListBulk().withStorageUrl( + "https://sampleStorageAccount.blob.core.windows.net/sample-container/sampleBlob.txt?sv=2022-11-02&sr=b&sig=39Up9jzHkxhUIhFEjEh9594DJxe7w6cIRCgOV6ICGS0%3A377&sp=rcw") + .withAction(Action.DOWNLOAD), null, null, com.azure.core.util.Context.NONE); } } ``` -### DnsResolverDomainLists_GetByResourceGroup +### DnsResolverDomainLists_CreateOrUpdate ```java -import com.azure.core.management.SubResource; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for DnsResolvers CreateOrUpdate. + * Samples for DnsResolverDomainLists CreateOrUpdate. */ -public final class DnsResolversCreateOrUpdateSamples { +public final class DnsResolverDomainListsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Put.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_BulkDomains_Put.json */ /** - * Sample code: Upsert DNS resolver. + * Sample code: Upsert DNS resolver domain list with bulk number of domains. * * @param manager Entry point to DnsResolverManager. */ - public static void upsertDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolvers() - .define("sampleDnsResolver") + public static void upsertDNSResolverDomainListWithBulkNumberOfDomains( + com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverDomainLists() + .define("sampleDnsResolverDomainList") .withRegion("westus2") .withExistingResourceGroup("sampleResourceGroup") - .withVirtualNetwork(new SubResource().withId( - "/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/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; - } -} -``` - -### DnsResolverDomainLists_List - -```java -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/stable/2025-05-01/examples/DnsResolverPolicy_Patch. - * json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_Put.json */ /** - * Sample code: Update DNS resolver policy. + * Sample code: Upsert DNS resolver domain list with less than 1000 domains. * * @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 upsertDNSResolverDomainListWithLessThan1000Domains( + com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverDomainLists() + .define("sampleDnsResolverDomainList") + .withRegion("westus2") + .withExistingResourceGroup("sampleResourceGroup") + .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .withDomains(Arrays.asList("contoso.com")) + .create(); } // Use "Map.of" if available @@ -441,202 +396,140 @@ public final class DnsResolverPoliciesUpdateSamples { } ``` -### DnsResolverDomainLists_ListByResourceGroup +### DnsResolverDomainLists_Delete ```java /** - * Samples for ForwardingRules Get. + * Samples for DnsResolverDomainLists Delete. */ -public final class ForwardingRulesGetSamples { +public final class DnsResolverDomainListsDeleteSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Get.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_Delete.json */ /** - * Sample code: Retrieve forwarding rule in a DNS forwarding ruleset. + * Sample code: Delete DNS resolver domain list. * * @param manager Entry point to DnsResolverManager. */ - public static void retrieveForwardingRuleInADNSForwardingRuleset( - com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.forwardingRules() - .getWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", - com.azure.core.util.Context.NONE); + public static void deleteDNSResolverDomainList(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverDomainLists() + .delete("sampleResourceGroup", "sampleDnsResolverDomainList", null, com.azure.core.util.Context.NONE); } } ``` -### DnsResolverDomainLists_Update +### DnsResolverDomainLists_GetByResourceGroup ```java -import com.azure.resourcemanager.dnsresolver.models.Action; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListBulk; - /** - * Samples for DnsResolverDomainLists Bulk. + * Samples for DnsResolverDomainLists GetByResourceGroup. */ -public final class DnsResolverDomainListsBulkSamples { +public final class DnsResolverDomainListsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_BulkUpload.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_BulkDomains_Get.json */ /** - * Sample code: Upload DNS resolver domain list domains. + * Sample code: Retrieve DNS resolver domain list with bulk number of domains. * * @param manager Entry point to DnsResolverManager. */ - public static void - uploadDNSResolverDomainListDomains(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + public static void retrieveDNSResolverDomainListWithBulkNumberOfDomains( + com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { manager.dnsResolverDomainLists() - .bulk("sampleResourceGroup", "sampleDnsResolverDomainList", new DnsResolverDomainListBulk().withStorageUrl( - "https://sampleStorageAccount.blob.core.windows.net/sample-container/sampleBlob.txt?sv=2022-11-02&sr=b&sig=39Up9jzHkxhUIhFEjEh9594DJxe7w6cIRCgOV6ICGS0%3A377&sp=rcw") - .withAction(Action.UPLOAD), null, null, com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverDomainList", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_BulkDownload.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_Get.json */ /** - * Sample code: Download DNS resolver domain list domains. + * Sample code: Retrieve DNS resolver domain list with less than 1000 domains. * * @param manager Entry point to DnsResolverManager. */ - public static void - downloadDNSResolverDomainListDomains(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + public static void retrieveDNSResolverDomainListWithLessThan1000Domains( + com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { manager.dnsResolverDomainLists() - .bulk("sampleResourceGroup", "sampleDnsResolverDomainList", new DnsResolverDomainListBulk().withStorageUrl( - "https://sampleStorageAccount.blob.core.windows.net/sample-container/sampleBlob.txt?sv=2022-11-02&sr=b&sig=39Up9jzHkxhUIhFEjEh9594DJxe7w6cIRCgOV6ICGS0%3A377&sp=rcw") - .withAction(Action.DOWNLOAD), null, null, com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverDomainList", + com.azure.core.util.Context.NONE); } } ``` -### DnsResolverPolicies_CreateOrUpdate +### DnsResolverDomainLists_List ```java -import com.azure.core.management.SubResource; -import com.azure.resourcemanager.dnsresolver.models.ActionType; -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. + * Samples for DnsResolverDomainLists List. */ -public final class DnsSecurityRulesCreateOrUpdateSamples { +public final class DnsResolverDomainListsListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Put.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_ListBySubscription.json */ /** - * Sample code: Upsert DNS security rule. + * Sample code: List DNS resolver domain lists by subscription. * * @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)) - .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; + public static void + listDNSResolverDomainListsBySubscription(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverDomainLists().list(null, com.azure.core.util.Context.NONE); } } ``` -### DnsResolverPolicies_Delete +### DnsResolverDomainLists_ListByResourceGroup ```java -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLink; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for DnsResolverPolicyVirtualNetworkLinks Update. + * Samples for DnsResolverDomainLists ListByResourceGroup. */ -public final class DnsResolverPolicyVirtualNetworkLinksUpdateSamples { +public final class DnsResolverDomainListsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicyVirtualNetworkLink_Patch.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_ListByResourceGroup.json */ /** - * Sample code: Update DNS resolver policy virtual network link. + * Sample code: List DNS resolver domain lists by resource group. * * @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; + listDNSResolverDomainListsByResourceGroup(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverDomainLists() + .listByResourceGroup("sampleResourceGroup", null, com.azure.core.util.Context.NONE); } } ``` -### DnsResolverPolicies_GetByResourceGroup +### DnsResolverDomainLists_Update ```java -import com.azure.resourcemanager.dnsresolver.models.ForwardingRule; -import com.azure.resourcemanager.dnsresolver.models.ForwardingRuleState; +import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainList; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for ForwardingRules Update. + * Samples for DnsResolverDomainLists Update. */ -public final class ForwardingRulesUpdateSamples { +public final class DnsResolverDomainListsUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Patch.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_Patch.json */ /** - * Sample code: Update forwarding rule in a DNS forwarding ruleset. + * Sample code: Update DNS resolver domain list. * * @param manager Entry point to DnsResolverManager. */ - public static void - updateForwardingRuleInADNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - ForwardingRule resource = manager.forwardingRules() - .getWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", + 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() - .withMetadata(mapOf("additionalProp2", "value2")) - .withForwardingRuleState(ForwardingRuleState.DISABLED) + .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .withDomains(Arrays.asList("contoso.com")) .apply(); } @@ -654,34 +547,31 @@ public final class ForwardingRulesUpdateSamples { } ``` -### DnsResolverPolicies_List +### DnsResolverPolicies_CreateOrUpdate ```java -import com.azure.resourcemanager.dnsresolver.models.VirtualNetworkLink; import java.util.HashMap; import java.util.Map; /** - * Samples for VirtualNetworkLinks Update. + * Samples for DnsResolverPolicies CreateOrUpdate. */ -public final class VirtualNetworkLinksUpdateSamples { +public final class DnsResolverPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Patch. - * json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_Put.json */ /** - * Sample code: Update virtual network link to a DNS forwarding ruleset. + * Sample code: Upsert DNS resolver policy. * * @param manager Entry point to DnsResolverManager. */ - public static void updateVirtualNetworkLinkToADNSForwardingRuleset( - com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - VirtualNetworkLink resource = manager.virtualNetworkLinks() - .getWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withMetadata(mapOf("additionalProp1", "value1")).apply(); + 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 @@ -698,178 +588,144 @@ public final class VirtualNetworkLinksUpdateSamples { } ``` -### DnsResolverPolicies_ListByResourceGroup +### DnsResolverPolicies_Delete ```java /** - * Samples for DnsResolvers Delete. + * Samples for DnsResolverPolicies Delete. */ -public final class DnsResolversDeleteSamples { +public final class DnsResolverPoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Delete.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_Delete.json */ /** - * Sample code: Delete DNS resolver. + * Sample code: Delete DNS resolver policy. * * @param manager Entry point to DnsResolverManager. */ - public static void deleteDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolvers() - .delete("sampleResourceGroup", "sampleDnsResolver", null, com.azure.core.util.Context.NONE); + public static void deleteDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverPolicies() + .delete("sampleResourceGroup", "sampleDnsResolverPolicy", null, com.azure.core.util.Context.NONE); } } ``` -### DnsResolverPolicies_ListByVirtualNetwork +### DnsResolverPolicies_GetByResourceGroup ```java /** - * Samples for DnsForwardingRulesets GetByResourceGroup. + * Samples for DnsResolverPolicies GetByResourceGroup. */ -public final class DnsForwardingRulesetsGetByResourceGroupSamples { +public final class DnsResolverPoliciesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Get. - * json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_Get.json */ /** - * Sample code: Retrieve DNS forwarding ruleset. + * Sample code: Retrieve DNS resolver policy. * * @param manager Entry point to DnsResolverManager. */ - public static void retrieveDNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsForwardingRulesets() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", + public static void retrieveDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverPolicies() + .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", com.azure.core.util.Context.NONE); } } ``` -### DnsResolverPolicies_Update +### DnsResolverPolicies_List ```java /** - * Samples for VirtualNetworkLinks List. + * Samples for DnsResolverPolicies List. */ -public final class VirtualNetworkLinksListSamples { +public final class DnsResolverPoliciesListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_List. - * json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_ListBySubscription.json */ /** - * Sample code: List virtual network links to a DNS forwarding ruleset. + * Sample code: List DNS resolver policies by subscription. * * @param manager Entry point to DnsResolverManager. */ - public static void listVirtualNetworkLinksToADNSForwardingRuleset( - com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.virtualNetworkLinks() - .list("sampleResourceGroup", "sampleDnsForwardingRuleset", null, com.azure.core.util.Context.NONE); + public static void + listDNSResolverPoliciesBySubscription(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverPolicies().list(null, com.azure.core.util.Context.NONE); } } ``` -### DnsResolverPolicyVirtualNetworkLinks_CreateOrUpdate +### DnsResolverPolicies_ListByResourceGroup ```java /** - * Samples for DnsResolvers GetByResourceGroup. + * Samples for DnsResolverPolicies ListByResourceGroup. */ -public final class DnsResolversGetByResourceGroupSamples { +public final class DnsResolverPoliciesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Get.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_ListByResourceGroup.json */ /** - * Sample code: Retrieve DNS resolver. + * Sample code: List DNS resolver policies by resource group. * * @param manager Entry point to DnsResolverManager. */ - public static void retrieveDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolvers() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolver", - com.azure.core.util.Context.NONE); + public static void + listDNSResolverPoliciesByResourceGroup(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverPolicies() + .listByResourceGroup("sampleResourceGroup", null, com.azure.core.util.Context.NONE); } } ``` -### DnsResolverPolicyVirtualNetworkLinks_Delete +### DnsResolverPolicies_ListByVirtualNetwork ```java /** - * Samples for DnsResolverDomainLists GetByResourceGroup. + * Samples for DnsResolverPolicies ListByVirtualNetwork. */ -public final class DnsResolverDomainListsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_BulkDomains_Get.json - */ - /** - * Sample code: Retrieve DNS resolver domain list with bulk number of domains. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void retrieveDNSResolverDomainListWithBulkNumberOfDomains( - com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverDomainList", - com.azure.core.util.Context.NONE); - } - +public final class DnsResolverPoliciesListByVirtualNetworkSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Get - * .json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_ListByVirtualNetwork.json */ /** - * Sample code: Retrieve DNS resolver domain list with less than 1000 domains. + * Sample code: List DNS resolver policies by virtual network. * * @param manager Entry point to DnsResolverManager. */ - public static void retrieveDNSResolverDomainListWithLessThan1000Domains( - com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverDomainList", - com.azure.core.util.Context.NONE); + public static void + listDNSResolverPoliciesByVirtualNetwork(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverPolicies() + .listByVirtualNetwork("sampleResourceGroup", "sampleVirtualNetwork", com.azure.core.util.Context.NONE); } } ``` -### DnsResolverPolicyVirtualNetworkLinks_Get +### DnsResolverPolicies_Update ```java -import com.azure.core.management.SubResource; -import java.util.Arrays; +import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicy; import java.util.HashMap; import java.util.Map; /** - * Samples for DnsForwardingRulesets CreateOrUpdate. + * Samples for DnsResolverPolicies Update. */ -public final class DnsForwardingRulesetsCreateOrUpdateSamples { +public final class DnsResolverPoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Put. - * json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_Patch.json */ /** - * Sample code: Upsert DNS forwarding ruleset. + * Sample code: Update DNS resolver policy. * * @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(); + 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 @@ -886,38 +742,33 @@ public final class DnsForwardingRulesetsCreateOrUpdateSamples { } ``` -### DnsResolverPolicyVirtualNetworkLinks_List +### DnsResolverPolicyVirtualNetworkLinks_CreateOrUpdate ```java import com.azure.core.management.SubResource; -import com.azure.resourcemanager.dnsresolver.models.IpAllocationMethod; -import com.azure.resourcemanager.dnsresolver.models.IpConfiguration; -import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for InboundEndpoints CreateOrUpdate. + * Samples for DnsResolverPolicyVirtualNetworkLinks CreateOrUpdate. */ -public final class InboundEndpointsCreateOrUpdateSamples { +public final class DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Put.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicyVirtualNetworkLink_Put.json */ /** - * Sample code: Upsert inbound endpoint for DNS resolver. + * Sample code: Upsert DNS resolver policy virtual network link. * * @param manager Entry point to DnsResolverManager. */ public static void - upsertInboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.inboundEndpoints() - .define("sampleInboundEndpoint") + upsertDNSResolverPolicyVirtualNetworkLink(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverPolicyVirtualNetworkLinks() + .define("sampleVirtualNetworkLink") .withRegion("westus2") - .withExistingDnsResolver("sampleResourceGroup", "sampleDnsResolver") - .withIpConfigurations(Arrays.asList(new IpConfiguration().withSubnet(new SubResource().withId( - "/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet")) - .withPrivateIpAllocationMethod(IpAllocationMethod.DYNAMIC))) + .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(); } @@ -936,32 +787,31 @@ public final class InboundEndpointsCreateOrUpdateSamples { } ``` -### DnsResolverPolicyVirtualNetworkLinks_Update +### DnsResolverPolicyVirtualNetworkLinks_Delete ```java /** - * Samples for DnsForwardingRulesets ListByVirtualNetwork. + * Samples for DnsResolverPolicyVirtualNetworkLinks Delete. */ -public final class DnsForwardingRulesetsListByVirtualNetworkSamples { +public final class DnsResolverPolicyVirtualNetworkLinksDeleteSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsForwardingRuleset_ListByVirtualNetwork.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicyVirtualNetworkLink_Delete.json */ /** - * Sample code: List DNS forwarding rulesets by virtual network. + * Sample code: Delete DNS resolver policy virtual network link. * * @param manager Entry point to DnsResolverManager. */ public static void - listDNSForwardingRulesetsByVirtualNetwork(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsForwardingRulesets() - .listByVirtualNetwork("sampleResourceGroup", "sampleVirtualNetwork", null, + deleteDNSResolverPolicyVirtualNetworkLink(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolverPolicyVirtualNetworkLinks() + .delete("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleVirtualNetworkLink", null, com.azure.core.util.Context.NONE); } } ``` -### DnsResolvers_CreateOrUpdate +### DnsResolverPolicyVirtualNetworkLinks_Get ```java /** @@ -969,8 +819,7 @@ public final class DnsForwardingRulesetsListByVirtualNetworkSamples { */ public final class DnsResolverPolicyVirtualNetworkLinksGetSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicyVirtualNetworkLink_Get.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicyVirtualNetworkLink_Get.json */ /** * Sample code: Retrieve DNS resolver policy virtual network link. @@ -986,39 +835,55 @@ public final class DnsResolverPolicyVirtualNetworkLinksGetSamples { } ``` -### DnsResolvers_Delete +### DnsResolverPolicyVirtualNetworkLinks_List ```java -import com.azure.resourcemanager.dnsresolver.models.ForwardingRuleState; -import com.azure.resourcemanager.dnsresolver.models.TargetDnsServer; -import java.util.Arrays; +/** + * Samples for DnsResolverPolicyVirtualNetworkLinks List. + */ +public final class DnsResolverPolicyVirtualNetworkLinksListSamples { + /* + * x-ms-original-file: 2025-10-01-preview/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); + } +} +``` + +### DnsResolverPolicyVirtualNetworkLinks_Update + +```java +import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLink; import java.util.HashMap; import java.util.Map; /** - * Samples for ForwardingRules CreateOrUpdate. + * Samples for DnsResolverPolicyVirtualNetworkLinks Update. */ -public final class ForwardingRulesCreateOrUpdateSamples { +public final class DnsResolverPolicyVirtualNetworkLinksUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Put.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicyVirtualNetworkLink_Patch.json */ /** - * Sample code: Upsert forwarding rule in a DNS forwarding ruleset. + * Sample code: Update DNS resolver policy virtual network link. * * @param manager Entry point to DnsResolverManager. */ public static void - upsertForwardingRuleInADNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.forwardingRules() - .define("sampleForwardingRule") - .withExistingDnsForwardingRuleset("sampleResourceGroup", "sampleDnsForwardingRuleset") - .withDomainName("contoso.com.") - .withTargetDnsServers(Arrays.asList(new TargetDnsServer().withIpAddress("10.0.0.1").withPort(53), - new TargetDnsServer().withIpAddress("10.0.0.2").withPort(53))) - .withMetadata(mapOf("additionalProp1", "value1")) - .withForwardingRuleState(ForwardingRuleState.ENABLED) - .create(); + 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 @@ -1035,7 +900,7 @@ public final class ForwardingRulesCreateOrUpdateSamples { } ``` -### DnsResolvers_GetByResourceGroup +### DnsResolvers_CreateOrUpdate ```java import com.azure.core.management.SubResource; @@ -1043,26 +908,24 @@ import java.util.HashMap; import java.util.Map; /** - * Samples for OutboundEndpoints CreateOrUpdate. + * Samples for DnsResolvers CreateOrUpdate. */ -public final class OutboundEndpointsCreateOrUpdateSamples { +public final class DnsResolversCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Put.json + * x-ms-original-file: 2025-10-01-preview/DnsResolver_Put.json */ /** - * Sample code: Upsert outbound endpoint for DNS resolver. + * Sample code: Upsert DNS resolver. * * @param manager Entry point to DnsResolverManager. */ - public static void - upsertOutboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.outboundEndpoints() - .define("sampleOutboundEndpoint") + public static void upsertDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolvers() + .define("sampleDnsResolver") .withRegion("westus2") - .withExistingDnsResolver("sampleResourceGroup", "sampleDnsResolver") - .withSubnet(new SubResource().withId( - "/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet")) + .withExistingResourceGroup("sampleResourceGroup") + .withVirtualNetwork(new SubResource().withId( + "/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork")) .withTags(mapOf("key1", "fakeTokenPlaceholder")) .create(); } @@ -1081,26 +944,69 @@ public final class OutboundEndpointsCreateOrUpdateSamples { } ``` +### DnsResolvers_Delete + +```java +/** + * Samples for DnsResolvers Delete. + */ +public final class DnsResolversDeleteSamples { + /* + * x-ms-original-file: 2025-10-01-preview/DnsResolver_Delete.json + */ + /** + * Sample code: Delete DNS resolver. + * + * @param manager Entry point to DnsResolverManager. + */ + public static void deleteDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolvers() + .delete("sampleResourceGroup", "sampleDnsResolver", null, com.azure.core.util.Context.NONE); + } +} +``` + +### DnsResolvers_GetByResourceGroup + +```java +/** + * Samples for DnsResolvers GetByResourceGroup. + */ +public final class DnsResolversGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-10-01-preview/DnsResolver_Get.json + */ + /** + * Sample code: Retrieve DNS resolver. + * + * @param manager Entry point to DnsResolverManager. + */ + public static void retrieveDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolvers() + .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolver", + com.azure.core.util.Context.NONE); + } +} +``` + ### DnsResolvers_List ```java /** - * Samples for DnsForwardingRulesets ListByResourceGroup. + * Samples for DnsResolvers List. */ -public final class DnsForwardingRulesetsListByResourceGroupSamples { +public final class DnsResolversListSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsForwardingRuleset_ListByResourceGroup.json + * x-ms-original-file: 2025-10-01-preview/DnsResolver_ListBySubscription.json */ /** - * Sample code: List DNS forwarding rulesets by resource group. + * Sample code: List DNS resolvers by subscription. * * @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); + listDNSResolversBySubscription(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolvers().list(null, com.azure.core.util.Context.NONE); } } ``` @@ -1108,33 +1014,74 @@ public final class DnsForwardingRulesetsListByResourceGroupSamples { ### DnsResolvers_ListByResourceGroup ```java -import com.azure.core.management.SubResource; +/** + * Samples for DnsResolvers ListByResourceGroup. + */ +public final class DnsResolversListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-10-01-preview/DnsResolver_ListByResourceGroup.json + */ + /** + * Sample code: List DNS resolvers by resource group. + * + * @param manager Entry point to DnsResolverManager. + */ + public static void + listDNSResolversByResourceGroup(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolvers().listByResourceGroup("sampleResourceGroup", null, com.azure.core.util.Context.NONE); + } +} +``` + +### DnsResolvers_ListByVirtualNetwork + +```java +/** + * Samples for DnsResolvers ListByVirtualNetwork. + */ +public final class DnsResolversListByVirtualNetworkSamples { + /* + * x-ms-original-file: 2025-10-01-preview/DnsResolver_ListByVirtualNetwork.json + */ + /** + * Sample code: List DNS resolvers by virtual network. + * + * @param manager Entry point to DnsResolverManager. + */ + public static void + listDNSResolversByVirtualNetwork(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsResolvers() + .listByVirtualNetwork("sampleResourceGroup", "sampleVirtualNetwork", null, + com.azure.core.util.Context.NONE); + } +} +``` + +### DnsResolvers_Update + +```java +import com.azure.resourcemanager.dnsresolver.models.DnsResolver; import java.util.HashMap; import java.util.Map; /** - * Samples for VirtualNetworkLinks CreateOrUpdate. + * Samples for DnsResolvers Update. */ -public final class VirtualNetworkLinksCreateOrUpdateSamples { +public final class DnsResolversUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Put. - * json + * x-ms-original-file: 2025-10-01-preview/DnsResolver_Patch.json */ /** - * Sample code: Upsert virtual network link to a DNS forwarding ruleset. + * Sample code: Update DNS resolver. * * @param manager Entry point to DnsResolverManager. */ - public static void upsertVirtualNetworkLinkToADNSForwardingRuleset( - com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.virtualNetworkLinks() - .define("sampleVirtualNetworkLink") - .withExistingDnsForwardingRuleset("sampleResourceGroup", "sampleDnsForwardingRuleset") - .withVirtualNetwork(new SubResource().withId( - "/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork")) - .withMetadata(mapOf("additionalProp1", "value1")) - .create(); + public static void updateDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + DnsResolver resource = manager.dnsResolvers() + .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolver", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder")).apply(); } // Use "Map.of" if available @@ -1151,156 +1098,181 @@ public final class VirtualNetworkLinksCreateOrUpdateSamples { } ``` -### DnsResolvers_ListByVirtualNetwork +### DnsSecurityRules_CreateOrUpdate ```java +import com.azure.core.management.SubResource; +import com.azure.resourcemanager.dnsresolver.models.ActionType; +import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction; +import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; +import com.azure.resourcemanager.dnsresolver.models.ManagedDomainList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for DnsSecurityRules Get. + * Samples for DnsSecurityRules CreateOrUpdate. */ -public final class DnsSecurityRulesGetSamples { +public final class DnsSecurityRulesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Get.json + * x-ms-original-file: 2025-10-01-preview/DnsSecurityRule_Put.json */ /** - * Sample code: Retrieve DNS security rule for DNS resolver policy. + * Sample code: Upsert DNS security rule. * * @param manager Entry point to DnsResolverManager. */ - public static void - retrieveDNSSecurityRuleForDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + public static void upsertDNSSecurityRule(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { manager.dnsSecurityRules() - .getWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleDnsSecurityRule", - com.azure.core.util.Context.NONE); + .define("sampleDnsSecurityRule") + .withRegion("westus2") + .withExistingDnsResolverPolicy("sampleResourceGroup", "sampleDnsResolverPolicy") + .withPriority(100) + .withAction(new DnsSecurityRuleAction().withActionType(ActionType.BLOCK)) + .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .withDnsResolverDomainLists(Arrays.asList(new SubResource().withId( + "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList"))) + .withDnsSecurityRuleState(DnsSecurityRuleState.ENABLED) + .create(); } -} -``` -### DnsResolvers_Update - -```java -/** - * Samples for DnsResolverPolicyVirtualNetworkLinks List. - */ -public final class DnsResolverPolicyVirtualNetworkLinksListSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicyVirtualNetworkLink_List.json + * x-ms-original-file: 2025-10-01-preview/DnsSecurityRule_ManagedDomainList_Put.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); + * Sample code: Upsert DNS security rule with managed domain list. + * + * @param manager Entry point to DnsResolverManager. + */ + public static void + upsertDNSSecurityRuleWithManagedDomainList(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsSecurityRules() + .define("sampleDnsSecurityRule") + .withRegion("westus2") + .withExistingDnsResolverPolicy("sampleResourceGroup", "sampleDnsResolverPolicy") + .withPriority(100) + .withAction(new DnsSecurityRuleAction().withActionType(ActionType.BLOCK)) + .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .withManagedDomainLists(Arrays.asList(ManagedDomainList.AZURE_DNS_THREAT_INTEL)) + .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_CreateOrUpdate +### DnsSecurityRules_Delete ```java /** - * Samples for DnsResolverPolicies ListByResourceGroup. + * Samples for DnsSecurityRules Delete. */ -public final class DnsResolverPoliciesListByResourceGroupSamples { +public final class DnsSecurityRulesDeleteSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicy_ListByResourceGroup.json + * x-ms-original-file: 2025-10-01-preview/DnsSecurityRule_Delete.json */ /** - * Sample code: List DNS resolver policies by resource group. + * Sample code: Delete DNS security rule for DNS resolver policy. * * @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); + deleteDNSSecurityRuleForDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsSecurityRules() + .delete("sampleResourceGroup", "sampleDnsDnsResolverPolicy", "sampleDnsSecurityRule", null, + com.azure.core.util.Context.NONE); } } ``` -### DnsSecurityRules_Delete +### DnsSecurityRules_Get ```java /** - * Samples for ForwardingRules Delete. + * Samples for DnsSecurityRules Get. */ -public final class ForwardingRulesDeleteSamples { +public final class DnsSecurityRulesGetSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Delete. - * json + * x-ms-original-file: 2025-10-01-preview/DnsSecurityRule_Get.json */ /** - * Sample code: Delete forwarding rule in a DNS forwarding ruleset. + * Sample code: Retrieve DNS security rule for DNS resolver policy. * * @param manager Entry point to DnsResolverManager. */ public static void - deleteForwardingRuleInADNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.forwardingRules() - .deleteWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", null, + retrieveDNSSecurityRuleForDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsSecurityRules() + .getWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleDnsSecurityRule", com.azure.core.util.Context.NONE); } } ``` -### DnsSecurityRules_Get +### DnsSecurityRules_List ```java /** - * Samples for ForwardingRules List. + * Samples for DnsSecurityRules List. */ -public final class ForwardingRulesListSamples { +public final class DnsSecurityRulesListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_List.json + * x-ms-original-file: 2025-10-01-preview/DnsSecurityRule_List.json */ /** - * Sample code: List forwarding rules in a DNS forwarding ruleset. + * Sample code: List DNS security rules by DNS resolver policy. * * @param manager Entry point to DnsResolverManager. */ public static void - listForwardingRulesInADNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.forwardingRules() - .list("sampleResourceGroup", "sampleDnsForwardingRuleset", null, com.azure.core.util.Context.NONE); + listDNSSecurityRulesByDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsSecurityRules() + .list("sampleResourceGroup", "sampleDnsResolverPolicy", null, com.azure.core.util.Context.NONE); } } ``` -### DnsSecurityRules_List +### 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 DnsResolverPolicies CreateOrUpdate. + * Samples for DnsSecurityRules Update. */ -public final class DnsResolverPoliciesCreateOrUpdateSamples { +public final class DnsSecurityRulesUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Put. - * json + * x-ms-original-file: 2025-10-01-preview/DnsSecurityRule_Patch.json */ /** - * Sample code: Upsert DNS resolver policy. + * Sample code: Update DNS security rule for 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") + 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")) - .create(); + .withDnsSecurityRuleState(DnsSecurityRuleState.DISABLED) + .apply(); } // Use "Map.of" if available @@ -1317,130 +1289,155 @@ public final class DnsResolverPoliciesCreateOrUpdateSamples { } ``` -### DnsSecurityRules_Update +### ForwardingRules_CreateOrUpdate ```java +import com.azure.resourcemanager.dnsresolver.models.ForwardingRuleState; +import com.azure.resourcemanager.dnsresolver.models.TargetDnsServer; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for DnsSecurityRules Delete. + * Samples for ForwardingRules CreateOrUpdate. */ -public final class DnsSecurityRulesDeleteSamples { +public final class ForwardingRulesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Delete. - * json + * x-ms-original-file: 2025-10-01-preview/ForwardingRule_Put.json */ /** - * Sample code: Delete DNS security rule for DNS resolver policy. + * Sample code: Upsert forwarding rule in a DNS forwarding ruleset. * * @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); + upsertForwardingRuleInADNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.forwardingRules() + .define("sampleForwardingRule") + .withExistingDnsForwardingRuleset("sampleResourceGroup", "sampleDnsForwardingRuleset") + .withDomainName("contoso.com.") + .withTargetDnsServers(Arrays.asList(new TargetDnsServer().withIpAddress("10.0.0.1").withPort(53), + new TargetDnsServer().withIpAddress("10.0.0.2").withPort(53))) + .withMetadata(mapOf("additionalProp1", "value1")) + .withForwardingRuleState(ForwardingRuleState.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; } } ``` -### ForwardingRules_CreateOrUpdate +### ForwardingRules_Delete ```java /** - * Samples for DnsResolvers ListByVirtualNetwork. + * Samples for ForwardingRules Delete. */ -public final class DnsResolversListByVirtualNetworkSamples { +public final class ForwardingRulesDeleteSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolver_ListByVirtualNetwork.json + * x-ms-original-file: 2025-10-01-preview/ForwardingRule_Delete.json */ /** - * Sample code: List DNS resolvers by virtual network. + * Sample code: Delete forwarding rule in a DNS forwarding ruleset. * * @param manager Entry point to DnsResolverManager. */ public static void - listDNSResolversByVirtualNetwork(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolvers() - .listByVirtualNetwork("sampleResourceGroup", "sampleVirtualNetwork", null, + deleteForwardingRuleInADNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.forwardingRules() + .deleteWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", null, com.azure.core.util.Context.NONE); } } ``` -### ForwardingRules_Delete +### ForwardingRules_Get ```java /** - * Samples for DnsResolverPolicies List. + * Samples for ForwardingRules Get. */ -public final class DnsResolverPoliciesListSamples { +public final class ForwardingRulesGetSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicy_ListBySubscription.json + * x-ms-original-file: 2025-10-01-preview/ForwardingRule_Get.json */ /** - * Sample code: List DNS resolver policies by subscription. + * Sample code: Retrieve forwarding rule in a DNS forwarding ruleset. * * @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); + public static void retrieveForwardingRuleInADNSForwardingRuleset( + com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.forwardingRules() + .getWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", + com.azure.core.util.Context.NONE); } } ``` -### ForwardingRules_Get +### ForwardingRules_List ```java /** - * Samples for DnsResolverDomainLists ListByResourceGroup. + * Samples for ForwardingRules List. */ -public final class DnsResolverDomainListsListByResourceGroupSamples { +public final class ForwardingRulesListSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_ListByResourceGroup.json + * x-ms-original-file: 2025-10-01-preview/ForwardingRule_List.json */ /** - * Sample code: List DNS resolver domain lists by resource group. + * Sample code: List forwarding rules in a DNS forwarding ruleset. * * @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); + listForwardingRulesInADNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.forwardingRules() + .list("sampleResourceGroup", "sampleDnsForwardingRuleset", null, com.azure.core.util.Context.NONE); } } ``` -### ForwardingRules_List +### ForwardingRules_Update ```java -import com.azure.resourcemanager.dnsresolver.models.DnsResolver; +import com.azure.resourcemanager.dnsresolver.models.ForwardingRule; +import com.azure.resourcemanager.dnsresolver.models.ForwardingRuleState; import java.util.HashMap; import java.util.Map; /** - * Samples for DnsResolvers Update. + * Samples for ForwardingRules Update. */ -public final class DnsResolversUpdateSamples { +public final class ForwardingRulesUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Patch.json + * x-ms-original-file: 2025-10-01-preview/ForwardingRule_Patch.json */ /** - * Sample code: Update DNS resolver. + * Sample code: Update forwarding rule in a DNS forwarding ruleset. * * @param manager Entry point to DnsResolverManager. */ - public static void updateDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - DnsResolver resource = manager.dnsResolvers() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolver", + public static void + updateForwardingRuleInADNSForwardingRuleset(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + ForwardingRule resource = manager.forwardingRules() + .getWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder")).apply(); + resource.update() + .withMetadata(mapOf("additionalProp2", "value2")) + .withForwardingRuleState(ForwardingRuleState.DISABLED) + .apply(); } // Use "Map.of" if available @@ -1457,36 +1454,39 @@ public final class DnsResolversUpdateSamples { } ``` -### ForwardingRules_Update +### InboundEndpoints_CreateOrUpdate ```java -import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainList; +import com.azure.core.management.SubResource; +import com.azure.resourcemanager.dnsresolver.models.IpAllocationMethod; +import com.azure.resourcemanager.dnsresolver.models.IpConfiguration; import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for DnsResolverDomainLists Update. + * Samples for InboundEndpoints CreateOrUpdate. */ -public final class DnsResolverDomainListsUpdateSamples { +public final class InboundEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_Patch.json + * x-ms-original-file: 2025-10-01-preview/InboundEndpoint_Put.json */ /** - * Sample code: Update DNS resolver domain list. + * Sample code: Upsert inbound endpoint for DNS resolver. * * @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() + public static void + upsertInboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.inboundEndpoints() + .define("sampleInboundEndpoint") + .withRegion("westus2") + .withExistingDnsResolver("sampleResourceGroup", "sampleDnsResolver") + .withIpConfigurations(Arrays.asList(new IpConfiguration().withSubnet(new SubResource().withId( + "/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet")) + .withPrivateIpAllocationMethod(IpAllocationMethod.DYNAMIC))) .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withDomains(Arrays.asList("contoso.com")) - .apply(); + .create(); } // Use "Map.of" if available @@ -1503,129 +1503,103 @@ public final class DnsResolverDomainListsUpdateSamples { } ``` -### InboundEndpoints_CreateOrUpdate +### InboundEndpoints_Delete ```java /** - * Samples for DnsResolverPolicies GetByResourceGroup. + * Samples for InboundEndpoints Delete. */ -public final class DnsResolverPoliciesGetByResourceGroupSamples { +public final class InboundEndpointsDeleteSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Get. - * json + * x-ms-original-file: 2025-10-01-preview/InboundEndpoint_Delete.json */ /** - * Sample code: Retrieve DNS resolver policy. + * Sample code: Delete inbound endpoint for DNS resolver. * * @param manager Entry point to DnsResolverManager. */ - public static void retrieveDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicies() - .getByResourceGroupWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", + public static void + deleteInboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.inboundEndpoints() + .delete("sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", null, com.azure.core.util.Context.NONE); } } ``` -### InboundEndpoints_Delete +### InboundEndpoints_Get ```java -import com.azure.resourcemanager.dnsresolver.models.DnsForwardingRuleset; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for DnsForwardingRulesets Update. + * Samples for InboundEndpoints Get. */ -public final class DnsForwardingRulesetsUpdateSamples { +public final class InboundEndpointsGetSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsForwardingRuleset_Patch.json + * x-ms-original-file: 2025-10-01-preview/InboundEndpoint_Get.json */ /** - * Sample code: Update DNS forwarding ruleset. + * Sample code: Retrieve inbound endpoint for DNS resolver. * * @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; + public static void + retrieveInboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.inboundEndpoints() + .getWithResponse("sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", + com.azure.core.util.Context.NONE); } } ``` -### InboundEndpoints_Get +### InboundEndpoints_List ```java /** - * Samples for DnsResolverPolicies ListByVirtualNetwork. + * Samples for InboundEndpoints List. */ -public final class DnsResolverPoliciesListByVirtualNetworkSamples { +public final class InboundEndpointsListSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicy_ListByVirtualNetwork.json + * x-ms-original-file: 2025-10-01-preview/InboundEndpoint_List.json */ /** - * Sample code: List DNS resolver policies by virtual network. + * Sample code: List inbound endpoints by DNS resolver. * * @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); + listInboundEndpointsByDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.inboundEndpoints() + .list("sampleResourceGroup", "sampleDnsResolver", null, com.azure.core.util.Context.NONE); } } ``` -### InboundEndpoints_List +### InboundEndpoints_Update ```java -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRule; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; +import com.azure.resourcemanager.dnsresolver.models.InboundEndpoint; import java.util.HashMap; import java.util.Map; /** - * Samples for DnsSecurityRules Update. + * Samples for InboundEndpoints Update. */ -public final class DnsSecurityRulesUpdateSamples { +public final class InboundEndpointsUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Patch. - * json + * x-ms-original-file: 2025-10-01-preview/InboundEndpoint_Patch.json */ /** - * Sample code: Update DNS security rule for DNS resolver policy. + * Sample code: Update inbound endpoint for DNS resolver. * * @param manager Entry point to DnsResolverManager. */ public static void - updateDNSSecurityRuleForDNSResolverPolicy(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - DnsSecurityRule resource = manager.dnsSecurityRules() - .getWithResponse("sampleResourceGroup", "sampleDnsResolverPolicy", "sampleDnsSecurityRule", + updateInboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + InboundEndpoint resource = manager.inboundEndpoints() + .getWithResponse("sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", com.azure.core.util.Context.NONE) .getValue(); - resource.update() - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withDnsSecurityRuleState(DnsSecurityRuleState.DISABLED) - .apply(); + resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder")).apply(); } // Use "Map.of" if available @@ -1642,7 +1616,7 @@ public final class DnsSecurityRulesUpdateSamples { } ``` -### InboundEndpoints_Update +### OutboundEndpoints_CreateOrUpdate ```java import com.azure.core.management.SubResource; @@ -1650,26 +1624,25 @@ import java.util.HashMap; import java.util.Map; /** - * Samples for DnsResolverPolicyVirtualNetworkLinks CreateOrUpdate. + * Samples for OutboundEndpoints CreateOrUpdate. */ -public final class DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateSamples { +public final class OutboundEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicyVirtualNetworkLink_Put.json + * x-ms-original-file: 2025-10-01-preview/OutboundEndpoint_Put.json */ /** - * Sample code: Upsert DNS resolver policy virtual network link. + * Sample code: Upsert outbound endpoint for DNS resolver. * * @param manager Entry point to DnsResolverManager. */ public static void - upsertDNSResolverPolicyVirtualNetworkLink(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverPolicyVirtualNetworkLinks() - .define("sampleVirtualNetworkLink") + upsertOutboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.outboundEndpoints() + .define("sampleOutboundEndpoint") .withRegion("westus2") - .withExistingDnsResolverPolicy("sampleResourceGroup", "sampleDnsResolverPolicy") - .withVirtualNetwork(new SubResource().withId( - "/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork")) + .withExistingDnsResolver("sampleResourceGroup", "sampleDnsResolver") + .withSubnet(new SubResource().withId( + "/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet")) .withTags(mapOf("key1", "fakeTokenPlaceholder")) .create(); } @@ -1688,29 +1661,6 @@ public final class DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateSamples { } ``` -### OutboundEndpoints_CreateOrUpdate - -```java -/** - * Samples for DnsResolvers ListByResourceGroup. - */ -public final class DnsResolversListByResourceGroupSamples { - /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolver_ListByResourceGroup.json - */ - /** - * Sample code: List DNS resolvers by resource group. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void - listDNSResolversByResourceGroup(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolvers().listByResourceGroup("sampleResourceGroup", null, com.azure.core.util.Context.NONE); - } -} -``` - ### OutboundEndpoints_Delete ```java @@ -1719,9 +1669,7 @@ public final class DnsResolversListByResourceGroupSamples { */ public final class OutboundEndpointsDeleteSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Delete. - * json + * x-ms-original-file: 2025-10-01-preview/OutboundEndpoint_Delete.json */ /** * Sample code: Delete outbound endpoint for DNS resolver. @@ -1741,22 +1689,22 @@ public final class OutboundEndpointsDeleteSamples { ```java /** - * Samples for DnsResolverPolicies Delete. + * Samples for OutboundEndpoints Get. */ -public final class DnsResolverPoliciesDeleteSamples { +public final class OutboundEndpointsGetSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Delete. - * json + * x-ms-original-file: 2025-10-01-preview/OutboundEndpoint_Get.json */ /** - * Sample code: Delete DNS resolver policy. + * Sample code: Retrieve outbound endpoint for DNS resolver. * * @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); + public static void + retrieveOutboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.outboundEndpoints() + .getWithResponse("sampleResourceGroup", "sampleDnsResolver", "sampleOutboundEndpoint", + com.azure.core.util.Context.NONE); } } ``` @@ -1765,22 +1713,21 @@ public final class DnsResolverPoliciesDeleteSamples { ```java /** - * Samples for DnsSecurityRules List. + * Samples for OutboundEndpoints List. */ -public final class DnsSecurityRulesListSamples { +public final class OutboundEndpointsListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_List.json + * x-ms-original-file: 2025-10-01-preview/OutboundEndpoint_List.json */ /** - * Sample code: List DNS security rules by DNS resolver policy. + * Sample code: List outbound endpoints by DNS resolver. * * @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); + listOutboundEndpointsByDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.outboundEndpoints() + .list("sampleResourceGroup", "sampleDnsResolver", null, com.azure.core.util.Context.NONE); } } ``` @@ -1788,28 +1735,26 @@ public final class DnsSecurityRulesListSamples { ### OutboundEndpoints_Update ```java -import com.azure.resourcemanager.dnsresolver.models.InboundEndpoint; +import com.azure.resourcemanager.dnsresolver.models.OutboundEndpoint; import java.util.HashMap; import java.util.Map; /** - * Samples for InboundEndpoints Update. + * Samples for OutboundEndpoints Update. */ -public final class InboundEndpointsUpdateSamples { +public final class OutboundEndpointsUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Patch. - * json + * x-ms-original-file: 2025-10-01-preview/OutboundEndpoint_Patch.json */ /** - * Sample code: Update inbound endpoint for DNS resolver. + * Sample code: Update outbound endpoint for DNS resolver. * * @param manager Entry point to DnsResolverManager. */ public static void - updateInboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - InboundEndpoint resource = manager.inboundEndpoints() - .getWithResponse("sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", + updateOutboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + OutboundEndpoint resource = manager.outboundEndpoints() + .getWithResponse("sampleResourceGroup", "sampleDnsResolver", "sampleOutboundEndpoint", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder")).apply(); @@ -1832,51 +1777,30 @@ public final class InboundEndpointsUpdateSamples { ### VirtualNetworkLinks_CreateOrUpdate ```java -import java.util.Arrays; +import com.azure.core.management.SubResource; import java.util.HashMap; import java.util.Map; /** - * Samples for DnsResolverDomainLists CreateOrUpdate. + * Samples for VirtualNetworkLinks CreateOrUpdate. */ -public final class DnsResolverDomainListsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_BulkDomains_Put.json - */ - /** - * Sample code: Upsert DNS resolver domain list with bulk number of domains. - * - * @param manager Entry point to DnsResolverManager. - */ - public static void upsertDNSResolverDomainListWithBulkNumberOfDomains( - com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists() - .define("sampleDnsResolverDomainList") - .withRegion("westus2") - .withExistingResourceGroup("sampleResourceGroup") - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .create(); - } - +public final class VirtualNetworkLinksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Put - * .json + * x-ms-original-file: 2025-10-01-preview/VirtualNetworkLink_Put.json */ /** - * Sample code: Upsert DNS resolver domain list with less than 1000 domains. + * Sample code: Upsert virtual network link to a DNS forwarding ruleset. * * @param manager Entry point to DnsResolverManager. */ - public static void upsertDNSResolverDomainListWithLessThan1000Domains( + public static void upsertVirtualNetworkLinkToADNSForwardingRuleset( com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.dnsResolverDomainLists() - .define("sampleDnsResolverDomainList") - .withRegion("westus2") - .withExistingResourceGroup("sampleResourceGroup") - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withDomains(Arrays.asList("contoso.com")) + manager.virtualNetworkLinks() + .define("sampleVirtualNetworkLink") + .withExistingDnsForwardingRuleset("sampleResourceGroup", "sampleDnsForwardingRuleset") + .withVirtualNetwork(new SubResource().withId( + "/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork")) + .withMetadata(mapOf("additionalProp1", "value1")) .create(); } @@ -1898,21 +1822,22 @@ public final class DnsResolverDomainListsCreateOrUpdateSamples { ```java /** - * Samples for DnsResolverDomainLists Delete. + * Samples for VirtualNetworkLinks Delete. */ -public final class DnsResolverDomainListsDeleteSamples { +public final class VirtualNetworkLinksDeleteSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_Delete.json + * x-ms-original-file: 2025-10-01-preview/VirtualNetworkLink_Delete.json */ /** - * Sample code: Delete DNS resolver domain list. + * Sample code: Delete virtual network link to a DNS forwarding ruleset. * * @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); + public static void deleteVirtualNetworkLinkToADNSForwardingRuleset( + com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.virtualNetworkLinks() + .delete("sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", null, + com.azure.core.util.Context.NONE); } } ``` @@ -1921,21 +1846,22 @@ public final class DnsResolverDomainListsDeleteSamples { ```java /** - * Samples for DnsResolverDomainLists List. + * Samples for VirtualNetworkLinks Get. */ -public final class DnsResolverDomainListsListSamples { +public final class VirtualNetworkLinksGetSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_ListBySubscription.json + * x-ms-original-file: 2025-10-01-preview/VirtualNetworkLink_Get.json */ /** - * Sample code: List DNS resolver domain lists by subscription. + * Sample code: Retrieve virtual network link to a DNS forwarding ruleset. * * @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); + public static void retrieveVirtualNetworkLinkToADNSForwardingRuleset( + com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.virtualNetworkLinks() + .getWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", + com.azure.core.util.Context.NONE); } } ``` @@ -1944,23 +1870,21 @@ public final class DnsResolverDomainListsListSamples { ```java /** - * Samples for OutboundEndpoints List. + * Samples for VirtualNetworkLinks List. */ -public final class OutboundEndpointsListSamples { +public final class VirtualNetworkLinksListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_List. - * json + * x-ms-original-file: 2025-10-01-preview/VirtualNetworkLink_List.json */ /** - * Sample code: List outbound endpoints by DNS resolver. + * Sample code: List virtual network links to a DNS forwarding ruleset. * * @param manager Entry point to DnsResolverManager. */ - public static void - listOutboundEndpointsByDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.outboundEndpoints() - .list("sampleResourceGroup", "sampleDnsResolver", null, com.azure.core.util.Context.NONE); + public static void listVirtualNetworkLinksToADNSForwardingRuleset( + com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.virtualNetworkLinks() + .list("sampleResourceGroup", "sampleDnsForwardingRuleset", null, com.azure.core.util.Context.NONE); } } ``` @@ -1968,24 +1892,41 @@ public final class OutboundEndpointsListSamples { ### VirtualNetworkLinks_Update ```java +import com.azure.resourcemanager.dnsresolver.models.VirtualNetworkLink; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for OutboundEndpoints Get. + * Samples for VirtualNetworkLinks Update. */ -public final class OutboundEndpointsGetSamples { +public final class VirtualNetworkLinksUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Get.json + * x-ms-original-file: 2025-10-01-preview/VirtualNetworkLink_Patch.json */ /** - * Sample code: Retrieve outbound endpoint for DNS resolver. + * Sample code: Update virtual network link to a DNS forwarding ruleset. * * @param manager Entry point to DnsResolverManager. */ - public static void - retrieveOutboundEndpointForDNSResolver(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { - manager.outboundEndpoints() - .getWithResponse("sampleResourceGroup", "sampleDnsResolver", "sampleOutboundEndpoint", - com.azure.core.util.Context.NONE); + public static void updateVirtualNetworkLinkToADNSForwardingRuleset( + com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + VirtualNetworkLink resource = manager.virtualNetworkLinks() + .getWithResponse("sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withMetadata(mapOf("additionalProp1", "value1")).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/pom.xml b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/pom.xml index caa61b5da077..038ba80f36c7 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/pom.xml +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -17,8 +17,8 @@ 1.2.0-beta.1 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-2025-05. + Microsoft Azure SDK for Dns Resolver Management + This package contains Microsoft Azure SDK for Dns Resolver Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The DNS Resolver Management Client. Package api-version 2025-10-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true 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 ef38ea48c2a5..e9f1bafa5c63 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver; @@ -56,7 +56,7 @@ /** * Entry point to DnsResolverManager. - * DNS Resolver Client. + * The DNS Resolver Management Client. */ public final class DnsResolverManager { private DnsResolvers dnsResolvers; @@ -92,11 +92,11 @@ private DnsResolverManager(HttpPipeline httpPipeline, AzureProfile profile, Dura } /** - * Creates an instance of DnsResolver service API entry point. + * Creates an instance of Dns Resolver service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the DnsResolver service API instance. + * @return the Dns Resolver service API instance. */ public static DnsResolverManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); @@ -105,11 +105,11 @@ public static DnsResolverManager authenticate(TokenCredential credential, AzureP } /** - * Creates an instance of DnsResolver service API entry point. + * Creates an instance of Dns Resolver service API entry point. * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. - * @return the DnsResolver service API instance. + * @return the Dns Resolver service API instance. */ public static DnsResolverManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); @@ -231,11 +231,11 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { } /** - * Creates an instance of DnsResolver service API entry point. + * Creates an instance of Dns Resolver service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the DnsResolver service API instance. + * @return the Dns Resolver service API instance. */ public DnsResolverManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsForwardingRulesetsClient.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsForwardingRulesetsClient.java index ce7a43a6dbe8..05eb45849430 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsForwardingRulesetsClient.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsForwardingRulesetsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent; @@ -19,6 +19,34 @@ * An instance of this class provides access to all the operations defined in DnsForwardingRulesetsClient. */ public interface DnsForwardingRulesetsClient { + /** + * Gets a DNS forwarding ruleset properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DNS forwarding ruleset properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String dnsForwardingRulesetName, Context context); + + /** + * Gets a DNS forwarding ruleset properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DNS forwarding ruleset properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DnsForwardingRulesetInner getByResourceGroup(String resourceGroupName, String dnsForwardingRulesetName); + /** * Creates or updates a DNS forwarding ruleset. * @@ -217,34 +245,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String dnsForwardingRulesetName, String ifMatch, Context context); - /** - * Gets a DNS forwarding ruleset properties. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS forwarding ruleset properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String dnsForwardingRulesetName, Context context); - - /** - * Gets a DNS forwarding ruleset properties. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS forwarding ruleset properties. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsForwardingRulesetInner getByResourceGroup(String resourceGroupName, String dnsForwardingRulesetName); - /** * Lists DNS forwarding rulesets within a resource group. * @@ -252,8 +252,7 @@ Response getByResourceGroupWithResponse(String resour * @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 forwarding rulesets as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -267,8 +266,7 @@ Response getByResourceGroupWithResponse(String resour * @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 forwarding rulesets as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Integer top, @@ -279,8 +277,7 @@ PagedIterable listByResourceGroup(String resourceGrou * * @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 forwarding rulesets as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -293,8 +290,7 @@ PagedIterable listByResourceGroup(String resourceGrou * @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 forwarding rulesets as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Integer top, Context context); @@ -303,7 +299,7 @@ PagedIterable listByResourceGroup(String resourceGrou * Lists DNS forwarding ruleset resource IDs attached 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -318,7 +314,7 @@ PagedIterable listByVirtualNetwork(Stri * Lists DNS forwarding ruleset resource IDs attached 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 virtualNetworkName The name of the VirtualNetwork. * @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. 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 index bc42774f362b..8072fc0e1688 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent; @@ -19,6 +19,34 @@ * An instance of this class provides access to all the operations defined in DnsResolverDomainListsClient. */ public interface DnsResolverDomainListsClient { + /** + * 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); + /** * Creates or updates a DNS resolver domain list. * @@ -213,34 +241,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @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. * @@ -248,8 +248,7 @@ Response getByResourceGroupWithResponse(String resou * @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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -263,8 +262,7 @@ Response getByResourceGroupWithResponse(String resou * @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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Integer top, @@ -275,8 +273,7 @@ PagedIterable listByResourceGroup(String resourceGro * * @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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -289,8 +286,7 @@ PagedIterable listByResourceGroup(String resourceGro * @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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Integer top, Context context); @@ -304,7 +300,7 @@ PagedIterable listByResourceGroup(String resourceGro * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DnsResolverDomainListInner> beginBulk(String resourceGroupName, @@ -324,7 +320,7 @@ SyncPoller, DnsResolverDomainListInner> b * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DnsResolverDomainListInner> beginBulk(String resourceGroupName, @@ -340,7 +336,7 @@ SyncPoller, DnsResolverDomainListInner> b * @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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) DnsResolverDomainListInner bulk(String resourceGroupName, String dnsResolverDomainListName, @@ -360,7 +356,7 @@ DnsResolverDomainListInner bulk(String resourceGroupName, String dnsResolverDoma * @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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) DnsResolverDomainListInner bulk(String resourceGroupName, String dnsResolverDomainListName, 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..28facb797ff9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent; @@ -12,26 +12,26 @@ */ public interface DnsResolverManagementClient { /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * 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 index b3b44ca08c5e..7bc56bbcf1dd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent; @@ -19,6 +19,34 @@ * An instance of this class provides access to all the operations defined in DnsResolverPoliciesClient. */ public interface DnsResolverPoliciesClient { + /** + * 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); + /** * Creates or updates a DNS resolver policy. * @@ -213,34 +241,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @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. * @@ -248,8 +248,7 @@ Response getByResourceGroupWithResponse(String resourceG * @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}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -263,8 +262,7 @@ Response getByResourceGroupWithResponse(String resourceG * @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}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Integer top, Context context); @@ -274,8 +272,7 @@ Response getByResourceGroupWithResponse(String resourceG * * @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}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -288,8 +285,7 @@ Response getByResourceGroupWithResponse(String resourceG * @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}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Integer top, Context context); @@ -298,7 +294,7 @@ Response getByResourceGroupWithResponse(String resourceG * 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -312,7 +308,7 @@ Response getByResourceGroupWithResponse(String resourceG * 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 virtualNetworkName The name of the VirtualNetwork. * @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. 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 index df84398966d6..64b42893f441 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent; @@ -19,6 +19,39 @@ * DnsResolverPolicyVirtualNetworkLinksClient. */ public interface DnsResolverPolicyVirtualNetworkLinksClient { + /** + * 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); + /** * Creates or updates a DNS resolver policy virtual network link. * @@ -246,39 +279,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. * @@ -287,8 +287,8 @@ DnsResolverPolicyVirtualNetworkLinkInner get(String resourceGroupName, String dn * @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}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, @@ -304,8 +304,8 @@ PagedIterable list(String resourceGrou * @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}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String dnsResolverPolicyName, diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolversClient.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolversClient.java index 66a115e181a2..d9cf8236a238 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolversClient.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolversClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent; @@ -19,6 +19,34 @@ * An instance of this class provides access to all the operations defined in DnsResolversClient. */ public interface DnsResolversClient { + /** + * Gets properties of a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String dnsResolverName, + Context context); + + /** + * Gets properties of a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DnsResolverInner getByResourceGroup(String resourceGroupName, String dnsResolverName); + /** * Creates or updates a DNS resolver. * @@ -210,34 +238,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String dnsResolverName, String ifMatch, Context context); - /** - * Gets properties of a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String dnsResolverName, - Context context); - - /** - * Gets properties of a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsResolverInner getByResourceGroup(String resourceGroupName, String dnsResolverName); - /** * Lists DNS resolvers within a resource group. * @@ -245,8 +245,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * @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 resolvers as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -260,8 +259,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * @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 resolvers as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Integer top, Context context); @@ -271,8 +269,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * * @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 resolvers as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -285,8 +282,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * @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 resolvers as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Integer top, Context context); @@ -295,7 +291,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * Lists DNS resolver 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -309,7 +305,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * Lists DNS resolver 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 virtualNetworkName The name of the VirtualNetwork. * @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. 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 index ba6eaafa6dd1..4e7e86dfa050 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent; @@ -18,6 +18,36 @@ * An instance of this class provides access to all the operations defined in DnsSecurityRulesClient. */ public interface DnsSecurityRulesClient { + /** + * 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); + /** * Creates or updates a DNS security rule for a DNS resolver policy. * @@ -228,36 +258,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String 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. * @@ -266,8 +266,7 @@ Response getWithResponse(String resourceGroupName, String * @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}. + * @return the response of a DnsSecurityRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String dnsResolverPolicyName); @@ -282,8 +281,7 @@ Response getWithResponse(String resourceGroupName, String * @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}. + * @return the response of a DnsSecurityRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String dnsResolverPolicyName, Integer top, diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/ForwardingRulesClient.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/ForwardingRulesClient.java index 9ce0854f4ea1..faf42583e28f 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/ForwardingRulesClient.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/ForwardingRulesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent; @@ -16,6 +16,36 @@ * An instance of this class provides access to all the operations defined in ForwardingRulesClient. */ public interface ForwardingRulesClient { + /** + * Gets properties of a forwarding rule in a DNS forwarding ruleset. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param forwardingRuleName The name of the forwarding 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 forwarding rule in a DNS forwarding ruleset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, + String forwardingRuleName, Context context); + + /** + * Gets properties of a forwarding rule in a DNS forwarding ruleset. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param forwardingRuleName The name of the forwarding 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 forwarding rule in a DNS forwarding ruleset. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ForwardingRuleInner get(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName); + /** * Creates or updates a forwarding rule in a DNS forwarding ruleset. * @@ -119,36 +149,6 @@ Response deleteWithResponse(String resourceGroupName, String dnsForwarding @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName); - /** - * Gets properties of a forwarding rule in a DNS forwarding ruleset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param forwardingRuleName The name of the forwarding 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 forwarding rule in a DNS forwarding ruleset along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, - String forwardingRuleName, Context context); - - /** - * Gets properties of a forwarding rule in a DNS forwarding ruleset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param forwardingRuleName The name of the forwarding 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 forwarding rule in a DNS forwarding ruleset. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ForwardingRuleInner get(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName); - /** * Lists forwarding rules in a DNS forwarding ruleset. * @@ -157,8 +157,7 @@ Response getWithResponse(String resourceGroupName, String d * @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 forwarding rules within a DNS forwarding ruleset as paginated - * response with {@link PagedIterable}. + * @return the response of a ForwardingRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName); @@ -173,8 +172,7 @@ Response getWithResponse(String resourceGroupName, String d * @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 forwarding rules within a DNS forwarding ruleset as paginated - * response with {@link PagedIterable}. + * @return the response of a ForwardingRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName, Integer top, diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/InboundEndpointsClient.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/InboundEndpointsClient.java index 5653f3a86288..d01747c5430c 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/InboundEndpointsClient.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/InboundEndpointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent; @@ -18,6 +18,36 @@ * An instance of this class provides access to all the operations defined in InboundEndpointsClient. */ public interface InboundEndpointsClient { + /** + * Gets properties of an inbound endpoint for a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. + * @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 an inbound endpoint for a DNS resolver along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String dnsResolverName, + String inboundEndpointName, Context context); + + /** + * Gets properties of an inbound endpoint for a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. + * @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 an inbound endpoint for a DNS resolver. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InboundEndpointInner get(String resourceGroupName, String dnsResolverName, String inboundEndpointName); + /** * Creates or updates an inbound endpoint for a DNS resolver. * @@ -227,36 +257,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String dnsResolverName, String inboundEndpointName, String ifMatch, Context context); - /** - * Gets properties of an inbound endpoint for a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. - * @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 an inbound endpoint for a DNS resolver along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String dnsResolverName, - String inboundEndpointName, Context context); - - /** - * Gets properties of an inbound endpoint for a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. - * @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 an inbound endpoint for a DNS resolver. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - InboundEndpointInner get(String resourceGroupName, String dnsResolverName, String inboundEndpointName); - /** * Lists inbound endpoints for a DNS resolver. * @@ -265,8 +265,7 @@ Response getWithResponse(String resourceGroupName, String * @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 inbound endpoints for a DNS resolver as paginated response - * with {@link PagedIterable}. + * @return the response of a InboundEndpoint list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String dnsResolverName); @@ -281,8 +280,7 @@ Response getWithResponse(String resourceGroupName, String * @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 inbound endpoints for a DNS resolver as paginated response - * with {@link PagedIterable}. + * @return the response of a InboundEndpoint list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String dnsResolverName, Integer top, diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/OutboundEndpointsClient.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/OutboundEndpointsClient.java index e80e87474967..b0cd366a4d52 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/OutboundEndpointsClient.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/OutboundEndpointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent; @@ -18,6 +18,36 @@ * An instance of this class provides access to all the operations defined in OutboundEndpointsClient. */ public interface OutboundEndpointsClient { + /** + * Gets properties of an outbound endpoint for a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. + * @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 an outbound endpoint for a DNS resolver along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String dnsResolverName, + String outboundEndpointName, Context context); + + /** + * Gets properties of an outbound endpoint for a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. + * @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 an outbound endpoint for a DNS resolver. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OutboundEndpointInner get(String resourceGroupName, String dnsResolverName, String outboundEndpointName); + /** * Creates or updates an outbound endpoint for a DNS resolver. * @@ -227,36 +257,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String dnsResolverName, String outboundEndpointName, String ifMatch, Context context); - /** - * Gets properties of an outbound endpoint for a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. - * @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 an outbound endpoint for a DNS resolver along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String dnsResolverName, - String outboundEndpointName, Context context); - - /** - * Gets properties of an outbound endpoint for a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. - * @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 an outbound endpoint for a DNS resolver. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OutboundEndpointInner get(String resourceGroupName, String dnsResolverName, String outboundEndpointName); - /** * Lists outbound endpoints for a DNS resolver. * @@ -265,8 +265,7 @@ Response getWithResponse(String resourceGroupName, String * @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 outbound endpoints for a DNS resolver as paginated response - * with {@link PagedIterable}. + * @return the response of a OutboundEndpoint list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String dnsResolverName); @@ -281,8 +280,7 @@ Response getWithResponse(String resourceGroupName, String * @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 outbound endpoints for a DNS resolver as paginated response - * with {@link PagedIterable}. + * @return the response of a OutboundEndpoint list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String dnsResolverName, Integer top, diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/VirtualNetworkLinksClient.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/VirtualNetworkLinksClient.java index 89de10c299d3..2f9c9746e72a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/VirtualNetworkLinksClient.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/VirtualNetworkLinksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent; @@ -18,6 +18,37 @@ * An instance of this class provides access to all the operations defined in VirtualNetworkLinksClient. */ public interface VirtualNetworkLinksClient { + /** + * Gets properties of a virtual network link to a DNS forwarding ruleset. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param virtualNetworkLinkName The name of the virtual network link. + * @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 virtual network link to a DNS forwarding ruleset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, + String virtualNetworkLinkName, Context context); + + /** + * Gets properties of a virtual network link to a DNS forwarding ruleset. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param virtualNetworkLinkName The name of the virtual network link. + * @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 virtual network link to a DNS forwarding ruleset. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkLinkInner get(String resourceGroupName, String dnsForwardingRulesetName, + String virtualNetworkLinkName); + /** * Creates or updates a virtual network link to a DNS forwarding ruleset. * @@ -229,37 +260,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, String ifMatch, Context context); - /** - * Gets properties of a virtual network link to a DNS forwarding ruleset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param virtualNetworkLinkName The name of the virtual network link. - * @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 virtual network link to a DNS forwarding ruleset along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, - String virtualNetworkLinkName, Context context); - - /** - * Gets properties of a virtual network link to a DNS forwarding ruleset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param virtualNetworkLinkName The name of the virtual network link. - * @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 virtual network link to a DNS forwarding ruleset. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VirtualNetworkLinkInner get(String resourceGroupName, String dnsForwardingRulesetName, - String virtualNetworkLinkName); - /** * Lists virtual network links to a DNS forwarding ruleset. * @@ -268,8 +268,7 @@ VirtualNetworkLinkInner get(String resourceGroupName, String dnsForwardingRulese * @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 virtual network links as paginated response with - * {@link PagedIterable}. + * @return the response of a VirtualNetworkLink list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName); @@ -284,8 +283,7 @@ VirtualNetworkLinkInner get(String resourceGroupName, String dnsForwardingRulese * @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 virtual network links as paginated response with - * {@link PagedIterable}. + * @return the response of a VirtualNetworkLink list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName, Integer top, 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..b34bae62c4a5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -8,7 +8,6 @@ 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; @@ -23,14 +22,15 @@ @Fluent public final class DnsForwardingRulesetInner extends Resource { /* - * ETag of the DNS forwarding ruleset. + * Properties of the DNS forwarding ruleset. */ - private String etag; + private DnsForwardingRulesetProperties innerProperties = new DnsForwardingRulesetProperties(); /* - * Properties of the DNS forwarding ruleset. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private DnsForwardingRulesetProperties innerProperties = new DnsForwardingRulesetProperties(); + private String etag; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -59,21 +59,24 @@ public DnsForwardingRulesetInner() { } /** - * Get the etag property: ETag of the DNS forwarding ruleset. + * Get the innerProperties property: Properties of the DNS forwarding ruleset. * - * @return the etag value. + * @return the innerProperties value. */ - public String etag() { - return this.etag; + private DnsForwardingRulesetProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Properties of the DNS forwarding ruleset. + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * - * @return the innerProperties value. + * @return the etag value. */ - private DnsForwardingRulesetProperties innerProperties() { - return this.innerProperties; + public String etag() { + return this.etag; } /** @@ -177,23 +180,6 @@ 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 DnsForwardingRulesetInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DnsForwardingRulesetInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsForwardingRulesetProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsForwardingRulesetProperties.java index 97a0ebbed27d..b9c301906a2e 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsForwardingRulesetProperties.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsForwardingRulesetProperties.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -85,21 +84,6 @@ public String resourceGuid() { return this.resourceGuid; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dnsResolverOutboundEndpoints() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property dnsResolverOutboundEndpoints in model DnsForwardingRulesetProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DnsForwardingRulesetProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListBulkProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListBulkProperties.java index f765538390b6..06c932aa318e 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListBulkProperties.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListBulkProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -77,26 +76,6 @@ public DnsResolverDomainListBulkProperties withAction(Action action) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageUrl() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property storageUrl in model DnsResolverDomainListBulkProperties")); - } - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property action in model DnsResolverDomainListBulkProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverDomainListBulkProperties.class); - /** * {@inheritDoc} */ 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 index b93c88c58cd4..1aff23d32d0c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -21,14 +21,15 @@ @Fluent public final class DnsResolverDomainListInner extends Resource { /* - * ETag of the DNS resolver domain list. + * Properties of the DNS resolver domain list. */ - private String etag; + private DnsResolverDomainListProperties innerProperties; /* - * Properties of the DNS resolver domain list. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private DnsResolverDomainListProperties innerProperties; + private String etag; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -57,21 +58,24 @@ public DnsResolverDomainListInner() { } /** - * Get the etag property: ETag of the DNS resolver domain list. + * Get the innerProperties property: Properties of the DNS resolver domain list. * - * @return the etag value. + * @return the innerProperties value. */ - public String etag() { - return this.etag; + private DnsResolverDomainListProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Properties of the DNS resolver domain list. + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * - * @return the innerProperties value. + * @return the etag value. */ - private DnsResolverDomainListProperties innerProperties() { - return this.innerProperties; + public String etag() { + return this.etag; } /** @@ -183,17 +187,6 @@ 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} */ @@ -233,11 +226,11 @@ public static DnsResolverDomainListInner fromJson(JsonReader jsonReader) throws } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedDnsResolverDomainListInner.withTags(tags); - } else if ("etag".equals(fieldName)) { - deserializedDnsResolverDomainListInner.etag = reader.getString(); } 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 { 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 index 1c26ccda650b..cafe5eb9a5ba 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -49,14 +49,6 @@ public DnsResolverDomainListPatchProperties withDomains(List domains) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index 34860fd2ba8d..6bfc0b9b9e9d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -95,14 +95,6 @@ public String resourceGuid() { return this.resourceGuid; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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..42d3aa53d0d9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -8,7 +8,6 @@ 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; @@ -23,14 +22,15 @@ @Fluent public final class DnsResolverInner extends Resource { /* - * ETag of the DNS resolver. + * Properties of the DNS resolver. */ - private String etag; + private DnsResolverProperties innerProperties = new DnsResolverProperties(); /* - * Properties of the DNS resolver. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private DnsResolverProperties innerProperties = new DnsResolverProperties(); + private String etag; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -59,21 +59,24 @@ public DnsResolverInner() { } /** - * Get the etag property: ETag of the DNS resolver. + * Get the innerProperties property: Properties of the DNS resolver. * - * @return the etag value. + * @return the innerProperties value. */ - public String etag() { - return this.etag; + private DnsResolverProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Properties of the DNS resolver. + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * - * @return the innerProperties value. + * @return the etag value. */ - private DnsResolverProperties innerProperties() { - return this.innerProperties; + public String etag() { + return this.etag; } /** @@ -185,23 +188,6 @@ 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 DnsResolverInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverInner.class); - /** * {@inheritDoc} */ 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 index 64bb31a64bf2..3413aa60210d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -20,14 +20,15 @@ @Fluent public final class DnsResolverPolicyInner extends Resource { /* - * ETag of the DNS resolver policy. + * Properties of the DNS resolver policy. */ - private String etag; + private DnsResolverPolicyProperties innerProperties; /* - * Properties of the DNS resolver policy. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private DnsResolverPolicyProperties innerProperties; + private String etag; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -56,21 +57,24 @@ public DnsResolverPolicyInner() { } /** - * Get the etag property: ETag of the DNS resolver policy. + * Get the innerProperties property: Properties of the DNS resolver policy. * - * @return the etag value. + * @return the innerProperties value. */ - public String etag() { - return this.etag; + private DnsResolverPolicyProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Properties of the DNS resolver policy. + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * - * @return the innerProperties value. + * @return the etag value. */ - private DnsResolverPolicyProperties innerProperties() { - return this.innerProperties; + public String etag() { + return this.etag; } /** @@ -149,17 +153,6 @@ 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} */ @@ -199,10 +192,10 @@ public static DnsResolverPolicyInner fromJson(JsonReader jsonReader) throws IOEx } 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 ("etag".equals(fieldName)) { + deserializedDnsResolverPolicyInner.etag = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedDnsResolverPolicyInner.systemData = SystemData.fromJson(reader); } else { 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 index 414be94a5b72..8e5c1b952a94 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -53,14 +53,6 @@ public String resourceGuid() { return this.resourceGuid; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index 177a2f383415..3af90b043a56 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -8,7 +8,6 @@ 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; @@ -21,17 +20,18 @@ */ @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(); + /* + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) + */ + private String etag; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -59,21 +59,24 @@ public DnsResolverPolicyVirtualNetworkLinkInner() { } /** - * Get the etag property: ETag of the DNS resolver policy virtual network link. + * Get the innerProperties property: Properties of the DNS resolver policy virtual network link. * - * @return the etag value. + * @return the innerProperties value. */ - public String etag() { - return this.etag; + private DnsResolverPolicyVirtualNetworkLinkProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Properties of the DNS resolver policy virtual network link. + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * - * @return the innerProperties value. + * @return the etag value. */ - private DnsResolverPolicyVirtualNetworkLinkProperties innerProperties() { - return this.innerProperties; + public String etag() { + return this.etag; } /** @@ -166,23 +169,6 @@ 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} */ 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 index d98d10ff57f1..5a1f51b614c5 100644 --- 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 @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -67,21 +66,6 @@ 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} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverProperties.java index 61f153666f8c..b366720d409a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverProperties.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverProperties.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -97,21 +96,6 @@ public String resourceGuid() { return this.resourceGuid; } - /** - * 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 DnsResolverProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverProperties.class); - /** * {@inheritDoc} */ 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 index 758794a34fb2..2143f12a4e32 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -8,12 +8,12 @@ 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.ManagedDomainList; import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -25,14 +25,15 @@ @Fluent public final class DnsSecurityRuleInner extends Resource { /* - * ETag of the DNS security rule. + * Properties of the DNS security rule. */ - private String etag; + private DnsSecurityRuleProperties innerProperties = new DnsSecurityRuleProperties(); /* - * Properties of the DNS security rule. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private DnsSecurityRuleProperties innerProperties = new DnsSecurityRuleProperties(); + private String etag; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -61,21 +62,24 @@ public DnsSecurityRuleInner() { } /** - * Get the etag property: ETag of the DNS security rule. + * Get the innerProperties property: Properties of the DNS security rule. * - * @return the etag value. + * @return the innerProperties value. */ - public String etag() { - return this.etag; + private DnsSecurityRuleProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Properties of the DNS security rule. + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * - * @return the innerProperties value. + * @return the etag value. */ - private DnsSecurityRuleProperties innerProperties() { - return this.innerProperties; + public String etag() { + return this.etag; } /** @@ -204,6 +208,29 @@ public DnsSecurityRuleInner withDnsResolverDomainLists(List dnsReso return this; } + /** + * Get the managedDomainLists property: Managed domain lists that the DNS security rule applies to. + * + * @return the managedDomainLists value. + */ + public List managedDomainLists() { + return this.innerProperties() == null ? null : this.innerProperties().managedDomainLists(); + } + + /** + * Set the managedDomainLists property: Managed domain lists that the DNS security rule applies to. + * + * @param managedDomainLists the managedDomainLists value to set. + * @return the DnsSecurityRuleInner object itself. + */ + public DnsSecurityRuleInner withManagedDomainLists(List managedDomainLists) { + if (this.innerProperties() == null) { + this.innerProperties = new DnsSecurityRuleProperties(); + } + this.innerProperties().withManagedDomainLists(managedDomainLists); + return this; + } + /** * Get the dnsSecurityRuleState property: The state of DNS security rule. * @@ -237,23 +264,6 @@ 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} */ 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 index 113cc7f19fc8..b79b2e853049 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -12,6 +12,7 @@ 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.ManagedDomainList; import java.io.IOException; import java.util.List; @@ -30,6 +31,11 @@ public final class DnsSecurityRulePatchProperties implements JsonSerializable dnsResolverDomainLists; + /* + * Managed domain lists that the DNS security rule applies to. + */ + private List managedDomainLists; + /* * The state of DNS security rule. */ @@ -86,6 +92,26 @@ public DnsSecurityRulePatchProperties withDnsResolverDomainLists(List managedDomainLists() { + return this.managedDomainLists; + } + + /** + * Set the managedDomainLists property: Managed domain lists that the DNS security rule applies to. + * + * @param managedDomainLists the managedDomainLists value to set. + * @return the DnsSecurityRulePatchProperties object itself. + */ + public DnsSecurityRulePatchProperties withManagedDomainLists(List managedDomainLists) { + this.managedDomainLists = managedDomainLists; + return this; + } + /** * Get the dnsSecurityRuleState property: The state of DNS security rule. * @@ -126,17 +152,6 @@ public DnsSecurityRulePatchProperties withPriority(Integer priority) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (action() != null) { - action().validate(); - } - } - /** * {@inheritDoc} */ @@ -146,6 +161,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("action", this.action); jsonWriter.writeArrayField("dnsResolverDomainLists", this.dnsResolverDomainLists, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("managedDomainLists", this.managedDomainLists, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeStringField("dnsSecurityRuleState", this.dnsSecurityRuleState == null ? null : this.dnsSecurityRuleState.toString()); jsonWriter.writeNumberField("priority", this.priority); @@ -174,6 +191,10 @@ public static DnsSecurityRulePatchProperties fromJson(JsonReader jsonReader) thr List dnsResolverDomainLists = reader.readArray(reader1 -> SubResource.fromJson(reader1)); deserializedDnsSecurityRulePatchProperties.dnsResolverDomainLists = dnsResolverDomainLists; + } else if ("managedDomainLists".equals(fieldName)) { + List managedDomainLists + = reader.readArray(reader1 -> ManagedDomainList.fromString(reader1.getString())); + deserializedDnsSecurityRulePatchProperties.managedDomainLists = managedDomainLists; } else if ("dnsSecurityRuleState".equals(fieldName)) { deserializedDnsSecurityRulePatchProperties.dnsSecurityRuleState = DnsSecurityRuleState.fromString(reader.getString()); 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 index 540ebd07d5a9..ab7996745840 100644 --- 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 @@ -1,18 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.ManagedDomainList; import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; import java.io.IOException; import java.util.List; @@ -37,6 +37,11 @@ public final class DnsSecurityRuleProperties implements JsonSerializable dnsResolverDomainLists; + /* + * Managed domain lists that the DNS security rule applies to. + */ + private List managedDomainLists; + /* * The state of DNS security rule. */ @@ -114,6 +119,26 @@ public DnsSecurityRuleProperties withDnsResolverDomainLists(List dn return this; } + /** + * Get the managedDomainLists property: Managed domain lists that the DNS security rule applies to. + * + * @return the managedDomainLists value. + */ + public List managedDomainLists() { + return this.managedDomainLists; + } + + /** + * Set the managedDomainLists property: Managed domain lists that the DNS security rule applies to. + * + * @param managedDomainLists the managedDomainLists value to set. + * @return the DnsSecurityRuleProperties object itself. + */ + public DnsSecurityRuleProperties withManagedDomainLists(List managedDomainLists) { + this.managedDomainLists = managedDomainLists; + return this; + } + /** * Get the dnsSecurityRuleState property: The state of DNS security rule. * @@ -144,28 +169,6 @@ 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} */ @@ -176,6 +179,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("action", this.action); jsonWriter.writeArrayField("dnsResolverDomainLists", this.dnsResolverDomainLists, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("managedDomainLists", this.managedDomainLists, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeStringField("dnsSecurityRuleState", this.dnsSecurityRuleState == null ? null : this.dnsSecurityRuleState.toString()); return jsonWriter.writeEndObject(); @@ -205,6 +210,10 @@ public static DnsSecurityRuleProperties fromJson(JsonReader jsonReader) throws I List dnsResolverDomainLists = reader.readArray(reader1 -> SubResource.fromJson(reader1)); deserializedDnsSecurityRuleProperties.dnsResolverDomainLists = dnsResolverDomainLists; + } else if ("managedDomainLists".equals(fieldName)) { + List managedDomainLists + = reader.readArray(reader1 -> ManagedDomainList.fromString(reader1.getString())); + deserializedDnsSecurityRuleProperties.managedDomainLists = managedDomainLists; } else if ("dnsSecurityRuleState".equals(fieldName)) { deserializedDnsSecurityRuleProperties.dnsSecurityRuleState = DnsSecurityRuleState.fromString(reader.getString()); 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..a4ed898a9c8b 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 @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; 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; @@ -24,14 +23,15 @@ @Fluent public final class ForwardingRuleInner extends ProxyResource { /* - * ETag of the forwarding rule. + * Properties of the forwarding rule. */ - private String etag; + private ForwardingRuleProperties innerProperties = new ForwardingRuleProperties(); /* - * Properties of the forwarding rule. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private ForwardingRuleProperties innerProperties = new ForwardingRuleProperties(); + private String etag; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -60,21 +60,24 @@ public ForwardingRuleInner() { } /** - * Get the etag property: ETag of the forwarding rule. + * Get the innerProperties property: Properties of the forwarding rule. * - * @return the etag value. + * @return the innerProperties value. */ - public String etag() { - return this.etag; + private ForwardingRuleProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Properties of the forwarding rule. + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * - * @return the innerProperties value. + * @return the etag value. */ - private ForwardingRuleProperties innerProperties() { - return this.innerProperties; + public String etag() { + return this.etag; } /** @@ -218,23 +221,6 @@ 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 ForwardingRuleInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ForwardingRuleInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRulePatchProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRulePatchProperties.java index b508fcf6e7b3..52411d0f3ffa 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRulePatchProperties.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRulePatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -101,17 +101,6 @@ public ForwardingRulePatchProperties withForwardingRuleState(ForwardingRuleState return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (targetDnsServers() != null) { - targetDnsServers().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRuleProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRuleProperties.java index 0e42eb2e5a7c..0e121e85b6bc 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRuleProperties.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRuleProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -144,28 +143,6 @@ public ProvisioningState provisioningState() { return this.provisioningState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (domainName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property domainName in model ForwardingRuleProperties")); - } - if (targetDnsServers() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetDnsServers in model ForwardingRuleProperties")); - } else { - targetDnsServers().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ForwardingRuleProperties.class); - /** * {@inheritDoc} */ 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..cca577326dda 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 @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -23,14 +22,15 @@ @Fluent public final class InboundEndpointInner extends Resource { /* - * ETag of the inbound endpoint. + * Properties of the inbound endpoint. */ - private String etag; + private InboundEndpointProperties innerProperties = new InboundEndpointProperties(); /* - * Properties of the inbound endpoint. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private InboundEndpointProperties innerProperties = new InboundEndpointProperties(); + private String etag; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -59,21 +59,24 @@ public InboundEndpointInner() { } /** - * Get the etag property: ETag of the inbound endpoint. + * Get the innerProperties property: Properties of the inbound endpoint. * - * @return the etag value. + * @return the innerProperties value. */ - public String etag() { - return this.etag; + private InboundEndpointProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Properties of the inbound endpoint. + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * - * @return the innerProperties value. + * @return the etag value. */ - private InboundEndpointProperties innerProperties() { - return this.innerProperties; + public String etag() { + return this.etag; } /** @@ -175,23 +178,6 @@ 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 InboundEndpointInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InboundEndpointInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/InboundEndpointProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/InboundEndpointProperties.java index 85426d5d4541..5f26bfa15fe3 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/InboundEndpointProperties.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/InboundEndpointProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -81,23 +80,6 @@ public String resourceGuid() { return this.resourceGuid; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipConfigurations() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ipConfigurations in model InboundEndpointProperties")); - } else { - ipConfigurations().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InboundEndpointProperties.class); - /** * {@inheritDoc} */ 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..343c90a780fb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -8,7 +8,6 @@ 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; @@ -22,14 +21,15 @@ @Fluent public final class OutboundEndpointInner extends Resource { /* - * ETag of the outbound endpoint. + * Properties of the outbound endpoint. */ - private String etag; + private OutboundEndpointProperties innerProperties = new OutboundEndpointProperties(); /* - * Properties of the outbound endpoint. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private OutboundEndpointProperties innerProperties = new OutboundEndpointProperties(); + private String etag; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -58,21 +58,24 @@ public OutboundEndpointInner() { } /** - * Get the etag property: ETag of the outbound endpoint. + * Get the innerProperties property: Properties of the outbound endpoint. * - * @return the etag value. + * @return the innerProperties value. */ - public String etag() { - return this.etag; + private OutboundEndpointProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Properties of the outbound endpoint. + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * - * @return the innerProperties value. + * @return the etag value. */ - private OutboundEndpointProperties innerProperties() { - return this.innerProperties; + public String etag() { + return this.etag; } /** @@ -174,23 +177,6 @@ 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 OutboundEndpointInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OutboundEndpointInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/OutboundEndpointProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/OutboundEndpointProperties.java index 36cd4e04e36f..dd2a3cd59ad0 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/OutboundEndpointProperties.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/OutboundEndpointProperties.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -80,21 +79,6 @@ public String resourceGuid() { return this.resourceGuid; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (subnet() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property subnet in model OutboundEndpointProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OutboundEndpointProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkDnsForwardingRulesetInner.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkDnsForwardingRulesetInner.java index f0fcd8f7201c..b7a0f73dc022 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkDnsForwardingRulesetInner.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkDnsForwardingRulesetInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.SubResource; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -15,7 +15,7 @@ /** * Reference to DNS forwarding ruleset and associated virtual network link. */ -@Fluent +@Immutable public final class VirtualNetworkDnsForwardingRulesetInner implements JsonSerializable { /* @@ -31,7 +31,7 @@ public final class VirtualNetworkDnsForwardingRulesetInner /** * Creates an instance of VirtualNetworkDnsForwardingRulesetInner class. */ - public VirtualNetworkDnsForwardingRulesetInner() { + private VirtualNetworkDnsForwardingRulesetInner() { } /** @@ -43,17 +43,6 @@ public String id() { return this.id; } - /** - * Set the id property: DNS Forwarding Ruleset Resource ID. - * - * @param id the id value to set. - * @return the VirtualNetworkDnsForwardingRulesetInner object itself. - */ - public VirtualNetworkDnsForwardingRulesetInner withId(String id) { - this.id = id; - return this; - } - /** * Get the innerProperties property: Properties of the virtual network link sub-resource reference. * @@ -72,31 +61,6 @@ public SubResource virtualNetworkLink() { return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkLink(); } - /** - * Set the virtualNetworkLink property: The reference to the virtual network link. - * - * @param virtualNetworkLink the virtualNetworkLink value to set. - * @return the VirtualNetworkDnsForwardingRulesetInner object itself. - */ - public VirtualNetworkDnsForwardingRulesetInner withVirtualNetworkLink(SubResource virtualNetworkLink) { - if (this.innerProperties() == null) { - this.innerProperties = new VirtualNetworkLinkSubResourceProperties(); - } - this.innerProperties().withVirtualNetworkLink(virtualNetworkLink); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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..533bfef04adb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -8,7 +8,6 @@ import com.azure.core.management.ProxyResource; 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; @@ -22,14 +21,15 @@ @Fluent public final class VirtualNetworkLinkInner extends ProxyResource { /* - * ETag of the virtual network link. + * Properties of the virtual network link. */ - private String etag; + private VirtualNetworkLinkProperties innerProperties = new VirtualNetworkLinkProperties(); /* - * Properties of the virtual network link. + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) */ - private VirtualNetworkLinkProperties innerProperties = new VirtualNetworkLinkProperties(); + private String etag; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -58,21 +58,24 @@ public VirtualNetworkLinkInner() { } /** - * Get the etag property: ETag of the virtual network link. + * Get the innerProperties property: Properties of the virtual network link. * - * @return the etag value. + * @return the innerProperties value. */ - public String etag() { - return this.etag; + private VirtualNetworkLinkProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Properties of the virtual network link. + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * - * @return the innerProperties value. + * @return the etag value. */ - private VirtualNetworkLinkProperties innerProperties() { - return this.innerProperties; + public String etag() { + return this.etag; } /** @@ -170,23 +173,6 @@ 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 VirtualNetworkLinkInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkLinkInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkPatchProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkPatchProperties.java index 45d5c10d0131..cd1cedad65e8 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkPatchProperties.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkPatchProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; @@ -48,14 +48,6 @@ public VirtualNetworkLinkPatchProperties withMetadata(Map metada return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkProperties.java index b8bb2f67e55e..6a7adf9baf71 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkProperties.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkProperties.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -92,21 +91,6 @@ 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 VirtualNetworkLinkProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkLinkProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkSubResourceProperties.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkSubResourceProperties.java index d68d6a476bea..95559808c066 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkSubResourceProperties.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkSubResourceProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.SubResource; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -15,7 +15,7 @@ /** * The reference to the virtual network link that associates between the DNS forwarding ruleset and virtual network. */ -@Fluent +@Immutable public final class VirtualNetworkLinkSubResourceProperties implements JsonSerializable { /* @@ -26,7 +26,7 @@ public final class VirtualNetworkLinkSubResourceProperties /** * Creates an instance of VirtualNetworkLinkSubResourceProperties class. */ - public VirtualNetworkLinkSubResourceProperties() { + private VirtualNetworkLinkSubResourceProperties() { } /** @@ -38,25 +38,6 @@ public SubResource virtualNetworkLink() { return this.virtualNetworkLink; } - /** - * Set the virtualNetworkLink property: The reference to the virtual network link. - * - * @param virtualNetworkLink the virtualNetworkLink value to set. - * @return the VirtualNetworkLinkSubResourceProperties object itself. - */ - public VirtualNetworkLinkSubResourceProperties withVirtualNetworkLink(SubResource virtualNetworkLink) { - this.virtualNetworkLink = virtualNetworkLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/package-info.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/package-info.java index b27ea4266a22..b8391a67d211 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/package-info.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the inner data models for DnsResolverManagementClient. - * DNS Resolver Client. + * The DNS Resolver Management Client. */ package com.azure.resourcemanager.dnsresolver.fluent.models; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/package-info.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/package-info.java index 44beb6fabdb4..2f9a756e9a06 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/package-info.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the service clients for DnsResolverManagementClient. - * DNS Resolver Client. + * The DNS Resolver Management Client. */ package com.azure.resourcemanager.dnsresolver.fluent; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetImpl.java index 5a330079a818..fb0e495b8b37 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetsClientImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetsClientImpl.java index 1c0d0d842dbe..401c297def85 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetsClientImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -32,15 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient; import com.azure.resourcemanager.dnsresolver.fluent.models.DnsForwardingRulesetInner; import com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkDnsForwardingRulesetInner; -import com.azure.resourcemanager.dnsresolver.models.DnsForwardingRulesetListResult; +import com.azure.resourcemanager.dnsresolver.implementation.models.DnsForwardingRulesetListResult; +import com.azure.resourcemanager.dnsresolver.implementation.models.VirtualNetworkDnsForwardingRulesetListResult; import com.azure.resourcemanager.dnsresolver.models.DnsForwardingRulesetPatch; -import com.azure.resourcemanager.dnsresolver.models.VirtualNetworkDnsForwardingRulesetListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -74,133 +73,125 @@ public final class DnsForwardingRulesetsClientImpl implements DnsForwardingRules * The interface defining all the services for DnsResolverManagementClientDnsForwardingRulesets to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "DnsResolverManagementClientDnsForwardingRulesets") public interface DnsForwardingRulesetsService { @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, + @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") DnsForwardingRulesetInner parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("if-match") String ifMatch, @HeaderParam("if-none-match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsForwardingRulesetInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") DnsForwardingRulesetInner parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("if-match") String ifMatch, @HeaderParam("if-none-match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsForwardingRulesetInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") DnsForwardingRulesetPatch parameters, @HeaderParam("Accept") String accept, + @HeaderParam("if-match") String ifMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DnsForwardingRulesetPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") DnsForwardingRulesetPatch parameters, @HeaderParam("Accept") String accept, + @HeaderParam("if-match") String ifMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DnsForwardingRulesetPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("if-match") String ifMatch, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @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/dnsForwardingRulesets/{dnsForwardingRulesetName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("if-match") String ifMatch, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets") @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); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@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); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsForwardingRulesets") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsForwardingRulesets") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -208,27 +199,29 @@ Response listSync(@HostParam("$host") String end @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByVirtualNetwork( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualNetworkName") String virtualNetworkName, @QueryParam("api-version") String apiVersion, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @PathParam("virtualNetworkName") String virtualNetworkName, @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}/listDnsForwardingRulesets") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByVirtualNetworkSync( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualNetworkName") String virtualNetworkName, @QueryParam("api-version") String apiVersion, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @PathParam("virtualNetworkName") String virtualNetworkName, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -236,7 +229,7 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -244,7 +237,7 @@ Response listByResourceGroupNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -252,7 +245,7 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -260,7 +253,7 @@ Response listNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByVirtualNetworkNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -268,10 +261,81 @@ Mono> listByVirtualNetwor @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByVirtualNetworkNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a DNS forwarding ruleset properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 DNS forwarding ruleset properties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String dnsForwardingRulesetName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a DNS forwarding ruleset properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 DNS forwarding ruleset properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String dnsForwardingRulesetName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, dnsForwardingRulesetName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a DNS forwarding ruleset properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @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 DNS forwarding ruleset properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String dnsForwardingRulesetName, Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, accept, context); + } + + /** + * Gets a DNS forwarding ruleset properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 DNS forwarding ruleset properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DnsForwardingRulesetInner getByResourceGroup(String resourceGroupName, String dnsForwardingRulesetName) { + return getByResourceGroupWithResponse(resourceGroupName, dnsForwardingRulesetName, Context.NONE).getValue(); + } + /** * Creates or updates a DNS forwarding ruleset. * @@ -290,32 +354,12 @@ Response listByVirtualNetworkNextS @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String dnsForwardingRulesetName, DnsForwardingRulesetInner 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsForwardingRulesetName, this.client.getApiVersion(), ifMatch, ifNoneMatch, - parameters, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, ifMatch, ifNoneMatch, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -337,35 +381,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String dnsForwardingRulesetName, DnsForwardingRulesetInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, - Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, ifMatch, ifNoneMatch, + contentType, accept, parameters, Context.NONE); } /** @@ -387,34 +407,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String dnsForwardingRulesetName, DnsForwardingRulesetInner parameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, ifMatch, ifNoneMatch, + contentType, accept, parameters, context); } /** @@ -642,32 +639,12 @@ public DnsForwardingRulesetInner createOrUpdate(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String dnsForwardingRulesetName, DnsForwardingRulesetPatch 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, this.client.getApiVersion(), ifMatch, parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, ifMatch, contentType, + accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -687,34 +664,11 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsForwardingRulesetName, DnsForwardingRulesetPatch parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, this.client.getApiVersion(), ifMatch, parameters, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, ifMatch, contentType, accept, + parameters, Context.NONE); } /** @@ -734,34 +688,11 @@ private Response updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsForwardingRulesetName, DnsForwardingRulesetPatch parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, this.client.getApiVersion(), ifMatch, parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, ifMatch, contentType, accept, + parameters, context); } /** @@ -971,26 +902,9 @@ public DnsForwardingRulesetInner update(String resourceGroupName, String dnsForw @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String dnsForwardingRulesetName, 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsForwardingRulesetName, this.client.getApiVersion(), ifMatch, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, ifMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1010,28 +924,8 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsForwardingRulesetName, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, this.client.getApiVersion(), ifMatch, accept, Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, ifMatch, Context.NONE); } /** @@ -1051,28 +945,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsForwardingRulesetName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, this.client.getApiVersion(), ifMatch, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, ifMatch, context); } /** @@ -1249,113 +1123,6 @@ public void delete(String resourceGroupName, String dnsForwardingRulesetName, St beginDelete(resourceGroupName, dnsForwardingRulesetName, ifMatch, context).getFinalResult(); } - /** - * Gets a DNS forwarding ruleset properties. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 DNS forwarding ruleset properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String dnsForwardingRulesetName) { - 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsForwardingRulesetName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a DNS forwarding ruleset properties. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 DNS forwarding ruleset properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String dnsForwardingRulesetName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, dnsForwardingRulesetName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a DNS forwarding ruleset properties. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @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 DNS forwarding ruleset properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String dnsForwardingRulesetName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsForwardingRulesetName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets a DNS forwarding ruleset properties. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 DNS forwarding ruleset properties. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsForwardingRulesetInner getByResourceGroup(String resourceGroupName, String dnsForwardingRulesetName) { - return getByResourceGroupWithResponse(resourceGroupName, dnsForwardingRulesetName, Context.NONE).getValue(); - } - /** * Lists DNS forwarding rulesets within a resource group. * @@ -1364,28 +1131,16 @@ public DnsForwardingRulesetInner getByResourceGroup(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS forwarding rulesets along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a DnsForwardingRuleset list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); @@ -1399,8 +1154,7 @@ private Mono> listByResourceGroupSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets as paginated response with - * {@link PagedFlux}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top) { @@ -1415,8 +1169,7 @@ private PagedFlux listByResourceGroupAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets as paginated response with - * {@link PagedFlux}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1433,28 +1186,14 @@ private PagedFlux listByResourceGroupAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets along with {@link PagedResponse}. + * @return the response of a DnsForwardingRuleset list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), top, accept, Context.NONE); + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1468,28 +1207,14 @@ private PagedResponse listByResourceGroupSinglePage(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets along with {@link PagedResponse}. + * @return the response of a DnsForwardingRuleset list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), top, accept, context); + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1501,8 +1226,7 @@ private PagedResponse listByResourceGroupSinglePage(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1520,8 +1244,7 @@ public PagedIterable listByResourceGroup(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, @@ -1537,23 +1260,15 @@ public PagedIterable listByResourceGroup(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a DnsForwardingRuleset list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); @@ -1566,8 +1281,7 @@ private Mono> listSinglePageAsync(Integ * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets as paginated response with - * {@link PagedFlux}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Integer top) { @@ -1579,8 +1293,7 @@ private PagedFlux listAsync(Integer top) { * * @throws ManagementException 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 forwarding rulesets as paginated response with - * {@link PagedFlux}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1595,23 +1308,13 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS forwarding rulesets along with {@link PagedResponse}. + * @return the response of a DnsForwardingRuleset list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), top, accept, Context.NONE); + this.client.getApiVersion(), this.client.getSubscriptionId(), top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1624,23 +1327,13 @@ private PagedResponse listSinglePage(Integer top) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets along with {@link PagedResponse}. + * @return the response of a DnsForwardingRuleset list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), top, accept, context); + this.client.getApiVersion(), this.client.getSubscriptionId(), top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1650,8 +1343,7 @@ private PagedResponse listSinglePage(Integer top, Con * * @throws ManagementException 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 forwarding rulesets as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1667,8 +1359,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS forwarding rulesets as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Integer top, Context context) { @@ -1680,7 +1371,7 @@ public PagedIterable list(Integer top, Context contex * Lists DNS forwarding ruleset resource IDs attached 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -1691,27 +1382,10 @@ public PagedIterable list(Integer top, Context contex @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByVirtualNetworkSinglePageAsync(String resourceGroupName, String virtualNetworkName, 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 (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(), top, accept, context)) + .withContext(context -> service.listByVirtualNetwork(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, top, accept, context)) .>map( res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -1722,7 +1396,7 @@ public PagedIterable list(Integer top, Context contex * Lists DNS forwarding ruleset resource IDs attached 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -1741,7 +1415,7 @@ private PagedFlux listByVirtualNetworkA * Lists DNS forwarding ruleset resource IDs attached 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 virtualNetworkName The name of the VirtualNetwork. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1760,7 +1434,7 @@ private PagedFlux listByVirtualNetworkA * Lists DNS forwarding ruleset resource IDs attached 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -1771,28 +1445,10 @@ private PagedFlux listByVirtualNetworkA @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualNetworkSinglePage(String resourceGroupName, String virtualNetworkName, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualNetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, virtualNetworkName, this.client.getApiVersion(), top, accept, Context.NONE); + = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1801,7 +1457,7 @@ private PagedFlux listByVirtualNetworkA * Lists DNS forwarding ruleset resource IDs attached 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -1813,28 +1469,10 @@ private PagedFlux listByVirtualNetworkA @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualNetworkSinglePage( String resourceGroupName, String virtualNetworkName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualNetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, virtualNetworkName, this.client.getApiVersion(), top, accept, context); + = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1843,7 +1481,7 @@ private PagedResponse listByVirtualNetw * Lists DNS forwarding ruleset resource IDs attached 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 virtualNetworkName The name of the VirtualNetwork. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1862,7 +1500,7 @@ public PagedIterable listByVirtualNetwo * Lists DNS forwarding ruleset resource IDs attached 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -1886,18 +1524,11 @@ public PagedIterable listByVirtualNetwo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a DnsForwardingRuleset list operation 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( @@ -1914,19 +1545,10 @@ private Mono> listByResourceGroupNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets along with {@link PagedResponse}. + * @return the response of a DnsForwardingRuleset list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1942,20 +1564,11 @@ private PagedResponse listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets along with {@link PagedResponse}. + * @return the response of a DnsForwardingRuleset list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -1970,18 +1583,11 @@ private PagedResponse listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a DnsForwardingRuleset list operation 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(), @@ -1996,19 +1602,10 @@ private Mono> listNextSinglePageAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets along with {@link PagedResponse}. + * @return the response of a DnsForwardingRuleset list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -2024,19 +1621,10 @@ private PagedResponse listNextSinglePage(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rulesets along with {@link PagedResponse}. + * @return the response of a DnsForwardingRuleset list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -2057,13 +1645,6 @@ private PagedResponse listNextSinglePage(String nextL @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( @@ -2086,15 +1667,6 @@ private PagedResponse listNextSinglePage(String nextL */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualNetworkNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByVirtualNetworkNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -2116,21 +1688,10 @@ private PagedResponse listByVirtualNetw @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualNetworkNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByVirtualNetworkNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(DnsForwardingRulesetsClientImpl.class); } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetsImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetsImpl.java index 9572b7396223..0e6896c0099e 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetsImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -29,14 +29,6 @@ public DnsForwardingRulesetsImpl(DnsForwardingRulesetsClient innerClient, this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String dnsForwardingRulesetName) { - this.serviceClient().delete(resourceGroupName, dnsForwardingRulesetName); - } - - public void delete(String resourceGroupName, String dnsForwardingRulesetName, String ifMatch, Context context) { - this.serviceClient().delete(resourceGroupName, dnsForwardingRulesetName, ifMatch, context); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String dnsForwardingRulesetName, Context context) { Response inner @@ -59,6 +51,14 @@ public DnsForwardingRuleset getByResourceGroup(String resourceGroupName, String } } + public void deleteByResourceGroup(String resourceGroupName, String dnsForwardingRulesetName) { + this.serviceClient().delete(resourceGroupName, dnsForwardingRulesetName); + } + + public void delete(String resourceGroupName, String dnsForwardingRulesetName, String ifMatch, Context context) { + this.serviceClient().delete(resourceGroupName, dnsForwardingRulesetName, ifMatch, context); + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsForwardingRulesetImpl(inner1, this.manager())); 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 index 2161d35ec471..a89a0a5efd6b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; 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 index eb6d4b607b04..0c4514676336 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -32,14 +32,13 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient; import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListInner; +import com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverDomainListListResult; import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListBulk; 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; @@ -73,194 +72,254 @@ public final class DnsResolverDomainListsClientImpl implements DnsResolverDomain * The interface defining all the services for DnsResolverManagementClientDnsResolverDomainLists to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "DnsResolverManagementClientDnsResolverDomainLists") public interface DnsResolverDomainListsService { @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsResolverDomainListName") String dnsResolverDomainListName, + @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) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsResolverDomainListName") String dnsResolverDomainListName, + @HeaderParam("Accept") String accept, Context context); + @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, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @HeaderParam("if-match") String ifMatch, @HeaderParam("if-none-match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsResolverDomainListInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @HeaderParam("if-match") String ifMatch, @HeaderParam("if-none-match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsResolverDomainListInner parameters, 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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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, + @HeaderParam("if-match") String ifMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DnsResolverDomainListPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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, + @HeaderParam("if-match") String ifMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DnsResolverDomainListPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "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, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @HeaderParam("if-match") String ifMatch, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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/{dnsResolverDomainListName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@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); + @HeaderParam("if-match") String ifMatch, 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); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @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) - Response listByResourceGroupSync(@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); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @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) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}/bulk") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> bulk(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> bulk(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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") DnsResolverDomainListBulk parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("if-match") String ifMatch, @HeaderParam("if-none-match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsResolverDomainListBulk parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}/bulk") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response bulkSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response bulkSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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") DnsResolverDomainListBulk parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("if-match") String ifMatch, @HeaderParam("if-none-match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsResolverDomainListBulk parameters, 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, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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, + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, 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 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) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverDomainListName, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverDomainListName, 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DnsResolverDomainListInner getByResourceGroup(String resourceGroupName, String dnsResolverDomainListName) { + return getByResourceGroupWithResponse(resourceGroupName, dnsResolverDomainListName, Context.NONE).getValue(); + } + /** * Creates or updates a DNS resolver domain list. * @@ -280,32 +339,12 @@ Response listNextSync( @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 contentType = "application/json"; 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)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverDomainListName, ifMatch, ifNoneMatch, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -327,35 +366,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverDomainListName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, - Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverDomainListName, ifMatch, ifNoneMatch, + contentType, accept, parameters, Context.NONE); } /** @@ -377,34 +392,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListInner parameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverDomainListName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverDomainListName, ifMatch, ifNoneMatch, + contentType, accept, parameters, context); } /** @@ -633,32 +625,12 @@ public DnsResolverDomainListInner createOrUpdate(String resourceGroupName, Strin @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 contentType = "application/json"; 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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverDomainListName, ifMatch, contentType, + accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -678,34 +650,11 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListPatch parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverDomainListName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, parameters, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverDomainListName, ifMatch, contentType, accept, + parameters, Context.NONE); } /** @@ -725,34 +674,11 @@ private Response updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListPatch parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverDomainListName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverDomainListName, ifMatch, contentType, accept, + parameters, context); } /** @@ -961,26 +887,9 @@ public DnsResolverDomainListInner update(String resourceGroupName, String dnsRes @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)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverDomainListName, ifMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -999,28 +908,8 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverDomainListName, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverDomainListName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, accept, Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverDomainListName, ifMatch, Context.NONE); } /** @@ -1039,28 +928,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverDomainListName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverDomainListName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverDomainListName, ifMatch, context); } /** @@ -1228,114 +1097,6 @@ public void delete(String resourceGroupName, String dnsResolverDomainListName, S beginDelete(resourceGroupName, dnsResolverDomainListName, ifMatch, context).getFinalResult(); } - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverDomainListName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getByResourceGroupSync(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. - */ - @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. * @@ -1344,28 +1105,16 @@ public DnsResolverDomainListInner getByResourceGroup(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); @@ -1379,8 +1128,7 @@ private Mono> listByResourceGroupSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top) { @@ -1395,8 +1143,7 @@ private PagedFlux listByResourceGroupAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1413,28 +1160,14 @@ private PagedFlux listByResourceGroupAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), top, accept, Context.NONE); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1448,28 +1181,14 @@ private PagedResponse listByResourceGroupSinglePage( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), top, accept, context); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1481,8 +1200,7 @@ private PagedResponse listByResourceGroupSinglePage( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1500,8 +1218,7 @@ public PagedIterable listByResourceGroup(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, @@ -1517,23 +1234,15 @@ public PagedIterable listByResourceGroup(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); @@ -1546,8 +1255,7 @@ private Mono> listSinglePageAsync(Inte * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Integer top) { @@ -1559,8 +1267,7 @@ private PagedFlux listAsync(Integer top) { * * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1575,23 +1282,13 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists along with {@link PagedResponse}. + * @return the response of a DnsResolverDomainList list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), top, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1604,23 +1301,13 @@ private PagedResponse listSinglePage(Integer top) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), top, accept, context); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1630,8 +1317,7 @@ private PagedResponse listSinglePage(Integer top, Co * * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1647,8 +1333,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver domain lists as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Integer top, Context context) { @@ -1669,38 +1354,17 @@ public PagedIterable list(Integer top, Context conte * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> bulkWithResponseAsync(String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListBulk 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.bulk(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, ifNoneMatch, - parameters, accept, context)) + .withContext(context -> service.bulk(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverDomainListName, ifMatch, ifNoneMatch, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1717,39 +1381,15 @@ private Mono>> bulkWithResponseAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response bulkWithResponse(String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListBulk parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverDomainListName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.bulkSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, + return service.bulkSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverDomainListName, ifMatch, ifNoneMatch, contentType, accept, parameters, Context.NONE); } @@ -1767,39 +1407,16 @@ private Response bulkWithResponse(String resourceGroupName, String d * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response bulkWithResponse(String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListBulk parameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverDomainListName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverDomainListName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.bulkSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverDomainListName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, context); + return service.bulkSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverDomainListName, ifMatch, ifNoneMatch, contentType, accept, parameters, + context); } /** @@ -1815,7 +1432,7 @@ private Response bulkWithResponse(String resourceGroupName, String d * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DnsResolverDomainListInner> beginBulkAsync( @@ -1837,7 +1454,7 @@ private PollerFlux, DnsResolverDomainList * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DnsResolverDomainListInner> beginBulkAsync( @@ -1864,7 +1481,7 @@ private PollerFlux, DnsResolverDomainList * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DnsResolverDomainListInner> beginBulk( @@ -1885,7 +1502,7 @@ public SyncPoller, DnsResolverDomainListI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DnsResolverDomainListInner> @@ -1912,7 +1529,7 @@ public SyncPoller, DnsResolverDomainListI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DnsResolverDomainListInner> beginBulk( @@ -1937,7 +1554,7 @@ public SyncPoller, DnsResolverDomainListI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono bulkAsync(String resourceGroupName, String dnsResolverDomainListName, @@ -1955,7 +1572,7 @@ private Mono bulkAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono bulkAsync(String resourceGroupName, String dnsResolverDomainListName, @@ -1975,7 +1592,7 @@ private Mono bulkAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public DnsResolverDomainListInner bulk(String resourceGroupName, String dnsResolverDomainListName, @@ -2000,7 +1617,7 @@ public DnsResolverDomainListInner bulk(String resourceGroupName, String dnsResol * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public DnsResolverDomainListInner bulk(String resourceGroupName, String dnsResolverDomainListName, @@ -2016,18 +1633,11 @@ public DnsResolverDomainListInner bulk(String resourceGroupName, String dnsResol * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation 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( @@ -2044,21 +1654,12 @@ private Mono> listByResourceGroupNextS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - Response res + Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -2072,22 +1673,13 @@ private PagedResponse listByResourceGroupNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - Response res + Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -2100,18 +1692,11 @@ private PagedResponse listByResourceGroupNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation 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(), @@ -2126,21 +1711,12 @@ private Mono> listNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - Response res + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -2154,25 +1730,14 @@ private PagedResponse listNextSinglePage(String next * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverDomainList list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; - Response res + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverDomainListsClientImpl.class); } 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 index 8e1e968b365f..e893a1e72494 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -28,14 +28,6 @@ public DnsResolverDomainListsImpl(DnsResolverDomainListsClient 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() @@ -58,6 +50,14 @@ public DnsResolverDomainList getByResourceGroup(String resourceGroupName, String } } + public void deleteByResourceGroup(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 PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsResolverDomainListImpl(inner1, this.manager())); diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverImpl.java index 44803e5d3718..b8fd394100a1 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; 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..91dc6bcda719 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { DnsResolverManagementClientImpl.class }) public final class DnsResolverManagementClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the DnsResolverManagementClientBuilder. */ - public DnsResolverManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public DnsResolverManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the DnsResolverManagementClientBuilder. */ - public DnsResolverManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public DnsResolverManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public DnsResolverManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); DnsResolverManagementClientImpl client = new DnsResolverManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } 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 8f44e8535b4b..a3035b89833c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -52,26 +52,12 @@ @ServiceClient(builder = DnsResolverManagementClientBuilder.class) public final class DnsResolverManagementClientImpl implements DnsResolverManagementClient { /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -80,12 +66,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -93,6 +79,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -282,17 +282,17 @@ 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 endpoint Service host. * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. */ DnsResolverManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2025-05-01"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2025-10-01-preview"; this.dnsResolvers = new DnsResolversClientImpl(this); this.inboundEndpoints = new InboundEndpointsClientImpl(this); this.outboundEndpoints = new OutboundEndpointsClientImpl(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 index be94f309204b..23056cda9b6b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -33,14 +33,13 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient; import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyListResult; +import com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverPolicyListResult; +import com.azure.resourcemanager.dnsresolver.implementation.models.SubResourceListResult; 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; @@ -74,161 +73,151 @@ public final class DnsResolverPoliciesClientImpl implements DnsResolverPoliciesC * The interface defining all the services for DnsResolverManagementClientDnsResolverPolicies to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "DnsResolverManagementClientDnsResolverPolicies") public interface DnsResolverPoliciesService { @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, @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) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, @HeaderParam("Accept") String accept, + Context context); + @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, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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, + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DnsResolverPolicyInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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, + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DnsResolverPolicyInner parameters, 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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsResolverPolicyPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsResolverPolicyPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "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, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, @HeaderParam("if-match") String ifMatch, + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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/{dnsResolverPolicyName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@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); + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, @HeaderParam("if-match") String ifMatch, + 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); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @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) - Response listByResourceGroupSync(@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); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @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) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @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, + Mono> listByVirtualNetwork(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualNetworkName") String virtualNetworkName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("virtualNetworkName") String virtualNetworkName, @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) - Response listByVirtualNetworkSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByVirtualNetworkSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualNetworkName") String virtualNetworkName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("virtualNetworkName") String virtualNetworkName, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -236,7 +225,7 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -244,7 +233,7 @@ Response listByResourceGroupNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -252,7 +241,7 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -260,7 +249,7 @@ Response listNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByVirtualNetworkNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -268,10 +257,81 @@ Mono> listByVirtualNetworkNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByVirtualNetworkNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, 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 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) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DnsResolverPolicyInner getByResourceGroup(String resourceGroupName, String dnsResolverPolicyName) { + return getByResourceGroupWithResponse(resourceGroupName, dnsResolverPolicyName, Context.NONE).getValue(); + } + /** * Creates or updates a DNS resolver policy. * @@ -290,32 +350,12 @@ Response listByVirtualNetworkNextSync( @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 contentType = "application/json"; 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)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, ifMatch, ifNoneMatch, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -337,33 +377,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverPolicyName, DnsResolverPolicyInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, ifMatch, ifNoneMatch, + contentType, accept, parameters, Context.NONE); } /** @@ -385,33 +403,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverPolicyName, DnsResolverPolicyInner parameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, ifMatch, ifNoneMatch, + contentType, accept, parameters, context); } /** @@ -639,32 +635,12 @@ public DnsResolverPolicyInner createOrUpdate(String resourceGroupName, String dn @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 contentType = "application/json"; 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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, ifMatch, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -684,33 +660,11 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsResolverPolicyName, DnsResolverPolicyPatch parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), ifMatch, parameters, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, ifMatch, contentType, accept, + parameters, Context.NONE); } /** @@ -730,33 +684,11 @@ private Response updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsResolverPolicyName, DnsResolverPolicyPatch parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), ifMatch, parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, ifMatch, contentType, accept, + parameters, context); } /** @@ -962,26 +894,9 @@ public DnsResolverPolicyInner update(String resourceGroupName, String dnsResolve @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)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, ifMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1000,27 +915,8 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverPolicyName, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), ifMatch, accept, Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, ifMatch, Context.NONE); } /** @@ -1039,27 +935,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverPolicyName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), ifMatch, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, ifMatch, context); } /** @@ -1226,112 +1103,6 @@ public void delete(String resourceGroupName, String dnsResolverPolicyName, Strin beginDelete(resourceGroupName, dnsResolverPolicyName, ifMatch, context).getFinalResult(); } - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getByResourceGroupSync(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. - */ - @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. * @@ -1340,28 +1111,16 @@ public DnsResolverPolicyInner getByResourceGroup(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a DnsResolverPolicy list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); @@ -1375,8 +1134,7 @@ private Mono> listByResourceGroupSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top) { @@ -1391,8 +1149,7 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1409,27 +1166,13 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicy list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), top, accept, Context.NONE); + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1443,28 +1186,14 @@ private PagedResponse listByResourceGroupSinglePage(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies along with {@link PagedResponse}. + * @return the response of a DnsResolverPolicy list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), top, accept, context); + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1476,8 +1205,7 @@ private PagedResponse listByResourceGroupSinglePage(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1495,8 +1223,7 @@ public PagedIterable listByResourceGroup(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, @@ -1512,23 +1239,15 @@ public PagedIterable listByResourceGroup(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a DnsResolverPolicy list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); @@ -1541,8 +1260,7 @@ private Mono> listSinglePageAsync(Integer * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Integer top) { @@ -1554,8 +1272,7 @@ private PagedFlux listAsync(Integer top) { * * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1570,23 +1287,13 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies along with {@link PagedResponse}. + * @return the response of a DnsResolverPolicy list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), top, accept, Context.NONE); + this.client.getApiVersion(), this.client.getSubscriptionId(), top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1599,23 +1306,13 @@ private PagedResponse listSinglePage(Integer top) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicy list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), top, accept, context); + this.client.getApiVersion(), this.client.getSubscriptionId(), top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1625,8 +1322,7 @@ private PagedResponse listSinglePage(Integer top, Contex * * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1642,8 +1338,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Integer top, Context context) { @@ -1655,7 +1350,7 @@ public 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. + * @param virtualNetworkName The name of the VirtualNetwork. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1665,27 +1360,10 @@ public PagedIterable list(Integer top, Context context) @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)) + .withContext(context -> service.listByVirtualNetwork(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, 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())); @@ -1695,7 +1373,7 @@ private Mono> listByVirtualNetworkSinglePageAsync(Str * 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 virtualNetworkName The name of the VirtualNetwork. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1711,7 +1389,7 @@ private PagedFlux listByVirtualNetworkAsync(String resourceGroupNam * 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 virtualNetworkName The name of the VirtualNetwork. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1720,28 +1398,10 @@ private PagedFlux listByVirtualNetworkAsync(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualNetworkSinglePage(String resourceGroupName, String virtualNetworkName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualNetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, virtualNetworkName, this.client.getApiVersion(), accept, Context.NONE); + = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1750,7 +1410,7 @@ private PagedResponse listByVirtualNetworkSinglePage(String resourc * 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -1760,28 +1420,10 @@ private PagedResponse listByVirtualNetworkSinglePage(String resourc @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualNetworkSinglePage(String resourceGroupName, String virtualNetworkName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualNetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, virtualNetworkName, this.client.getApiVersion(), accept, context); + = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1790,7 +1432,7 @@ private PagedResponse listByVirtualNetworkSinglePage(String resourc * 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 virtualNetworkName The name of the VirtualNetwork. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1807,7 +1449,7 @@ public PagedIterable listByVirtualNetwork(String resourceGroupName, * 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -1829,18 +1471,11 @@ public PagedIterable listByVirtualNetwork(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a DnsResolverPolicy list operation 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( @@ -1857,19 +1492,10 @@ private Mono> listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicy list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1885,19 +1511,10 @@ private PagedResponse listByResourceGroupNextSinglePage( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicy list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -1912,18 +1529,11 @@ private PagedResponse listByResourceGroupNextSinglePage( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicy list operation 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(), @@ -1938,19 +1548,10 @@ private Mono> listNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policies along with {@link PagedResponse}. + * @return the response of a DnsResolverPolicy list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1966,19 +1567,10 @@ private PagedResponse listNextSinglePage(String nextLink * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicy list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -1998,13 +1590,6 @@ private PagedResponse listNextSinglePage(String nextLink */ @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( @@ -2025,15 +1610,6 @@ private Mono> listByVirtualNetworkNextSinglePageAsync */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualNetworkNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByVirtualNetworkNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -2053,21 +1629,10 @@ private PagedResponse listByVirtualNetworkNextSinglePage(String nex */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualNetworkNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByVirtualNetworkNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverPoliciesClientImpl.class); } 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 index 9d753f443782..a12adb083b01 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -28,14 +28,6 @@ public DnsResolverPoliciesImpl(DnsResolverPoliciesClient 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 @@ -58,6 +50,14 @@ public DnsResolverPolicy getByResourceGroup(String resourceGroupName, String dns } } + public void deleteByResourceGroup(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 PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsResolverPolicyImpl(inner1, 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 index 407aab75cba7..caa661cd59d8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; 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 index fdc875eee0a6..285d89b215a5 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; 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 index a22797252895..260314a8ec02 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -31,12 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient; import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLinkListResult; +import com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverPolicyVirtualNetworkLinkListResult; import com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLinkPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -73,129 +72,119 @@ public final class DnsResolverPolicyVirtualNetworkLinksClientImpl * The interface defining all the services for DnsResolverManagementClientDnsResolverPolicyVirtualNetworkLinks to be * used by the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "DnsResolverManagementClientDnsResolverPolicyVirtualNetworkLinks") public interface DnsResolverPolicyVirtualNetworkLinksService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @HeaderParam("if-match") String ifMatch, @HeaderParam("if-none-match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsResolverPolicyVirtualNetworkLinkInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") - @ExpectedResponses({ 200, 202 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @HeaderParam("if-match") String ifMatch, @HeaderParam("if-none-match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsResolverPolicyVirtualNetworkLinkInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") - @ExpectedResponses({ 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @HeaderParam("if-match") String ifMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsResolverPolicyVirtualNetworkLinkPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") - @ExpectedResponses({ 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @HeaderParam("if-match") String ifMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsResolverPolicyVirtualNetworkLinkPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @HeaderParam("if-match") String ifMatch, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/virtualNetworkLinks/{dnsResolverPolicyVirtualNetworkLinkName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @HeaderParam("if-match") String ifMatch, 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, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, @QueryParam("$top") Integer top, @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) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -203,7 +192,7 @@ Response listSync(@HostParam("$ho @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -211,10 +200,93 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, 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 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) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, + dnsResolverPolicyVirtualNetworkLinkName, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DnsResolverPolicyVirtualNetworkLinkInner get(String resourceGroupName, String dnsResolverPolicyName, + String dnsResolverPolicyVirtualNetworkLinkName) { + return getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, + Context.NONE).getValue(); + } + /** * Creates or updates a DNS resolver policy virtual network link. * @@ -237,36 +309,11 @@ Response listNextSync( 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 contentType = "application/json"; 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)) + return FluxUtil.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, + dnsResolverPolicyVirtualNetworkLinkName, ifMatch, ifNoneMatch, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -291,39 +338,12 @@ private Mono>> createOrUpdateWithResponseAsync(String private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, this.client.getApiVersion(), ifMatch, - ifNoneMatch, parameters, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, + dnsResolverPolicyVirtualNetworkLinkName, ifMatch, ifNoneMatch, contentType, accept, parameters, + Context.NONE); } /** @@ -348,39 +368,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkInner parameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, this.client.getApiVersion(), ifMatch, - ifNoneMatch, parameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, + dnsResolverPolicyVirtualNetworkLinkName, ifMatch, ifNoneMatch, contentType, accept, parameters, context); } /** @@ -647,36 +639,12 @@ public DnsResolverPolicyVirtualNetworkLinkInner createOrUpdate(String resourceGr 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 contentType = "application/json"; 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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, + dnsResolverPolicyVirtualNetworkLinkName, ifMatch, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -699,39 +667,11 @@ private Mono>> updateWithResponseAsync(String resource private Response updateWithResponse(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, this.client.getApiVersion(), ifMatch, - parameters, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, + dnsResolverPolicyVirtualNetworkLinkName, ifMatch, contentType, accept, parameters, Context.NONE); } /** @@ -754,39 +694,11 @@ private Response updateWithResponse(String resourceGroupName, String private Response updateWithResponse(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, DnsResolverPolicyVirtualNetworkLinkPatch parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, this.client.getApiVersion(), ifMatch, - parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, + dnsResolverPolicyVirtualNetworkLinkName, ifMatch, contentType, accept, parameters, context); } /** @@ -1033,31 +945,10 @@ public DnsResolverPolicyVirtualNetworkLinkInner update(String resourceGroupName, @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)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, + dnsResolverPolicyVirtualNetworkLinkName, ifMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1078,33 +969,9 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, this.client.getApiVersion(), ifMatch, - accept, Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, + dnsResolverPolicyVirtualNetworkLinkName, ifMatch, Context.NONE); } /** @@ -1125,33 +992,9 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName, this.client.getApiVersion(), ifMatch, - accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, + dnsResolverPolicyVirtualNetworkLinkName, ifMatch, context); } /** @@ -1346,133 +1189,6 @@ public void delete(String resourceGroupName, String dnsResolverPolicyName, .getFinalResult(); } - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsResolverPolicyVirtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter dnsResolverPolicyVirtualNetworkLinkName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(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. - */ - @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. * @@ -1482,32 +1198,16 @@ public DnsResolverPolicyVirtualNetworkLinkInner get(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolver policy virtual network links along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, top, accept, context)) .>map( res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -1523,8 +1223,8 @@ private Mono> listSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, @@ -1541,8 +1241,8 @@ private PagedFlux listAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, @@ -1561,34 +1261,15 @@ private PagedFlux listAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String dnsResolverPolicyName, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), top, accept, Context.NONE); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverPolicyName, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1603,34 +1284,15 @@ private PagedResponse listSinglePage(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String dnsResolverPolicyName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), top, accept, context); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverPolicyName, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1643,8 +1305,8 @@ private PagedResponse listSinglePage(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, @@ -1664,8 +1326,8 @@ public PagedIterable list(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, @@ -1681,18 +1343,11 @@ public PagedIterable list(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation 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( @@ -1708,20 +1363,10 @@ private Mono> listNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1737,27 +1382,15 @@ private PagedResponse listNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverPolicyVirtualNetworkLinksClientImpl.class); } 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 index e49f4bf35246..b62483dd655d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -27,18 +27,6 @@ public DnsResolverPolicyVirtualNetworkLinksImpl(DnsResolverPolicyVirtualNetworkL 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() @@ -63,6 +51,18 @@ public DnsResolverPolicyVirtualNetworkLink get(String resourceGroupName, String } } + 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 PagedIterable list(String resourceGroupName, String dnsResolverPolicyName) { PagedIterable inner diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolversClientImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolversClientImpl.java index e4adaed70886..346b942fa128 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolversClientImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolversClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -33,14 +33,13 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient; import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverInner; -import com.azure.resourcemanager.dnsresolver.models.DnsResolverListResult; +import com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverListResult; +import com.azure.resourcemanager.dnsresolver.implementation.models.SubResourceListResult; import com.azure.resourcemanager.dnsresolver.models.DnsResolverPatch; -import com.azure.resourcemanager.dnsresolver.models.SubResourceListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -74,155 +73,151 @@ public final class DnsResolversClientImpl implements DnsResolversClient { * The interface defining all the services for DnsResolverManagementClientDnsResolvers to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "DnsResolverManagementClientDnsResolvers") public interface DnsResolversService { @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsResolverName") String dnsResolverName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsResolverName") String dnsResolverName, @HeaderParam("Accept") String accept, + Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") DnsResolverInner parameters, @HeaderParam("Accept") String accept, + @PathParam("dnsResolverName") String dnsResolverName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DnsResolverInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") DnsResolverInner parameters, @HeaderParam("Accept") String accept, + @PathParam("dnsResolverName") String dnsResolverName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DnsResolverInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @BodyParam("application/json") DnsResolverPatch parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("dnsResolverName") String dnsResolverName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsResolverPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @BodyParam("application/json") DnsResolverPatch parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("dnsResolverName") String dnsResolverName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsResolverPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("Accept") String accept, Context context); + @PathParam("dnsResolverName") String dnsResolverName, @HeaderParam("if-match") String ifMatch, + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, @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/dnsResolvers/{dnsResolverName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("dnsResolverName") String dnsResolverName, @HeaderParam("if-match") String ifMatch, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers") @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); + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@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); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsResolvers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnsResolvers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @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}/listDnsResolvers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByVirtualNetwork(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByVirtualNetwork(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualNetworkName") String virtualNetworkName, @QueryParam("api-version") String apiVersion, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @PathParam("virtualNetworkName") String virtualNetworkName, @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}/listDnsResolvers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByVirtualNetworkSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listByVirtualNetworkSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualNetworkName") String virtualNetworkName, @QueryParam("api-version") String apiVersion, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @PathParam("virtualNetworkName") String virtualNetworkName, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -230,7 +225,7 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -238,21 +233,21 @@ Response listByResourceGroupNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -260,10 +255,80 @@ Mono> listByVirtualNetworkNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByVirtualNetworkNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets properties of a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String dnsResolverName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets properties of a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String dnsResolverName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, dnsResolverName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets properties of a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String dnsResolverName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, accept, context); + } + + /** + * Gets properties of a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DnsResolverInner getByResourceGroup(String resourceGroupName, String dnsResolverName) { + return getByResourceGroupWithResponse(resourceGroupName, dnsResolverName, Context.NONE).getValue(); + } + /** * Creates or updates a DNS resolver. * @@ -282,32 +347,12 @@ Response listByVirtualNetworkNextSync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String dnsResolverName, DnsResolverInner 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, - accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, ifMatch, ifNoneMatch, contentType, + accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -329,33 +374,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverName, DnsResolverInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, ifMatch, ifNoneMatch, contentType, + accept, parameters, Context.NONE); } /** @@ -377,33 +400,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverName, DnsResolverInner parameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, ifMatch, ifNoneMatch, contentType, + accept, parameters, context); } /** @@ -625,31 +626,12 @@ public DnsResolverInner createOrUpdate(String resourceGroupName, String dnsResol @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String dnsResolverName, DnsResolverPatch 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverName, this.client.getApiVersion(), ifMatch, parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, ifMatch, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -669,33 +651,11 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsResolverName, DnsResolverPatch parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, this.client.getApiVersion(), ifMatch, parameters, accept, Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, ifMatch, contentType, accept, + parameters, Context.NONE); } /** @@ -715,33 +675,11 @@ private Response updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsResolverName, DnsResolverPatch parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, this.client.getApiVersion(), ifMatch, parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, ifMatch, contentType, accept, + parameters, context); } /** @@ -942,26 +880,9 @@ public DnsResolverInner update(String resourceGroupName, String dnsResolverName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String dnsResolverName, 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverName, this.client.getApiVersion(), ifMatch, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, ifMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -979,27 +900,8 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverName, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, this.client.getApiVersion(), ifMatch, accept, Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, ifMatch, Context.NONE); } /** @@ -1018,27 +920,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, this.client.getApiVersion(), ifMatch, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, ifMatch, context); } /** @@ -1202,111 +1085,6 @@ public void delete(String resourceGroupName, String dnsResolverName, String ifMa beginDelete(resourceGroupName, dnsResolverName, ifMatch, context).getFinalResult(); } - /** - * Gets properties of a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String dnsResolverName) { - 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets properties of a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String dnsResolverName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, dnsResolverName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets properties of a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String dnsResolverName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets properties of a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsResolverInner getByResourceGroup(String resourceGroupName, String dnsResolverName) { - return getByResourceGroupWithResponse(resourceGroupName, dnsResolverName, Context.NONE).getValue(); - } - /** * Lists DNS resolvers within a resource group. * @@ -1315,28 +1093,16 @@ public DnsResolverInner getByResourceGroup(String resourceGroupName, String dnsR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resolvers along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a DnsResolver list operation 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); @@ -1350,7 +1116,7 @@ private Mono> listByResourceGroupSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resolvers as paginated response with {@link PagedFlux}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer top) { @@ -1365,7 +1131,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolvers as paginated response with {@link PagedFlux}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1382,27 +1148,13 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolvers along with {@link PagedResponse}. + * @return the response of a DnsResolver list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), top, accept, Context.NONE); + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1416,28 +1168,14 @@ private PagedResponse listByResourceGroupSinglePage(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resolvers along with {@link PagedResponse}. + * @return the response of a DnsResolver list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), top, accept, context); + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1449,8 +1187,7 @@ private PagedResponse listByResourceGroupSinglePage(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resolvers as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1468,8 +1205,7 @@ public PagedIterable listByResourceGroup(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolvers as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Integer top, Context context) { @@ -1484,23 +1220,15 @@ public PagedIterable listByResourceGroup(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolvers along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a DnsResolver list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); @@ -1513,7 +1241,7 @@ private Mono> listSinglePageAsync(Integer top) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resolvers as paginated response with {@link PagedFlux}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Integer top) { @@ -1525,7 +1253,7 @@ private PagedFlux listAsync(Integer top) { * * @throws ManagementException 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 resolvers as paginated response with {@link PagedFlux}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1540,23 +1268,13 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolvers along with {@link PagedResponse}. + * @return the response of a DnsResolver list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), top, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1569,23 +1287,13 @@ private PagedResponse listSinglePage(Integer top) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resolvers along with {@link PagedResponse}. + * @return the response of a DnsResolver list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), top, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1595,8 +1303,7 @@ private PagedResponse listSinglePage(Integer top, Context cont * * @throws ManagementException 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 resolvers as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1612,8 +1319,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolvers as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Integer top, Context context) { @@ -1625,7 +1331,7 @@ public PagedIterable list(Integer top, Context context) { * Lists DNS resolver 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -1636,27 +1342,10 @@ public PagedIterable list(Integer top, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByVirtualNetworkSinglePageAsync(String resourceGroupName, String virtualNetworkName, 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 (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(), top, accept, context)) + .withContext(context -> service.listByVirtualNetwork(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, 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())); @@ -1666,7 +1355,7 @@ private Mono> listByVirtualNetworkSinglePageAsync(Str * Lists DNS resolver 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -1684,7 +1373,7 @@ private PagedFlux listByVirtualNetworkAsync(String resourceGroupNam * Lists DNS resolver 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 virtualNetworkName The name of the VirtualNetwork. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1701,7 +1390,7 @@ private PagedFlux listByVirtualNetworkAsync(String resourceGroupNam * Lists DNS resolver 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -1711,28 +1400,10 @@ private PagedFlux listByVirtualNetworkAsync(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualNetworkSinglePage(String resourceGroupName, String virtualNetworkName, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualNetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, virtualNetworkName, this.client.getApiVersion(), top, accept, Context.NONE); + = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1741,7 +1412,7 @@ private PagedResponse listByVirtualNetworkSinglePage(String resourc * Lists DNS resolver 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -1752,28 +1423,10 @@ private PagedResponse listByVirtualNetworkSinglePage(String resourc @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualNetworkSinglePage(String resourceGroupName, String virtualNetworkName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (virtualNetworkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, virtualNetworkName, this.client.getApiVersion(), top, accept, context); + = service.listByVirtualNetworkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, virtualNetworkName, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1782,7 +1435,7 @@ private PagedResponse listByVirtualNetworkSinglePage(String resourc * Lists DNS resolver 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 virtualNetworkName The name of the VirtualNetwork. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1800,7 +1453,7 @@ public PagedIterable listByVirtualNetwork(String resourceGroupName, * Lists DNS resolver 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -1824,18 +1477,11 @@ public PagedIterable listByVirtualNetwork(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolvers along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a DnsResolver list operation 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( @@ -1852,19 +1498,10 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resolvers along with {@link PagedResponse}. + * @return the response of a DnsResolver list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1880,19 +1517,10 @@ private PagedResponse listByResourceGroupNextSinglePage(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolvers along with {@link PagedResponse}. + * @return the response of a DnsResolver list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -1907,18 +1535,11 @@ private PagedResponse listByResourceGroupNextSinglePage(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS resolvers along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a DnsResolver list operation 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(), @@ -1933,19 +1554,10 @@ private Mono> listNextSinglePageAsync(String nex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resolvers along with {@link PagedResponse}. + * @return the response of a DnsResolver list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1961,19 +1573,10 @@ private PagedResponse listNextSinglePage(String nextLink) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resolvers along with {@link PagedResponse}. + * @return the response of a DnsResolver list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -1993,13 +1596,6 @@ private PagedResponse listNextSinglePage(String nextLink, Cont */ @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( @@ -2020,15 +1616,6 @@ private Mono> listByVirtualNetworkNextSinglePageAsync */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualNetworkNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByVirtualNetworkNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -2048,21 +1635,10 @@ private PagedResponse listByVirtualNetworkNextSinglePage(String nex */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByVirtualNetworkNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByVirtualNetworkNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(DnsResolversClientImpl.class); } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolversImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolversImpl.java index 6cdf38caa990..738af382bc52 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolversImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolversImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -28,14 +28,6 @@ public DnsResolversImpl(DnsResolversClient innerClient, this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String dnsResolverName) { - this.serviceClient().delete(resourceGroupName, dnsResolverName); - } - - public void delete(String resourceGroupName, String dnsResolverName, String ifMatch, Context context) { - this.serviceClient().delete(resourceGroupName, dnsResolverName, ifMatch, context); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String dnsResolverName, Context context) { Response inner @@ -57,6 +49,14 @@ public DnsResolver getByResourceGroup(String resourceGroupName, String dnsResolv } } + public void deleteByResourceGroup(String resourceGroupName, String dnsResolverName) { + this.serviceClient().delete(resourceGroupName, dnsResolverName); + } + + public void delete(String resourceGroupName, String dnsResolverName, String ifMatch, Context context) { + this.serviceClient().delete(resourceGroupName, dnsResolverName, ifMatch, context); + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsResolverImpl(inner1, 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 index c161992dcb4e..cfb8cd2bec63 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -13,6 +13,7 @@ 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.ManagedDomainList; import com.azure.resourcemanager.dnsresolver.models.ProvisioningState; import java.util.Collections; import java.util.List; @@ -73,6 +74,15 @@ public List dnsResolverDomainLists() { } } + public List managedDomainLists() { + List inner = this.innerModel().managedDomainLists(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public DnsSecurityRuleState dnsSecurityRuleState() { return this.innerModel().dnsSecurityRuleState(); } @@ -217,6 +227,16 @@ public DnsSecurityRuleImpl withAction(DnsSecurityRuleAction action) { } } + public DnsSecurityRuleImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + public DnsSecurityRuleImpl withDnsResolverDomainLists(List dnsResolverDomainLists) { if (isInCreateMode()) { this.innerModel().withDnsResolverDomainLists(dnsResolverDomainLists); @@ -227,12 +247,12 @@ public DnsSecurityRuleImpl withDnsResolverDomainLists(List dnsResol } } - public DnsSecurityRuleImpl withTags(Map tags) { + public DnsSecurityRuleImpl withManagedDomainLists(List managedDomainLists) { if (isInCreateMode()) { - this.innerModel().withTags(tags); + this.innerModel().withManagedDomainLists(managedDomainLists); return this; } else { - this.updateParameters.withTags(tags); + this.updateParameters.withManagedDomainLists(managedDomainLists); return this; } } 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 index 19a47f969dad..2772459153b5 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -31,12 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient; import com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRuleInner; -import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleListResult; +import com.azure.resourcemanager.dnsresolver.implementation.models.DnsSecurityRuleListResult; import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRulePatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -71,123 +70,117 @@ public final class DnsSecurityRulesClientImpl implements DnsSecurityRulesClient * The interface defining all the services for DnsResolverManagementClientDnsSecurityRules to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "DnsResolverManagementClientDnsSecurityRules") public interface DnsSecurityRulesService { @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("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, + @PathParam("dnsSecurityRuleName") String dnsSecurityRuleName, @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) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, + @PathParam("dnsSecurityRuleName") String dnsSecurityRuleName, @HeaderParam("Accept") String accept, + Context context); + @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, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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, + @PathParam("dnsSecurityRuleName") String dnsSecurityRuleName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DnsSecurityRuleInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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, + @PathParam("dnsSecurityRuleName") String dnsSecurityRuleName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DnsSecurityRuleInner parameters, 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, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @PathParam("dnsSecurityRuleName") String dnsSecurityRuleName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsSecurityRulePatch parameters, 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) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @PathParam("dnsSecurityRuleName") String dnsSecurityRuleName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DnsSecurityRulePatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "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, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @PathParam("dnsSecurityRuleName") String dnsSecurityRuleName, @HeaderParam("if-match") String ifMatch, + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverPolicies/{dnsResolverPolicyName}/dnsSecurityRules/{dnsSecurityRuleName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@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/{dnsSecurityRuleName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @PathParam("dnsSecurityRuleName") String dnsSecurityRuleName, @HeaderParam("if-match") String ifMatch, + 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, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, @QueryParam("$top") Integer top, @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) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, - @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, + @PathParam("dnsResolverPolicyName") String dnsResolverPolicyName, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -195,7 +188,7 @@ Response listSync(@HostParam("$host") String endpoint @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -203,7 +196,85 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, 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 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) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DnsSecurityRuleInner get(String resourceGroupName, String dnsResolverPolicyName, + String dnsSecurityRuleName) { + return getWithResponse(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, Context.NONE).getValue(); } /** @@ -226,36 +297,12 @@ Response listNextSync(@PathParam(value = "nextLink", 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 contentType = "application/json"; 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)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, + ifNoneMatch, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -278,38 +325,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRuleInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, - accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, + ifNoneMatch, contentType, accept, parameters, Context.NONE); } /** @@ -333,38 +353,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRuleInner parameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, - accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, + ifNoneMatch, contentType, accept, parameters, context); } /** @@ -601,36 +594,12 @@ public DnsSecurityRuleInner createOrUpdate(String resourceGroupName, String dnsR @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 contentType = "application/json"; 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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -651,38 +620,11 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRulePatch parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), ifMatch, parameters, accept, - Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, + contentType, accept, parameters, Context.NONE); } /** @@ -703,38 +645,11 @@ private Response updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, DnsSecurityRulePatch parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), ifMatch, parameters, accept, - context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, + contentType, accept, parameters, context); } /** @@ -955,31 +870,10 @@ public DnsSecurityRuleInner update(String resourceGroupName, String dnsResolverP @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)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -999,31 +893,9 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), ifMatch, accept, Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, + Context.NONE); } /** @@ -1043,31 +915,9 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, dnsSecurityRuleName, this.client.getApiVersion(), ifMatch, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, + context); } /** @@ -1249,126 +1099,6 @@ public void delete(String resourceGroupName, String dnsResolverPolicyName, Strin beginDelete(resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName, ifMatch, context).getFinalResult(); } - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } - if (dnsSecurityRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsSecurityRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(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. - */ - @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. * @@ -1378,32 +1108,16 @@ public DnsSecurityRuleInner get(String resourceGroupName, String dnsResolverPoli * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsSecurityRule list operation 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverPolicyName, 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())); @@ -1418,8 +1132,7 @@ private Mono> listSinglePageAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsSecurityRule list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String dnsResolverPolicyName, @@ -1436,8 +1149,7 @@ private PagedFlux listAsync(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS security rules within a DNS resolver policy as paginated - * response with {@link PagedFlux}. + * @return the response of a DnsSecurityRule list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String dnsResolverPolicyName) { @@ -1455,34 +1167,15 @@ private PagedFlux listAsync(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS security rules within a DNS resolver policy along with - * {@link PagedResponse}. + * @return the response of a DnsSecurityRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String dnsResolverPolicyName, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), top, accept, Context.NONE); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverPolicyName, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1497,34 +1190,15 @@ private PagedResponse listSinglePage(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS security rules within a DNS resolver policy along with - * {@link PagedResponse}. + * @return the response of a DnsSecurityRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String dnsResolverPolicyName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverPolicyName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverPolicyName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverPolicyName, this.client.getApiVersion(), top, accept, context); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverPolicyName, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1537,8 +1211,7 @@ private PagedResponse listSinglePage(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS security rules within a DNS resolver policy as paginated - * response with {@link PagedIterable}. + * @return the response of a DnsSecurityRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String dnsResolverPolicyName) { @@ -1557,8 +1230,7 @@ public PagedIterable list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS security rules within a DNS resolver policy as paginated - * response with {@link PagedIterable}. + * @return the response of a DnsSecurityRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String dnsResolverPolicyName, Integer top, @@ -1574,18 +1246,11 @@ public PagedIterable list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS security rules within a DNS resolver policy along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a DnsSecurityRule list operation 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(), @@ -1600,20 +1265,10 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on DNS security rules within a DNS resolver policy along with - * {@link PagedResponse}. + * @return the response of a DnsSecurityRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1629,26 +1284,14 @@ private PagedResponse listNextSinglePage(String nextLink) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a DnsSecurityRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(DnsSecurityRulesClientImpl.class); } 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 index d9ea98ca255f..dac04e46229d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -27,15 +27,6 @@ public DnsSecurityRulesImpl(DnsSecurityRulesClient 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() @@ -58,6 +49,15 @@ public DnsSecurityRule get(String resourceGroupName, String dnsResolverPolicyNam } } + 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 PagedIterable list(String resourceGroupName, String dnsResolverPolicyName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, dnsResolverPolicyName); return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsSecurityRuleImpl(inner1, this.manager())); diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRuleImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRuleImpl.java index 38292850abf9..de6b18b9fd3a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRuleImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRuleImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRulesClientImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRulesClientImpl.java index 9152f711c14f..d7eca12ab67c 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRulesClientImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRulesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -29,10 +29,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient; import com.azure.resourcemanager.dnsresolver.fluent.models.ForwardingRuleInner; -import com.azure.resourcemanager.dnsresolver.models.ForwardingRuleListResult; +import com.azure.resourcemanager.dnsresolver.implementation.models.ForwardingRuleListResult; import com.azure.resourcemanager.dnsresolver.models.ForwardingRulePatch; import reactor.core.publisher.Mono; @@ -65,123 +64,117 @@ public final class ForwardingRulesClientImpl implements ForwardingRulesClient { * The interface defining all the services for DnsResolverManagementClientForwardingRules to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "DnsResolverManagementClientForwardingRules") public interface ForwardingRulesService { @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/forwardingRules/{forwardingRuleName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, + @PathParam("forwardingRuleName") String forwardingRuleName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/forwardingRules/{forwardingRuleName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, + @PathParam("forwardingRuleName") String forwardingRuleName, @HeaderParam("Accept") String accept, + Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/forwardingRules/{forwardingRuleName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("forwardingRuleName") String forwardingRuleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ForwardingRuleInner parameters, @HeaderParam("Accept") String accept, + @PathParam("forwardingRuleName") String forwardingRuleName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ForwardingRuleInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/forwardingRules/{forwardingRuleName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("forwardingRuleName") String forwardingRuleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") ForwardingRuleInner parameters, @HeaderParam("Accept") String accept, + @PathParam("forwardingRuleName") String forwardingRuleName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ForwardingRuleInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/forwardingRules/{forwardingRuleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("forwardingRuleName") String forwardingRuleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @BodyParam("application/json") ForwardingRulePatch parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("forwardingRuleName") String forwardingRuleName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ForwardingRulePatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/forwardingRules/{forwardingRuleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("forwardingRuleName") String forwardingRuleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @BodyParam("application/json") ForwardingRulePatch parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("forwardingRuleName") String forwardingRuleName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ForwardingRulePatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/forwardingRules/{forwardingRuleName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("forwardingRuleName") String forwardingRuleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("Accept") String accept, Context context); + @PathParam("forwardingRuleName") String forwardingRuleName, @HeaderParam("if-match") String ifMatch, + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/forwardingRules/{forwardingRuleName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("forwardingRuleName") String forwardingRuleName, @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/dnsForwardingRulesets/{dnsForwardingRulesetName}/forwardingRules/{forwardingRuleName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("forwardingRuleName") String forwardingRuleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/forwardingRules/{forwardingRuleName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("forwardingRuleName") String forwardingRuleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("forwardingRuleName") String forwardingRuleName, @HeaderParam("if-match") String ifMatch, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/forwardingRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, + @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/forwardingRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, + @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -189,7 +182,7 @@ Response listSync(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -197,7 +190,86 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets properties of a forwarding rule in a DNS forwarding ruleset. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param forwardingRuleName The name of the forwarding 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 forwarding rule in a DNS forwarding ruleset along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String dnsForwardingRulesetName, String forwardingRuleName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets properties of a forwarding rule in a DNS forwarding ruleset. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param forwardingRuleName The name of the forwarding 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 forwarding rule in a DNS forwarding ruleset on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String dnsForwardingRulesetName, + String forwardingRuleName) { + return getWithResponseAsync(resourceGroupName, dnsForwardingRulesetName, forwardingRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets properties of a forwarding rule in a DNS forwarding ruleset. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param forwardingRuleName The name of the forwarding 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 forwarding rule in a DNS forwarding ruleset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, + String forwardingRuleName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, accept, context); + } + + /** + * Gets properties of a forwarding rule in a DNS forwarding ruleset. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param forwardingRuleName The name of the forwarding 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 forwarding rule in a DNS forwarding ruleset. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ForwardingRuleInner get(String resourceGroupName, String dnsForwardingRulesetName, + String forwardingRuleName) { + return getWithResponse(resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, Context.NONE) + .getValue(); } /** @@ -221,36 +293,12 @@ Response listNextSync(@PathParam(value = "nextLink", e private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName, ForwardingRuleInner 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (forwardingRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter forwardingRuleName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, this.client.getApiVersion(), ifMatch, - ifNoneMatch, parameters, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, + ifMatch, ifNoneMatch, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -296,39 +344,11 @@ private Mono createOrUpdateAsync(String resourceGroupName, public Response createOrUpdateWithResponse(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName, ForwardingRuleInner parameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (forwardingRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter forwardingRuleName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, forwardingRuleName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, - accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, ifMatch, + ifNoneMatch, contentType, accept, parameters, context); } /** @@ -370,36 +390,12 @@ public ForwardingRuleInner createOrUpdate(String resourceGroupName, String dnsFo @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName, ForwardingRulePatch 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (forwardingRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter forwardingRuleName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, this.client.getApiVersion(), ifMatch, - parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, + ifMatch, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -441,39 +437,11 @@ private Mono updateAsync(String resourceGroupName, String d @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName, ForwardingRulePatch parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (forwardingRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter forwardingRuleName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, forwardingRuleName, this.client.getApiVersion(), ifMatch, parameters, accept, - context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, ifMatch, + contentType, accept, parameters, context); } /** @@ -512,31 +480,10 @@ public ForwardingRuleInner update(String resourceGroupName, String dnsForwarding @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName, 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (forwardingRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter forwardingRuleName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, this.client.getApiVersion(), ifMatch, - accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, + ifMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -576,32 +523,9 @@ private Mono deleteAsync(String resourceGroupName, String dnsForwardingRul @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (forwardingRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter forwardingRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, forwardingRuleName, this.client.getApiVersion(), ifMatch, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, ifMatch, + context); } /** @@ -620,128 +544,6 @@ public void delete(String resourceGroupName, String dnsForwardingRulesetName, St deleteWithResponse(resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, ifMatch, Context.NONE); } - /** - * Gets properties of a forwarding rule in a DNS forwarding ruleset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param forwardingRuleName The name of the forwarding 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 forwarding rule in a DNS forwarding ruleset along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String dnsForwardingRulesetName, String forwardingRuleName) { - 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (forwardingRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter forwardingRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, forwardingRuleName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets properties of a forwarding rule in a DNS forwarding ruleset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param forwardingRuleName The name of the forwarding 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 forwarding rule in a DNS forwarding ruleset on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String dnsForwardingRulesetName, - String forwardingRuleName) { - return getWithResponseAsync(resourceGroupName, dnsForwardingRulesetName, forwardingRuleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets properties of a forwarding rule in a DNS forwarding ruleset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param forwardingRuleName The name of the forwarding 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 forwarding rule in a DNS forwarding ruleset along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, - String forwardingRuleName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (forwardingRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter forwardingRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, forwardingRuleName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets properties of a forwarding rule in a DNS forwarding ruleset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param forwardingRuleName The name of the forwarding 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 forwarding rule in a DNS forwarding ruleset. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ForwardingRuleInner get(String resourceGroupName, String dnsForwardingRulesetName, - String forwardingRuleName) { - return getWithResponse(resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, Context.NONE) - .getValue(); - } - /** * Lists forwarding rules in a DNS forwarding ruleset. * @@ -751,32 +553,16 @@ public ForwardingRuleInner get(String resourceGroupName, String dnsForwardingRul * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rules within a DNS forwarding ruleset along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a ForwardingRule list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String dnsForwardingRulesetName, 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsForwardingRulesetName, this.client.getApiVersion(), top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, 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())); @@ -791,8 +577,7 @@ private Mono> listSinglePageAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rules within a DNS forwarding ruleset as paginated - * response with {@link PagedFlux}. + * @return the response of a ForwardingRule list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String dnsForwardingRulesetName, @@ -809,8 +594,7 @@ private PagedFlux listAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on forwarding rules within a DNS forwarding ruleset as paginated - * response with {@link PagedFlux}. + * @return the response of a ForwardingRule list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String dnsForwardingRulesetName) { @@ -828,35 +612,15 @@ private PagedFlux listAsync(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on forwarding rules within a DNS forwarding ruleset along with - * {@link PagedResponse}. + * @return the response of a ForwardingRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String dnsForwardingRulesetName, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, this.client.getApiVersion(), top, accept, Context.NONE); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsForwardingRulesetName, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -871,35 +635,15 @@ private PagedResponse listSinglePage(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rules within a DNS forwarding ruleset along with - * {@link PagedResponse}. + * @return the response of a ForwardingRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String dnsForwardingRulesetName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, this.client.getApiVersion(), top, accept, context); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsForwardingRulesetName, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -912,8 +656,7 @@ private PagedResponse listSinglePage(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rules within a DNS forwarding ruleset as paginated - * response with {@link PagedIterable}. + * @return the response of a ForwardingRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName) { @@ -932,8 +675,7 @@ public PagedIterable list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on forwarding rules within a DNS forwarding ruleset as paginated - * response with {@link PagedIterable}. + * @return the response of a ForwardingRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName, @@ -949,18 +691,11 @@ public PagedIterable list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on forwarding rules within a DNS forwarding ruleset along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a ForwardingRule list operation 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(), @@ -975,20 +710,10 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on forwarding rules within a DNS forwarding ruleset along with - * {@link PagedResponse}. + * @return the response of a ForwardingRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1004,26 +729,14 @@ private PagedResponse listNextSinglePage(String nextLink) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 forwarding rules within a DNS forwarding ruleset along with - * {@link PagedResponse}. + * @return the response of a ForwardingRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(ForwardingRulesClientImpl.class); } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRulesImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRulesImpl.java index 68f02b7efb93..239c97366e07 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRulesImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRulesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -27,16 +27,6 @@ public ForwardingRulesImpl(ForwardingRulesClient innerClient, this.serviceManager = serviceManager; } - public Response deleteWithResponse(String resourceGroupName, String dnsForwardingRulesetName, - String forwardingRuleName, String ifMatch, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, ifMatch, context); - } - - public void delete(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName) { - this.serviceClient().delete(resourceGroupName, dnsForwardingRulesetName, forwardingRuleName); - } - public Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName, Context context) { Response inner = this.serviceClient() @@ -59,6 +49,16 @@ public ForwardingRule get(String resourceGroupName, String dnsForwardingRulesetN } } + public Response deleteWithResponse(String resourceGroupName, String dnsForwardingRulesetName, + String forwardingRuleName, String ifMatch, Context context) { + return this.serviceClient() + .deleteWithResponse(resourceGroupName, dnsForwardingRulesetName, forwardingRuleName, ifMatch, context); + } + + public void delete(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName) { + this.serviceClient().delete(resourceGroupName, dnsForwardingRulesetName, forwardingRuleName); + } + public PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, dnsForwardingRulesetName); diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointImpl.java index 0587d14e6445..4c8c61614241 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointsClientImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointsClientImpl.java index 4cde2023746d..45841918961a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointsClientImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -31,12 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient; import com.azure.resourcemanager.dnsresolver.fluent.models.InboundEndpointInner; -import com.azure.resourcemanager.dnsresolver.models.InboundEndpointListResult; +import com.azure.resourcemanager.dnsresolver.implementation.models.InboundEndpointListResult; import com.azure.resourcemanager.dnsresolver.models.InboundEndpointPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -71,129 +70,125 @@ public final class InboundEndpointsClientImpl implements InboundEndpointsClient * The interface defining all the services for DnsResolverManagementClientInboundEndpoints to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "DnsResolverManagementClientInboundEndpoints") public interface InboundEndpointsService { @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/inboundEndpoints/{inboundEndpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsResolverName") String dnsResolverName, + @PathParam("inboundEndpointName") String inboundEndpointName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/inboundEndpoints/{inboundEndpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsResolverName") String dnsResolverName, + @PathParam("inboundEndpointName") String inboundEndpointName, @HeaderParam("Accept") String accept, + Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/inboundEndpoints/{inboundEndpointName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("inboundEndpointName") String inboundEndpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") InboundEndpointInner parameters, @HeaderParam("Accept") String accept, + @PathParam("inboundEndpointName") String inboundEndpointName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") InboundEndpointInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/inboundEndpoints/{inboundEndpointName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("inboundEndpointName") String inboundEndpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") InboundEndpointInner parameters, @HeaderParam("Accept") String accept, + @PathParam("inboundEndpointName") String inboundEndpointName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") InboundEndpointInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/inboundEndpoints/{inboundEndpointName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("inboundEndpointName") String inboundEndpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @BodyParam("application/json") InboundEndpointPatch parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("inboundEndpointName") String inboundEndpointName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InboundEndpointPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/inboundEndpoints/{inboundEndpointName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("inboundEndpointName") String inboundEndpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @BodyParam("application/json") InboundEndpointPatch parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("inboundEndpointName") String inboundEndpointName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InboundEndpointPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/inboundEndpoints/{inboundEndpointName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("inboundEndpointName") String inboundEndpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, @HeaderParam("Accept") String accept, Context context); + @PathParam("inboundEndpointName") String inboundEndpointName, @HeaderParam("if-match") String ifMatch, + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/inboundEndpoints/{inboundEndpointName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("inboundEndpointName") String inboundEndpointName, @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/dnsResolvers/{dnsResolverName}/inboundEndpoints/{inboundEndpointName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("inboundEndpointName") String inboundEndpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/inboundEndpoints/{inboundEndpointName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("inboundEndpointName") String inboundEndpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("inboundEndpointName") String inboundEndpointName, @HeaderParam("if-match") String ifMatch, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/inboundEndpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, @QueryParam("api-version") String apiVersion, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @PathParam("dnsResolverName") String dnsResolverName, @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/inboundEndpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, @QueryParam("api-version") String apiVersion, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @PathParam("dnsResolverName") String dnsResolverName, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -201,7 +196,82 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets properties of an inbound endpoint for a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an inbound endpoint for a DNS resolver along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String dnsResolverName, + String inboundEndpointName) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, inboundEndpointName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets properties of an inbound endpoint for a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an inbound endpoint for a DNS resolver on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String dnsResolverName, + String inboundEndpointName) { + return getWithResponseAsync(resourceGroupName, dnsResolverName, inboundEndpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets properties of an inbound endpoint for a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. + * @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 an inbound endpoint for a DNS resolver along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String dnsResolverName, + String inboundEndpointName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverName, inboundEndpointName, accept, context); + } + + /** + * Gets properties of an inbound endpoint for a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an inbound endpoint for a DNS resolver. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InboundEndpointInner get(String resourceGroupName, String dnsResolverName, String inboundEndpointName) { + return getWithResponse(resourceGroupName, dnsResolverName, inboundEndpointName, Context.NONE).getValue(); } /** @@ -225,36 +295,12 @@ Response listNextSync(@PathParam(value = "nextLink", private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String dnsResolverName, String inboundEndpointName, InboundEndpointInner 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (inboundEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter inboundEndpointName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverName, inboundEndpointName, this.client.getApiVersion(), ifMatch, - ifNoneMatch, parameters, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, inboundEndpointName, ifMatch, + ifNoneMatch, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -277,38 +323,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverName, String inboundEndpointName, InboundEndpointInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (inboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter inboundEndpointName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, inboundEndpointName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, - Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, inboundEndpointName, ifMatch, + ifNoneMatch, contentType, accept, parameters, Context.NONE); } /** @@ -332,38 +351,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverName, String inboundEndpointName, InboundEndpointInner parameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (inboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter inboundEndpointName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, inboundEndpointName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, accept, - context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, inboundEndpointName, ifMatch, + ifNoneMatch, contentType, accept, parameters, context); } /** @@ -599,36 +591,12 @@ public InboundEndpointInner createOrUpdate(String resourceGroupName, String dnsR @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String dnsResolverName, String inboundEndpointName, InboundEndpointPatch 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (inboundEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter inboundEndpointName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverName, inboundEndpointName, this.client.getApiVersion(), ifMatch, - parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, inboundEndpointName, ifMatch, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -649,38 +617,11 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsResolverName, String inboundEndpointName, InboundEndpointPatch parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (inboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter inboundEndpointName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, inboundEndpointName, this.client.getApiVersion(), ifMatch, parameters, accept, - Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, inboundEndpointName, ifMatch, + contentType, accept, parameters, Context.NONE); } /** @@ -701,37 +642,11 @@ private Response updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsResolverName, String inboundEndpointName, InboundEndpointPatch parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (inboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter inboundEndpointName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, inboundEndpointName, this.client.getApiVersion(), ifMatch, parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, inboundEndpointName, ifMatch, + contentType, accept, parameters, context); } /** @@ -949,31 +864,8 @@ public InboundEndpointInner update(String resourceGroupName, String dnsResolverN @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String dnsResolverName, String inboundEndpointName, 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (inboundEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter inboundEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, inboundEndpointName, this.client.getApiVersion(), ifMatch, accept, context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, inboundEndpointName, ifMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -993,31 +885,9 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverName, String inboundEndpointName, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (inboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter inboundEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, inboundEndpointName, this.client.getApiVersion(), ifMatch, accept, Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, inboundEndpointName, ifMatch, + Context.NONE); } /** @@ -1037,31 +907,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverName, String inboundEndpointName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (inboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter inboundEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, inboundEndpointName, this.client.getApiVersion(), ifMatch, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, inboundEndpointName, ifMatch, context); } /** @@ -1243,124 +1090,6 @@ public void delete(String resourceGroupName, String dnsResolverName, String inbo beginDelete(resourceGroupName, dnsResolverName, inboundEndpointName, ifMatch, context).getFinalResult(); } - /** - * Gets properties of an inbound endpoint for a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an inbound endpoint for a DNS resolver along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String dnsResolverName, - String inboundEndpointName) { - 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (inboundEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter inboundEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverName, inboundEndpointName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets properties of an inbound endpoint for a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an inbound endpoint for a DNS resolver on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String dnsResolverName, - String inboundEndpointName) { - return getWithResponseAsync(resourceGroupName, dnsResolverName, inboundEndpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets properties of an inbound endpoint for a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. - * @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 an inbound endpoint for a DNS resolver along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String dnsResolverName, - String inboundEndpointName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (inboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter inboundEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, inboundEndpointName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets properties of an inbound endpoint for a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an inbound endpoint for a DNS resolver. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InboundEndpointInner get(String resourceGroupName, String dnsResolverName, String inboundEndpointName) { - return getWithResponse(resourceGroupName, dnsResolverName, inboundEndpointName, Context.NONE).getValue(); - } - /** * Lists inbound endpoints for a DNS resolver. * @@ -1370,32 +1099,16 @@ public InboundEndpointInner get(String resourceGroupName, String dnsResolverName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 inbound endpoints for a DNS resolver along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a InboundEndpoint list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String dnsResolverName, 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverName, this.client.getApiVersion(), top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, 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())); @@ -1410,8 +1123,7 @@ private Mono> listSinglePageAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 inbound endpoints for a DNS resolver as paginated response - * with {@link PagedFlux}. + * @return the response of a InboundEndpoint list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String dnsResolverName, Integer top) { @@ -1427,8 +1139,7 @@ private PagedFlux listAsync(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on inbound endpoints for a DNS resolver as paginated response - * with {@link PagedFlux}. + * @return the response of a InboundEndpoint list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String dnsResolverName) { @@ -1446,34 +1157,15 @@ private PagedFlux listAsync(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on inbound endpoints for a DNS resolver along with - * {@link PagedResponse}. + * @return the response of a InboundEndpoint list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String dnsResolverName, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, this.client.getApiVersion(), top, accept, Context.NONE); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverName, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1488,34 +1180,15 @@ private PagedResponse listSinglePage(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on inbound endpoints for a DNS resolver along with - * {@link PagedResponse}. + * @return the response of a InboundEndpoint list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String dnsResolverName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, this.client.getApiVersion(), top, accept, context); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverName, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1528,8 +1201,7 @@ private PagedResponse listSinglePage(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on inbound endpoints for a DNS resolver as paginated response - * with {@link PagedIterable}. + * @return the response of a InboundEndpoint list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String dnsResolverName) { @@ -1548,8 +1220,7 @@ public PagedIterable list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on inbound endpoints for a DNS resolver as paginated response - * with {@link PagedIterable}. + * @return the response of a InboundEndpoint list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String dnsResolverName, Integer top, @@ -1565,18 +1236,11 @@ public PagedIterable list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on inbound endpoints for a DNS resolver along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a InboundEndpoint list operation 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(), @@ -1591,20 +1255,10 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on inbound endpoints for a DNS resolver along with - * {@link PagedResponse}. + * @return the response of a InboundEndpoint list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1620,26 +1274,14 @@ private PagedResponse listNextSinglePage(String nextLink) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 inbound endpoints for a DNS resolver along with - * {@link PagedResponse}. + * @return the response of a InboundEndpoint list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(InboundEndpointsClientImpl.class); } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointsImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointsImpl.java index f24908cea8eb..d3e008030236 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointsImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -27,15 +27,6 @@ public InboundEndpointsImpl(InboundEndpointsClient innerClient, this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String dnsResolverName, String inboundEndpointName) { - this.serviceClient().delete(resourceGroupName, dnsResolverName, inboundEndpointName); - } - - public void delete(String resourceGroupName, String dnsResolverName, String inboundEndpointName, String ifMatch, - Context context) { - this.serviceClient().delete(resourceGroupName, dnsResolverName, inboundEndpointName, ifMatch, context); - } - public Response getWithResponse(String resourceGroupName, String dnsResolverName, String inboundEndpointName, Context context) { Response inner @@ -57,6 +48,15 @@ public InboundEndpoint get(String resourceGroupName, String dnsResolverName, Str } } + public void delete(String resourceGroupName, String dnsResolverName, String inboundEndpointName) { + this.serviceClient().delete(resourceGroupName, dnsResolverName, inboundEndpointName); + } + + public void delete(String resourceGroupName, String dnsResolverName, String inboundEndpointName, String ifMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, dnsResolverName, inboundEndpointName, ifMatch, context); + } + public PagedIterable list(String resourceGroupName, String dnsResolverName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, dnsResolverName); return ResourceManagerUtils.mapPage(inner, inner1 -> new InboundEndpointImpl(inner1, this.manager())); diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointImpl.java index 08e5985f449b..cd7256b92040 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointsClientImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointsClientImpl.java index e3dc150d49e5..f1b378ff262a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointsClientImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -31,12 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient; import com.azure.resourcemanager.dnsresolver.fluent.models.OutboundEndpointInner; -import com.azure.resourcemanager.dnsresolver.models.OutboundEndpointListResult; +import com.azure.resourcemanager.dnsresolver.implementation.models.OutboundEndpointListResult; import com.azure.resourcemanager.dnsresolver.models.OutboundEndpointPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -71,135 +70,125 @@ public final class OutboundEndpointsClientImpl implements OutboundEndpointsClien * The interface defining all the services for DnsResolverManagementClientOutboundEndpoints to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "DnsResolverManagementClientOutboundEndpoints") public interface OutboundEndpointsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints/{outboundEndpointName}") - @ExpectedResponses({ 200, 201, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints/{outboundEndpointName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("outboundEndpointName") String outboundEndpointName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") OutboundEndpointInner parameters, @HeaderParam("Accept") String accept, + @PathParam("outboundEndpointName") String outboundEndpointName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints/{outboundEndpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsResolverName") String dnsResolverName, + @PathParam("outboundEndpointName") String outboundEndpointName, @HeaderParam("Accept") String accept, + Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints/{outboundEndpointName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("outboundEndpointName") String outboundEndpointName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") OutboundEndpointInner parameters, @HeaderParam("Accept") String accept, + @PathParam("outboundEndpointName") String outboundEndpointName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") OutboundEndpointInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints/{outboundEndpointName}") - @ExpectedResponses({ 200, 202 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints/{outboundEndpointName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("outboundEndpointName") String outboundEndpointName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") OutboundEndpointPatch parameters, @HeaderParam("Accept") String accept, + @PathParam("outboundEndpointName") String outboundEndpointName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") OutboundEndpointInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints/{outboundEndpointName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("outboundEndpointName") String outboundEndpointName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") OutboundEndpointPatch parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("outboundEndpointName") String outboundEndpointName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OutboundEndpointPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints/{outboundEndpointName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints/{outboundEndpointName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("outboundEndpointName") String outboundEndpointName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("Accept") String accept, Context context); + @PathParam("outboundEndpointName") String outboundEndpointName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OutboundEndpointPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints/{outboundEndpointName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("outboundEndpointName") String outboundEndpointName, - @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/dnsResolvers/{dnsResolverName}/outboundEndpoints/{outboundEndpointName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("outboundEndpointName") String outboundEndpointName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("outboundEndpointName") String outboundEndpointName, @HeaderParam("if-match") String ifMatch, + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints/{outboundEndpointName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints/{outboundEndpointName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsResolverName") String dnsResolverName, - @PathParam("outboundEndpointName") String outboundEndpointName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("outboundEndpointName") String outboundEndpointName, @HeaderParam("if-match") String ifMatch, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, @QueryParam("api-version") String apiVersion, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @PathParam("dnsResolverName") String dnsResolverName, @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolvers/{dnsResolverName}/outboundEndpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsResolverName") String dnsResolverName, @QueryParam("api-version") String apiVersion, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @PathParam("dnsResolverName") String dnsResolverName, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -207,10 +196,85 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets properties of an outbound endpoint for a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an outbound endpoint for a DNS resolver along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String dnsResolverName, + String outboundEndpointName) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, outboundEndpointName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets properties of an outbound endpoint for a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an outbound endpoint for a DNS resolver on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String dnsResolverName, + String outboundEndpointName) { + return getWithResponseAsync(resourceGroupName, dnsResolverName, outboundEndpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets properties of an outbound endpoint for a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. + * @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 an outbound endpoint for a DNS resolver along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String dnsResolverName, + String outboundEndpointName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverName, outboundEndpointName, accept, context); + } + + /** + * Gets properties of an outbound endpoint for a DNS resolver. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsResolverName The name of the DNS resolver. + * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 an outbound endpoint for a DNS resolver. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OutboundEndpointInner get(String resourceGroupName, String dnsResolverName, String outboundEndpointName) { + return getWithResponse(resourceGroupName, dnsResolverName, outboundEndpointName, Context.NONE).getValue(); + } + /** * Creates or updates an outbound endpoint for a DNS resolver. * @@ -232,36 +296,12 @@ Response listNextSync( private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String dnsResolverName, String outboundEndpointName, OutboundEndpointInner 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (outboundEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter outboundEndpointName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverName, outboundEndpointName, this.client.getApiVersion(), ifMatch, - ifNoneMatch, parameters, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, outboundEndpointName, ifMatch, + ifNoneMatch, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -284,38 +324,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverName, String outboundEndpointName, OutboundEndpointInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (outboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter outboundEndpointName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, outboundEndpointName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, - accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, outboundEndpointName, ifMatch, + ifNoneMatch, contentType, accept, parameters, Context.NONE); } /** @@ -339,38 +352,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName private Response createOrUpdateWithResponse(String resourceGroupName, String dnsResolverName, String outboundEndpointName, OutboundEndpointInner parameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (outboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter outboundEndpointName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, outboundEndpointName, this.client.getApiVersion(), ifMatch, ifNoneMatch, parameters, - accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, outboundEndpointName, ifMatch, + ifNoneMatch, contentType, accept, parameters, context); } /** @@ -610,36 +596,12 @@ public OutboundEndpointInner createOrUpdate(String resourceGroupName, String dns @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String dnsResolverName, String outboundEndpointName, OutboundEndpointPatch 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (outboundEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter outboundEndpointName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverName, outboundEndpointName, this.client.getApiVersion(), ifMatch, - parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, outboundEndpointName, ifMatch, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -660,38 +622,11 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsResolverName, String outboundEndpointName, OutboundEndpointPatch parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (outboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter outboundEndpointName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, outboundEndpointName, this.client.getApiVersion(), ifMatch, parameters, accept, - Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, outboundEndpointName, ifMatch, + contentType, accept, parameters, Context.NONE); } /** @@ -712,37 +647,11 @@ private Response updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsResolverName, String outboundEndpointName, OutboundEndpointPatch parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (outboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter outboundEndpointName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, outboundEndpointName, this.client.getApiVersion(), ifMatch, parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, outboundEndpointName, ifMatch, + contentType, accept, parameters, context); } /** @@ -963,31 +872,10 @@ public OutboundEndpointInner update(String resourceGroupName, String dnsResolver @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String dnsResolverName, String outboundEndpointName, 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (outboundEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter outboundEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, outboundEndpointName, this.client.getApiVersion(), ifMatch, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, outboundEndpointName, ifMatch, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1007,31 +895,9 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverName, String outboundEndpointName, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (outboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter outboundEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, outboundEndpointName, this.client.getApiVersion(), ifMatch, accept, Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, outboundEndpointName, ifMatch, + Context.NONE); } /** @@ -1051,31 +917,9 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsResolverName, String outboundEndpointName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (outboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter outboundEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, outboundEndpointName, this.client.getApiVersion(), ifMatch, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, outboundEndpointName, ifMatch, + context); } /** @@ -1257,124 +1101,6 @@ public void delete(String resourceGroupName, String dnsResolverName, String outb beginDelete(resourceGroupName, dnsResolverName, outboundEndpointName, ifMatch, context).getFinalResult(); } - /** - * Gets properties of an outbound endpoint for a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an outbound endpoint for a DNS resolver along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String dnsResolverName, - String outboundEndpointName) { - 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (outboundEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter outboundEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverName, outboundEndpointName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets properties of an outbound endpoint for a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an outbound endpoint for a DNS resolver on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String dnsResolverName, - String outboundEndpointName) { - return getWithResponseAsync(resourceGroupName, dnsResolverName, outboundEndpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets properties of an outbound endpoint for a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. - * @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 an outbound endpoint for a DNS resolver along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String dnsResolverName, - String outboundEndpointName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } - if (outboundEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter outboundEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, outboundEndpointName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets properties of an outbound endpoint for a DNS resolver. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsResolverName The name of the DNS resolver. - * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an outbound endpoint for a DNS resolver. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OutboundEndpointInner get(String resourceGroupName, String dnsResolverName, String outboundEndpointName) { - return getWithResponse(resourceGroupName, dnsResolverName, outboundEndpointName, Context.NONE).getValue(); - } - /** * Lists outbound endpoints for a DNS resolver. * @@ -1384,32 +1110,16 @@ public OutboundEndpointInner get(String resourceGroupName, String dnsResolverNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 outbound endpoints for a DNS resolver along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a OutboundEndpoint list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String dnsResolverName, 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 (dnsResolverName == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsResolverName, this.client.getApiVersion(), top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsResolverName, 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())); @@ -1424,8 +1134,7 @@ private Mono> listSinglePageAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 outbound endpoints for a DNS resolver as paginated response - * with {@link PagedFlux}. + * @return the response of a OutboundEndpoint list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String dnsResolverName, Integer top) { @@ -1441,8 +1150,7 @@ private PagedFlux listAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 outbound endpoints for a DNS resolver as paginated response - * with {@link PagedFlux}. + * @return the response of a OutboundEndpoint list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String dnsResolverName) { @@ -1460,34 +1168,15 @@ private PagedFlux listAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 outbound endpoints for a DNS resolver along with - * {@link PagedResponse}. + * @return the response of a OutboundEndpoint list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String dnsResolverName, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, this.client.getApiVersion(), top, accept, Context.NONE); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverName, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1502,34 +1191,15 @@ private PagedResponse listSinglePage(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on outbound endpoints for a DNS resolver along with - * {@link PagedResponse}. + * @return the response of a OutboundEndpoint list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String dnsResolverName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsResolverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter dnsResolverName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsResolverName, this.client.getApiVersion(), top, accept, context); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsResolverName, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1542,8 +1212,7 @@ private PagedResponse listSinglePage(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on outbound endpoints for a DNS resolver as paginated response - * with {@link PagedIterable}. + * @return the response of a OutboundEndpoint list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String dnsResolverName) { @@ -1562,8 +1231,7 @@ public PagedIterable list(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on outbound endpoints for a DNS resolver as paginated response - * with {@link PagedIterable}. + * @return the response of a OutboundEndpoint list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String dnsResolverName, Integer top, @@ -1579,18 +1247,11 @@ public PagedIterable list(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on outbound endpoints for a DNS resolver along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a OutboundEndpoint list operation 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(), @@ -1605,20 +1266,10 @@ private Mono> listNextSinglePageAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on outbound endpoints for a DNS resolver along with - * {@link PagedResponse}. + * @return the response of a OutboundEndpoint list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1634,26 +1285,14 @@ private PagedResponse listNextSinglePage(String nextLink) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 outbound endpoints for a DNS resolver along with - * {@link PagedResponse}. + * @return the response of a OutboundEndpoint list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(OutboundEndpointsClientImpl.class); } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointsImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointsImpl.java index 53ef4a2c06a9..0650ba45d6ec 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointsImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -27,15 +27,6 @@ public OutboundEndpointsImpl(OutboundEndpointsClient innerClient, this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String dnsResolverName, String outboundEndpointName) { - this.serviceClient().delete(resourceGroupName, dnsResolverName, outboundEndpointName); - } - - public void delete(String resourceGroupName, String dnsResolverName, String outboundEndpointName, String ifMatch, - Context context) { - this.serviceClient().delete(resourceGroupName, dnsResolverName, outboundEndpointName, ifMatch, context); - } - public Response getWithResponse(String resourceGroupName, String dnsResolverName, String outboundEndpointName, Context context) { Response inner @@ -58,6 +49,15 @@ public OutboundEndpoint get(String resourceGroupName, String dnsResolverName, St } } + public void delete(String resourceGroupName, String dnsResolverName, String outboundEndpointName) { + this.serviceClient().delete(resourceGroupName, dnsResolverName, outboundEndpointName); + } + + public void delete(String resourceGroupName, String dnsResolverName, String outboundEndpointName, String ifMatch, + Context context) { + this.serviceClient().delete(resourceGroupName, dnsResolverName, outboundEndpointName, ifMatch, context); + } + public PagedIterable list(String resourceGroupName, String dnsResolverName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, dnsResolverName); return ResourceManagerUtils.mapPage(inner, inner1 -> new OutboundEndpointImpl(inner1, this.manager())); diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ResourceManagerUtils.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ResourceManagerUtils.java index 53f2990a0001..53f44c1c73eb 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ResourceManagerUtils.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkDnsForwardingRulesetImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkDnsForwardingRulesetImpl.java index 4c170102d4ea..61e10c018c23 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkDnsForwardingRulesetImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkDnsForwardingRulesetImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinkImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinkImpl.java index 795bfbbcfefc..8dc27aa12eb5 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinkImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinkImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinksClientImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinksClientImpl.java index b07c5510a7db..faa3440c6d5c 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinksClientImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinksClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -31,12 +31,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient; import com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkLinkInner; -import com.azure.resourcemanager.dnsresolver.models.VirtualNetworkLinkListResult; +import com.azure.resourcemanager.dnsresolver.implementation.models.VirtualNetworkLinkListResult; import com.azure.resourcemanager.dnsresolver.models.VirtualNetworkLinkPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -71,129 +70,117 @@ public final class VirtualNetworkLinksClientImpl implements VirtualNetworkLinksC * The interface defining all the services for DnsResolverManagementClientVirtualNetworkLinks to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "DnsResolverManagementClientVirtualNetworkLinks") public interface VirtualNetworkLinksService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks/{virtualNetworkLinkName}") - @ExpectedResponses({ 200, 201, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks/{virtualNetworkLinkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") VirtualNetworkLinkInner parameters, @HeaderParam("Accept") String accept, + @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks/{virtualNetworkLinkName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, + @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, @HeaderParam("Accept") String accept, + Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks/{virtualNetworkLinkName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @BodyParam("application/json") VirtualNetworkLinkInner parameters, @HeaderParam("Accept") String accept, + @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") VirtualNetworkLinkInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks/{virtualNetworkLinkName}") - @ExpectedResponses({ 200, 202 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks/{virtualNetworkLinkName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") VirtualNetworkLinkPatch parameters, @HeaderParam("Accept") String accept, + @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("if-none-match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") VirtualNetworkLinkInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks/{virtualNetworkLinkName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") VirtualNetworkLinkPatch parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualNetworkLinkPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks/{virtualNetworkLinkName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks/{virtualNetworkLinkName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("Accept") String accept, Context context); + @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, @HeaderParam("if-match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualNetworkLinkPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks/{virtualNetworkLinkName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, - @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/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks/{virtualNetworkLinkName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, @HeaderParam("if-match") String ifMatch, + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks/{virtualNetworkLinkName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks/{virtualNetworkLinkName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("virtualNetworkLinkName") String virtualNetworkLinkName, @HeaderParam("if-match") String ifMatch, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, + @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName}/virtualNetworkLinks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, - @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, + @PathParam("dnsForwardingRulesetName") String dnsForwardingRulesetName, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -201,7 +188,7 @@ Response listSync(@HostParam("$host") String endpo @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -209,10 +196,90 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets properties of a virtual network link to a DNS forwarding ruleset. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param virtualNetworkLinkName The name of the virtual network link. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 virtual network link to a DNS forwarding ruleset along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String dnsForwardingRulesetName, String virtualNetworkLinkName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets properties of a virtual network link to a DNS forwarding ruleset. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param virtualNetworkLinkName The name of the virtual network link. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 virtual network link to a DNS forwarding ruleset on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String dnsForwardingRulesetName, + String virtualNetworkLinkName) { + return getWithResponseAsync(resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets properties of a virtual network link to a DNS forwarding ruleset. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param virtualNetworkLinkName The name of the virtual network link. + * @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 virtual network link to a DNS forwarding ruleset along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, + String virtualNetworkLinkName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, accept, context); + } + + /** + * Gets properties of a virtual network link to a DNS forwarding ruleset. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param virtualNetworkLinkName The name of the virtual network link. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 virtual network link to a DNS forwarding ruleset. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkLinkInner get(String resourceGroupName, String dnsForwardingRulesetName, + String virtualNetworkLinkName) { + return getWithResponse(resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, Context.NONE) + .getValue(); + } + /** * Creates or updates a virtual network link to a DNS forwarding ruleset. * @@ -233,36 +300,12 @@ Response listNextSync( private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, VirtualNetworkLinkInner 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (virtualNetworkLinkName == null) { - return Mono.error( - new IllegalArgumentException("Parameter virtualNetworkLinkName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, this.client.getApiVersion(), - ifMatch, ifNoneMatch, parameters, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, + ifMatch, ifNoneMatch, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -285,39 +328,11 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, VirtualNetworkLinkInner parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (virtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualNetworkLinkName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, virtualNetworkLinkName, this.client.getApiVersion(), ifMatch, ifNoneMatch, - parameters, accept, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, + ifMatch, ifNoneMatch, contentType, accept, parameters, Context.NONE); } /** @@ -341,39 +356,11 @@ private Response createOrUpdateWithResponse(String resourceGroupName private Response createOrUpdateWithResponse(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, VirtualNetworkLinkInner parameters, String ifMatch, String ifNoneMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (virtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualNetworkLinkName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, virtualNetworkLinkName, this.client.getApiVersion(), ifMatch, ifNoneMatch, - parameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, + ifMatch, ifNoneMatch, contentType, accept, parameters, context); } /** @@ -613,36 +600,12 @@ public VirtualNetworkLinkInner createOrUpdate(String resourceGroupName, String d private Mono>> updateWithResponseAsync(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, VirtualNetworkLinkPatch 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (virtualNetworkLinkName == null) { - return Mono.error( - new IllegalArgumentException("Parameter virtualNetworkLinkName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, this.client.getApiVersion(), - ifMatch, parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, + ifMatch, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -663,39 +626,11 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, VirtualNetworkLinkPatch parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (virtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualNetworkLinkName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, virtualNetworkLinkName, this.client.getApiVersion(), ifMatch, parameters, accept, - Context.NONE); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, + ifMatch, contentType, accept, parameters, Context.NONE); } /** @@ -716,39 +651,11 @@ private Response updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, VirtualNetworkLinkPatch parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (virtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualNetworkLinkName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, virtualNetworkLinkName, this.client.getApiVersion(), ifMatch, parameters, accept, - context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, + ifMatch, contentType, accept, parameters, context); } /** @@ -971,31 +878,10 @@ public VirtualNetworkLinkInner update(String resourceGroupName, String dnsForwar @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (virtualNetworkLinkName == null) { - return Mono.error( - new IllegalArgumentException("Parameter virtualNetworkLinkName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, this.client.getApiVersion(), - ifMatch, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, + ifMatch, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1015,33 +901,9 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, String ifMatch) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (virtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualNetworkLinkName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, virtualNetworkLinkName, this.client.getApiVersion(), ifMatch, accept, - Context.NONE); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, + ifMatch, Context.NONE); } /** @@ -1061,32 +923,9 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (virtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualNetworkLinkName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, virtualNetworkLinkName, this.client.getApiVersion(), ifMatch, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, + ifMatch, context); } /** @@ -1270,129 +1109,6 @@ public void delete(String resourceGroupName, String dnsForwardingRulesetName, St .getFinalResult(); } - /** - * Gets properties of a virtual network link to a DNS forwarding ruleset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param virtualNetworkLinkName The name of the virtual network link. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 virtual network link to a DNS forwarding ruleset along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String dnsForwardingRulesetName, String virtualNetworkLinkName) { - 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (virtualNetworkLinkName == null) { - return Mono.error( - new IllegalArgumentException("Parameter virtualNetworkLinkName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, virtualNetworkLinkName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets properties of a virtual network link to a DNS forwarding ruleset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param virtualNetworkLinkName The name of the virtual network link. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 virtual network link to a DNS forwarding ruleset on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String dnsForwardingRulesetName, - String virtualNetworkLinkName) { - return getWithResponseAsync(resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets properties of a virtual network link to a DNS forwarding ruleset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param virtualNetworkLinkName The name of the virtual network link. - * @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 virtual network link to a DNS forwarding ruleset along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, - String virtualNetworkLinkName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } - if (virtualNetworkLinkName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualNetworkLinkName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, virtualNetworkLinkName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets properties of a virtual network link to a DNS forwarding ruleset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param virtualNetworkLinkName The name of the virtual network link. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 virtual network link to a DNS forwarding ruleset. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkLinkInner get(String resourceGroupName, String dnsForwardingRulesetName, - String virtualNetworkLinkName) { - return getWithResponse(resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, Context.NONE) - .getValue(); - } - /** * Lists virtual network links to a DNS forwarding ruleset. * @@ -1402,32 +1118,16 @@ public VirtualNetworkLinkInner get(String resourceGroupName, String dnsForwardin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual network links along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a VirtualNetworkLink list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String dnsForwardingRulesetName, 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 (dnsForwardingRulesetName == null) { - return Mono.error( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, dnsForwardingRulesetName, this.client.getApiVersion(), top, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsForwardingRulesetName, 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())); @@ -1442,8 +1142,7 @@ private Mono> listSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on virtual network links as paginated response with - * {@link PagedFlux}. + * @return the response of a VirtualNetworkLink list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String dnsForwardingRulesetName, @@ -1460,8 +1159,7 @@ private PagedFlux listAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual network links as paginated response with - * {@link PagedFlux}. + * @return the response of a VirtualNetworkLink list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String dnsForwardingRulesetName) { @@ -1479,34 +1177,15 @@ private PagedFlux listAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual network links along with {@link PagedResponse}. + * @return the response of a VirtualNetworkLink list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String dnsForwardingRulesetName, Integer top) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, this.client.getApiVersion(), top, accept, Context.NONE); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsForwardingRulesetName, top, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1521,34 +1200,15 @@ private PagedResponse listSinglePage(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on virtual network links along with {@link PagedResponse}. + * @return the response of a VirtualNetworkLink list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String dnsForwardingRulesetName, Integer top, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (dnsForwardingRulesetName == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Parameter dnsForwardingRulesetName is required and cannot be null.")); - } final String accept = "application/json"; Response res - = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - dnsForwardingRulesetName, this.client.getApiVersion(), top, accept, context); + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsForwardingRulesetName, top, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1561,8 +1221,7 @@ private PagedResponse listSinglePage(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to an enumeration operation on virtual network links as paginated response with - * {@link PagedIterable}. + * @return the response of a VirtualNetworkLink list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName) { @@ -1581,8 +1240,7 @@ public PagedIterable list(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual network links as paginated response with - * {@link PagedIterable}. + * @return the response of a VirtualNetworkLink list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName, @@ -1598,18 +1256,11 @@ public PagedIterable list(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual network links along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a VirtualNetworkLink list operation 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(), @@ -1624,19 +1275,10 @@ private Mono> listNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual network links along with {@link PagedResponse}. + * @return the response of a VirtualNetworkLink list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1652,25 +1294,14 @@ private PagedResponse listNextSinglePage(String nextLin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 virtual network links along with {@link PagedResponse}. + * @return the response of a VirtualNetworkLink list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkLinksClientImpl.class); } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinksImpl.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinksImpl.java index f0e7ab8a7024..ab263138a065 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinksImpl.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.implementation; @@ -27,16 +27,6 @@ public VirtualNetworkLinksImpl(VirtualNetworkLinksClient innerClient, this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName) { - this.serviceClient().delete(resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName); - } - - public void delete(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, - String ifMatch, Context context) { - this.serviceClient() - .delete(resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, ifMatch, context); - } - public Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, Context context) { Response inner = this.serviceClient() @@ -60,6 +50,16 @@ public VirtualNetworkLink get(String resourceGroupName, String dnsForwardingRule } } + public void delete(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName) { + this.serviceClient().delete(resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName); + } + + public void delete(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, + String ifMatch, Context context) { + this.serviceClient() + .delete(resourceGroupName, dnsForwardingRulesetName, virtualNetworkLinkName, ifMatch, context); + } + public PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, dnsForwardingRulesetName); diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRulesetListResult.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsForwardingRulesetListResult.java similarity index 70% rename from sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRulesetListResult.java rename to sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsForwardingRulesetListResult.java index 34b087d5c437..180715cc5cb7 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRulesetListResult.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsForwardingRulesetListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.dnsresolver.models; +package com.azure.resourcemanager.dnsresolver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * The response to an enumeration operation on DNS forwarding rulesets. + * The response of a DnsForwardingRuleset list operation. */ -@Fluent +@Immutable public final class DnsForwardingRulesetListResult implements JsonSerializable { /* - * Enumeration of the DNS forwarding rulesets. + * The DnsForwardingRuleset items on this page */ private List value; /* - * The continuation token for the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of DnsForwardingRulesetListResult class. */ - public DnsForwardingRulesetListResult() { + private DnsForwardingRulesetListResult() { } /** - * Get the value property: Enumeration of the DNS forwarding rulesets. + * Get the value property: The DnsForwardingRuleset items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: Enumeration of the DNS forwarding rulesets. - * - * @param value the value value to set. - * @return the DnsForwardingRulesetListResult object itself. - */ - public DnsForwardingRulesetListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token for the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +52,6 @@ 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} */ @@ -81,6 +59,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DnsForwardingRulesetListResult 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 DnsForwardingRulesetListResult. */ public static DnsForwardingRulesetListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsResolverDomainListListResult.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsResolverDomainListListResult.java new file mode 100644 index 000000000000..0f6918d0b449 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsResolverDomainListListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.implementation.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.fluent.models.DnsResolverDomainListInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a DnsResolverDomainList list operation. + */ +@Immutable +public final class DnsResolverDomainListListResult implements JsonSerializable { + /* + * The DnsResolverDomainList items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of DnsResolverDomainListListResult class. + */ + private DnsResolverDomainListListResult() { + } + + /** + * Get the value property: The DnsResolverDomainList items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DnsResolverDomainListListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DnsResolverDomainListListResult 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 DnsResolverDomainListListResult. + */ + public static DnsResolverDomainListListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DnsResolverDomainListListResult deserializedDnsResolverDomainListListResult + = new DnsResolverDomainListListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DnsResolverDomainListInner.fromJson(reader1)); + deserializedDnsResolverDomainListListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDnsResolverDomainListListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDnsResolverDomainListListResult; + }); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverListResult.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsResolverListResult.java similarity index 70% rename from sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverListResult.java rename to sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsResolverListResult.java index adf690fd887b..cde499540594 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverListResult.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsResolverListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.dnsresolver.models; +package com.azure.resourcemanager.dnsresolver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * The response to an enumeration operation on DNS resolvers. + * The response of a DnsResolver list operation. */ -@Fluent +@Immutable public final class DnsResolverListResult implements JsonSerializable { /* - * Enumeration of the DNS resolvers. + * The DnsResolver items on this page */ private List value; /* - * The continuation token for the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of DnsResolverListResult class. */ - public DnsResolverListResult() { + private DnsResolverListResult() { } /** - * Get the value property: Enumeration of the DNS resolvers. + * Get the value property: The DnsResolver items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: Enumeration of the DNS resolvers. - * - * @param value the value value to set. - * @return the DnsResolverListResult object itself. - */ - public DnsResolverListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token for the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +52,6 @@ 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} */ @@ -81,6 +59,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DnsResolverListResult 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 DnsResolverListResult. */ public static DnsResolverListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/DnsResolverPolicyListResult.java similarity index 70% rename from sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyListResult.java rename to sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsResolverPolicyListResult.java index 5192919eff41..804a0b5042e3 100644 --- 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/implementation/models/DnsResolverPolicyListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.dnsresolver.models; +package com.azure.resourcemanager.dnsresolver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * The response to an enumeration operation on DNS resolver policies. + * The response of a DnsResolverPolicy list operation. */ -@Fluent +@Immutable public final class DnsResolverPolicyListResult implements JsonSerializable { /* - * Enumeration of the DNS resolver policies. + * The DnsResolverPolicy items on this page */ private List value; /* - * The continuation token for the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of DnsResolverPolicyListResult class. */ - public DnsResolverPolicyListResult() { + private DnsResolverPolicyListResult() { } /** - * Get the value property: Enumeration of the DNS resolver policies. + * Get the value property: The DnsResolverPolicy items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List 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. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +52,6 @@ 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} */ @@ -81,6 +59,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the DnsResolverPolicyListResult. */ public static DnsResolverPolicyListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/DnsResolverPolicyVirtualNetworkLinkListResult.java similarity index 70% rename from sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLinkListResult.java rename to sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsResolverPolicyVirtualNetworkLinkListResult.java index b17e3e8fa7ea..16476ce0903b 100644 --- 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/implementation/models/DnsResolverPolicyVirtualNetworkLinkListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.dnsresolver.models; +package com.azure.resourcemanager.dnsresolver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +14,29 @@ import java.util.List; /** - * The response to an enumeration operation on DNS resolver policy virtual network links. + * The response of a DnsResolverPolicyVirtualNetworkLink list operation. */ -@Fluent +@Immutable public final class DnsResolverPolicyVirtualNetworkLinkListResult implements JsonSerializable { /* - * Enumeration of the DNS resolver policy virtual network links. + * The DnsResolverPolicyVirtualNetworkLink items on this page */ private List value; /* - * The continuation token for the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of DnsResolverPolicyVirtualNetworkLinkListResult class. */ - public DnsResolverPolicyVirtualNetworkLinkListResult() { + private DnsResolverPolicyVirtualNetworkLinkListResult() { } /** - * Get the value property: Enumeration of the DNS resolver policy virtual network links. + * Get the value property: The DnsResolverPolicyVirtualNetworkLink items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List 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. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,17 +53,6 @@ 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} */ @@ -83,6 +60,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -92,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the DnsResolverPolicyVirtualNetworkLinkListResult. */ public static DnsResolverPolicyVirtualNetworkLinkListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/DnsSecurityRuleListResult.java similarity index 69% rename from sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRuleListResult.java rename to sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsSecurityRuleListResult.java index f4df92bf0218..fbf5f8401fab 100644 --- 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/implementation/models/DnsSecurityRuleListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.dnsresolver.models; +package com.azure.resourcemanager.dnsresolver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * The response to an enumeration operation on DNS security rules within a DNS resolver policy. + * The response of a DnsSecurityRule list operation. */ -@Fluent +@Immutable public final class DnsSecurityRuleListResult implements JsonSerializable { /* - * Enumeration of the DNS security rules. + * The DnsSecurityRule items on this page */ private List value; /* - * The continuation token for the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of DnsSecurityRuleListResult class. */ - public DnsSecurityRuleListResult() { + private DnsSecurityRuleListResult() { } /** - * Get the value property: Enumeration of the DNS security rules. + * Get the value property: The DnsSecurityRule items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List 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. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +52,6 @@ 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} */ @@ -81,6 +59,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the DnsSecurityRuleListResult. */ public static DnsSecurityRuleListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRuleListResult.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/ForwardingRuleListResult.java similarity index 69% rename from sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRuleListResult.java rename to sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/ForwardingRuleListResult.java index 54e8aee9274e..e952a9844bd6 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRuleListResult.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/ForwardingRuleListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.dnsresolver.models; +package com.azure.resourcemanager.dnsresolver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * The response to an enumeration operation on forwarding rules within a DNS forwarding ruleset. + * The response of a ForwardingRule list operation. */ -@Fluent +@Immutable public final class ForwardingRuleListResult implements JsonSerializable { /* - * Enumeration of the forwarding rules. + * The ForwardingRule items on this page */ private List value; /* - * The continuation token for the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ForwardingRuleListResult class. */ - public ForwardingRuleListResult() { + private ForwardingRuleListResult() { } /** - * Get the value property: Enumeration of the forwarding rules. + * Get the value property: The ForwardingRule items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: Enumeration of the forwarding rules. - * - * @param value the value value to set. - * @return the ForwardingRuleListResult object itself. - */ - public ForwardingRuleListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token for the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +52,6 @@ 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} */ @@ -81,6 +59,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ForwardingRuleListResult 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 ForwardingRuleListResult. */ public static ForwardingRuleListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpointListResult.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/InboundEndpointListResult.java similarity index 69% rename from sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpointListResult.java rename to sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/InboundEndpointListResult.java index 1cd9d46830fe..d810d286e30b 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpointListResult.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/InboundEndpointListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.dnsresolver.models; +package com.azure.resourcemanager.dnsresolver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * The response to an enumeration operation on inbound endpoints for a DNS resolver. + * The response of a InboundEndpoint list operation. */ -@Fluent +@Immutable public final class InboundEndpointListResult implements JsonSerializable { /* - * Enumeration of the inbound endpoints for a DNS resolver. + * The InboundEndpoint items on this page */ private List value; /* - * The continuation token for the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of InboundEndpointListResult class. */ - public InboundEndpointListResult() { + private InboundEndpointListResult() { } /** - * Get the value property: Enumeration of the inbound endpoints for a DNS resolver. + * Get the value property: The InboundEndpoint items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: Enumeration of the inbound endpoints for a DNS resolver. - * - * @param value the value value to set. - * @return the InboundEndpointListResult object itself. - */ - public InboundEndpointListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token for the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +52,6 @@ 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} */ @@ -81,6 +59,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of InboundEndpointListResult 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 InboundEndpointListResult. */ public static InboundEndpointListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpointListResult.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/OutboundEndpointListResult.java similarity index 69% rename from sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpointListResult.java rename to sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/OutboundEndpointListResult.java index 46f94c4fd33e..c636aa0384b8 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpointListResult.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/OutboundEndpointListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.dnsresolver.models; +package com.azure.resourcemanager.dnsresolver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * The response to an enumeration operation on outbound endpoints for a DNS resolver. + * The response of a OutboundEndpoint list operation. */ -@Fluent +@Immutable public final class OutboundEndpointListResult implements JsonSerializable { /* - * Enumeration of the outbound endpoints for a DNS resolver. + * The OutboundEndpoint items on this page */ private List value; /* - * The continuation token for the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OutboundEndpointListResult class. */ - public OutboundEndpointListResult() { + private OutboundEndpointListResult() { } /** - * Get the value property: Enumeration of the outbound endpoints for a DNS resolver. + * Get the value property: The OutboundEndpoint items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: Enumeration of the outbound endpoints for a DNS resolver. - * - * @param value the value value to set. - * @return the OutboundEndpointListResult object itself. - */ - public OutboundEndpointListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token for the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +52,6 @@ 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} */ @@ -81,6 +59,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OutboundEndpointListResult 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 OutboundEndpointListResult. */ public static OutboundEndpointListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/SubResourceListResult.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/SubResourceListResult.java similarity index 73% rename from sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/SubResourceListResult.java rename to sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/SubResourceListResult.java index 2c3db1260efa..96d54b89eeef 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/SubResourceListResult.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/SubResourceListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.dnsresolver.models; +package com.azure.resourcemanager.dnsresolver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.SubResource; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -16,26 +16,26 @@ /** * The response to an enumeration operation on sub-resources. */ -@Fluent +@Immutable public final class SubResourceListResult implements JsonSerializable { /* - * Enumeration of the sub-resources. + * The SubResource items on this page */ private List value; /* - * The continuation token for the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of SubResourceListResult class. */ - public SubResourceListResult() { + private SubResourceListResult() { } /** - * Get the value property: Enumeration of the sub-resources. + * Get the value property: The SubResource items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: Enumeration of the sub-resources. - * - * @param value the value value to set. - * @return the SubResourceListResult object itself. - */ - public SubResourceListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token for the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,14 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -78,6 +59,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -87,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SubResourceListResult 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 SubResourceListResult. */ public static SubResourceListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkDnsForwardingRulesetListResult.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/VirtualNetworkDnsForwardingRulesetListResult.java similarity index 72% rename from sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkDnsForwardingRulesetListResult.java rename to sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/VirtualNetworkDnsForwardingRulesetListResult.java index 17cc486befec..e7611ee5ca41 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkDnsForwardingRulesetListResult.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/VirtualNetworkDnsForwardingRulesetListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.dnsresolver.models; +package com.azure.resourcemanager.dnsresolver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * The response to an enumeration operation on Virtual Network DNS Forwarding Ruleset. */ -@Fluent +@Immutable public final class VirtualNetworkDnsForwardingRulesetListResult implements JsonSerializable { /* - * Enumeration of the Virtual Network DNS Forwarding Ruleset. + * The VirtualNetworkDnsForwardingRuleset items on this page */ private List value; /* - * The continuation token for the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of VirtualNetworkDnsForwardingRulesetListResult class. */ - public VirtualNetworkDnsForwardingRulesetListResult() { + private VirtualNetworkDnsForwardingRulesetListResult() { } /** - * Get the value property: Enumeration of the Virtual Network DNS Forwarding Ruleset. + * Get the value property: The VirtualNetworkDnsForwardingRuleset items on this page. * * @return the value value. */ @@ -45,18 +45,7 @@ public List value() { } /** - * Set the value property: Enumeration of the Virtual Network DNS Forwarding Ruleset. - * - * @param value the value value to set. - * @return the VirtualNetworkDnsForwardingRulesetListResult object itself. - */ - public VirtualNetworkDnsForwardingRulesetListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token for the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -64,17 +53,6 @@ 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} */ @@ -82,6 +60,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of VirtualNetworkDnsForwardingRulesetListResult 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 VirtualNetworkDnsForwardingRulesetListResult. */ public static VirtualNetworkDnsForwardingRulesetListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLinkListResult.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/VirtualNetworkLinkListResult.java similarity index 70% rename from sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLinkListResult.java rename to sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/VirtualNetworkLinkListResult.java index b7525c2bf169..a366a4ef5639 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLinkListResult.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/VirtualNetworkLinkListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.dnsresolver.models; +package com.azure.resourcemanager.dnsresolver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * The response to an enumeration operation on virtual network links. + * The response of a VirtualNetworkLink list operation. */ -@Fluent +@Immutable public final class VirtualNetworkLinkListResult implements JsonSerializable { /* - * Enumeration of the virtual network links. + * The VirtualNetworkLink items on this page */ private List value; /* - * The continuation token for the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of VirtualNetworkLinkListResult class. */ - public VirtualNetworkLinkListResult() { + private VirtualNetworkLinkListResult() { } /** - * Get the value property: Enumeration of the virtual network links. + * Get the value property: The VirtualNetworkLink items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: Enumeration of the virtual network links. - * - * @param value the value value to set. - * @return the VirtualNetworkLinkListResult object itself. - */ - public VirtualNetworkLinkListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token for the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,17 +52,6 @@ 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} */ @@ -81,6 +59,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -90,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of VirtualNetworkLinkListResult 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 VirtualNetworkLinkListResult. */ public static VirtualNetworkLinkListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/package-info.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/package-info.java index ca00d5c71366..ab19244700f5 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/package-info.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the implementations for DnsResolverManagementClient. - * DNS Resolver Client. + * The DNS Resolver Management Client. */ package com.azure.resourcemanager.dnsresolver.implementation; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/Action.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/Action.java index 6ab20dd58123..9ede9fad908e 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/Action.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/Action.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; 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 index 06314d2db3f1..5aeef69cc987 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; 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..f4e8692d73f1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -52,7 +52,10 @@ public interface DnsForwardingRuleset { Map tags(); /** - * Gets the etag property: ETag of the DNS forwarding ruleset. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRulesetPatch.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRulesetPatch.java index 91ec61a43212..c21b29996fd1 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRulesetPatch.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRulesetPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -78,14 +78,6 @@ public DnsForwardingRulesetPatch withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRulesets.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRulesets.java index 40cacc9ffce5..bc2865d3d5a3 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRulesets.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRulesets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -13,57 +13,57 @@ */ public interface DnsForwardingRulesets { /** - * Deletes a DNS forwarding ruleset. WARNING: This operation cannot be undone. All forwarding rules within the - * ruleset will be deleted. + * Gets a DNS forwarding ruleset properties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DNS forwarding ruleset properties along with {@link Response}. */ - void delete(String resourceGroupName, String dnsForwardingRulesetName); + Response getByResourceGroupWithResponse(String resourceGroupName, + String dnsForwardingRulesetName, Context context); /** - * Deletes a DNS forwarding ruleset. WARNING: This operation cannot be undone. All forwarding rules within the - * ruleset will be deleted. + * Gets a DNS forwarding ruleset properties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @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 a DNS forwarding ruleset properties. */ - void delete(String resourceGroupName, String dnsForwardingRulesetName, String ifMatch, Context context); + DnsForwardingRuleset getByResourceGroup(String resourceGroupName, String dnsForwardingRulesetName); /** - * Gets a DNS forwarding ruleset properties. + * Deletes a DNS forwarding ruleset. WARNING: This operation cannot be undone. All forwarding rules within the + * ruleset will be deleted. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS forwarding ruleset properties along with {@link Response}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, - String dnsForwardingRulesetName, Context context); + void deleteByResourceGroup(String resourceGroupName, String dnsForwardingRulesetName); /** - * Gets a DNS forwarding ruleset properties. + * Deletes a DNS forwarding ruleset. WARNING: This operation cannot be undone. All forwarding rules within the + * ruleset will be deleted. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. + * @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 a DNS forwarding ruleset properties. */ - DnsForwardingRuleset getByResourceGroup(String resourceGroupName, String dnsForwardingRulesetName); + void delete(String resourceGroupName, String dnsForwardingRulesetName, String ifMatch, Context context); /** * Lists DNS forwarding rulesets within a resource group. @@ -72,8 +72,7 @@ Response getByResourceGroupWithResponse(String resourceGro * @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 forwarding rulesets as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -86,8 +85,7 @@ Response getByResourceGroupWithResponse(String resourceGro * @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 forwarding rulesets as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Integer top, Context context); @@ -96,8 +94,7 @@ Response getByResourceGroupWithResponse(String resourceGro * * @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 forwarding rulesets as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -109,8 +106,7 @@ Response getByResourceGroupWithResponse(String resourceGro * @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 forwarding rulesets as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsForwardingRuleset list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Integer top, Context context); @@ -118,7 +114,7 @@ Response getByResourceGroupWithResponse(String resourceGro * Lists DNS forwarding ruleset resource IDs attached 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -132,7 +128,7 @@ PagedIterable listByVirtualNetwork(String re * Lists DNS forwarding ruleset resource IDs attached 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 virtualNetworkName The name of the VirtualNetwork. * @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. 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..6ec65827c600 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -51,7 +51,10 @@ public interface DnsResolver { Map tags(); /** - * Gets the etag property: ETag of the DNS resolver. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag 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 index 87be460df184..4c5a09c2ef67 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -51,7 +51,10 @@ public interface DnsResolverDomainList { Map tags(); /** - * Gets the etag property: ETag of the DNS resolver domain list. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -348,7 +351,7 @@ interface WithIfMatch { * @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. + * @return the response. */ DnsResolverDomainList bulk(DnsResolverDomainListBulk parameters); @@ -364,7 +367,7 @@ interface WithIfMatch { * @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. + * @return the response. */ DnsResolverDomainList bulk(DnsResolverDomainListBulk parameters, String ifMatch, String ifNoneMatch, Context context); diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainListBulk.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainListBulk.java index fffe2f7d05b8..cbbcda7ca62a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainListBulk.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainListBulk.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.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; @@ -86,23 +85,6 @@ public DnsResolverDomainListBulk withAction(Action action) { return this; } - /** - * 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 DnsResolverDomainListBulk")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DnsResolverDomainListBulk.class); - /** * {@inheritDoc} */ 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 index 50bb4b1d04e3..af70d50ab251 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -87,17 +87,6 @@ public DnsResolverDomainListPatch withDomains(List domains) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 index f04511aae908..6aa88131391b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -13,55 +13,55 @@ */ public interface DnsResolverDomainLists { /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. + * 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}. */ - void delete(String resourceGroupName, String dnsResolverDomainListName); + Response getByResourceGroupWithResponse(String resourceGroupName, + String dnsResolverDomainListName, Context context); /** - * Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. + * 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 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 properties of a DNS resolver domain list. */ - void delete(String resourceGroupName, String dnsResolverDomainListName, String ifMatch, Context context); + DnsResolverDomainList getByResourceGroup(String resourceGroupName, String dnsResolverDomainListName); /** - * Gets properties of a DNS resolver domain list. + * 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 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); + void deleteByResourceGroup(String resourceGroupName, String dnsResolverDomainListName); /** - * Gets properties of a DNS resolver domain list. + * 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 properties of a DNS resolver domain list. */ - DnsResolverDomainList getByResourceGroup(String resourceGroupName, String dnsResolverDomainListName); + void delete(String resourceGroupName, String dnsResolverDomainListName, String ifMatch, Context context); /** * Lists DNS resolver domain lists within a resource group. @@ -70,8 +70,7 @@ Response getByResourceGroupWithResponse(String resourceGr * @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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -84,8 +83,7 @@ Response getByResourceGroupWithResponse(String resourceGr * @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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Integer top, Context context); @@ -94,8 +92,7 @@ Response getByResourceGroupWithResponse(String resourceGr * * @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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -107,8 +104,7 @@ Response getByResourceGroupWithResponse(String resourceGr * @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}. + * @return the response of a DnsResolverDomainList list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Integer top, Context context); @@ -121,7 +117,7 @@ Response getByResourceGroupWithResponse(String resourceGr * @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. + * @return the response. */ DnsResolverDomainList bulk(String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListBulk parameters); @@ -140,7 +136,7 @@ DnsResolverDomainList bulk(String resourceGroupName, String dnsResolverDomainLis * @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. + * @return the response. */ DnsResolverDomainList bulk(String resourceGroupName, String dnsResolverDomainListName, DnsResolverDomainListBulk parameters, String ifMatch, String ifNoneMatch, Context context); diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPatch.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPatch.java index 358625f5fbd5..c273669c12ea 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPatch.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -48,14 +48,6 @@ public DnsResolverPatch withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index 69c273c124ce..a532dd8252a4 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -14,55 +14,55 @@ */ public interface DnsResolverPolicies { /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. + * 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}. */ - void delete(String resourceGroupName, String dnsResolverPolicyName); + Response getByResourceGroupWithResponse(String resourceGroupName, String dnsResolverPolicyName, + Context context); /** - * Deletes a DNS resolver policy. WARNING: This operation cannot be undone. + * 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 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 properties of a DNS resolver policy. */ - void delete(String resourceGroupName, String dnsResolverPolicyName, String ifMatch, Context context); + DnsResolverPolicy getByResourceGroup(String resourceGroupName, String dnsResolverPolicyName); /** - * Gets properties of a DNS resolver policy. + * 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 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); + void deleteByResourceGroup(String resourceGroupName, String dnsResolverPolicyName); /** - * Gets properties of a DNS resolver policy. + * 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 properties of a DNS resolver policy. */ - DnsResolverPolicy getByResourceGroup(String resourceGroupName, String dnsResolverPolicyName); + void delete(String resourceGroupName, String dnsResolverPolicyName, String ifMatch, Context context); /** * Lists DNS resolver policies within a resource group. @@ -71,8 +71,7 @@ Response getByResourceGroupWithResponse(String resourceGroupN * @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}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -85,8 +84,7 @@ Response getByResourceGroupWithResponse(String resourceGroupN * @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}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Integer top, Context context); @@ -95,8 +93,7 @@ Response getByResourceGroupWithResponse(String resourceGroupN * * @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}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -108,8 +105,7 @@ Response getByResourceGroupWithResponse(String resourceGroupN * @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}. + * @return the response of a DnsResolverPolicy list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Integer top, Context context); @@ -117,7 +113,7 @@ Response getByResourceGroupWithResponse(String resourceGroupN * 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -130,7 +126,7 @@ Response getByResourceGroupWithResponse(String resourceGroupN * 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 virtualNetworkName The name of the VirtualNetwork. * @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. 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 index 10759d53bd18..1190b398b232 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -50,7 +50,10 @@ public interface DnsResolverPolicy { Map tags(); /** - * Gets the etag property: ETag of the DNS resolver policy. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ 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 index 4a400ebcf128..49416b0100a2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -48,14 +48,6 @@ public DnsResolverPolicyPatch withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index 249d197dffcf..77e193cdd6e6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -51,7 +51,10 @@ public interface DnsResolverPolicyVirtualNetworkLink { Map tags(); /** - * Gets the etag property: ETag of the DNS resolver policy virtual network link. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ 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 index 5a6fdc9a899b..7b890ee80f6b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -49,14 +49,6 @@ public DnsResolverPolicyVirtualNetworkLinkPatch withTags(Map tag return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index 7b76e023143c..b98968f279dd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -13,65 +13,65 @@ */ public interface DnsResolverPolicyVirtualNetworkLinks { /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. + * 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}. */ - void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName); + Response getWithResponse(String resourceGroupName, + String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, Context context); /** - * Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. + * 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 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 properties of a DNS resolver policy virtual network link. */ - void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, - String ifMatch, Context context); + DnsResolverPolicyVirtualNetworkLink get(String resourceGroupName, String dnsResolverPolicyName, + String dnsResolverPolicyVirtualNetworkLinkName); /** - * Gets properties of a DNS resolver policy virtual network link. + * 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 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); + void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName); /** - * Gets properties of a DNS resolver policy virtual network link. + * 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 properties of a DNS resolver policy virtual network link. */ - DnsResolverPolicyVirtualNetworkLink get(String resourceGroupName, String dnsResolverPolicyName, - String dnsResolverPolicyVirtualNetworkLinkName); + void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsResolverPolicyVirtualNetworkLinkName, + String ifMatch, Context context); /** * Lists DNS resolver policy virtual network links. @@ -81,8 +81,8 @@ DnsResolverPolicyVirtualNetworkLink get(String resourceGroupName, String dnsReso * @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}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String dnsResolverPolicyName); @@ -96,8 +96,8 @@ DnsResolverPolicyVirtualNetworkLink get(String resourceGroupName, String dnsReso * @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}. + * @return the response of a DnsResolverPolicyVirtualNetworkLink list operation as paginated response with + * {@link PagedIterable}. */ 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/models/DnsResolverState.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverState.java index 0ac5edf9cd1b..f6ad11493c48 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverState.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolvers.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolvers.java index acfc55d866d0..2b83cb2a7583 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolvers.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolvers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -14,55 +14,55 @@ */ public interface DnsResolvers { /** - * Deletes a DNS resolver. WARNING: This operation cannot be undone. + * Gets properties of a DNS resolver. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsResolverName The name of the DNS resolver. + * @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 along with {@link Response}. */ - void delete(String resourceGroupName, String dnsResolverName); + Response getByResourceGroupWithResponse(String resourceGroupName, String dnsResolverName, + Context context); /** - * Deletes a DNS resolver. WARNING: This operation cannot be undone. + * Gets properties of a DNS resolver. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsResolverName The name of the DNS resolver. - * @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 properties of a DNS resolver. */ - void delete(String resourceGroupName, String dnsResolverName, String ifMatch, Context context); + DnsResolver getByResourceGroup(String resourceGroupName, String dnsResolverName); /** - * Gets properties of a DNS resolver. + * Deletes a DNS resolver. WARNING: This operation cannot be undone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsResolverName The name of the DNS resolver. - * @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 along with {@link Response}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String dnsResolverName, - Context context); + void deleteByResourceGroup(String resourceGroupName, String dnsResolverName); /** - * Gets properties of a DNS resolver. + * Deletes a DNS resolver. WARNING: This operation cannot be undone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsResolverName The name of the DNS resolver. + * @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 properties of a DNS resolver. */ - DnsResolver getByResourceGroup(String resourceGroupName, String dnsResolverName); + void delete(String resourceGroupName, String dnsResolverName, String ifMatch, Context context); /** * Lists DNS resolvers within a resource group. @@ -71,8 +71,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * @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 resolvers as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -85,8 +84,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * @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 resolvers as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Integer top, Context context); @@ -95,8 +93,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * * @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 resolvers as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -108,8 +105,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * @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 resolvers as paginated response with - * {@link PagedIterable}. + * @return the response of a DnsResolver list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Integer top, Context context); @@ -117,7 +113,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * Lists DNS resolver 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 virtualNetworkName The name of the VirtualNetwork. * @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. @@ -130,7 +126,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, S * Lists DNS resolver 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 virtualNetworkName The name of the VirtualNetwork. * @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. 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 index 07565c484c4b..0cdc5fa2bfdb 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -52,7 +52,10 @@ public interface DnsSecurityRule { Map tags(); /** - * Gets the etag property: ETag of the DNS security rule. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ @@ -87,6 +90,13 @@ public interface DnsSecurityRule { */ List dnsResolverDomainLists(); + /** + * Gets the managedDomainLists property: Managed domain lists that the DNS security rule applies to. + * + * @return the managedDomainLists value. + */ + List managedDomainLists(); + /** * Gets the dnsSecurityRuleState property: The state of DNS security rule. * @@ -133,9 +143,9 @@ public interface DnsSecurityRule { /** * The entirety of the DnsSecurityRule definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithPriority, DefinitionStages.WithAction, - DefinitionStages.WithDnsResolverDomainLists, DefinitionStages.WithCreate { + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithParentResource, + DefinitionStages.WithPriority, DefinitionStages.WithAction, DefinitionStages.WithCreate { } /** @@ -206,28 +216,15 @@ interface WithAction { * @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); + WithCreate withAction(DnsSecurityRuleAction action); } /** * 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, + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithDnsResolverDomainLists, + DefinitionStages.WithManagedDomainLists, DefinitionStages.WithDnsSecurityRuleState, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { /** * Executes the create request. @@ -258,6 +255,33 @@ interface WithTags { WithCreate withTags(Map tags); } + /** + * 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 allowing to specify managedDomainLists. + */ + interface WithManagedDomainLists { + /** + * Specifies the managedDomainLists property: Managed domain lists that the DNS security rule applies to.. + * + * @param managedDomainLists Managed domain lists that the DNS security rule applies to. + * @return the next definition stage. + */ + WithCreate withManagedDomainLists(List managedDomainLists); + } + /** * The stage of the DnsSecurityRule definition allowing to specify dnsSecurityRuleState. */ @@ -313,7 +337,8 @@ interface WithIfNoneMatch { * The template for DnsSecurityRule update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithAction, UpdateStages.WithDnsResolverDomainLists, - UpdateStages.WithDnsSecurityRuleState, UpdateStages.WithPriority, UpdateStages.WithIfMatch { + UpdateStages.WithManagedDomainLists, UpdateStages.WithDnsSecurityRuleState, UpdateStages.WithPriority, + UpdateStages.WithIfMatch { /** * Executes the update request. * @@ -374,6 +399,19 @@ interface WithDnsResolverDomainLists { Update withDnsResolverDomainLists(List dnsResolverDomainLists); } + /** + * The stage of the DnsSecurityRule update allowing to specify managedDomainLists. + */ + interface WithManagedDomainLists { + /** + * Specifies the managedDomainLists property: Managed domain lists that the DNS security rule applies to.. + * + * @param managedDomainLists Managed domain lists that the DNS security rule applies to. + * @return the next definition stage. + */ + Update withManagedDomainLists(List managedDomainLists); + } + /** * The stage of the DnsSecurityRule update allowing to specify dnsSecurityRuleState. */ 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 index bedfbfc8df81..5ce4a911a170 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -47,14 +47,6 @@ public DnsSecurityRuleAction withActionType(ActionType actionType) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index b4595b9020cf..11a017e4deeb 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -111,6 +111,29 @@ public DnsSecurityRulePatch withDnsResolverDomainLists(List dnsReso return this; } + /** + * Get the managedDomainLists property: Managed domain lists that the DNS security rule applies to. + * + * @return the managedDomainLists value. + */ + public List managedDomainLists() { + return this.innerProperties() == null ? null : this.innerProperties().managedDomainLists(); + } + + /** + * Set the managedDomainLists property: Managed domain lists that the DNS security rule applies to. + * + * @param managedDomainLists the managedDomainLists value to set. + * @return the DnsSecurityRulePatch object itself. + */ + public DnsSecurityRulePatch withManagedDomainLists(List managedDomainLists) { + if (this.innerProperties() == null) { + this.innerProperties = new DnsSecurityRulePatchProperties(); + } + this.innerProperties().withManagedDomainLists(managedDomainLists); + return this; + } + /** * Get the dnsSecurityRuleState property: The state of DNS security rule. * @@ -157,17 +180,6 @@ public DnsSecurityRulePatch withPriority(Integer priority) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 index 6f2f82ce8462..a40b600f1fac 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; 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 index 51a36ea7cdd0..4f4c02601073 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -13,60 +13,60 @@ */ public interface DnsSecurityRules { /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. + * 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}. */ - void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName); + Response getWithResponse(String resourceGroupName, String dnsResolverPolicyName, + String dnsSecurityRuleName, Context context); /** - * Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. + * 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 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 properties of a DNS security rule for a DNS resolver policy. */ - void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, String ifMatch, - Context context); + DnsSecurityRule get(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName); /** - * Gets properties of a DNS security rule for a DNS resolver policy. + * 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 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); + void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName); /** - * Gets properties of a DNS security rule for a DNS resolver policy. + * 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 properties of a DNS security rule for a DNS resolver policy. */ - DnsSecurityRule get(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName); + void delete(String resourceGroupName, String dnsResolverPolicyName, String dnsSecurityRuleName, String ifMatch, + Context context); /** * Lists DNS security rules for a DNS resolver policy. @@ -76,8 +76,7 @@ Response getWithResponse(String resourceGroupName, String dnsRe * @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}. + * @return the response of a DnsSecurityRule list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String dnsResolverPolicyName); @@ -91,8 +90,7 @@ Response getWithResponse(String resourceGroupName, String dnsRe * @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}. + * @return the response of a DnsSecurityRule list operation as paginated response with {@link PagedIterable}. */ 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/models/ForwardingRule.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRule.java index d11e38deaeed..759a57f54ccb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -36,7 +36,10 @@ public interface ForwardingRule { String type(); /** - * Gets the etag property: ETag of the forwarding rule. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRulePatch.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRulePatch.java index 8dd6018e298c..a4cb4c0ca4e4 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRulePatch.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRulePatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -108,17 +108,6 @@ public ForwardingRulePatch withForwardingRuleState(ForwardingRuleState forwardin return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRuleState.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRuleState.java index 23b377bce4f9..6472d3b216d9 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRuleState.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRuleState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRules.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRules.java index 2f76fcc70585..6a992d6f074b 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRules.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRules.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -13,24 +13,22 @@ */ public interface ForwardingRules { /** - * Deletes a forwarding rule in a DNS forwarding ruleset. WARNING: This operation cannot be undone. + * Gets properties of a forwarding rule in a DNS forwarding ruleset. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. * @param forwardingRuleName The name of the forwarding 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 Response}. + * @return properties of a forwarding rule in a DNS forwarding ruleset along with {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String dnsForwardingRulesetName, - String forwardingRuleName, String ifMatch, Context context); + Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, + String forwardingRuleName, Context context); /** - * Deletes a forwarding rule in a DNS forwarding ruleset. WARNING: This operation cannot be undone. + * Gets properties of a forwarding rule in a DNS forwarding ruleset. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. @@ -38,26 +36,29 @@ Response deleteWithResponse(String resourceGroupName, String dnsForwarding * @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 forwarding rule in a DNS forwarding ruleset. */ - void delete(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName); + ForwardingRule get(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName); /** - * Gets properties of a forwarding rule in a DNS forwarding ruleset. + * Deletes a forwarding rule in a DNS forwarding ruleset. WARNING: This operation cannot be undone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. * @param forwardingRuleName The name of the forwarding 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 properties of a forwarding rule in a DNS forwarding ruleset along with {@link Response}. + * @return the {@link Response}. */ - Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, - String forwardingRuleName, Context context); + Response deleteWithResponse(String resourceGroupName, String dnsForwardingRulesetName, + String forwardingRuleName, String ifMatch, Context context); /** - * Gets properties of a forwarding rule in a DNS forwarding ruleset. + * Deletes a forwarding rule in a DNS forwarding ruleset. WARNING: This operation cannot be undone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. @@ -65,9 +66,8 @@ Response getWithResponse(String resourceGroupName, String dnsFor * @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 forwarding rule in a DNS forwarding ruleset. */ - ForwardingRule get(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName); + void delete(String resourceGroupName, String dnsForwardingRulesetName, String forwardingRuleName); /** * Lists forwarding rules in a DNS forwarding ruleset. @@ -77,8 +77,7 @@ Response getWithResponse(String resourceGroupName, String dnsFor * @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 forwarding rules within a DNS forwarding ruleset as paginated - * response with {@link PagedIterable}. + * @return the response of a ForwardingRule list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName); @@ -92,8 +91,7 @@ Response getWithResponse(String resourceGroupName, String dnsFor * @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 forwarding rules within a DNS forwarding ruleset as paginated - * response with {@link PagedIterable}. + * @return the response of a ForwardingRule list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName, Integer top, Context context); 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..bc3d5a61c9a7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -51,7 +51,10 @@ public interface InboundEndpoint { Map tags(); /** - * Gets the etag property: ETag of the inbound endpoint. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpointPatch.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpointPatch.java index fcbb74f26abc..6d8ea7b7a3b9 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpointPatch.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpointPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -48,14 +48,6 @@ public InboundEndpointPatch withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpoints.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpoints.java index 38a117ac6a5b..0286bc28b813 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpoints.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpoints.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -13,60 +13,60 @@ */ public interface InboundEndpoints { /** - * Deletes an inbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. + * Gets properties of an inbound endpoint for a DNS resolver. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsResolverName The name of the DNS resolver. * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. + * @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 an inbound endpoint for a DNS resolver along with {@link Response}. */ - void delete(String resourceGroupName, String dnsResolverName, String inboundEndpointName); + Response getWithResponse(String resourceGroupName, String dnsResolverName, + String inboundEndpointName, Context context); /** - * Deletes an inbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. + * Gets properties of an inbound endpoint for a DNS resolver. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsResolverName The name of the DNS resolver. * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. - * @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 properties of an inbound endpoint for a DNS resolver. */ - void delete(String resourceGroupName, String dnsResolverName, String inboundEndpointName, String ifMatch, - Context context); + InboundEndpoint get(String resourceGroupName, String dnsResolverName, String inboundEndpointName); /** - * Gets properties of an inbound endpoint for a DNS resolver. + * Deletes an inbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsResolverName The name of the DNS resolver. * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. - * @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 an inbound endpoint for a DNS resolver along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String dnsResolverName, - String inboundEndpointName, Context context); + void delete(String resourceGroupName, String dnsResolverName, String inboundEndpointName); /** - * Gets properties of an inbound endpoint for a DNS resolver. + * Deletes an inbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsResolverName The name of the DNS resolver. * @param inboundEndpointName The name of the inbound endpoint for the DNS resolver. + * @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 properties of an inbound endpoint for a DNS resolver. */ - InboundEndpoint get(String resourceGroupName, String dnsResolverName, String inboundEndpointName); + void delete(String resourceGroupName, String dnsResolverName, String inboundEndpointName, String ifMatch, + Context context); /** * Lists inbound endpoints for a DNS resolver. @@ -76,8 +76,7 @@ Response getWithResponse(String resourceGroupName, String dnsRe * @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 inbound endpoints for a DNS resolver as paginated response - * with {@link PagedIterable}. + * @return the response of a InboundEndpoint list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String dnsResolverName); @@ -91,8 +90,7 @@ Response getWithResponse(String resourceGroupName, String dnsRe * @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 inbound endpoints for a DNS resolver as paginated response - * with {@link PagedIterable}. + * @return the response of a InboundEndpoint list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String dnsResolverName, Integer top, Context context); diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/IpAllocationMethod.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/IpAllocationMethod.java index f6bd91da0db3..3239f5c6f63a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/IpAllocationMethod.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/IpAllocationMethod.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/IpConfiguration.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/IpConfiguration.java index d975c181dc46..69ffd38eea1a 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/IpConfiguration.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/IpConfiguration.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.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; @@ -99,20 +98,6 @@ public IpConfiguration withPrivateIpAllocationMethod(IpAllocationMethod privateI return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (subnet() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property subnet in model IpConfiguration")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpConfiguration.class); - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ManagedDomainList.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ManagedDomainList.java new file mode 100644 index 000000000000..efae6c69f01d --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ManagedDomainList.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Describes Managed Domain List options for DNS security rules. + */ +public final class ManagedDomainList extends ExpandableStringEnum { + /** + * Domain list managed by Azure DNS Threat Intelligence. + */ + public static final ManagedDomainList AZURE_DNS_THREAT_INTEL = fromString("AzureDnsThreatIntel"); + + /** + * Creates a new instance of ManagedDomainList value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedDomainList() { + } + + /** + * Creates or finds a ManagedDomainList from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedDomainList. + */ + public static ManagedDomainList fromString(String name) { + return fromString(name, ManagedDomainList.class); + } + + /** + * Gets known ManagedDomainList values. + * + * @return known ManagedDomainList values. + */ + public static Collection values() { + return values(ManagedDomainList.class); + } +} 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..99150bd69e3b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -51,7 +51,10 @@ public interface OutboundEndpoint { Map tags(); /** - * Gets the etag property: ETag of the outbound endpoint. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpointPatch.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpointPatch.java index a6c821a2b5f5..9fe7ec2e3013 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpointPatch.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpointPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -48,14 +48,6 @@ public OutboundEndpointPatch withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpoints.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpoints.java index cc5a84a7fd80..77b394f1b506 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpoints.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpoints.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -13,60 +13,60 @@ */ public interface OutboundEndpoints { /** - * Deletes an outbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. + * Gets properties of an outbound endpoint for a DNS resolver. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsResolverName The name of the DNS resolver. * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. + * @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 an outbound endpoint for a DNS resolver along with {@link Response}. */ - void delete(String resourceGroupName, String dnsResolverName, String outboundEndpointName); + Response getWithResponse(String resourceGroupName, String dnsResolverName, + String outboundEndpointName, Context context); /** - * Deletes an outbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. + * Gets properties of an outbound endpoint for a DNS resolver. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsResolverName The name of the DNS resolver. * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. - * @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 properties of an outbound endpoint for a DNS resolver. */ - void delete(String resourceGroupName, String dnsResolverName, String outboundEndpointName, String ifMatch, - Context context); + OutboundEndpoint get(String resourceGroupName, String dnsResolverName, String outboundEndpointName); /** - * Gets properties of an outbound endpoint for a DNS resolver. + * Deletes an outbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsResolverName The name of the DNS resolver. * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. - * @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 an outbound endpoint for a DNS resolver along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String dnsResolverName, - String outboundEndpointName, Context context); + void delete(String resourceGroupName, String dnsResolverName, String outboundEndpointName); /** - * Gets properties of an outbound endpoint for a DNS resolver. + * Deletes an outbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsResolverName The name of the DNS resolver. * @param outboundEndpointName The name of the outbound endpoint for the DNS resolver. + * @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 properties of an outbound endpoint for a DNS resolver. */ - OutboundEndpoint get(String resourceGroupName, String dnsResolverName, String outboundEndpointName); + void delete(String resourceGroupName, String dnsResolverName, String outboundEndpointName, String ifMatch, + Context context); /** * Lists outbound endpoints for a DNS resolver. @@ -76,8 +76,7 @@ Response getWithResponse(String resourceGroupName, String dnsR * @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 outbound endpoints for a DNS resolver as paginated response - * with {@link PagedIterable}. + * @return the response of a OutboundEndpoint list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String dnsResolverName); @@ -91,8 +90,7 @@ Response getWithResponse(String resourceGroupName, String dnsR * @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 outbound endpoints for a DNS resolver as paginated response - * with {@link PagedIterable}. + * @return the response of a OutboundEndpoint list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String dnsResolverName, Integer top, Context context); diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ProvisioningState.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ProvisioningState.java index eb40c2ad30b3..098e31101cba 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ProvisioningState.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/TargetDnsServer.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/TargetDnsServer.java index d62a45457f76..5b718f989764 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/TargetDnsServer.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/TargetDnsServer.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.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; @@ -73,20 +72,6 @@ public TargetDnsServer withPort(Integer port) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipAddress() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property ipAddress in model TargetDnsServer")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TargetDnsServer.class); - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkDnsForwardingRuleset.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkDnsForwardingRuleset.java index 59e833c199fc..6d2043876459 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkDnsForwardingRuleset.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkDnsForwardingRuleset.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; 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..898b6f227809 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -36,7 +36,10 @@ public interface VirtualNetworkLink { String type(); /** - * Gets the etag property: ETag of the virtual network link. + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). * * @return the etag value. */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLinkPatch.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLinkPatch.java index f444459907e7..9f70a20cdc95 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLinkPatch.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLinkPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -61,17 +61,6 @@ public VirtualNetworkLinkPatch withMetadata(Map metadata) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLinks.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLinks.java index 50fc8480173a..d97bf9776a86 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLinks.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLinks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.models; @@ -13,60 +13,60 @@ */ public interface VirtualNetworkLinks { /** - * Deletes a virtual network link to a DNS forwarding ruleset. WARNING: This operation cannot be undone. + * Gets properties of a virtual network link to a DNS forwarding ruleset. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. * @param virtualNetworkLinkName The name of the virtual network link. + * @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 virtual network link to a DNS forwarding ruleset along with {@link Response}. */ - void delete(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName); + Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, + String virtualNetworkLinkName, Context context); /** - * Deletes a virtual network link to a DNS forwarding ruleset. WARNING: This operation cannot be undone. + * Gets properties of a virtual network link to a DNS forwarding ruleset. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. * @param virtualNetworkLinkName The name of the virtual network link. - * @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 properties of a virtual network link to a DNS forwarding ruleset. */ - void delete(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, - String ifMatch, Context context); + VirtualNetworkLink get(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName); /** - * Gets properties of a virtual network link to a DNS forwarding ruleset. + * Deletes a virtual network link to a DNS forwarding ruleset. WARNING: This operation cannot be undone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. * @param virtualNetworkLinkName The name of the virtual network link. - * @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 virtual network link to a DNS forwarding ruleset along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String dnsForwardingRulesetName, - String virtualNetworkLinkName, Context context); + void delete(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName); /** - * Gets properties of a virtual network link to a DNS forwarding ruleset. + * Deletes a virtual network link to a DNS forwarding ruleset. WARNING: This operation cannot be undone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset. * @param virtualNetworkLinkName The name of the virtual network link. + * @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 properties of a virtual network link to a DNS forwarding ruleset. */ - VirtualNetworkLink get(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName); + void delete(String resourceGroupName, String dnsForwardingRulesetName, String virtualNetworkLinkName, + String ifMatch, Context context); /** * Lists virtual network links to a DNS forwarding ruleset. @@ -76,8 +76,7 @@ Response getWithResponse(String resourceGroupName, String dn * @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 virtual network links as paginated response with - * {@link PagedIterable}. + * @return the response of a VirtualNetworkLink list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName); @@ -91,8 +90,7 @@ Response getWithResponse(String resourceGroupName, String dn * @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 virtual network links as paginated response with - * {@link PagedIterable}. + * @return the response of a VirtualNetworkLink list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String dnsForwardingRulesetName, Integer top, Context context); diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/package-info.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/package-info.java index 3e35291707aa..2ceefed8dc24 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/package-info.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the data models for DnsResolverManagementClient. - * DNS Resolver Client. + * The DNS Resolver Management Client. */ package com.azure.resourcemanager.dnsresolver.models; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/package-info.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/package-info.java index 9afbf6b3b025..4c77b4fa9758 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/package-info.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the classes for DnsResolverManagementClient. - * DNS Resolver Client. + * The DNS Resolver Management Client. */ package com.azure.resourcemanager.dnsresolver; diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/module-info.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/module-info.java index f5fbe47af7ad..f06b6cd04c69 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/module-info.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.dnsresolver { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.dnsresolver.fluent.models to com.azure.core; opens com.azure.resourcemanager.dnsresolver.models to com.azure.core; + opens com.azure.resourcemanager.dnsresolver.implementation.models to com.azure.core; } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/resources/META-INF/azure-resourcemanager-dnsresolver_apiview_properties.json b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/resources/META-INF/azure-resourcemanager-dnsresolver_apiview_properties.json new file mode 100644 index 000000000000..250673294a51 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/resources/META-INF/azure-resourcemanager-dnsresolver_apiview_properties.json @@ -0,0 +1,177 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient": "Microsoft.Network.DnsForwardingRulesets", + "com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.beginCreateOrUpdate": "Microsoft.Network.DnsForwardingRulesets.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.beginDelete": "Microsoft.Network.DnsForwardingRulesets.delete", + "com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.beginUpdate": "Microsoft.Network.DnsForwardingRulesets.update", + "com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.createOrUpdate": "Microsoft.Network.DnsForwardingRulesets.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.delete": "Microsoft.Network.DnsForwardingRulesets.delete", + "com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.getByResourceGroup": "Microsoft.Network.DnsForwardingRulesets.get", + "com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.getByResourceGroupWithResponse": "Microsoft.Network.DnsForwardingRulesets.get", + "com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.list": "Microsoft.Network.DnsForwardingRulesets.list", + "com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.listByResourceGroup": "Microsoft.Network.DnsForwardingRulesets.listByResourceGroup", + "com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.listByVirtualNetwork": "Microsoft.Network.DnsForwardingRulesetsOperationGroup.listByVirtualNetwork", + "com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.update": "Microsoft.Network.DnsForwardingRulesets.update", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient": "Microsoft.Network.DnsResolverDomainLists", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.beginBulk": "Microsoft.Network.DnsResolverDomainLists.bulk", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.beginCreateOrUpdate": "Microsoft.Network.DnsResolverDomainLists.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.beginDelete": "Microsoft.Network.DnsResolverDomainLists.delete", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.beginUpdate": "Microsoft.Network.DnsResolverDomainLists.update", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.bulk": "Microsoft.Network.DnsResolverDomainLists.bulk", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.createOrUpdate": "Microsoft.Network.DnsResolverDomainLists.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.delete": "Microsoft.Network.DnsResolverDomainLists.delete", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.getByResourceGroup": "Microsoft.Network.DnsResolverDomainLists.get", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.getByResourceGroupWithResponse": "Microsoft.Network.DnsResolverDomainLists.get", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.list": "Microsoft.Network.DnsResolverDomainLists.list", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.listByResourceGroup": "Microsoft.Network.DnsResolverDomainLists.listByResourceGroup", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.update": "Microsoft.Network.DnsResolverDomainLists.update", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverManagementClient": "Microsoft.Network", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient": "Microsoft.Network.DnsResolverPolicies", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.beginCreateOrUpdate": "Microsoft.Network.DnsResolverPolicies.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.beginDelete": "Microsoft.Network.DnsResolverPolicies.delete", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.beginUpdate": "Microsoft.Network.DnsResolverPolicies.update", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.createOrUpdate": "Microsoft.Network.DnsResolverPolicies.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.delete": "Microsoft.Network.DnsResolverPolicies.delete", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.getByResourceGroup": "Microsoft.Network.DnsResolverPolicies.get", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.getByResourceGroupWithResponse": "Microsoft.Network.DnsResolverPolicies.get", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.list": "Microsoft.Network.DnsResolverPolicies.list", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.listByResourceGroup": "Microsoft.Network.DnsResolverPolicies.listByResourceGroup", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.listByVirtualNetwork": "Microsoft.Network.DnsResolverPoliciesOperationGroup.listByVirtualNetwork", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.update": "Microsoft.Network.DnsResolverPolicies.update", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient": "Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.beginCreateOrUpdate": "Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.beginDelete": "Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.delete", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.beginUpdate": "Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.update", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.createOrUpdate": "Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.delete": "Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.delete", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.get": "Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.get", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.getWithResponse": "Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.get", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.list": "Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.list", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.update": "Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.update", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient": "Microsoft.Network.DnsResolvers", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.beginCreateOrUpdate": "Microsoft.Network.DnsResolvers.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.beginDelete": "Microsoft.Network.DnsResolvers.delete", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.beginUpdate": "Microsoft.Network.DnsResolvers.update", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.createOrUpdate": "Microsoft.Network.DnsResolvers.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.delete": "Microsoft.Network.DnsResolvers.delete", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.getByResourceGroup": "Microsoft.Network.DnsResolvers.get", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.getByResourceGroupWithResponse": "Microsoft.Network.DnsResolvers.get", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.list": "Microsoft.Network.DnsResolvers.list", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.listByResourceGroup": "Microsoft.Network.DnsResolvers.listByResourceGroup", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.listByVirtualNetwork": "Microsoft.Network.DnsResolversOperationGroup.listByVirtualNetwork", + "com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.update": "Microsoft.Network.DnsResolvers.update", + "com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient": "Microsoft.Network.DnsSecurityRules", + "com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.beginCreateOrUpdate": "Microsoft.Network.DnsSecurityRules.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.beginDelete": "Microsoft.Network.DnsSecurityRules.delete", + "com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.beginUpdate": "Microsoft.Network.DnsSecurityRules.update", + "com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.createOrUpdate": "Microsoft.Network.DnsSecurityRules.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.delete": "Microsoft.Network.DnsSecurityRules.delete", + "com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.get": "Microsoft.Network.DnsSecurityRules.get", + "com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.getWithResponse": "Microsoft.Network.DnsSecurityRules.get", + "com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.list": "Microsoft.Network.DnsSecurityRules.list", + "com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.update": "Microsoft.Network.DnsSecurityRules.update", + "com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient": "Microsoft.Network.ForwardingRules", + "com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.createOrUpdate": "Microsoft.Network.ForwardingRules.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.createOrUpdateWithResponse": "Microsoft.Network.ForwardingRules.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.delete": "Microsoft.Network.ForwardingRules.delete", + "com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.deleteWithResponse": "Microsoft.Network.ForwardingRules.delete", + "com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.get": "Microsoft.Network.ForwardingRules.get", + "com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.getWithResponse": "Microsoft.Network.ForwardingRules.get", + "com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.list": "Microsoft.Network.ForwardingRules.list", + "com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.update": "Microsoft.Network.ForwardingRules.update", + "com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.updateWithResponse": "Microsoft.Network.ForwardingRules.update", + "com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient": "Microsoft.Network.InboundEndpoints", + "com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.beginCreateOrUpdate": "Microsoft.Network.InboundEndpoints.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.beginDelete": "Microsoft.Network.InboundEndpoints.delete", + "com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.beginUpdate": "Microsoft.Network.InboundEndpoints.update", + "com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.createOrUpdate": "Microsoft.Network.InboundEndpoints.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.delete": "Microsoft.Network.InboundEndpoints.delete", + "com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.get": "Microsoft.Network.InboundEndpoints.get", + "com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.getWithResponse": "Microsoft.Network.InboundEndpoints.get", + "com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.list": "Microsoft.Network.InboundEndpoints.list", + "com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.update": "Microsoft.Network.InboundEndpoints.update", + "com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient": "Microsoft.Network.OutboundEndpoints", + "com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.beginCreateOrUpdate": "Microsoft.Network.OutboundEndpoints.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.beginDelete": "Microsoft.Network.OutboundEndpoints.delete", + "com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.beginUpdate": "Microsoft.Network.OutboundEndpoints.update", + "com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.createOrUpdate": "Microsoft.Network.OutboundEndpoints.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.delete": "Microsoft.Network.OutboundEndpoints.delete", + "com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.get": "Microsoft.Network.OutboundEndpoints.get", + "com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.getWithResponse": "Microsoft.Network.OutboundEndpoints.get", + "com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.list": "Microsoft.Network.OutboundEndpoints.list", + "com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.update": "Microsoft.Network.OutboundEndpoints.update", + "com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient": "Microsoft.Network.VirtualNetworkLinks", + "com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.beginCreateOrUpdate": "Microsoft.Network.VirtualNetworkLinks.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.beginDelete": "Microsoft.Network.VirtualNetworkLinks.delete", + "com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.beginUpdate": "Microsoft.Network.VirtualNetworkLinks.update", + "com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.createOrUpdate": "Microsoft.Network.VirtualNetworkLinks.createOrUpdate", + "com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.delete": "Microsoft.Network.VirtualNetworkLinks.delete", + "com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.get": "Microsoft.Network.VirtualNetworkLinks.get", + "com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.getWithResponse": "Microsoft.Network.VirtualNetworkLinks.get", + "com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.list": "Microsoft.Network.VirtualNetworkLinks.list", + "com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.update": "Microsoft.Network.VirtualNetworkLinks.update", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsForwardingRulesetInner": "Microsoft.Network.DnsForwardingRuleset", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsForwardingRulesetProperties": "Microsoft.Network.DnsForwardingRulesetProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListBulkProperties": "Microsoft.Network.DnsResolverDomainListBulkProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListInner": "Microsoft.Network.DnsResolverDomainList", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListPatchProperties": "Microsoft.Network.DnsResolverDomainListPatchProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListProperties": "Microsoft.Network.DnsResolverDomainListProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverInner": "Microsoft.Network.DnsResolver", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyInner": "Microsoft.Network.DnsResolverPolicy", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyProperties": "Microsoft.Network.DnsResolverPolicyProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkInner": "Microsoft.Network.DnsResolverPolicyVirtualNetworkLink", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkProperties": "Microsoft.Network.DnsResolverPolicyVirtualNetworkLinkProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverProperties": "Microsoft.Network.DnsResolverProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRuleInner": "Microsoft.Network.DnsSecurityRule", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRulePatchProperties": "Microsoft.Network.DnsSecurityRulePatchProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRuleProperties": "Microsoft.Network.DnsSecurityRuleProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.ForwardingRuleInner": "Microsoft.Network.ForwardingRule", + "com.azure.resourcemanager.dnsresolver.fluent.models.ForwardingRulePatchProperties": "Microsoft.Network.ForwardingRulePatchProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.ForwardingRuleProperties": "Microsoft.Network.ForwardingRuleProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.InboundEndpointInner": "Microsoft.Network.InboundEndpoint", + "com.azure.resourcemanager.dnsresolver.fluent.models.InboundEndpointProperties": "Microsoft.Network.InboundEndpointProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.OutboundEndpointInner": "Microsoft.Network.OutboundEndpoint", + "com.azure.resourcemanager.dnsresolver.fluent.models.OutboundEndpointProperties": "Microsoft.Network.OutboundEndpointProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkDnsForwardingRulesetInner": "Microsoft.Network.VirtualNetworkDnsForwardingRuleset", + "com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkLinkInner": "Microsoft.Network.VirtualNetworkLink", + "com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkLinkPatchProperties": "Microsoft.Network.VirtualNetworkLinkPatchProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkLinkProperties": "Microsoft.Network.VirtualNetworkLinkProperties", + "com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkLinkSubResourceProperties": "Microsoft.Network.VirtualNetworkLinkSubResourceProperties", + "com.azure.resourcemanager.dnsresolver.implementation.DnsResolverManagementClientBuilder": "Microsoft.Network", + "com.azure.resourcemanager.dnsresolver.implementation.models.DnsForwardingRulesetListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverDomainListListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverPolicyListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverPolicyVirtualNetworkLinkListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.dnsresolver.implementation.models.DnsSecurityRuleListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.dnsresolver.implementation.models.ForwardingRuleListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.dnsresolver.implementation.models.InboundEndpointListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.dnsresolver.implementation.models.OutboundEndpointListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.dnsresolver.implementation.models.SubResourceListResult": "Microsoft.Network.SubResourceListResult", + "com.azure.resourcemanager.dnsresolver.implementation.models.VirtualNetworkDnsForwardingRulesetListResult": "Microsoft.Network.VirtualNetworkDnsForwardingRulesetListResult", + "com.azure.resourcemanager.dnsresolver.implementation.models.VirtualNetworkLinkListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.dnsresolver.models.Action": "Microsoft.Network.Action", + "com.azure.resourcemanager.dnsresolver.models.ActionType": "Microsoft.Network.ActionType", + "com.azure.resourcemanager.dnsresolver.models.DnsForwardingRulesetPatch": "Microsoft.Network.DnsForwardingRulesetPatch", + "com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListBulk": "Microsoft.Network.DnsResolverDomainListBulk", + "com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListPatch": "Microsoft.Network.DnsResolverDomainListPatch", + "com.azure.resourcemanager.dnsresolver.models.DnsResolverPatch": "Microsoft.Network.DnsResolverPatch", + "com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyPatch": "Microsoft.Network.DnsResolverPolicyPatch", + "com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLinkPatch": "Microsoft.Network.DnsResolverPolicyVirtualNetworkLinkPatch", + "com.azure.resourcemanager.dnsresolver.models.DnsResolverState": "Microsoft.Network.DnsResolverState", + "com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction": "Microsoft.Network.DnsSecurityRuleAction", + "com.azure.resourcemanager.dnsresolver.models.DnsSecurityRulePatch": "Microsoft.Network.DnsSecurityRulePatch", + "com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState": "Microsoft.Network.DnsSecurityRuleState", + "com.azure.resourcemanager.dnsresolver.models.ForwardingRulePatch": "Microsoft.Network.ForwardingRulePatch", + "com.azure.resourcemanager.dnsresolver.models.ForwardingRuleState": "Microsoft.Network.ForwardingRuleState", + "com.azure.resourcemanager.dnsresolver.models.InboundEndpointPatch": "Microsoft.Network.InboundEndpointPatch", + "com.azure.resourcemanager.dnsresolver.models.IpAllocationMethod": "Microsoft.Network.IpAllocationMethod", + "com.azure.resourcemanager.dnsresolver.models.IpConfiguration": "Microsoft.Network.IpConfiguration", + "com.azure.resourcemanager.dnsresolver.models.ManagedDomainList": "Microsoft.Network.ManagedDomainList", + "com.azure.resourcemanager.dnsresolver.models.OutboundEndpointPatch": "Microsoft.Network.OutboundEndpointPatch", + "com.azure.resourcemanager.dnsresolver.models.ProvisioningState": "Microsoft.Network.ProvisioningState", + "com.azure.resourcemanager.dnsresolver.models.TargetDnsServer": "Microsoft.Network.TargetDnsServer", + "com.azure.resourcemanager.dnsresolver.models.VirtualNetworkLinkPatch": "Microsoft.Network.VirtualNetworkLinkPatch" + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/resources/META-INF/azure-resourcemanager-dnsresolver_metadata.json b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/resources/META-INF/azure-resourcemanager-dnsresolver_metadata.json new file mode 100644 index 000000000000..32e3d0ee3883 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/resources/META-INF/azure-resourcemanager-dnsresolver_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersion":"2025-10-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient":"Microsoft.Network.DnsForwardingRulesets","com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.beginCreateOrUpdate":"Microsoft.Network.DnsForwardingRulesets.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.beginDelete":"Microsoft.Network.DnsForwardingRulesets.delete","com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.beginUpdate":"Microsoft.Network.DnsForwardingRulesets.update","com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.createOrUpdate":"Microsoft.Network.DnsForwardingRulesets.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.delete":"Microsoft.Network.DnsForwardingRulesets.delete","com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.getByResourceGroup":"Microsoft.Network.DnsForwardingRulesets.get","com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.getByResourceGroupWithResponse":"Microsoft.Network.DnsForwardingRulesets.get","com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.list":"Microsoft.Network.DnsForwardingRulesets.list","com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.listByResourceGroup":"Microsoft.Network.DnsForwardingRulesets.listByResourceGroup","com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.listByVirtualNetwork":"Microsoft.Network.DnsForwardingRulesetsOperationGroup.listByVirtualNetwork","com.azure.resourcemanager.dnsresolver.fluent.DnsForwardingRulesetsClient.update":"Microsoft.Network.DnsForwardingRulesets.update","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient":"Microsoft.Network.DnsResolverDomainLists","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.beginBulk":"Microsoft.Network.DnsResolverDomainLists.bulk","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.beginCreateOrUpdate":"Microsoft.Network.DnsResolverDomainLists.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.beginDelete":"Microsoft.Network.DnsResolverDomainLists.delete","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.beginUpdate":"Microsoft.Network.DnsResolverDomainLists.update","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.bulk":"Microsoft.Network.DnsResolverDomainLists.bulk","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.createOrUpdate":"Microsoft.Network.DnsResolverDomainLists.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.delete":"Microsoft.Network.DnsResolverDomainLists.delete","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.getByResourceGroup":"Microsoft.Network.DnsResolverDomainLists.get","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.getByResourceGroupWithResponse":"Microsoft.Network.DnsResolverDomainLists.get","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.list":"Microsoft.Network.DnsResolverDomainLists.list","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.listByResourceGroup":"Microsoft.Network.DnsResolverDomainLists.listByResourceGroup","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverDomainListsClient.update":"Microsoft.Network.DnsResolverDomainLists.update","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverManagementClient":"Microsoft.Network","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient":"Microsoft.Network.DnsResolverPolicies","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.beginCreateOrUpdate":"Microsoft.Network.DnsResolverPolicies.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.beginDelete":"Microsoft.Network.DnsResolverPolicies.delete","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.beginUpdate":"Microsoft.Network.DnsResolverPolicies.update","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.createOrUpdate":"Microsoft.Network.DnsResolverPolicies.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.delete":"Microsoft.Network.DnsResolverPolicies.delete","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.getByResourceGroup":"Microsoft.Network.DnsResolverPolicies.get","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.getByResourceGroupWithResponse":"Microsoft.Network.DnsResolverPolicies.get","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.list":"Microsoft.Network.DnsResolverPolicies.list","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.listByResourceGroup":"Microsoft.Network.DnsResolverPolicies.listByResourceGroup","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.listByVirtualNetwork":"Microsoft.Network.DnsResolverPoliciesOperationGroup.listByVirtualNetwork","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPoliciesClient.update":"Microsoft.Network.DnsResolverPolicies.update","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient":"Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.beginCreateOrUpdate":"Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.beginDelete":"Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.delete","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.beginUpdate":"Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.update","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.createOrUpdate":"Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.delete":"Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.delete","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.get":"Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.get","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.getWithResponse":"Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.get","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.list":"Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.list","com.azure.resourcemanager.dnsresolver.fluent.DnsResolverPolicyVirtualNetworkLinksClient.update":"Microsoft.Network.DnsResolverPolicyVirtualNetworkLinks.update","com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient":"Microsoft.Network.DnsResolvers","com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.beginCreateOrUpdate":"Microsoft.Network.DnsResolvers.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.beginDelete":"Microsoft.Network.DnsResolvers.delete","com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.beginUpdate":"Microsoft.Network.DnsResolvers.update","com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.createOrUpdate":"Microsoft.Network.DnsResolvers.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.delete":"Microsoft.Network.DnsResolvers.delete","com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.getByResourceGroup":"Microsoft.Network.DnsResolvers.get","com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.getByResourceGroupWithResponse":"Microsoft.Network.DnsResolvers.get","com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.list":"Microsoft.Network.DnsResolvers.list","com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.listByResourceGroup":"Microsoft.Network.DnsResolvers.listByResourceGroup","com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.listByVirtualNetwork":"Microsoft.Network.DnsResolversOperationGroup.listByVirtualNetwork","com.azure.resourcemanager.dnsresolver.fluent.DnsResolversClient.update":"Microsoft.Network.DnsResolvers.update","com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient":"Microsoft.Network.DnsSecurityRules","com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.beginCreateOrUpdate":"Microsoft.Network.DnsSecurityRules.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.beginDelete":"Microsoft.Network.DnsSecurityRules.delete","com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.beginUpdate":"Microsoft.Network.DnsSecurityRules.update","com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.createOrUpdate":"Microsoft.Network.DnsSecurityRules.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.delete":"Microsoft.Network.DnsSecurityRules.delete","com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.get":"Microsoft.Network.DnsSecurityRules.get","com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.getWithResponse":"Microsoft.Network.DnsSecurityRules.get","com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.list":"Microsoft.Network.DnsSecurityRules.list","com.azure.resourcemanager.dnsresolver.fluent.DnsSecurityRulesClient.update":"Microsoft.Network.DnsSecurityRules.update","com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient":"Microsoft.Network.ForwardingRules","com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.createOrUpdate":"Microsoft.Network.ForwardingRules.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.createOrUpdateWithResponse":"Microsoft.Network.ForwardingRules.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.delete":"Microsoft.Network.ForwardingRules.delete","com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.deleteWithResponse":"Microsoft.Network.ForwardingRules.delete","com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.get":"Microsoft.Network.ForwardingRules.get","com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.getWithResponse":"Microsoft.Network.ForwardingRules.get","com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.list":"Microsoft.Network.ForwardingRules.list","com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.update":"Microsoft.Network.ForwardingRules.update","com.azure.resourcemanager.dnsresolver.fluent.ForwardingRulesClient.updateWithResponse":"Microsoft.Network.ForwardingRules.update","com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient":"Microsoft.Network.InboundEndpoints","com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.beginCreateOrUpdate":"Microsoft.Network.InboundEndpoints.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.beginDelete":"Microsoft.Network.InboundEndpoints.delete","com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.beginUpdate":"Microsoft.Network.InboundEndpoints.update","com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.createOrUpdate":"Microsoft.Network.InboundEndpoints.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.delete":"Microsoft.Network.InboundEndpoints.delete","com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.get":"Microsoft.Network.InboundEndpoints.get","com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.getWithResponse":"Microsoft.Network.InboundEndpoints.get","com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.list":"Microsoft.Network.InboundEndpoints.list","com.azure.resourcemanager.dnsresolver.fluent.InboundEndpointsClient.update":"Microsoft.Network.InboundEndpoints.update","com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient":"Microsoft.Network.OutboundEndpoints","com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.beginCreateOrUpdate":"Microsoft.Network.OutboundEndpoints.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.beginDelete":"Microsoft.Network.OutboundEndpoints.delete","com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.beginUpdate":"Microsoft.Network.OutboundEndpoints.update","com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.createOrUpdate":"Microsoft.Network.OutboundEndpoints.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.delete":"Microsoft.Network.OutboundEndpoints.delete","com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.get":"Microsoft.Network.OutboundEndpoints.get","com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.getWithResponse":"Microsoft.Network.OutboundEndpoints.get","com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.list":"Microsoft.Network.OutboundEndpoints.list","com.azure.resourcemanager.dnsresolver.fluent.OutboundEndpointsClient.update":"Microsoft.Network.OutboundEndpoints.update","com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient":"Microsoft.Network.VirtualNetworkLinks","com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.beginCreateOrUpdate":"Microsoft.Network.VirtualNetworkLinks.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.beginDelete":"Microsoft.Network.VirtualNetworkLinks.delete","com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.beginUpdate":"Microsoft.Network.VirtualNetworkLinks.update","com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.createOrUpdate":"Microsoft.Network.VirtualNetworkLinks.createOrUpdate","com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.delete":"Microsoft.Network.VirtualNetworkLinks.delete","com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.get":"Microsoft.Network.VirtualNetworkLinks.get","com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.getWithResponse":"Microsoft.Network.VirtualNetworkLinks.get","com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.list":"Microsoft.Network.VirtualNetworkLinks.list","com.azure.resourcemanager.dnsresolver.fluent.VirtualNetworkLinksClient.update":"Microsoft.Network.VirtualNetworkLinks.update","com.azure.resourcemanager.dnsresolver.fluent.models.DnsForwardingRulesetInner":"Microsoft.Network.DnsForwardingRuleset","com.azure.resourcemanager.dnsresolver.fluent.models.DnsForwardingRulesetProperties":"Microsoft.Network.DnsForwardingRulesetProperties","com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListBulkProperties":"Microsoft.Network.DnsResolverDomainListBulkProperties","com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListInner":"Microsoft.Network.DnsResolverDomainList","com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListPatchProperties":"Microsoft.Network.DnsResolverDomainListPatchProperties","com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListProperties":"Microsoft.Network.DnsResolverDomainListProperties","com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverInner":"Microsoft.Network.DnsResolver","com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyInner":"Microsoft.Network.DnsResolverPolicy","com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyProperties":"Microsoft.Network.DnsResolverPolicyProperties","com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkInner":"Microsoft.Network.DnsResolverPolicyVirtualNetworkLink","com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverPolicyVirtualNetworkLinkProperties":"Microsoft.Network.DnsResolverPolicyVirtualNetworkLinkProperties","com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverProperties":"Microsoft.Network.DnsResolverProperties","com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRuleInner":"Microsoft.Network.DnsSecurityRule","com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRulePatchProperties":"Microsoft.Network.DnsSecurityRulePatchProperties","com.azure.resourcemanager.dnsresolver.fluent.models.DnsSecurityRuleProperties":"Microsoft.Network.DnsSecurityRuleProperties","com.azure.resourcemanager.dnsresolver.fluent.models.ForwardingRuleInner":"Microsoft.Network.ForwardingRule","com.azure.resourcemanager.dnsresolver.fluent.models.ForwardingRulePatchProperties":"Microsoft.Network.ForwardingRulePatchProperties","com.azure.resourcemanager.dnsresolver.fluent.models.ForwardingRuleProperties":"Microsoft.Network.ForwardingRuleProperties","com.azure.resourcemanager.dnsresolver.fluent.models.InboundEndpointInner":"Microsoft.Network.InboundEndpoint","com.azure.resourcemanager.dnsresolver.fluent.models.InboundEndpointProperties":"Microsoft.Network.InboundEndpointProperties","com.azure.resourcemanager.dnsresolver.fluent.models.OutboundEndpointInner":"Microsoft.Network.OutboundEndpoint","com.azure.resourcemanager.dnsresolver.fluent.models.OutboundEndpointProperties":"Microsoft.Network.OutboundEndpointProperties","com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkDnsForwardingRulesetInner":"Microsoft.Network.VirtualNetworkDnsForwardingRuleset","com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkLinkInner":"Microsoft.Network.VirtualNetworkLink","com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkLinkPatchProperties":"Microsoft.Network.VirtualNetworkLinkPatchProperties","com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkLinkProperties":"Microsoft.Network.VirtualNetworkLinkProperties","com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkLinkSubResourceProperties":"Microsoft.Network.VirtualNetworkLinkSubResourceProperties","com.azure.resourcemanager.dnsresolver.implementation.DnsResolverManagementClientBuilder":"Microsoft.Network","com.azure.resourcemanager.dnsresolver.implementation.models.DnsForwardingRulesetListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverDomainListListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverPolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverPolicyVirtualNetworkLinkListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.dnsresolver.implementation.models.DnsSecurityRuleListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.dnsresolver.implementation.models.ForwardingRuleListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.dnsresolver.implementation.models.InboundEndpointListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.dnsresolver.implementation.models.OutboundEndpointListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.dnsresolver.implementation.models.SubResourceListResult":"Microsoft.Network.SubResourceListResult","com.azure.resourcemanager.dnsresolver.implementation.models.VirtualNetworkDnsForwardingRulesetListResult":"Microsoft.Network.VirtualNetworkDnsForwardingRulesetListResult","com.azure.resourcemanager.dnsresolver.implementation.models.VirtualNetworkLinkListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.dnsresolver.models.Action":"Microsoft.Network.Action","com.azure.resourcemanager.dnsresolver.models.ActionType":"Microsoft.Network.ActionType","com.azure.resourcemanager.dnsresolver.models.DnsForwardingRulesetPatch":"Microsoft.Network.DnsForwardingRulesetPatch","com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListBulk":"Microsoft.Network.DnsResolverDomainListBulk","com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListPatch":"Microsoft.Network.DnsResolverDomainListPatch","com.azure.resourcemanager.dnsresolver.models.DnsResolverPatch":"Microsoft.Network.DnsResolverPatch","com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyPatch":"Microsoft.Network.DnsResolverPolicyPatch","com.azure.resourcemanager.dnsresolver.models.DnsResolverPolicyVirtualNetworkLinkPatch":"Microsoft.Network.DnsResolverPolicyVirtualNetworkLinkPatch","com.azure.resourcemanager.dnsresolver.models.DnsResolverState":"Microsoft.Network.DnsResolverState","com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction":"Microsoft.Network.DnsSecurityRuleAction","com.azure.resourcemanager.dnsresolver.models.DnsSecurityRulePatch":"Microsoft.Network.DnsSecurityRulePatch","com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState":"Microsoft.Network.DnsSecurityRuleState","com.azure.resourcemanager.dnsresolver.models.ForwardingRulePatch":"Microsoft.Network.ForwardingRulePatch","com.azure.resourcemanager.dnsresolver.models.ForwardingRuleState":"Microsoft.Network.ForwardingRuleState","com.azure.resourcemanager.dnsresolver.models.InboundEndpointPatch":"Microsoft.Network.InboundEndpointPatch","com.azure.resourcemanager.dnsresolver.models.IpAllocationMethod":"Microsoft.Network.IpAllocationMethod","com.azure.resourcemanager.dnsresolver.models.IpConfiguration":"Microsoft.Network.IpConfiguration","com.azure.resourcemanager.dnsresolver.models.ManagedDomainList":"Microsoft.Network.ManagedDomainList","com.azure.resourcemanager.dnsresolver.models.OutboundEndpointPatch":"Microsoft.Network.OutboundEndpointPatch","com.azure.resourcemanager.dnsresolver.models.ProvisioningState":"Microsoft.Network.ProvisioningState","com.azure.resourcemanager.dnsresolver.models.TargetDnsServer":"Microsoft.Network.TargetDnsServer","com.azure.resourcemanager.dnsresolver.models.VirtualNetworkLinkPatch":"Microsoft.Network.VirtualNetworkLinkPatch"},"generatedFiles":["src/main/java/com/azure/resourcemanager/dnsresolver/DnsResolverManager.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsForwardingRulesetsClient.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverDomainListsClient.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverManagementClient.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverPoliciesClient.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolverPolicyVirtualNetworkLinksClient.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsResolversClient.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/DnsSecurityRulesClient.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/ForwardingRulesClient.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/InboundEndpointsClient.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/OutboundEndpointsClient.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/VirtualNetworkLinksClient.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsForwardingRulesetInner.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsForwardingRulesetProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListBulkProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListInner.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListPatchProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverDomainListProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverInner.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyInner.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyVirtualNetworkLinkInner.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverPolicyVirtualNetworkLinkProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsResolverProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsSecurityRuleInner.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsSecurityRulePatchProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/DnsSecurityRuleProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRuleInner.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRulePatchProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/ForwardingRuleProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/InboundEndpointInner.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/InboundEndpointProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/OutboundEndpointInner.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/OutboundEndpointProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkDnsForwardingRulesetInner.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkInner.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkPatchProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/VirtualNetworkLinkSubResourceProperties.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/dnsresolver/fluent/package-info.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetsClientImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsForwardingRulesetsImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverDomainListImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverDomainListsClientImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverDomainListsImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverManagementClientImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPoliciesImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyVirtualNetworkLinkImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyVirtualNetworkLinksClientImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolverPolicyVirtualNetworkLinksImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolversClientImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsResolversImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsSecurityRuleImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsSecurityRulesClientImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/DnsSecurityRulesImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRuleImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRulesClientImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ForwardingRulesImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/InboundEndpointsImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/OutboundEndpointsImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkDnsForwardingRulesetImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinkImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinksClientImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/VirtualNetworkLinksImpl.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsForwardingRulesetListResult.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsResolverDomainListListResult.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsResolverListResult.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsResolverPolicyListResult.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsResolverPolicyVirtualNetworkLinkListResult.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/DnsSecurityRuleListResult.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/ForwardingRuleListResult.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/InboundEndpointListResult.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/OutboundEndpointListResult.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/SubResourceListResult.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/VirtualNetworkDnsForwardingRulesetListResult.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/models/VirtualNetworkLinkListResult.java","src/main/java/com/azure/resourcemanager/dnsresolver/implementation/package-info.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/Action.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/ActionType.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRuleset.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRulesetPatch.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsForwardingRulesets.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolver.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainList.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainListBulk.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainListPatch.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverDomainLists.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPatch.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicies.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicy.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyPatch.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLink.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLinkPatch.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverPolicyVirtualNetworkLinks.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolverState.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsResolvers.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRule.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRuleAction.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRulePatch.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRuleState.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/DnsSecurityRules.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRule.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRulePatch.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRuleState.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRules.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpoint.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpointPatch.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/InboundEndpoints.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/IpAllocationMethod.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/IpConfiguration.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/ManagedDomainList.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpoint.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpointPatch.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/OutboundEndpoints.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/TargetDnsServer.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkDnsForwardingRuleset.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLink.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLinkPatch.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/VirtualNetworkLinks.java","src/main/java/com/azure/resourcemanager/dnsresolver/models/package-info.java","src/main/java/com/azure/resourcemanager/dnsresolver/package-info.java","src/main/java/module-info.java"]} \ 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 4987fff5001d..f1523dd7c6a9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -14,9 +14,7 @@ */ public final class DnsForwardingRulesetsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Put. - * json + * x-ms-original-file: 2025-10-01-preview/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 ea443102f833..58f8105ea3ad 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsForwardingRulesetsDeleteSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsForwardingRuleset_Delete.json + * x-ms-original-file: 2025-10-01-preview/DnsForwardingRuleset_Delete.json */ /** * Sample code: Delete DNS forwarding ruleset. 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 d946350ab82e..ddb4fd74915e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,9 +9,7 @@ */ public final class DnsForwardingRulesetsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Get. - * json + * x-ms-original-file: 2025-10-01-preview/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 478c1a891d5e..9a98e87039cb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsForwardingRulesetsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsForwardingRuleset_ListByResourceGroup.json + * x-ms-original-file: 2025-10-01-preview/DnsForwardingRuleset_ListByResourceGroup.json */ /** * Sample code: List DNS forwarding rulesets by resource group. 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 6f58aa5845ac..80e0e2fc6508 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsForwardingRulesetsListByVirtualNetworkSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsForwardingRuleset_ListByVirtualNetwork.json + * x-ms-original-file: 2025-10-01-preview/DnsForwardingRuleset_ListByVirtualNetwork.json */ /** * Sample code: List DNS forwarding rulesets by virtual network. 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 cefc3c2f647a..ba36aa66a2d6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsForwardingRulesetsListSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsForwardingRuleset_ListBySubscription.json + * x-ms-original-file: 2025-10-01-preview/DnsForwardingRuleset_ListBySubscription.json */ /** * Sample code: List DNS forwarding rulesets by subscription. 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 98d726ce4cdc..21b8327166e1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -13,8 +13,7 @@ */ public final class DnsForwardingRulesetsUpdateSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsForwardingRuleset_Patch.json + * x-ms-original-file: 2025-10-01-preview/DnsForwardingRuleset_Patch.json */ /** * Sample code: Update DNS forwarding ruleset. diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsBulkSamples.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsBulkSamples.java index a069dc2743f0..90f760605400 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsBulkSamples.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/samples/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsBulkSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -12,8 +12,7 @@ */ public final class DnsResolverDomainListsBulkSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_BulkUpload.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_BulkUpload.json */ /** * Sample code: Upload DNS resolver domain list domains. @@ -29,8 +28,7 @@ public final class DnsResolverDomainListsBulkSamples { } /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_BulkDownload.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_BulkDownload.json */ /** * Sample code: Download DNS resolver domain list domains. 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 index 2b089320ee46..f9435f17af1f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -13,8 +13,7 @@ */ public final class DnsResolverDomainListsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_BulkDomains_Put.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_BulkDomains_Put.json */ /** * Sample code: Upsert DNS resolver domain list with bulk number of domains. @@ -32,9 +31,7 @@ public static void upsertDNSResolverDomainListWithBulkNumberOfDomains( } /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Put - * .json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_Put.json */ /** * Sample code: Upsert DNS resolver domain list with less than 1000 domains. 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 index 6eb5b37d8dad..dade53213591 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolverDomainListsDeleteSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_Delete.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_Delete.json */ /** * Sample code: Delete DNS resolver domain list. 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 index c9d4a0e947ac..e93db0815cbb 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolverDomainListsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_BulkDomains_Get.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_BulkDomains_Get.json */ /** * Sample code: Retrieve DNS resolver domain list with bulk number of domains. @@ -25,9 +24,7 @@ public static void retrieveDNSResolverDomainListWithBulkNumberOfDomains( } /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Get - * .json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_Get.json */ /** * Sample code: Retrieve DNS resolver domain list with less than 1000 domains. 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 index d9337fe9b2df..092a045990fd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolverDomainListsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_ListByResourceGroup.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_ListByResourceGroup.json */ /** * Sample code: List DNS resolver domain lists by resource group. 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 index 18ec790798bc..bf33c0072050 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolverDomainListsListSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_ListBySubscription.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_ListBySubscription.json */ /** * Sample code: List DNS resolver domain lists by subscription. 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 index 0b73e494f1eb..a8b21bc0489b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -14,8 +14,7 @@ */ public final class DnsResolverDomainListsUpdateSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverDomainList_Patch.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverDomainList_Patch.json */ /** * Sample code: Update DNS resolver domain list. 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 index 24a540f3a7d2..1f61546010d6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -12,9 +12,7 @@ */ public final class DnsResolverPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Put. - * json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_Put.json */ /** * Sample code: Upsert DNS resolver policy. 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 index 2a185bed8898..5eae901dd4aa 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,9 +9,7 @@ */ public final class DnsResolverPoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Delete. - * json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_Delete.json */ /** * Sample code: Delete DNS resolver policy. 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 index bb834fa31e72..61e3d6114a61 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,9 +9,7 @@ */ public final class DnsResolverPoliciesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Get. - * json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_Get.json */ /** * Sample code: Retrieve DNS resolver policy. 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 index d3e2ab490fc8..3b7e28d7d7c5 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolverPoliciesListByResourceGroupSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicy_ListByResourceGroup.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_ListByResourceGroup.json */ /** * Sample code: List DNS resolver policies by resource group. 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 index 43f54dce5429..fb7e3224d7bd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolverPoliciesListByVirtualNetworkSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicy_ListByVirtualNetwork.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_ListByVirtualNetwork.json */ /** * Sample code: List DNS resolver policies by virtual network. 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 index 626dee9c096e..edb78790fa24 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolverPoliciesListSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicy_ListBySubscription.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_ListBySubscription.json */ /** * Sample code: List DNS resolver policies by subscription. 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 index 642ae74b0a37..f357fbc18ce6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -13,9 +13,7 @@ */ public final class DnsResolverPoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Patch. - * json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicy_Patch.json */ /** * Sample code: Update DNS resolver policy. 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 index e8a5ec26b530..b3018eb928da 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -13,8 +13,7 @@ */ public final class DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicyVirtualNetworkLink_Put.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicyVirtualNetworkLink_Put.json */ /** * Sample code: Upsert DNS resolver policy virtual network link. 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 index a9466a025439..53c4ca836ff2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolverPolicyVirtualNetworkLinksDeleteSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicyVirtualNetworkLink_Delete.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicyVirtualNetworkLink_Delete.json */ /** * Sample code: Delete DNS resolver policy virtual network link. 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 index a64b73ae2099..99a49f03aca8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolverPolicyVirtualNetworkLinksGetSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicyVirtualNetworkLink_Get.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicyVirtualNetworkLink_Get.json */ /** * Sample code: Retrieve DNS resolver policy virtual network link. 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 index 277ec52adc78..b3d8cd4d0439 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolverPolicyVirtualNetworkLinksListSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicyVirtualNetworkLink_List.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicyVirtualNetworkLink_List.json */ /** * Sample code: List DNS resolver policy virtual network links by DNS resolver policy. 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 index 5c99766b96f4..822f4170d746 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -13,8 +13,7 @@ */ public final class DnsResolverPolicyVirtualNetworkLinksUpdateSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolverPolicyVirtualNetworkLink_Patch.json + * x-ms-original-file: 2025-10-01-preview/DnsResolverPolicyVirtualNetworkLink_Patch.json */ /** * Sample code: Update DNS resolver policy virtual network link. 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 36c6c8d7aa00..3e0a20661add 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -13,8 +13,7 @@ */ public final class DnsResolversCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Put.json + * x-ms-original-file: 2025-10-01-preview/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 9c6c12f2151d..88caee0d508a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolversDeleteSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Delete.json + * x-ms-original-file: 2025-10-01-preview/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 c1ce97d493b0..a45f7e7a0dd3 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolversGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Get.json + * x-ms-original-file: 2025-10-01-preview/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 e082f2a68de8..868bfca8e531 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolversListByResourceGroupSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolver_ListByResourceGroup.json + * x-ms-original-file: 2025-10-01-preview/DnsResolver_ListByResourceGroup.json */ /** * Sample code: List DNS resolvers by resource group. 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 f0ab03e7779a..33aff21256ce 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolversListByVirtualNetworkSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolver_ListByVirtualNetwork.json + * x-ms-original-file: 2025-10-01-preview/DnsResolver_ListByVirtualNetwork.json */ /** * Sample code: List DNS resolvers by virtual network. 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 88db578b6f0d..fdd33a404de4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsResolversListSamples { /* - * x-ms-original-file: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ - * DnsResolver_ListBySubscription.json + * x-ms-original-file: 2025-10-01-preview/DnsResolver_ListBySubscription.json */ /** * Sample code: List DNS resolvers by subscription. 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 5eaac0432236..e71cae1df27a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -13,8 +13,7 @@ */ public final class DnsResolversUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Patch.json + * x-ms-original-file: 2025-10-01-preview/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 index ec92daec1104..cd07dbef3dcc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -8,6 +8,7 @@ import com.azure.resourcemanager.dnsresolver.models.ActionType; import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction; import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; +import com.azure.resourcemanager.dnsresolver.models.ManagedDomainList; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -17,8 +18,7 @@ */ public final class DnsSecurityRulesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Put.json + * x-ms-original-file: 2025-10-01-preview/DnsSecurityRule_Put.json */ /** * Sample code: Upsert DNS security rule. @@ -32,9 +32,31 @@ public static void upsertDNSSecurityRule(com.azure.resourcemanager.dnsresolver.D .withExistingDnsResolverPolicy("sampleResourceGroup", "sampleDnsResolverPolicy") .withPriority(100) .withAction(new DnsSecurityRuleAction().withActionType(ActionType.BLOCK)) + .withTags(mapOf("key1", "fakeTokenPlaceholder")) .withDnsResolverDomainLists(Arrays.asList(new SubResource().withId( "/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList"))) + .withDnsSecurityRuleState(DnsSecurityRuleState.ENABLED) + .create(); + } + + /* + * x-ms-original-file: 2025-10-01-preview/DnsSecurityRule_ManagedDomainList_Put.json + */ + /** + * Sample code: Upsert DNS security rule with managed domain list. + * + * @param manager Entry point to DnsResolverManager. + */ + public static void + upsertDNSSecurityRuleWithManagedDomainList(com.azure.resourcemanager.dnsresolver.DnsResolverManager manager) { + manager.dnsSecurityRules() + .define("sampleDnsSecurityRule") + .withRegion("westus2") + .withExistingDnsResolverPolicy("sampleResourceGroup", "sampleDnsResolverPolicy") + .withPriority(100) + .withAction(new DnsSecurityRuleAction().withActionType(ActionType.BLOCK)) .withTags(mapOf("key1", "fakeTokenPlaceholder")) + .withManagedDomainLists(Arrays.asList(ManagedDomainList.AZURE_DNS_THREAT_INTEL)) .withDnsSecurityRuleState(DnsSecurityRuleState.ENABLED) .create(); } 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 index fff94d9cc316..f4767d2f54e4 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,9 +9,7 @@ */ public final class DnsSecurityRulesDeleteSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Delete. - * json + * x-ms-original-file: 2025-10-01-preview/DnsSecurityRule_Delete.json */ /** * Sample code: Delete DNS security rule for DNS resolver policy. 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 index 4e0a3deeec1d..59c0beb42037 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsSecurityRulesGetSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Get.json + * x-ms-original-file: 2025-10-01-preview/DnsSecurityRule_Get.json */ /** * Sample code: Retrieve DNS security rule for DNS resolver policy. 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 index afd4ae62037e..0b735ce0ab17 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class DnsSecurityRulesListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_List.json + * x-ms-original-file: 2025-10-01-preview/DnsSecurityRule_List.json */ /** * Sample code: List DNS security rules by DNS resolver policy. 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 index ca2a2e20bdb6..b61606a25a8e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -14,9 +14,7 @@ */ public final class DnsSecurityRulesUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Patch. - * json + * x-ms-original-file: 2025-10-01-preview/DnsSecurityRule_Patch.json */ /** * Sample code: Update DNS security rule for DNS resolver policy. 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 7a4d97552b28..5527713b40ea 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -15,8 +15,7 @@ */ public final class ForwardingRulesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Put.json + * x-ms-original-file: 2025-10-01-preview/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 72bd7f95cef4..058f51fc5bfc 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,9 +9,7 @@ */ public final class ForwardingRulesDeleteSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Delete. - * json + * x-ms-original-file: 2025-10-01-preview/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 3d3590988842..b0cbce755df1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class ForwardingRulesGetSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Get.json + * x-ms-original-file: 2025-10-01-preview/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 34da25c96684..def0eea7c63a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class ForwardingRulesListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_List.json + * x-ms-original-file: 2025-10-01-preview/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 ce58f3bf34e7..68fcfb9f4376 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -14,8 +14,7 @@ */ public final class ForwardingRulesUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Patch.json + * x-ms-original-file: 2025-10-01-preview/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 f760733de5a5..c3ebb2c1927f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -16,8 +16,7 @@ */ public final class InboundEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Put.json + * x-ms-original-file: 2025-10-01-preview/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 ca04449087da..29dc01fa03ee 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,9 +9,7 @@ */ public final class InboundEndpointsDeleteSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Delete. - * json + * x-ms-original-file: 2025-10-01-preview/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 e3d4b6abd4d7..ad2c7b084513 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class InboundEndpointsGetSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Get.json + * x-ms-original-file: 2025-10-01-preview/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 ce83c6bf1d64..a2e087644cba 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class InboundEndpointsListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_List.json + * x-ms-original-file: 2025-10-01-preview/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 4ecbdfaa15bb..0e325e377b30 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -13,9 +13,7 @@ */ public final class InboundEndpointsUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Patch. - * json + * x-ms-original-file: 2025-10-01-preview/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 236c3a2dddaf..3603af54811c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -13,8 +13,7 @@ */ public final class OutboundEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Put.json + * x-ms-original-file: 2025-10-01-preview/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 2a4a987d76a7..fa362d5d7b66 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,9 +9,7 @@ */ public final class OutboundEndpointsDeleteSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Delete. - * json + * x-ms-original-file: 2025-10-01-preview/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 83a57998d934..30c946d25053 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,8 +9,7 @@ */ public final class OutboundEndpointsGetSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Get.json + * x-ms-original-file: 2025-10-01-preview/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 d77ce6385740..720e0febffcd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,9 +9,7 @@ */ public final class OutboundEndpointsListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_List. - * json + * x-ms-original-file: 2025-10-01-preview/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 0030ae750029..85be5ed67be9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -13,9 +13,7 @@ */ public final class OutboundEndpointsUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Patch. - * json + * x-ms-original-file: 2025-10-01-preview/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 b7b4e390a74b..56cdea4dbd63 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -13,9 +13,7 @@ */ public final class VirtualNetworkLinksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Put. - * json + * x-ms-original-file: 2025-10-01-preview/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 1cc523de0f29..314ba2579ae6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,9 +9,7 @@ */ public final class VirtualNetworkLinksDeleteSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Delete - * .json + * x-ms-original-file: 2025-10-01-preview/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 760af01e20b7..4b6ecf9fa9ed 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,9 +9,7 @@ */ public final class VirtualNetworkLinksGetSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Get. - * json + * x-ms-original-file: 2025-10-01-preview/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 053282d64ceb..3ff01df667f6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -9,9 +9,7 @@ */ public final class VirtualNetworkLinksListSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_List. - * json + * x-ms-original-file: 2025-10-01-preview/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 2ecbc464b4b7..feaa7bdf5c2d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -13,9 +13,7 @@ */ public final class VirtualNetworkLinksUpdateSamples { /* - * x-ms-original-file: - * specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Patch. - * json + * x-ms-original-file: 2025-10-01-preview/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/DnsForwardingRulesetInnerTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetInnerTests.java new file mode 100644 index 000000000000..e57e5a234290 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetInnerTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.DnsForwardingRulesetInner; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class DnsForwardingRulesetInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsForwardingRulesetInner model = BinaryData.fromString( + "{\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"fnba\"},{\"id\":\"ionle\"}],\"provisioningState\":\"Canceled\",\"resourceGuid\":\"qgtz\"},\"etag\":\"pnqbqqwxrjfe\",\"location\":\"lnwsubisn\",\"tags\":{\"zscxaqwo\":\"pmng\",\"ase\":\"chcbonqvpkvlrxnj\",\"enjbdlwtgrhp\":\"pheoflokeyy\",\"umasxazjpq\":\"jp\"},\"id\":\"e\",\"name\":\"ualhbxxhejj\",\"type\":\"zvdudgwdslfhotwm\"}") + .toObject(DnsForwardingRulesetInner.class); + Assertions.assertEquals("lnwsubisn", model.location()); + Assertions.assertEquals("pmng", model.tags().get("zscxaqwo")); + Assertions.assertEquals("fnba", model.dnsResolverOutboundEndpoints().get(0).id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsForwardingRulesetInner model = new DnsForwardingRulesetInner().withLocation("lnwsubisn") + .withTags( + mapOf("zscxaqwo", "pmng", "ase", "chcbonqvpkvlrxnj", "enjbdlwtgrhp", "pheoflokeyy", "umasxazjpq", "jp")) + .withDnsResolverOutboundEndpoints( + Arrays.asList(new SubResource().withId("fnba"), new SubResource().withId("ionle"))); + model = BinaryData.fromObject(model).toObject(DnsForwardingRulesetInner.class); + Assertions.assertEquals("lnwsubisn", model.location()); + Assertions.assertEquals("pmng", model.tags().get("zscxaqwo")); + Assertions.assertEquals("fnba", model.dnsResolverOutboundEndpoints().get(0).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/DnsForwardingRulesetListResultTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetListResultTests.java new file mode 100644 index 000000000000..070fba110538 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetListResultTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.implementation.models.DnsForwardingRulesetListResult; +import org.junit.jupiter.api.Assertions; + +public final class DnsForwardingRulesetListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsForwardingRulesetListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"hbkuofqwey\"},{\"id\":\"menevfyexfwh\"},{\"id\":\"cibvyvdcsitynn\"},{\"id\":\"mdectehfiqscjey\"}],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"zrkgqhcjrefovg\"},\"etag\":\"qsl\",\"location\":\"yvxyqjp\",\"tags\":{\"pngjcrcczsqpjhvm\":\"t\",\"a\":\"ajvnysounqe\",\"jmcmatuokthfu\":\"oaeupfhyhltrpmo\",\"xodpuozmyzydagfu\":\"uaodsfcpk\"},\"id\":\"xbezyiuokktwh\",\"name\":\"dxwzywqsmbsurexi\",\"type\":\"o\"},{\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"cfsf\"}],\"provisioningState\":\"Creating\",\"resourceGuid\":\"ddystkiiuxhqy\"},\"etag\":\"xorrqnb\",\"location\":\"czvyifq\",\"tags\":{\"atkpnp\":\"dvjsllrmvvdf\",\"iqzbq\":\"lexxbczwtru\"},\"id\":\"vsovmyokac\",\"name\":\"pkwlhz\",\"type\":\"obpxjmflbvvn\"}],\"nextLink\":\"rkcciwwzjuqk\"}") + .toObject(DnsForwardingRulesetListResult.class); + Assertions.assertEquals("yvxyqjp", model.value().get(0).location()); + Assertions.assertEquals("t", model.value().get(0).tags().get("pngjcrcczsqpjhvm")); + Assertions.assertEquals("hbkuofqwey", model.value().get(0).dnsResolverOutboundEndpoints().get(0).id()); + Assertions.assertEquals("rkcciwwzjuqk", model.nextLink()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetPatchTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetPatchTests.java new file mode 100644 index 000000000000..cc56f63d6975 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetPatchTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.models.DnsForwardingRulesetPatch; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class DnsForwardingRulesetPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsForwardingRulesetPatch model = BinaryData.fromString( + "{\"dnsResolverOutboundEndpoints\":[{\"id\":\"avo\"},{\"id\":\"zdmohctbqvu\"},{\"id\":\"xdn\"}],\"tags\":{\"azjdyggd\":\"owgujjugwdkcglhs\"}}") + .toObject(DnsForwardingRulesetPatch.class); + Assertions.assertEquals("avo", model.dnsResolverOutboundEndpoints().get(0).id()); + Assertions.assertEquals("owgujjugwdkcglhs", model.tags().get("azjdyggd")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsForwardingRulesetPatch model = new DnsForwardingRulesetPatch() + .withDnsResolverOutboundEndpoints(Arrays.asList(new SubResource().withId("avo"), + new SubResource().withId("zdmohctbqvu"), new SubResource().withId("xdn"))) + .withTags(mapOf("azjdyggd", "owgujjugwdkcglhs")); + model = BinaryData.fromObject(model).toObject(DnsForwardingRulesetPatch.class); + Assertions.assertEquals("avo", model.dnsResolverOutboundEndpoints().get(0).id()); + Assertions.assertEquals("owgujjugwdkcglhs", model.tags().get("azjdyggd")); + } + + // 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/DnsForwardingRulesetPropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetPropertiesTests.java new file mode 100644 index 000000000000..b679a900d36e --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsForwardingRulesetPropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.DnsForwardingRulesetProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DnsForwardingRulesetPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsForwardingRulesetProperties model = BinaryData.fromString( + "{\"dnsResolverOutboundEndpoints\":[{\"id\":\"pwlbjnpg\"},{\"id\":\"ftadehxnltyfs\"}],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"suesnzw\"}") + .toObject(DnsForwardingRulesetProperties.class); + Assertions.assertEquals("pwlbjnpg", model.dnsResolverOutboundEndpoints().get(0).id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsForwardingRulesetProperties model = new DnsForwardingRulesetProperties().withDnsResolverOutboundEndpoints( + Arrays.asList(new SubResource().withId("pwlbjnpg"), new SubResource().withId("ftadehxnltyfs"))); + model = BinaryData.fromObject(model).toObject(DnsForwardingRulesetProperties.class); + Assertions.assertEquals("pwlbjnpg", model.dnsResolverOutboundEndpoints().get(0).id()); + } +} 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 a5693bcb1564..6ff742af9ed8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -25,7 +25,7 @@ public final class DnsForwardingRulesetsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"sutrgjup\",\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"tpwoqhihejq\"},{\"id\":\"zpnfqntcypsxj\"},{\"id\":\"oimwkslirc\"}],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"vydfceacvlhvygdy\"},\"location\":\"umrtwnawjsl\",\"tags\":{\"mznbaeqphch\":\"kojgcyzts\",\"ehuwrykqgaifmvik\":\"nrnrp\",\"xcv\":\"bydvkhbejdz\",\"v\":\"srhnjivo\"},\"id\":\"novqfzge\",\"name\":\"jdftuljltd\",\"type\":\"ceamtm\"}"; + = "{\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"ziuxxpshnee\"},{\"id\":\"lfg\"},{\"id\":\"qubkw\"}],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"rds\"},\"etag\":\"ujbazpjuohminyfl\",\"location\":\"rwm\",\"tags\":{\"ygdxpgpqchis\":\"wpklvxw\",\"bjcrxgibbdaxco\":\"epn\",\"kwbqplhlvnuu\":\"fozauorsuk\",\"soldweyuqdunv\":\"pzlrphw\"},\"id\":\"nnrwrbiork\",\"name\":\"alywjhhgdn\",\"type\":\"xmsivfomiloxggdu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,19 +35,18 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DnsForwardingRuleset response = manager.dnsForwardingRulesets() - .define("fezzxscyhwzdg") - .withRegion("wncot") - .withExistingResourceGroup("wxnb") - .withDnsResolverOutboundEndpoints(Arrays.asList(new SubResource().withId("mvzzbtdcqvp"), - new SubResource().withId("yujviylwdshfssn"), new SubResource().withId("gy"))) - .withTags(mapOf("yczuhxacpq", "hirctymoxoftpipi")) - .withIfMatch("urisjnhnytxifqj") - .withIfNoneMatch("gxmrhublwp") + .define("coezbrhubskh") + .withRegion("qtqzfavyv") + .withExistingResourceGroup("smlmbtxhwgfwsrta") + .withDnsResolverOutboundEndpoints(Arrays.asList(new SubResource().withId("goo"))) + .withTags(mapOf("euayjkqabqgzsles", "ybar", "vbquwr", "cbhernntiewdj", "uffkmrqemvvh", "ehwagoh")) + .withIfMatch("guaadraufactkahz") + .withIfNoneMatch("v") .create(); - Assertions.assertEquals("umrtwnawjsl", response.location()); - Assertions.assertEquals("kojgcyzts", response.tags().get("mznbaeqphch")); - Assertions.assertEquals("tpwoqhihejq", response.dnsResolverOutboundEndpoints().get(0).id()); + Assertions.assertEquals("rwm", response.location()); + Assertions.assertEquals("wpklvxw", response.tags().get("ygdxpgpqchis")); + Assertions.assertEquals("ziuxxpshnee", 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 64e33ecf3423..67c9ac6346ba 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.dnsForwardingRulesets().delete("pqqmted", "tmmjihyeozph", "wau", com.azure.core.util.Context.NONE); + manager.dnsForwardingRulesets().delete("esutrgjupauutpw", "qhih", "jqgwzp", 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 d6707c74b5fc..c3e1a929ad47 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -21,7 +21,7 @@ public final class DnsForwardingRulesetsGetByResourceGroupWithResponseMockTests @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"f\",\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"txhojujb\"},{\"id\":\"elmcuvhixbjxyfw\"},{\"id\":\"lrcoolsttpki\"}],\"provisioningState\":\"Failed\",\"resourceGuid\":\"nujrywvtyl\"},\"location\":\"pncur\",\"tags\":{\"cbihwqk\":\"wiithtywub\"},\"id\":\"fdntwjchrdgoih\",\"name\":\"umwctondz\",\"type\":\"luudfdlwggytsb\"}"; + = "{\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"avgrvkffovjz\"},{\"id\":\"jbibg\"},{\"id\":\"fxumv\"},{\"id\":\"luyovwxnbkfezzx\"}],\"provisioningState\":\"Creating\",\"resourceGuid\":\"wzdgirujbzbo\"},\"etag\":\"zzbtdcqvpniyujvi\",\"location\":\"wdsh\",\"tags\":{\"bgye\":\"n\",\"cotmr\":\"rymsgaojfmw\",\"yczuhxacpq\":\"hirctymoxoftpipi\",\"wdgzxulucv\":\"lihhyuspskasdvlm\"},\"id\":\"amrsreuzv\",\"name\":\"urisjnhnytxifqj\",\"type\":\"gxmrhublwp\"}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DnsForwardingRuleset response = manager.dnsForwardingRulesets() - .getByResourceGroupWithResponse("qncygupkvi", "mdscwxqupev", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("dxtqmieoxo", "ggufhyaomtb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("pncur", response.location()); - Assertions.assertEquals("wiithtywub", response.tags().get("cbihwqk")); - Assertions.assertEquals("txhojujb", response.dnsResolverOutboundEndpoints().get(0).id()); + Assertions.assertEquals("wdsh", response.location()); + Assertions.assertEquals("n", response.tags().get("bgye")); + Assertions.assertEquals("avgrvkffovjz", 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 21b39606e834..797dd2876651 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class DnsForwardingRulesetsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"seinqfiuf\",\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"npirgnepttw\"}],\"provisioningState\":\"Failed\",\"resourceGuid\":\"iffcdmqnrojlpijn\"},\"location\":\"xfrdd\",\"tags\":{\"ronasxift\":\"atiz\",\"zh\":\"zq\"},\"id\":\"tw\",\"name\":\"sgogczhonnxk\",\"type\":\"lgnyhmo\"}]}"; + = "{\"value\":[{\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"foimwkslircizjxv\"}],\"provisioningState\":\"Updating\",\"resourceGuid\":\"eacvl\"},\"etag\":\"ygdyftumrtw\",\"location\":\"wjslbiwkojgcyzt\",\"tags\":{\"baeqphc\":\"z\",\"gaifmvik\":\"qnrnrpxehuwryk\",\"xcv\":\"bydvkhbejdz\"},\"id\":\"srhnjivo\",\"name\":\"v\",\"type\":\"novqfzge\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,12 @@ public void testListByResourceGroup() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.dnsForwardingRulesets().listByResourceGroup("tov", 1670043770, com.azure.core.util.Context.NONE); + PagedIterable response = manager.dnsForwardingRulesets() + .listByResourceGroup("fqntcyp", 613728557, com.azure.core.util.Context.NONE); - Assertions.assertEquals("xfrdd", response.iterator().next().location()); - Assertions.assertEquals("atiz", response.iterator().next().tags().get("ronasxift")); - Assertions.assertEquals("npirgnepttw", response.iterator().next().dnsResolverOutboundEndpoints().get(0).id()); + Assertions.assertEquals("wjslbiwkojgcyzt", response.iterator().next().location()); + Assertions.assertEquals("z", response.iterator().next().tags().get("baeqphc")); + Assertions.assertEquals("foimwkslircizjxv", + 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 7c53bd3d32c5..c9d4a0669ade 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class DnsForwardingRulesetsListByVirtualNetworkMockTests { @Test public void testListByVirtualNetwork() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"bibgjmfxumv\",\"properties\":{\"virtualNetworkLink\":{\"id\":\"yo\"}}}]}"; + = "{\"value\":[{\"id\":\"dqbcvhzlhplod\",\"properties\":{\"virtualNetworkLink\":{\"id\":\"wwqfbumlkxtrqj\"}}}]}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.dnsForwardingRulesets() - .listByVirtualNetwork("ggufhyaomtb", "hhavgrvkffovjz", 894379890, com.azure.core.util.Context.NONE); + .listByVirtualNetwork("ostgkts", "vdxec", 1393468230, com.azure.core.util.Context.NONE); - Assertions.assertEquals("bibgjmfxumv", response.iterator().next().id()); - Assertions.assertEquals("yo", response.iterator().next().virtualNetworkLink().id()); + Assertions.assertEquals("dqbcvhzlhplod", response.iterator().next().id()); + Assertions.assertEquals("wwqfbumlkxtrqj", 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 6a025e86115c..a1cc7999a291 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class DnsForwardingRulesetsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"kkgthr\",\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"xjb\"}],\"provisioningState\":\"Updating\",\"resourceGuid\":\"vcxgfrpdsofbshr\"},\"location\":\"vbuswd\",\"tags\":{\"rtkfawnopq\":\"ybycnunvj\",\"x\":\"ikyzirtxdy\"},\"id\":\"ejnt\",\"name\":\"sewgioilqukr\",\"type\":\"dxtqmieoxo\"}]}"; + = "{\"value\":[{\"properties\":{\"dnsResolverOutboundEndpoints\":[{\"id\":\"tul\"},{\"id\":\"tduceamt\"},{\"id\":\"zuo\"}],\"provisioningState\":\"Deleting\",\"resourceGuid\":\"cwwqiokn\"},\"etag\":\"xmojmsvpkjp\",\"location\":\"kwcf\",\"tags\":{\"ydbsd\":\"jyxgtczh\",\"uripltfnhtba\":\"hmkxmaehvbb\",\"kpyklyhp\":\"kgxywr\"},\"id\":\"uodpv\",\"name\":\"uudl\",\"type\":\"zibt\"}]}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.dnsForwardingRulesets().list(1331454733, com.azure.core.util.Context.NONE); + = manager.dnsForwardingRulesets().list(430792961, com.azure.core.util.Context.NONE); - Assertions.assertEquals("vbuswd", response.iterator().next().location()); - Assertions.assertEquals("ybycnunvj", response.iterator().next().tags().get("rtkfawnopq")); - Assertions.assertEquals("xjb", response.iterator().next().dnsResolverOutboundEndpoints().get(0).id()); + Assertions.assertEquals("kwcf", response.iterator().next().location()); + Assertions.assertEquals("jyxgtczh", response.iterator().next().tags().get("ydbsd")); + Assertions.assertEquals("tul", response.iterator().next().dnsResolverOutboundEndpoints().get(0).id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListBulkPropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListBulkPropertiesTests.java new file mode 100644 index 000000000000..8678339bc241 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListBulkPropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.fluent.models.DnsResolverDomainListBulkProperties; +import com.azure.resourcemanager.dnsresolver.models.Action; +import org.junit.jupiter.api.Assertions; + +public final class DnsResolverDomainListBulkPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsResolverDomainListBulkProperties model + = BinaryData.fromString("{\"storageUrl\":\"efkifr\",\"action\":\"Upload\"}") + .toObject(DnsResolverDomainListBulkProperties.class); + Assertions.assertEquals("efkifr", model.storageUrl()); + Assertions.assertEquals(Action.UPLOAD, model.action()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverDomainListBulkProperties model + = new DnsResolverDomainListBulkProperties().withStorageUrl("efkifr").withAction(Action.UPLOAD); + model = BinaryData.fromObject(model).toObject(DnsResolverDomainListBulkProperties.class); + Assertions.assertEquals("efkifr", model.storageUrl()); + Assertions.assertEquals(Action.UPLOAD, model.action()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListBulkTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListBulkTests.java new file mode 100644 index 000000000000..3048a255e0f2 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListBulkTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.models.Action; +import com.azure.resourcemanager.dnsresolver.models.DnsResolverDomainListBulk; +import org.junit.jupiter.api.Assertions; + +public final class DnsResolverDomainListBulkTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsResolverDomainListBulk model + = BinaryData.fromString("{\"properties\":{\"storageUrl\":\"wabm\",\"action\":\"Upload\"}}") + .toObject(DnsResolverDomainListBulk.class); + Assertions.assertEquals("wabm", model.storageUrl()); + Assertions.assertEquals(Action.UPLOAD, model.action()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverDomainListBulk model + = new DnsResolverDomainListBulk().withStorageUrl("wabm").withAction(Action.UPLOAD); + model = BinaryData.fromObject(model).toObject(DnsResolverDomainListBulk.class); + Assertions.assertEquals("wabm", model.storageUrl()); + Assertions.assertEquals(Action.UPLOAD, model.action()); + } +} 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 new file mode 100644 index 000000000000..a5ea29e45d2d --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListInnerTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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( + "{\"properties\":{\"domains\":[\"qagvrvm\",\"pkukghi\"],\"domainsUrl\":\"blxgwimf\",\"provisioningState\":\"Updating\",\"resourceGuid\":\"j\"},\"etag\":\"mszkkfo\",\"location\":\"eyfkzikfja\",\"tags\":{\"vxwc\":\"a\",\"fatkld\":\"elpcirelsfeaenwa\",\"oulpjrv\":\"xbjhwuaanozjosph\"},\"id\":\"ag\",\"name\":\"rvimjwosytxitcsk\",\"type\":\"cktqumiekkezzi\"}") + .toObject(DnsResolverDomainListInner.class); + Assertions.assertEquals("eyfkzikfja", model.location()); + Assertions.assertEquals("a", model.tags().get("vxwc")); + Assertions.assertEquals("qagvrvm", model.domains().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverDomainListInner model = new DnsResolverDomainListInner().withLocation("eyfkzikfja") + .withTags(mapOf("vxwc", "a", "fatkld", "elpcirelsfeaenwa", "oulpjrv", "xbjhwuaanozjosph")) + .withDomains(Arrays.asList("qagvrvm", "pkukghi")); + model = BinaryData.fromObject(model).toObject(DnsResolverDomainListInner.class); + Assertions.assertEquals("eyfkzikfja", model.location()); + Assertions.assertEquals("a", model.tags().get("vxwc")); + Assertions.assertEquals("qagvrvm", 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/DnsResolverDomainListListResultTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListListResultTests.java new file mode 100644 index 000000000000..bbfd2c5aa410 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListListResultTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverDomainListListResult; +import org.junit.jupiter.api.Assertions; + +public final class DnsResolverDomainListListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsResolverDomainListListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"domains\":[\"fdnw\",\"wmewzsyy\",\"euzsoi\",\"judpfrxt\"],\"domainsUrl\":\"hzv\",\"provisioningState\":\"Creating\",\"resourceGuid\":\"wkqbrqu\"},\"etag\":\"axhexiilivp\",\"location\":\"iirqtd\",\"tags\":{\"l\":\"xoruzfgsquyfxrx\",\"zwl\":\"ptramxj\",\"tdooaoj\":\"nwxuqlcvydyp\"},\"id\":\"niodkooeb\",\"name\":\"nuj\",\"type\":\"emmsbvdkc\"},{\"properties\":{\"domains\":[\"jinfw\",\"lfltka\"],\"domainsUrl\":\"vefkdlfoakggk\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"ao\"},\"etag\":\"ulpqblylsyxkqjn\",\"location\":\"ervtiagxs\",\"tags\":{\"sbzkf\":\"uem\",\"dxrbuukzcle\":\"beyvpnqicvinvkjj\",\"fn\":\"yhmlwpaztzp\"},\"id\":\"ckw\",\"name\":\"fz\",\"type\":\"whxxbuyqax\"},{\"properties\":{\"domains\":[\"ztppriolxorjalto\",\"mncwsobqwcsdb\"],\"domainsUrl\":\"dcfhucqdpf\",\"provisioningState\":\"Updating\",\"resourceGuid\":\"sbjjc\"},\"etag\":\"vxb\",\"location\":\"vudutncor\",\"tags\":{\"f\":\"xqtvcofu\",\"u\":\"vkg\",\"aznqntoru\":\"gdknnqv\"},\"id\":\"sgsahmkycgr\",\"name\":\"uwjuetaeburuvdmo\",\"type\":\"s\"}],\"nextLink\":\"l\"}") + .toObject(DnsResolverDomainListListResult.class); + Assertions.assertEquals("iirqtd", model.value().get(0).location()); + Assertions.assertEquals("xoruzfgsquyfxrx", model.value().get(0).tags().get("l")); + Assertions.assertEquals("fdnw", model.value().get(0).domains().get(0)); + Assertions.assertEquals("l", model.nextLink()); + } +} 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 new file mode 100644 index 000000000000..e09b37795f0b --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListPatchPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":[\"baaa\",\"jyvayffimrzrtuz\",\"ogs\"]}") + .toObject(DnsResolverDomainListPatchProperties.class); + Assertions.assertEquals("baaa", model.domains().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverDomainListPatchProperties model + = new DnsResolverDomainListPatchProperties().withDomains(Arrays.asList("baaa", "jyvayffimrzrtuz", "ogs")); + model = BinaryData.fromObject(model).toObject(DnsResolverDomainListPatchProperties.class); + Assertions.assertEquals("baaa", 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 new file mode 100644 index 000000000000..f6c8397c5594 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListPatchTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":[\"cyjmoadsuvarmy\",\"dmjsjqb\",\"hhyxxrw\",\"yc\"]},\"tags\":{\"xkgymareqnajxqu\":\"hp\",\"ddg\":\"jhkycub\",\"pxacqqudfn\":\"sofwqmzqalkrmnji\"}}") + .toObject(DnsResolverDomainListPatch.class); + Assertions.assertEquals("hp", model.tags().get("xkgymareqnajxqu")); + Assertions.assertEquals("cyjmoadsuvarmy", model.domains().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverDomainListPatch model = new DnsResolverDomainListPatch() + .withTags(mapOf("xkgymareqnajxqu", "hp", "ddg", "jhkycub", "pxacqqudfn", "sofwqmzqalkrmnji")) + .withDomains(Arrays.asList("cyjmoadsuvarmy", "dmjsjqb", "hhyxxrw", "yc")); + model = BinaryData.fromObject(model).toObject(DnsResolverDomainListPatch.class); + Assertions.assertEquals("hp", model.tags().get("xkgymareqnajxqu")); + Assertions.assertEquals("cyjmoadsuvarmy", 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 new file mode 100644 index 000000000000..8e51855012f0 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":[\"yf\"],\"domainsUrl\":\"dgqggebdu\",\"provisioningState\":\"Failed\",\"resourceGuid\":\"eqidbqfatpx\"}") + .toObject(DnsResolverDomainListProperties.class); + Assertions.assertEquals("yf", model.domains().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverDomainListProperties model = new DnsResolverDomainListProperties().withDomains(Arrays.asList("yf")); + model = BinaryData.fromObject(model).toObject(DnsResolverDomainListProperties.class); + Assertions.assertEquals("yf", model.domains().get(0)); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsBulkMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsBulkMockTests.java index 4da93bf784c1..e941010e6bfe 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsBulkMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverDomainListsBulkMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -23,7 +23,7 @@ public final class DnsResolverDomainListsBulkMockTests { @Test public void testBulk() throws Exception { String responseStr - = "{\"etag\":\"is\",\"properties\":{\"domains\":[\"xzhczexrxz\",\"ujrtrhqvwr\"],\"domainsUrl\":\"khgn\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"nzlrpiqywncvjt\"},\"location\":\"cof\",\"tags\":{\"gbjkvreljeamur\":\"htd\"},\"id\":\"zmlovuanash\",\"name\":\"xlpm\",\"type\":\"erbdk\"}"; + = "{\"properties\":{\"domains\":[\"sihsgqcwdhohsd\"],\"domainsUrl\":\"cdzsu\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"dxbzlmcmuap\"},\"etag\":\"hdbevwqqxeyskon\",\"location\":\"inkfkbgbz\",\"tags\":{\"jmygvk\":\"xeqoc\",\"fezrx\":\"qkjjeokbz\",\"q\":\"czurtlei\",\"zvd\":\"bkwvzg\"},\"id\":\"bzdixzmq\",\"name\":\"noda\",\"type\":\"opqhewjptmc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testBulk() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DnsResolverDomainList response = manager.dnsResolverDomainLists() - .bulk("hheioqaqhvseuf", "qyrxp", - new DnsResolverDomainListBulk().withStorageUrl("lcgqlsismj").withAction(Action.DOWNLOAD), "rddga", - "quhiosrsjuivf", com.azure.core.util.Context.NONE); + .bulk("vlgo", "bmftpmdt", + new DnsResolverDomainListBulk().withStorageUrl("fjltfvnzcyjtotp").withAction(Action.UPLOAD), + "pvpbdbzqgqqiheds", "qwthmky", com.azure.core.util.Context.NONE); - Assertions.assertEquals("cof", response.location()); - Assertions.assertEquals("htd", response.tags().get("gbjkvreljeamur")); - Assertions.assertEquals("xzhczexrxz", response.domains().get(0)); + Assertions.assertEquals("inkfkbgbz", response.location()); + Assertions.assertEquals("xeqoc", response.tags().get("jmygvk")); + Assertions.assertEquals("sihsgqcwdhohsd", response.domains().get(0)); } } 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 index e733f16e1231..d27f72b35de5 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -24,7 +24,7 @@ public final class DnsResolverDomainListsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"texoqqpwc\",\"properties\":{\"domains\":[\"mhruncuwm\",\"spkcdqzh\",\"ctddun\"],\"domainsUrl\":\"dyfpchrqbnj\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"egy\"},\"location\":\"wboxjumvqqo\",\"tags\":{\"aiouaubrjt\":\"r\",\"fuojrngif\":\"oq\",\"dfqwmkyoq\":\"rzpasccbiuimzdly\"},\"id\":\"fdvruz\",\"name\":\"lzo\",\"type\":\"hpc\"}"; + = "{\"properties\":{\"domains\":[\"usfzsvtuikzha\",\"qglcfhmlrqryxynq\",\"zrdpsovwxznptgoe\",\"ybbabpfhvfsl\"],\"domainsUrl\":\"ntjlr\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"s\"},\"etag\":\"rioov\",\"location\":\"dsxwaab\",\"tags\":{\"izkzobgo\":\"frygznmmax\",\"ieixynllxe\":\"xlhslnel\"},\"id\":\"wcrojphslhcaw\",\"name\":\"u\",\"type\":\"i\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,18 +34,18 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DnsResolverDomainList response = manager.dnsResolverDomainLists() - .define("bccxjmonfdgn") - .withRegion("bbelawumuaslzk") - .withExistingResourceGroup("lvidizozs") - .withTags(mapOf("nomdrkywuhpsv", "woycqucwyha", "xzsrzpge", "uurutlwexxwlalni", "yb", "q")) - .withDomains(Arrays.asList("ctzenkeifzzhmkd", "svflyhbxcudch", "gsrboldforobw")) - .withIfMatch("mysu") - .withIfNoneMatch("swqrntvlwijp") + .define("dlat") + .withRegion("iuubwefqsf") + .withExistingResourceGroup("sbostzel") + .withTags(mapOf("apjwogqqnobpudcd", "qtferrqwexjkmf", "bucljgkyexaogu", "btqwpwyawbzas")) + .withDomains(Arrays.asList("lbiojlvfhrb", "pn", "qvcww", "yurmochpprprs")) + .withIfMatch("zqdqxt") + .withIfNoneMatch("jw") .create(); - Assertions.assertEquals("wboxjumvqqo", response.location()); - Assertions.assertEquals("r", response.tags().get("aiouaubrjt")); - Assertions.assertEquals("mhruncuwm", response.domains().get(0)); + Assertions.assertEquals("dsxwaab", response.location()); + Assertions.assertEquals("frygznmmax", response.tags().get("izkzobgo")); + Assertions.assertEquals("usfzsvtuikzha", response.domains().get(0)); } // Use "Map.of" if available 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 index 81fdb8f9d9fe..66cb11e696cf 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -21,7 +21,7 @@ public final class DnsResolverDomainListsGetByResourceGroupWithResponseMockTests @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"fgsftufqob\",\"properties\":{\"domains\":[\"acgcckknhx\"],\"domainsUrl\":\"zvytnrzvuljraaer\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"qgukkjqnv\"},\"location\":\"oylaxxul\",\"tags\":{\"hryvy\":\"sdosfjbjsvgjr\",\"xgccknfnw\":\"ytdc\"},\"id\":\"btmvpdvjdhttza\",\"name\":\"fedxihchrphkm\",\"type\":\"rjdqnsdfzp\"}"; + = "{\"properties\":{\"domains\":[\"qpbtuodxes\",\"abbelawumuaslzk\"],\"domainsUrl\":\"rwoycqucwyh\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"mdr\"},\"etag\":\"wuhpsvfuur\",\"location\":\"lwexxwl\",\"tags\":{\"q\":\"iexzsrzpge\",\"wwpgdakchzyvlixq\":\"yb\",\"bn\":\"rkcxkj\",\"swqrntvlwijp\":\"mysu\"},\"id\":\"ttexoqqpwcyyufmh\",\"name\":\"uncuw\",\"type\":\"qspkcdqzhlctd\"}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DnsResolverDomainList response = manager.dnsResolverDomainLists() - .getByResourceGroupWithResponse("kdlpa", "zrcxfailcfxwmdbo", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("boldforobwj", "vizbfhfo", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("oylaxxul", response.location()); - Assertions.assertEquals("sdosfjbjsvgjr", response.tags().get("hryvy")); - Assertions.assertEquals("acgcckknhx", response.domains().get(0)); + Assertions.assertEquals("lwexxwl", response.location()); + Assertions.assertEquals("iexzsrzpge", response.tags().get("q")); + Assertions.assertEquals("qpbtuodxes", 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 index 02825b2909a4..4b9d0fbcdff0 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class DnsResolverDomainListsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"utlwxezwzhok\",\"properties\":{\"domains\":[\"hh\",\"qlgehg\"],\"domainsUrl\":\"ipifhpfeoajvg\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"jcsheafid\"},\"location\":\"ugsresmkssjhoi\",\"tags\":{\"fwegprhptillu\":\"f\",\"hm\":\"biqtgdq\",\"lllibph\":\"wsldrizetpwbr\",\"a\":\"qzmiza\"},\"id\":\"ankjpdnjzh\",\"name\":\"joylh\",\"type\":\"lmuoyxprimrsopte\"}]}"; + = "{\"value\":[{\"properties\":{\"domains\":[\"gegydcwboxjum\",\"qqoli\",\"r\"],\"domainsUrl\":\"iouaubrjt\",\"provisioningState\":\"Deleting\",\"resourceGuid\":\"fuojrngif\"},\"etag\":\"z\",\"location\":\"sccbiuimzd\",\"tags\":{\"fdvruz\":\"dfqwmkyoq\",\"hpc\":\"lzo\",\"fdgugeyzi\":\"fnmdxotn\",\"jee\":\"grkyuizabsnmfpph\"},\"id\":\"yhyhsgzfczb\",\"name\":\"omfgbeglqgleohib\",\"type\":\"tnluankrr\"}]}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.dnsResolverDomainLists() - .listByResourceGroup("gtgkylkdghr", 810731058, com.azure.core.util.Context.NONE); + .listByResourceGroup("unqndyfpchrqb", 494278046, com.azure.core.util.Context.NONE); - Assertions.assertEquals("ugsresmkssjhoi", response.iterator().next().location()); - Assertions.assertEquals("f", response.iterator().next().tags().get("fwegprhptillu")); - Assertions.assertEquals("hh", response.iterator().next().domains().get(0)); + Assertions.assertEquals("sccbiuimzd", response.iterator().next().location()); + Assertions.assertEquals("dfqwmkyoq", response.iterator().next().tags().get("fdvruz")); + Assertions.assertEquals("gegydcwboxjum", 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 index 873f2f643234..6d42ccbdd46c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class DnsResolverDomainListsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"meisls\",\"properties\":{\"domains\":[\"ylw\",\"dzaumweooh\",\"uufuz\",\"oyjathwtzol\"],\"domainsUrl\":\"emwmdxmebwjs\",\"provisioningState\":\"Canceled\",\"resourceGuid\":\"hlxvea\"},\"location\":\"qxnmwmqt\",\"tags\":{\"jaeukmrsieekpn\":\"yijddtvqcttad\"},\"id\":\"zaapmudqmeqwi\",\"name\":\"pibudqwyxebeybpm\",\"type\":\"znrtffyaqit\"}]}"; + = "{\"value\":[{\"properties\":{\"domains\":[\"btijvacvbm\",\"z\",\"qqxlajr\",\"wxacevehj\"],\"domainsUrl\":\"yxoaf\",\"provisioningState\":\"Failed\",\"resourceGuid\":\"lt\"},\"etag\":\"eyl\",\"location\":\"mfgvxirpghriypo\",\"tags\":{\"nuciqdsmexiit\":\"hlqhykprlpy\",\"stgnl\":\"fuxtyasiibmiybnn\",\"vmqfoud\":\"hnmgixhcm\",\"yyprotwyp\":\"rhc\"},\"id\":\"ndm\",\"name\":\"xhugcm\",\"type\":\"k\"}]}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.dnsResolverDomainLists().list(1101000820, com.azure.core.util.Context.NONE); + = manager.dnsResolverDomainLists().list(1893496735, com.azure.core.util.Context.NONE); - Assertions.assertEquals("qxnmwmqt", response.iterator().next().location()); - Assertions.assertEquals("yijddtvqcttad", response.iterator().next().tags().get("jaeukmrsieekpn")); - Assertions.assertEquals("ylw", response.iterator().next().domains().get(0)); + Assertions.assertEquals("mfgvxirpghriypo", response.iterator().next().location()); + Assertions.assertEquals("hlqhykprlpy", response.iterator().next().tags().get("nuciqdsmexiit")); + Assertions.assertEquals("btijvacvbm", response.iterator().next().domains().get(0)); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverInnerTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverInnerTests.java new file mode 100644 index 000000000000..a190d848740b --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverInnerTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.DnsResolverInner; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class DnsResolverInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsResolverInner model = BinaryData.fromString( + "{\"properties\":{\"virtualNetwork\":{\"id\":\"mhquvgjxp\"},\"dnsResolverState\":\"Disconnected\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"hmtzopbsphrup\"},\"etag\":\"gsybbejhp\",\"location\":\"ycm\",\"tags\":{\"tbmufpo\":\"obhdxbmtqioqjze\"},\"id\":\"noi\",\"name\":\"hwlrx\",\"type\":\"bqsoqijg\"}") + .toObject(DnsResolverInner.class); + Assertions.assertEquals("ycm", model.location()); + Assertions.assertEquals("obhdxbmtqioqjze", model.tags().get("tbmufpo")); + Assertions.assertEquals("mhquvgjxp", model.virtualNetwork().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverInner model = new DnsResolverInner().withLocation("ycm") + .withTags(mapOf("tbmufpo", "obhdxbmtqioqjze")) + .withVirtualNetwork(new SubResource().withId("mhquvgjxp")); + model = BinaryData.fromObject(model).toObject(DnsResolverInner.class); + Assertions.assertEquals("ycm", model.location()); + Assertions.assertEquals("obhdxbmtqioqjze", model.tags().get("tbmufpo")); + Assertions.assertEquals("mhquvgjxp", 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/DnsResolverListResultTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverListResultTests.java new file mode 100644 index 000000000000..bb5c1d910687 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverListResultTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverListResult; +import org.junit.jupiter.api.Assertions; + +public final class DnsResolverListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsResolverListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"virtualNetwork\":{\"id\":\"zlhjxrifkwmrvkt\"},\"dnsResolverState\":\"Disconnected\",\"provisioningState\":\"Updating\",\"resourceGuid\":\"cipaouaj\"},\"etag\":\"qucmpo\",\"location\":\"dkfo\",\"tags\":{\"qs\":\"ygjofjdd\"},\"id\":\"deupewnwrei\",\"name\":\"jzyflu\",\"type\":\"arhmofcqhsmy\"},{\"properties\":{\"virtualNetwork\":{\"id\":\"kdtmlxhekuk\"},\"dnsResolverState\":\"Connected\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"cdm\"},\"etag\":\"rcryuanzwuxzdxta\",\"location\":\"lhmwhfpmrqobm\",\"tags\":{\"pzvgnwzsymglzufc\":\"knryrtihfxtij\",\"hdbihan\":\"zk\",\"y\":\"fhfcb\"},\"id\":\"a\",\"name\":\"ithxqhabifpi\",\"type\":\"xwczbyscnp\"},{\"properties\":{\"virtualNetwork\":{\"id\":\"uhivyqniw\"},\"dnsResolverState\":\"Connected\",\"provisioningState\":\"Updating\",\"resourceGuid\":\"vd\"},\"etag\":\"jgrtfwvukxga\",\"location\":\"ccsnhsjc\",\"tags\":{\"kryhtnapczwlokj\":\"j\",\"jnchgej\":\"emkkvnipjox\"},\"id\":\"podmailzydehojwy\",\"name\":\"huxinpmqnj\",\"type\":\"qwixjspro\"},{\"properties\":{\"virtualNetwork\":{\"id\":\"cputegjvwmfdats\"},\"dnsResolverState\":\"Disconnected\",\"provisioningState\":\"Updating\",\"resourceGuid\":\"hulsuuvmkjozkrwf\"},\"etag\":\"iodjp\",\"location\":\"w\",\"tags\":{\"azakl\":\"pvwryoqpsoacc\",\"fdosyg\":\"lahbcryff\",\"hcrzevd\":\"xpaojakhmsbz\",\"qjbpfzfsin\":\"hlxaolthqtr\"},\"id\":\"gvfcj\",\"name\":\"wzo\",\"type\":\"xjtfelluwfzit\"}],\"nextLink\":\"peqfpjkjl\"}") + .toObject(DnsResolverListResult.class); + Assertions.assertEquals("dkfo", model.value().get(0).location()); + Assertions.assertEquals("ygjofjdd", model.value().get(0).tags().get("qs")); + Assertions.assertEquals("zlhjxrifkwmrvkt", model.value().get(0).virtualNetwork().id()); + Assertions.assertEquals("peqfpjkjl", model.nextLink()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPatchTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPatchTests.java new file mode 100644 index 000000000000..a19c277fb60a --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPatchTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.models.DnsResolverPatch; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class DnsResolverPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsResolverPatch model + = BinaryData.fromString("{\"tags\":{\"gdf\":\"ojywifsqesa\"}}").toObject(DnsResolverPatch.class); + Assertions.assertEquals("ojywifsqesa", model.tags().get("gdf")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverPatch model = new DnsResolverPatch().withTags(mapOf("gdf", "ojywifsqesa")); + model = BinaryData.fromObject(model).toObject(DnsResolverPatch.class); + Assertions.assertEquals("ojywifsqesa", model.tags().get("gdf")); + } + + // 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/DnsResolverPoliciesCreateOrUpdateMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPoliciesCreateOrUpdateMockTests.java index fc2180c5d16e..a0181bdefa6d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -23,7 +23,7 @@ public final class DnsResolverPoliciesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"dyuib\",\"properties\":{\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"bzydvfvfcj\"},\"location\":\"eoisrvhmgor\",\"tags\":{\"faxvxil\":\"kiscvwmzhwpl\",\"nzeyqxtjj\":\"btgn\",\"vodggxdbee\":\"zqlqhyc\"},\"id\":\"mieknlraria\",\"name\":\"wiuagydwqf\",\"type\":\"ylyrfgiagtco\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"ivmmghfcfiwrxgk\"},\"etag\":\"uvyinzqodfvpgs\",\"location\":\"xgsg\",\"tags\":{\"bqvgaqv\":\"gzdjtxvzf\",\"rdve\":\"gafcqu\",\"uzhyrmewipmvekdx\":\"nwsdtutnwlduyc\"},\"id\":\"kuqgsjjxundxgket\",\"name\":\"zhhzjhfjmhvvmu\",\"type\":\"gpmuneqsxvmhfbuz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,16 +33,17 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DnsResolverPolicy response = manager.dnsResolverPolicies() - .define("hlfkqojpy") - .withRegion("nysuxmprafwgckh") - .withExistingResourceGroup("hihfrbbcevqagtlt") - .withTags(mapOf("wafqroud", "vdff")) - .withIfMatch("xg") - .withIfNoneMatch("moy") + .define("qxzhem") + .withRegion("ozzwculkba") + .withExistingResourceGroup("lftidgfcwqmpim") + .withTags(mapOf("uktalhsnvkcdmxz", "ajnjwltlwtjj", "eazulcs", "poaimlnwiaaomyl", "jhlfzswpchwahf", "thwwn", + "wlyxgncxyk", "ousnfepgfewe")) + .withIfMatch("qizxfpxtgqscjavf") + .withIfNoneMatch("juhdqazkmtgguwpi") .create(); - Assertions.assertEquals("eoisrvhmgor", response.location()); - Assertions.assertEquals("kiscvwmzhwpl", response.tags().get("faxvxil")); + Assertions.assertEquals("xgsg", response.location()); + Assertions.assertEquals("gzdjtxvzf", response.tags().get("bqvgaqv")); } // Use "Map.of" if available 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 index 4e71f5ce5cf2..4596d3ecf4e2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -21,7 +21,7 @@ public final class DnsResolverPoliciesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"vfcibyfmowux\",\"properties\":{\"provisioningState\":\"Updating\",\"resourceGuid\":\"dwxf\"},\"location\":\"iivwzjbhyzsxjrka\",\"tags\":{\"uqeqv\":\"rnegvmn\",\"est\":\"dspastjbkkdmfl\",\"ilozapeewchpxlk\":\"jlxr\",\"ziycslevufuztck\":\"wk\"},\"id\":\"yhjtqedcgzu\",\"name\":\"wmmrq\",\"type\":\"zrrjvpgly\"}"; + = "{\"properties\":{\"provisioningState\":\"Deleting\",\"resourceGuid\":\"gxdbeesmie\"},\"etag\":\"lrariaawiu\",\"location\":\"ydwqfbylyrf\",\"tags\":{\"fnzjvusfzldm\":\"gtcojocqwo\"},\"id\":\"zuxylfsbtkadpyso\",\"name\":\"nbtgkbugrjqctoj\",\"type\":\"mi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DnsResolverPolicy response = manager.dnsResolverPolicies() - .getByResourceGroupWithResponse("fuajly", "tlvofq", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("nzeyqxtjj", "zqlqhyc", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("iivwzjbhyzsxjrka", response.location()); - Assertions.assertEquals("rnegvmn", response.tags().get("uqeqv")); + Assertions.assertEquals("ydwqfbylyrf", response.location()); + Assertions.assertEquals("gtcojocqwo", response.tags().get("fnzjvusfzldm")); } } 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 index 8aaf65cad814..8693e01520af 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class DnsResolverPoliciesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"oepry\",\"properties\":{\"provisioningState\":\"Canceled\",\"resourceGuid\":\"tpzdmovzvfvaawzq\"},\"location\":\"f\",\"tags\":{\"glae\":\"ur\"},\"id\":\"xndticokpvzmlqtm\",\"name\":\"dgxobfircl\",\"type\":\"pkc\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"ojyqdhcuplcplcw\"},\"etag\":\"ihih\",\"location\":\"zdsqtzbsrgnow\",\"tags\":{\"e\":\"fgmvecactxmwo\",\"ekqvgqouwif\":\"owcluqo\",\"ivqikfxcvhr\":\"mpjw\"},\"id\":\"sphuagrttikteus\",\"name\":\"c\",\"type\":\"kvyklxubyjaffmm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.dnsResolverPolicies().listByResourceGroup("zgkrvqe", 561886244, com.azure.core.util.Context.NONE); + = manager.dnsResolverPolicies().listByResourceGroup("of", 525772305, com.azure.core.util.Context.NONE); - Assertions.assertEquals("f", response.iterator().next().location()); - Assertions.assertEquals("ur", response.iterator().next().tags().get("glae")); + Assertions.assertEquals("zdsqtzbsrgnow", response.iterator().next().location()); + Assertions.assertEquals("fgmvecactxmwo", response.iterator().next().tags().get("e")); } } 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 index ca73d05a3cfb..424e031e4737 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -21,7 +21,7 @@ public final class DnsResolverPoliciesListByVirtualNetworkMockTests { @Test public void testListByVirtualNetwork() throws Exception { - String responseStr = "{\"value\":[{\"id\":\"pnvdxz\"}]}"; + String responseStr = "{\"value\":[{\"id\":\"moob\"}]}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.dnsResolverPolicies() - .listByVirtualNetwork("qgnjdgkynscli", "hzvhxnkomtkubo", com.azure.core.util.Context.NONE); + .listByVirtualNetwork("brxjjsto", "beitpkx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("pnvdxz", response.iterator().next().id()); + Assertions.assertEquals("moob", 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 index 62b095a35b0a..82d81bdb61d2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class DnsResolverPoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"zriykhy\",\"properties\":{\"provisioningState\":\"Updating\",\"resourceGuid\":\"lboxqvkjl\"},\"location\":\"ho\",\"tags\":{\"uzzptjazysdz\":\"nhdwdigumbnra\",\"iqyuvvfo\":\"ezwwv\",\"ikvylauya\":\"kphhq\"},\"id\":\"luwmncst\",\"name\":\"ijf\",\"type\":\"bvpoekrsgsgbdhu\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"resourceGuid\":\"u\"},\"etag\":\"gqibrtalmetttw\",\"location\":\"slqxi\",\"tags\":{\"z\":\"moo\",\"y\":\"seypxiutcxapz\",\"lhvnhlab\":\"petogebjox\"},\"id\":\"q\",\"name\":\"kkzjcjbtrga\",\"type\":\"hvv\"}]}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.dnsResolverPolicies().list(1115944872, com.azure.core.util.Context.NONE); + = manager.dnsResolverPolicies().list(355904338, com.azure.core.util.Context.NONE); - Assertions.assertEquals("ho", response.iterator().next().location()); - Assertions.assertEquals("nhdwdigumbnra", response.iterator().next().tags().get("uzzptjazysdz")); + Assertions.assertEquals("slqxi", response.iterator().next().location()); + Assertions.assertEquals("moo", response.iterator().next().tags().get("z")); } } 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 new file mode 100644 index 000000000000..cdc65fc07706 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyInnerTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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( + "{\"properties\":{\"provisioningState\":\"Failed\",\"resourceGuid\":\"savjcbpwxqps\"},\"etag\":\"nftguvriuhpr\",\"location\":\"dyvxqtayriww\",\"tags\":{\"mcqibycnojv\":\"qbex\",\"zhpvgqzcjrvxd\":\"nmefqsgzvahapj\",\"vawjvzunlu\":\"zlmwlxkvugfhz\",\"xipeilpjzuaejx\":\"hnnpr\"},\"id\":\"ultskzbbtdz\",\"name\":\"mv\",\"type\":\"ekg\"}") + .toObject(DnsResolverPolicyInner.class); + Assertions.assertEquals("dyvxqtayriww", model.location()); + Assertions.assertEquals("qbex", model.tags().get("mcqibycnojv")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverPolicyInner model = new DnsResolverPolicyInner().withLocation("dyvxqtayriww") + .withTags(mapOf("mcqibycnojv", "qbex", "zhpvgqzcjrvxd", "nmefqsgzvahapj", "vawjvzunlu", "zlmwlxkvugfhz", + "xipeilpjzuaejx", "hnnpr")); + model = BinaryData.fromObject(model).toObject(DnsResolverPolicyInner.class); + Assertions.assertEquals("dyvxqtayriww", model.location()); + Assertions.assertEquals("qbex", model.tags().get("mcqibycnojv")); + } + + // 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 new file mode 100644 index 000000000000..2be8d67379da --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyListResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverPolicyListResult; +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\":[{\"properties\":{\"provisioningState\":\"Creating\",\"resourceGuid\":\"kelnsmvbxwyjsf\"},\"etag\":\"hcaalnjix\",\"location\":\"xyawj\",\"tags\":{\"yexz\":\"qcslyjpkiid\"},\"id\":\"eli\",\"name\":\"hnrztfol\",\"type\":\"bnxknalaulppg\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"apnyiropuhpig\"},\"etag\":\"gylgqgitxmedjvcs\",\"location\":\"n\",\"tags\":{\"zhxgktrmgucn\":\"ncw\",\"llwptfdy\":\"pkteo\",\"rhhuaopppcqeqx\":\"pfqbuaceopzf\",\"izpost\":\"lzdahzxctobgbkdm\"},\"id\":\"grcfb\",\"name\":\"nrmfqjhhk\",\"type\":\"bpvjymjhx\"}],\"nextLink\":\"yngudivk\"}") + .toObject(DnsResolverPolicyListResult.class); + Assertions.assertEquals("xyawj", model.value().get(0).location()); + Assertions.assertEquals("qcslyjpkiid", model.value().get(0).tags().get("yexz")); + Assertions.assertEquals("yngudivk", model.nextLink()); + } +} 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 new file mode 100644 index 000000000000..58bf81ba8418 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyPatchTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":{\"uusdttouwa\":\"bsjyofdx\"}}").toObject(DnsResolverPolicyPatch.class); + Assertions.assertEquals("bsjyofdx", model.tags().get("uusdttouwa")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverPolicyPatch model = new DnsResolverPolicyPatch().withTags(mapOf("uusdttouwa", "bsjyofdx")); + model = BinaryData.fromObject(model).toObject(DnsResolverPolicyPatch.class); + Assertions.assertEquals("bsjyofdx", model.tags().get("uusdttouwa")); + } + + // 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 new file mode 100644 index 000000000000..0a429cb6b780 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyPropertiesTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Deleting\",\"resourceGuid\":\"uh\"}") + .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 new file mode 100644 index 000000000000..5dcf13ebeab6 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkInnerTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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( + "{\"properties\":{\"virtualNetwork\":{\"id\":\"taakc\"},\"provisioningState\":\"Failed\"},\"etag\":\"zvqtmnubexkp\",\"location\":\"smond\",\"tags\":{\"jvp\":\"uxvypomgkopkwh\",\"ysmocmbqfqvmkcxo\":\"jqg\",\"tddckcb\":\"apvhelxprgly\"},\"id\":\"uejrjxgc\",\"name\":\"qibrhosxsdqrhzoy\",\"type\":\"i\"}") + .toObject(DnsResolverPolicyVirtualNetworkLinkInner.class); + Assertions.assertEquals("smond", model.location()); + Assertions.assertEquals("uxvypomgkopkwh", model.tags().get("jvp")); + Assertions.assertEquals("taakc", model.virtualNetwork().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverPolicyVirtualNetworkLinkInner model + = new DnsResolverPolicyVirtualNetworkLinkInner().withLocation("smond") + .withTags(mapOf("jvp", "uxvypomgkopkwh", "ysmocmbqfqvmkcxo", "jqg", "tddckcb", "apvhelxprgly")) + .withVirtualNetwork(new SubResource().withId("taakc")); + model = BinaryData.fromObject(model).toObject(DnsResolverPolicyVirtualNetworkLinkInner.class); + Assertions.assertEquals("smond", model.location()); + Assertions.assertEquals("uxvypomgkopkwh", model.tags().get("jvp")); + Assertions.assertEquals("taakc", 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 new file mode 100644 index 000000000000..10f0f82c84f6 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkListResultTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.implementation.models.DnsResolverPolicyVirtualNetworkLinkListResult; +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\":[{\"properties\":{\"virtualNetwork\":{\"id\":\"giwbwoenwa\"},\"provisioningState\":\"Succeeded\"},\"etag\":\"dtkcnqxwbpokulp\",\"location\":\"jwaa\",\"tags\":{\"qlpqwcciuq\":\"qiiobyuqer\",\"tkuwhhmhykojo\":\"bdbutauvf\",\"lpichk\":\"afnn\"},\"id\":\"ymkcdyhb\",\"name\":\"kkpwdreqnovvq\",\"type\":\"ovljxywsu\"},{\"properties\":{\"virtualNetwork\":{\"id\":\"yrs\"},\"provisioningState\":\"Updating\"},\"etag\":\"tgadgvraeaen\",\"location\":\"nzar\",\"tags\":{\"uijfqk\":\"q\",\"ibwwiftohqkv\":\"cewiipfpub\",\"ljphuopxodl\":\"uvksgplsaknynfsy\",\"sjswsrms\":\"iyntorzihle\"},\"id\":\"yzrpzbchckqqzq\",\"name\":\"ox\",\"type\":\"ysuiizynkedya\"},{\"properties\":{\"virtualNetwork\":{\"id\":\"wyhqmibzyhwits\"},\"provisioningState\":\"Creating\"},\"etag\":\"ynpcdpumnzgmwznm\",\"location\":\"iknsorgjh\",\"tags\":{\"tncvokot\":\"dtlwwrlkd\",\"gsyocogj\":\"lxdy\"},\"id\":\"tdtbnnhadooc\",\"name\":\"kvci\",\"type\":\"hnvpamqgxq\"},{\"properties\":{\"virtualNetwork\":{\"id\":\"ezikywggxkal\"},\"provisioningState\":\"Failed\"},\"etag\":\"elwuipi\",\"location\":\"jzkzi\",\"tags\":{\"ayrhyrnx\":\"vc\",\"qqtch\":\"mueedndrdvstk\"},\"id\":\"alm\",\"name\":\"mtdaa\",\"type\":\"gdv\"}],\"nextLink\":\"gpiohgwxrtfudxe\"}") + .toObject(DnsResolverPolicyVirtualNetworkLinkListResult.class); + Assertions.assertEquals("jwaa", model.value().get(0).location()); + Assertions.assertEquals("qiiobyuqer", model.value().get(0).tags().get("qlpqwcciuq")); + Assertions.assertEquals("giwbwoenwa", model.value().get(0).virtualNetwork().id()); + Assertions.assertEquals("gpiohgwxrtfudxe", model.nextLink()); + } +} 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 new file mode 100644 index 000000000000..896d7dc5f5c0 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkPatchTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":{\"hrkwo\":\"wfluszdt\",\"qacpiex\":\"yyv\"}}") + .toObject(DnsResolverPolicyVirtualNetworkLinkPatch.class); + Assertions.assertEquals("wfluszdt", model.tags().get("hrkwo")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverPolicyVirtualNetworkLinkPatch model + = new DnsResolverPolicyVirtualNetworkLinkPatch().withTags(mapOf("hrkwo", "wfluszdt", "qacpiex", "yyv")); + model = BinaryData.fromObject(model).toObject(DnsResolverPolicyVirtualNetworkLinkPatch.class); + Assertions.assertEquals("wfluszdt", model.tags().get("hrkwo")); + } + + // 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 new file mode 100644 index 000000000000..3a70e8c4e876 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPolicyVirtualNetworkLinkPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"rq\"},\"provisioningState\":\"Deleting\"}") + .toObject(DnsResolverPolicyVirtualNetworkLinkProperties.class); + Assertions.assertEquals("rq", model.virtualNetwork().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverPolicyVirtualNetworkLinkProperties model + = new DnsResolverPolicyVirtualNetworkLinkProperties().withVirtualNetwork(new SubResource().withId("rq")); + model = BinaryData.fromObject(model).toObject(DnsResolverPolicyVirtualNetworkLinkProperties.class); + Assertions.assertEquals("rq", 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 index dcda771a43a7..9da26f5e5870 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -24,7 +24,7 @@ public final class DnsResolverPolicyVirtualNetworkLinksCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"prtujwsawdd\",\"properties\":{\"virtualNetwork\":{\"id\":\"babxvitit\"},\"provisioningState\":\"Succeeded\"},\"location\":\"exavoxt\",\"tags\":{\"q\":\"ecdmdqbwpy\",\"slhhxudbxv\":\"gsfjac\",\"tnsi\":\"d\"},\"id\":\"ud\",\"name\":\"z\",\"type\":\"mes\"}"; + = "{\"properties\":{\"virtualNetwork\":{\"id\":\"zonzlrpiqywnc\"},\"provisioningState\":\"Succeeded\"},\"etag\":\"z\",\"location\":\"fizehtdhgbjk\",\"tags\":{\"vzmlovuanashcxl\":\"ljeamu\",\"lvidizozs\":\"mjerbdk\",\"n\":\"bccxjmonfdgn\",\"keifzzhmkdasv\":\"ypuuwwltvuqjctze\"},\"id\":\"lyhb\",\"name\":\"cu\",\"type\":\"chxgs\"}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DnsResolverPolicyVirtualNetworkLink response = manager.dnsResolverPolicyVirtualNetworkLinks() - .define("jjidjk") - .withRegion("jbnkpp") - .withExistingDnsResolverPolicy("jhhn", "kzyb") - .withVirtualNetwork(new SubResource().withId("nljlageuaulx")) - .withTags(mapOf("rmffeyc", "enlsvxeizzgwkln", "iymerteeammxqi", "ckt", "zddrt", "kk")) - .withIfMatch("cuijpxt") - .withIfNoneMatch("s") + .define("mwmqtibx") + .withRegion("aapm") + .withExistingDnsResolverPolicy("mwmdxmebwjscjpa", "lxveabfqx") + .withVirtualNetwork(new SubResource().withId("jddtvqct")) + .withTags(mapOf("ibudqwy", "meqwig", "ybpmzznrtffyaq", "eb", "hvseufuqyrx", "tmhheioqa", "dgamquhiosrsj", + "dlcgqlsismjqfr")) + .withIfMatch("qvwre") + .withIfNoneMatch("khgn") .create(); - Assertions.assertEquals("exavoxt", response.location()); - Assertions.assertEquals("ecdmdqbwpy", response.tags().get("q")); - Assertions.assertEquals("babxvitit", response.virtualNetwork().id()); + Assertions.assertEquals("fizehtdhgbjk", response.location()); + Assertions.assertEquals("ljeamu", response.tags().get("vzmlovuanashcxl")); + Assertions.assertEquals("zonzlrpiqywnc", response.virtualNetwork().id()); } // Use "Map.of" if available 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 index 408402457d83..3ba9043f0157 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -21,7 +21,7 @@ public final class DnsResolverPolicyVirtualNetworkLinksGetWithResponseMockTests @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"etag\":\"tyms\",\"properties\":{\"virtualNetwork\":{\"id\":\"ygqdnfwqzdz\"},\"provisioningState\":\"Updating\"},\"location\":\"axhnfh\",\"tags\":{\"ouwivkxoyzunbixx\":\"vi\"},\"id\":\"ti\",\"name\":\"vcpwpgclrc\",\"type\":\"vtsoxf\"}"; + = "{\"properties\":{\"virtualNetwork\":{\"id\":\"rjdqnsdfzp\"},\"provisioningState\":\"Deleting\"},\"etag\":\"kylkdghrj\",\"location\":\"utlwxezwzhok\",\"tags\":{\"ehgpp\":\"nhhtql\",\"csheafidltugsr\":\"pifhpfeoajvgcxtx\",\"h\":\"smkss\",\"egprhptil\":\"iftxfkf\"},\"id\":\"ucb\",\"name\":\"qtgdqohmcwsl\",\"type\":\"riz\"}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DnsResolverPolicyVirtualNetworkLink response = manager.dnsResolverPolicyVirtualNetworkLinks() - .getWithResponse("yihsasbhudypohyu", "ms", "ynsqyrpfoobr", com.azure.core.util.Context.NONE) + .getWithResponse("knfnwmbtmvpdv", "dhttzaefedxihchr", "hk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("axhnfh", response.location()); - Assertions.assertEquals("vi", response.tags().get("ouwivkxoyzunbixx")); - Assertions.assertEquals("ygqdnfwqzdz", response.virtualNetwork().id()); + Assertions.assertEquals("utlwxezwzhok", response.location()); + Assertions.assertEquals("nhhtql", response.tags().get("ehgpp")); + Assertions.assertEquals("rjdqnsdfzp", 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 index 9b23b2a77450..f7a5fea2f88c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class DnsResolverPolicyVirtualNetworkLinksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"frpmpdnqqskaw\",\"properties\":{\"virtualNetwork\":{\"id\":\"qvmmbn\"},\"provisioningState\":\"Failed\"},\"location\":\"tqlkz\",\"tags\":{\"qdrfegcealzxwhc\":\"nitgvkxlz\",\"vbkbxgomf\":\"nsymoyqhlwigd\",\"jsqzhzbezk\":\"juwasqvdaeyyguxa\"},\"id\":\"imsidxasicddyvvj\",\"name\":\"kgfmocwahpq\",\"type\":\"atjeaahh\"}]}"; + = "{\"value\":[{\"properties\":{\"virtualNetwork\":{\"id\":\"ibph\"},\"provisioningState\":\"Failed\"},\"etag\":\"izakak\",\"location\":\"kjpdnjzhajo\",\"tags\":{\"ecj\":\"jlmuoyxprimrsopt\",\"zaum\":\"eislstvasylwx\"},\"id\":\"eoohguufuzboyj\",\"name\":\"thwtzol\",\"type\":\"a\"}]}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.dnsResolverPolicyVirtualNetworkLinks() - .list("kenx", "m", 1600333305, com.azure.core.util.Context.NONE); + .list("tpwb", "a", 1596471966, com.azure.core.util.Context.NONE); - Assertions.assertEquals("tqlkz", response.iterator().next().location()); - Assertions.assertEquals("nitgvkxlz", response.iterator().next().tags().get("qdrfegcealzxwhc")); - Assertions.assertEquals("qvmmbn", response.iterator().next().virtualNetwork().id()); + Assertions.assertEquals("kjpdnjzhajo", response.iterator().next().location()); + Assertions.assertEquals("jlmuoyxprimrsopt", response.iterator().next().tags().get("ecj")); + Assertions.assertEquals("ibph", response.iterator().next().virtualNetwork().id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPropertiesTests.java new file mode 100644 index 000000000000..9e3a87cdebbc --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsResolverPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.DnsResolverProperties; +import org.junit.jupiter.api.Assertions; + +public final class DnsResolverPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsResolverProperties model = BinaryData.fromString( + "{\"virtualNetwork\":{\"id\":\"mbpazlobcufpdzn\"},\"dnsResolverState\":\"Connected\",\"provisioningState\":\"Deleting\",\"resourceGuid\":\"jnqglhqgnu\"}") + .toObject(DnsResolverProperties.class); + Assertions.assertEquals("mbpazlobcufpdzn", model.virtualNetwork().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsResolverProperties model + = new DnsResolverProperties().withVirtualNetwork(new SubResource().withId("mbpazlobcufpdzn")); + model = BinaryData.fromObject(model).toObject(DnsResolverProperties.class); + Assertions.assertEquals("mbpazlobcufpdzn", model.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 7b310e98ee28..e5ecbd2312d2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -24,7 +24,7 @@ public final class DnsResolversCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"x\",\"properties\":{\"virtualNetwork\":{\"id\":\"q\"},\"dnsResolverState\":\"Disconnected\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"mciodhkhazxkhn\"},\"location\":\"onlwntoeg\",\"tags\":{\"kszzcmrvexztv\":\"wbw\",\"gsfraoyzkoow\":\"t\",\"aldsy\":\"lmnguxaw\",\"znkbykutwpfhpagm\":\"uximerqfobw\"},\"id\":\"r\",\"name\":\"kdsnfdsdoakgtdl\",\"type\":\"kkze\"}"; + = "{\"properties\":{\"virtualNetwork\":{\"id\":\"krribdeibqi\"},\"dnsResolverState\":\"Connected\",\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"xndzwm\"},\"etag\":\"efajpj\",\"location\":\"wkqnyhg\",\"tags\":{\"ystawfsdjpvkvp\":\"tjivfxzsjabib\"},\"id\":\"jxbkzbzkdvn\",\"name\":\"jabudurgkakmo\",\"type\":\"zhjjklffhmouwq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,18 +34,18 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DnsResolver response = manager.dnsResolvers() - .define("f") - .withRegion("grauwjuetaebur") - .withExistingResourceGroup("xqtvcofu") - .withVirtualNetwork(new SubResource().withId("tor")) - .withTags(mapOf("kif", "movsmzlxwabmqoe", "btndo", "vtpuqujmqlgk")) - .withIfMatch("i") - .withIfNoneMatch("ybxarzgszu") + .define("elolppvksrpqvuj") + .withRegion("shfwpracstwity") + .withExistingResourceGroup("kyhejhzisxgf") + .withVirtualNetwork(new SubResource().withId("aehtwd")) + .withTags(mapOf("md", "vxccedcp", "zxltjcvn", "odn", "xqi", "ltiugcxnavv")) + .withIfMatch("odacizs") + .withIfNoneMatch("q") .create(); - Assertions.assertEquals("onlwntoeg", response.location()); - Assertions.assertEquals("wbw", response.tags().get("kszzcmrvexztv")); - Assertions.assertEquals("q", response.virtualNetwork().id()); + Assertions.assertEquals("wkqnyhg", response.location()); + Assertions.assertEquals("tjivfxzsjabib", response.tags().get("ystawfsdjpvkvp")); + Assertions.assertEquals("krribdeibqi", 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 aadeffb9aa84..238e7ce9367e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.dnsResolvers().delete("ebdunyg", "eqidbqfatpx", "lr", com.azure.core.util.Context.NONE); + manager.dnsResolvers().delete("lmnguxaw", "aldsy", "uximerqfobw", 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 2aff80987f74..e52e9c6ad88a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -21,7 +21,7 @@ public final class DnsResolversGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"etag\":\"hyxxrwlycoduhpk\",\"properties\":{\"virtualNetwork\":{\"id\":\"gymare\"},\"dnsResolverState\":\"Connected\",\"provisioningState\":\"Canceled\",\"resourceGuid\":\"ugjhky\"},\"location\":\"beddgssofw\",\"tags\":{\"rmnjijpx\":\"qal\",\"byxbaaabjy\":\"cqqudf\",\"zrtuzq\":\"ayffim\",\"fdnw\":\"gsexne\"},\"id\":\"wmewzsyy\",\"name\":\"euzsoi\",\"type\":\"judpfrxt\"}"; + = "{\"properties\":{\"virtualNetwork\":{\"id\":\"ujitcjedftww\"},\"dnsResolverState\":\"Connected\",\"provisioningState\":\"Deleting\",\"resourceGuid\":\"v\"},\"etag\":\"pzfoqoui\",\"location\":\"bxarzgszufoxci\",\"tags\":{\"xkhnzbonlwnto\":\"idoamciodhkha\"},\"id\":\"gokdwbwhks\",\"name\":\"zcmrvexztvb\",\"type\":\"qgsfraoyzkoow\"}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DnsResolver response = manager.dnsResolvers() - .getByResourceGroupWithResponse("cyjmoadsuvarmy", "dmjsjqb", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("puqujmqlgkfbtn", "oaongbjc", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("beddgssofw", response.location()); - Assertions.assertEquals("qal", response.tags().get("rmnjijpx")); - Assertions.assertEquals("gymare", response.virtualNetwork().id()); + Assertions.assertEquals("bxarzgszufoxci", response.location()); + Assertions.assertEquals("idoamciodhkha", response.tags().get("xkhnzbonlwnto")); + Assertions.assertEquals("ujitcjedftww", 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 278dfacf2134..532598152359 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class DnsResolversListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"xhexiilivpdti\",\"properties\":{\"virtualNetwork\":{\"id\":\"q\"},\"dnsResolverState\":\"Disconnected\",\"provisioningState\":\"Creating\",\"resourceGuid\":\"oruzfgsquyfxrxx\"},\"location\":\"ptramxj\",\"tags\":{\"tdooaoj\":\"lwnwxuqlcvydyp\",\"nuj\":\"niodkooeb\",\"odtji\":\"emmsbvdkc\"},\"id\":\"fw\",\"name\":\"lfltka\",\"type\":\"jvefkdlfoakggkfp\"}]}"; + = "{\"value\":[{\"properties\":{\"virtualNetwork\":{\"id\":\"kdsnfdsdoakgtdl\"},\"dnsResolverState\":\"Disconnected\",\"provisioningState\":\"Updating\",\"resourceGuid\":\"dlhewp\"},\"etag\":\"dsttwvo\",\"location\":\"bbejdcngqqm\",\"tags\":{\"twaenuuzko\":\"ufgmjzrwrdg\",\"iefozbhdmsml\":\"bminrfdwoyuhhzi\"},\"id\":\"zqhof\",\"name\":\"rmaequ\",\"type\":\"ah\"}]}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.dnsResolvers() - .listByResourceGroup("thzvaytdwkqbrqu", 965192802, com.azure.core.util.Context.NONE); + .listByResourceGroup("znkbykutwpfhpagm", 155762894, com.azure.core.util.Context.NONE); - Assertions.assertEquals("ptramxj", response.iterator().next().location()); - Assertions.assertEquals("lwnwxuqlcvydyp", response.iterator().next().tags().get("tdooaoj")); - Assertions.assertEquals("q", response.iterator().next().virtualNetwork().id()); + Assertions.assertEquals("bbejdcngqqm", response.iterator().next().location()); + Assertions.assertEquals("ufgmjzrwrdg", response.iterator().next().tags().get("twaenuuzko")); + Assertions.assertEquals("kdsnfdsdoakgtdl", 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 57edebc84c8e..8fcf42ae3d69 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -21,7 +21,7 @@ public final class DnsResolversListByVirtualNetworkMockTests { @Test public void testListByVirtualNetwork() throws Exception { - String responseStr = "{\"value\":[{\"id\":\"bvtvudutncormr\"}]}"; + String responseStr = "{\"value\":[{\"id\":\"gq\"}]}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.dnsResolvers() - .listByVirtualNetwork("wcsdbnwdcfhucq", "pfuvglsbjjca", 615108235, com.azure.core.util.Context.NONE); + .listByVirtualNetwork("lusiy", "bsfgytguslfea", 489676883, com.azure.core.util.Context.NONE); - Assertions.assertEquals("bvtvudutncormr", response.iterator().next().id()); + Assertions.assertEquals("gq", 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 416a5e8f30e1..088e79d57d4d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class DnsResolversListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"owpulpq\",\"properties\":{\"virtualNetwork\":{\"id\":\"ylsyxkqjnsje\"},\"dnsResolverState\":\"Connected\",\"provisioningState\":\"Deleting\",\"resourceGuid\":\"xsdszuempsb\"},\"location\":\"f\",\"tags\":{\"dxrbuukzcle\":\"yvpnqicvinvkjj\",\"fn\":\"yhmlwpaztzp\",\"fz\":\"ckw\",\"feqztppriol\":\"whxxbuyqax\"},\"id\":\"or\",\"name\":\"altol\",\"type\":\"ncwsob\"}]}"; + = "{\"value\":[{\"properties\":{\"virtualNetwork\":{\"id\":\"slfaoqzpiyyl\"},\"dnsResolverState\":\"Connected\",\"provisioningState\":\"Updating\",\"resourceGuid\":\"hc\"},\"etag\":\"ph\",\"location\":\"ivwitqscywugg\",\"tags\":{\"i\":\"uhczbwemh\",\"wmsweypqwd\":\"sbrgz\"},\"id\":\"ggicccnxqhue\",\"name\":\"mkttlstvlzywem\",\"type\":\"zrncsdt\"}]}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.dnsResolvers().list(2109908244, com.azure.core.util.Context.NONE); + PagedIterable response = manager.dnsResolvers().list(1894418598, com.azure.core.util.Context.NONE); - Assertions.assertEquals("f", response.iterator().next().location()); - Assertions.assertEquals("yvpnqicvinvkjj", response.iterator().next().tags().get("dxrbuukzcle")); - Assertions.assertEquals("ylsyxkqjnsje", response.iterator().next().virtualNetwork().id()); + Assertions.assertEquals("ivwitqscywugg", response.iterator().next().location()); + Assertions.assertEquals("uhczbwemh", response.iterator().next().tags().get("i")); + Assertions.assertEquals("slfaoqzpiyyl", response.iterator().next().virtualNetwork().id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRuleActionTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRuleActionTests.java new file mode 100644 index 000000000000..c87da615ed52 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRuleActionTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.models.ActionType; +import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction; +import org.junit.jupiter.api.Assertions; + +public final class DnsSecurityRuleActionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsSecurityRuleAction model + = BinaryData.fromString("{\"actionType\":\"Alert\"}").toObject(DnsSecurityRuleAction.class); + Assertions.assertEquals(ActionType.ALERT, model.actionType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsSecurityRuleAction model = new DnsSecurityRuleAction().withActionType(ActionType.ALERT); + model = BinaryData.fromObject(model).toObject(DnsSecurityRuleAction.class); + Assertions.assertEquals(ActionType.ALERT, model.actionType()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRuleInnerTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRuleInnerTests.java new file mode 100644 index 000000000000..485594a61507 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRuleInnerTests.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.DnsSecurityRuleInner; +import com.azure.resourcemanager.dnsresolver.models.ActionType; +import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction; +import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; +import com.azure.resourcemanager.dnsresolver.models.ManagedDomainList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class DnsSecurityRuleInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsSecurityRuleInner model = BinaryData.fromString( + "{\"properties\":{\"priority\":1003023874,\"action\":{\"actionType\":\"Alert\"},\"dnsResolverDomainLists\":[{\"id\":\"zvszj\"},{\"id\":\"uvjfdxxive\"},{\"id\":\"t\"}],\"managedDomainLists\":[\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\"],\"dnsSecurityRuleState\":\"Disabled\",\"provisioningState\":\"Failed\"},\"etag\":\"xv\",\"location\":\"xyslqbh\",\"tags\":{\"tkblmpewww\":\"obl\",\"hxcr\":\"bkrvrnsvshqj\",\"sub\":\"bfovasrruvwbhsq\"},\"id\":\"gjb\",\"name\":\"rxbpyb\",\"type\":\"rfbjf\"}") + .toObject(DnsSecurityRuleInner.class); + Assertions.assertEquals("xyslqbh", model.location()); + Assertions.assertEquals("obl", model.tags().get("tkblmpewww")); + Assertions.assertEquals(1003023874, model.priority()); + Assertions.assertEquals(ActionType.ALERT, model.action().actionType()); + Assertions.assertEquals("zvszj", model.dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals(ManagedDomainList.AZURE_DNS_THREAT_INTEL, model.managedDomainLists().get(0)); + Assertions.assertEquals(DnsSecurityRuleState.DISABLED, model.dnsSecurityRuleState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsSecurityRuleInner model = new DnsSecurityRuleInner().withLocation("xyslqbh") + .withTags(mapOf("tkblmpewww", "obl", "hxcr", "bkrvrnsvshqj", "sub", "bfovasrruvwbhsq")) + .withPriority(1003023874) + .withAction(new DnsSecurityRuleAction().withActionType(ActionType.ALERT)) + .withDnsResolverDomainLists(Arrays.asList(new SubResource().withId("zvszj"), + new SubResource().withId("uvjfdxxive"), new SubResource().withId("t"))) + .withManagedDomainLists(Arrays.asList(ManagedDomainList.AZURE_DNS_THREAT_INTEL, + ManagedDomainList.AZURE_DNS_THREAT_INTEL, ManagedDomainList.AZURE_DNS_THREAT_INTEL)) + .withDnsSecurityRuleState(DnsSecurityRuleState.DISABLED); + model = BinaryData.fromObject(model).toObject(DnsSecurityRuleInner.class); + Assertions.assertEquals("xyslqbh", model.location()); + Assertions.assertEquals("obl", model.tags().get("tkblmpewww")); + Assertions.assertEquals(1003023874, model.priority()); + Assertions.assertEquals(ActionType.ALERT, model.action().actionType()); + Assertions.assertEquals("zvszj", model.dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals(ManagedDomainList.AZURE_DNS_THREAT_INTEL, model.managedDomainLists().get(0)); + Assertions.assertEquals(DnsSecurityRuleState.DISABLED, model.dnsSecurityRuleState()); + } + + // 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/DnsSecurityRuleListResultTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRuleListResultTests.java new file mode 100644 index 000000000000..2e8b1e08eb06 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRuleListResultTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.implementation.models.DnsSecurityRuleListResult; +import com.azure.resourcemanager.dnsresolver.models.ActionType; +import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; +import com.azure.resourcemanager.dnsresolver.models.ManagedDomainList; +import org.junit.jupiter.api.Assertions; + +public final class DnsSecurityRuleListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsSecurityRuleListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"priority\":487324139,\"action\":{\"actionType\":\"Block\"},\"dnsResolverDomainLists\":[{\"id\":\"dzu\"},{\"id\":\"rsc\"},{\"id\":\"t\"},{\"id\":\"vfiwjmygtdss\"}],\"managedDomainLists\":[\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\"],\"dnsSecurityRuleState\":\"Disabled\",\"provisioningState\":\"Updating\"},\"etag\":\"fzp\",\"location\":\"semwabnet\",\"tags\":{\"wubmwmbesldn\":\"szhedplvw\",\"lcxog\":\"wwtppj\",\"qqkdltfzxmhhvhgu\":\"okonzmnsikvmkqz\",\"xtibqdxbxwakbog\":\"eodkwobda\"},\"id\":\"xndlkzgxhu\",\"name\":\"iplbpodxunkbebxm\",\"type\":\"byyntwlrbqt\"},{\"properties\":{\"priority\":1876719101,\"action\":{\"actionType\":\"Alert\"},\"dnsResolverDomainLists\":[{\"id\":\"otgqrlltmu\"},{\"id\":\"auwzizxbmpgc\"},{\"id\":\"fuzmuvpbtt\"}],\"managedDomainLists\":[\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\"],\"dnsSecurityRuleState\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"etag\":\"zbtbhj\",\"location\":\"lkfg\",\"tags\":{\"ikdowwquuvx\":\"neuelfphsdyhtoz\"},\"id\":\"xclvit\",\"name\":\"hqzonosggbhcoh\",\"type\":\"wdsjnkalju\"},{\"properties\":{\"priority\":1496719551,\"action\":{\"actionType\":\"Allow\"},\"dnsResolverDomainLists\":[{\"id\":\"ffgdkz\"},{\"id\":\"wkfvhqcrailvp\"},{\"id\":\"pfuflrw\"},{\"id\":\"hdlxyjrxsagafcn\"}],\"managedDomainLists\":[\"AzureDnsThreatIntel\"],\"dnsSecurityRuleState\":\"Disabled\",\"provisioningState\":\"Canceled\"},\"etag\":\"dgfbcvkcvqvpke\",\"location\":\"cvdrhvoodsot\",\"tags\":{\"d\":\"zdopcjwvnhd\",\"twuoegrpkhjwni\":\"mgxcxrslpm\"},\"id\":\"qsluicp\",\"name\":\"ggkzzlvmbmpa\",\"type\":\"modfvuefywsbpfvm\"}],\"nextLink\":\"hrfou\"}") + .toObject(DnsSecurityRuleListResult.class); + Assertions.assertEquals("semwabnet", model.value().get(0).location()); + Assertions.assertEquals("szhedplvw", model.value().get(0).tags().get("wubmwmbesldn")); + Assertions.assertEquals(487324139, model.value().get(0).priority()); + Assertions.assertEquals(ActionType.BLOCK, model.value().get(0).action().actionType()); + Assertions.assertEquals("dzu", model.value().get(0).dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals(ManagedDomainList.AZURE_DNS_THREAT_INTEL, + model.value().get(0).managedDomainLists().get(0)); + Assertions.assertEquals(DnsSecurityRuleState.DISABLED, model.value().get(0).dnsSecurityRuleState()); + Assertions.assertEquals("hrfou", model.nextLink()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulePatchPropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulePatchPropertiesTests.java new file mode 100644 index 000000000000..ff166db1c7e9 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulePatchPropertiesTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.DnsSecurityRulePatchProperties; +import com.azure.resourcemanager.dnsresolver.models.ActionType; +import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction; +import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; +import com.azure.resourcemanager.dnsresolver.models.ManagedDomainList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DnsSecurityRulePatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsSecurityRulePatchProperties model = BinaryData.fromString( + "{\"action\":{\"actionType\":\"Block\"},\"dnsResolverDomainLists\":[{\"id\":\"n\"},{\"id\":\"ao\"},{\"id\":\"xzb\"}],\"managedDomainLists\":[\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\"],\"dnsSecurityRuleState\":\"Disabled\",\"priority\":677878330}") + .toObject(DnsSecurityRulePatchProperties.class); + Assertions.assertEquals(ActionType.BLOCK, model.action().actionType()); + Assertions.assertEquals("n", model.dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals(ManagedDomainList.AZURE_DNS_THREAT_INTEL, model.managedDomainLists().get(0)); + Assertions.assertEquals(DnsSecurityRuleState.DISABLED, model.dnsSecurityRuleState()); + Assertions.assertEquals(677878330, model.priority()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsSecurityRulePatchProperties model = new DnsSecurityRulePatchProperties() + .withAction(new DnsSecurityRuleAction().withActionType(ActionType.BLOCK)) + .withDnsResolverDomainLists(Arrays.asList(new SubResource().withId("n"), new SubResource().withId("ao"), + new SubResource().withId("xzb"))) + .withManagedDomainLists(Arrays.asList(ManagedDomainList.AZURE_DNS_THREAT_INTEL, + ManagedDomainList.AZURE_DNS_THREAT_INTEL, ManagedDomainList.AZURE_DNS_THREAT_INTEL)) + .withDnsSecurityRuleState(DnsSecurityRuleState.DISABLED) + .withPriority(677878330); + model = BinaryData.fromObject(model).toObject(DnsSecurityRulePatchProperties.class); + Assertions.assertEquals(ActionType.BLOCK, model.action().actionType()); + Assertions.assertEquals("n", model.dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals(ManagedDomainList.AZURE_DNS_THREAT_INTEL, model.managedDomainLists().get(0)); + Assertions.assertEquals(DnsSecurityRuleState.DISABLED, model.dnsSecurityRuleState()); + Assertions.assertEquals(677878330, model.priority()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulePatchTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulePatchTests.java new file mode 100644 index 000000000000..9338d6b241d8 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulePatchTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.models.ActionType; +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.ManagedDomainList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class DnsSecurityRulePatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsSecurityRulePatch model = BinaryData.fromString( + "{\"properties\":{\"action\":{\"actionType\":\"Block\"},\"dnsResolverDomainLists\":[{\"id\":\"mifthnzdnd\"}],\"managedDomainLists\":[\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\"],\"dnsSecurityRuleState\":\"Disabled\",\"priority\":1584904008},\"tags\":{\"thuma\":\"uhavhql\",\"vaolpsslqlf\":\"olbgycduiertgccy\",\"mcwyhzdxssadb\":\"mdnbbglzpswiy\"}}") + .toObject(DnsSecurityRulePatch.class); + Assertions.assertEquals("uhavhql", model.tags().get("thuma")); + Assertions.assertEquals(ActionType.BLOCK, model.action().actionType()); + Assertions.assertEquals("mifthnzdnd", model.dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals(ManagedDomainList.AZURE_DNS_THREAT_INTEL, model.managedDomainLists().get(0)); + Assertions.assertEquals(DnsSecurityRuleState.DISABLED, model.dnsSecurityRuleState()); + Assertions.assertEquals(1584904008, model.priority()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsSecurityRulePatch model = new DnsSecurityRulePatch() + .withTags(mapOf("thuma", "uhavhql", "vaolpsslqlf", "olbgycduiertgccy", "mcwyhzdxssadb", "mdnbbglzpswiy")) + .withAction(new DnsSecurityRuleAction().withActionType(ActionType.BLOCK)) + .withDnsResolverDomainLists(Arrays.asList(new SubResource().withId("mifthnzdnd"))) + .withManagedDomainLists(Arrays.asList(ManagedDomainList.AZURE_DNS_THREAT_INTEL, + ManagedDomainList.AZURE_DNS_THREAT_INTEL, ManagedDomainList.AZURE_DNS_THREAT_INTEL)) + .withDnsSecurityRuleState(DnsSecurityRuleState.DISABLED) + .withPriority(1584904008); + model = BinaryData.fromObject(model).toObject(DnsSecurityRulePatch.class); + Assertions.assertEquals("uhavhql", model.tags().get("thuma")); + Assertions.assertEquals(ActionType.BLOCK, model.action().actionType()); + Assertions.assertEquals("mifthnzdnd", model.dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals(ManagedDomainList.AZURE_DNS_THREAT_INTEL, model.managedDomainLists().get(0)); + Assertions.assertEquals(DnsSecurityRuleState.DISABLED, model.dnsSecurityRuleState()); + Assertions.assertEquals(1584904008, model.priority()); + } + + // 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/DnsSecurityRulePropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulePropertiesTests.java new file mode 100644 index 000000000000..a5313b9ad7f6 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulePropertiesTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.DnsSecurityRuleProperties; +import com.azure.resourcemanager.dnsresolver.models.ActionType; +import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction; +import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; +import com.azure.resourcemanager.dnsresolver.models.ManagedDomainList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DnsSecurityRulePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsSecurityRuleProperties model = BinaryData.fromString( + "{\"priority\":837542479,\"action\":{\"actionType\":\"Block\"},\"dnsResolverDomainLists\":[{\"id\":\"ftpvjzbexil\"},{\"id\":\"nfqqnvwp\"},{\"id\":\"taruoujmkcj\"},{\"id\":\"qytjrybnwjewgd\"}],\"managedDomainLists\":[\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\"],\"dnsSecurityRuleState\":\"Enabled\",\"provisioningState\":\"Canceled\"}") + .toObject(DnsSecurityRuleProperties.class); + Assertions.assertEquals(837542479, model.priority()); + Assertions.assertEquals(ActionType.BLOCK, model.action().actionType()); + Assertions.assertEquals("ftpvjzbexil", model.dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals(ManagedDomainList.AZURE_DNS_THREAT_INTEL, model.managedDomainLists().get(0)); + Assertions.assertEquals(DnsSecurityRuleState.ENABLED, model.dnsSecurityRuleState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsSecurityRuleProperties model = new DnsSecurityRuleProperties().withPriority(837542479) + .withAction(new DnsSecurityRuleAction().withActionType(ActionType.BLOCK)) + .withDnsResolverDomainLists( + Arrays.asList(new SubResource().withId("ftpvjzbexil"), new SubResource().withId("nfqqnvwp"), + new SubResource().withId("taruoujmkcj"), new SubResource().withId("qytjrybnwjewgd"))) + .withManagedDomainLists(Arrays.asList(ManagedDomainList.AZURE_DNS_THREAT_INTEL, + ManagedDomainList.AZURE_DNS_THREAT_INTEL, ManagedDomainList.AZURE_DNS_THREAT_INTEL)) + .withDnsSecurityRuleState(DnsSecurityRuleState.ENABLED); + model = BinaryData.fromObject(model).toObject(DnsSecurityRuleProperties.class); + Assertions.assertEquals(837542479, model.priority()); + Assertions.assertEquals(ActionType.BLOCK, model.action().actionType()); + Assertions.assertEquals("ftpvjzbexil", model.dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals(ManagedDomainList.AZURE_DNS_THREAT_INTEL, model.managedDomainLists().get(0)); + Assertions.assertEquals(DnsSecurityRuleState.ENABLED, model.dnsSecurityRuleState()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesCreateOrUpdateMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesCreateOrUpdateMockTests.java index 6d9604afa1f0..07a75cac2aee 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesCreateOrUpdateMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -15,6 +15,7 @@ import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRule; import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleAction; import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; +import com.azure.resourcemanager.dnsresolver.models.ManagedDomainList; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -28,7 +29,7 @@ public final class DnsSecurityRulesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"cf\",\"properties\":{\"priority\":437881905,\"action\":{\"actionType\":\"Block\"},\"dnsResolverDomainLists\":[{\"id\":\"neuvyinzqod\"}],\"dnsSecurityRuleState\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"location\":\"oxgsgbpfgzdjtx\",\"tags\":{\"rdve\":\"lbqvgaqvlgafcqu\",\"uzhyrmewipmvekdx\":\"nwsdtutnwlduyc\"},\"id\":\"kuqgsjjxundxgket\",\"name\":\"zhhzjhfjmhvvmu\",\"type\":\"gpmuneqsxvmhfbuz\"}"; + = "{\"properties\":{\"priority\":1080480185,\"action\":{\"actionType\":\"Block\"},\"dnsResolverDomainLists\":[{\"id\":\"zrcxfailcfxwmdbo\"},{\"id\":\"fgsftufqob\"}],\"managedDomainLists\":[\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\"],\"dnsSecurityRuleState\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"etag\":\"knh\",\"location\":\"izvy\",\"tags\":{\"aaeranokqgukk\":\"zvulj\",\"oylaxxul\":\"qnvb\"},\"id\":\"disdosfjbjsvgj\",\"name\":\"whryvycytdcl\",\"type\":\"gc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,24 +39,27 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DnsSecurityRule response = manager.dnsSecurityRules() - .define("jwltlwtjjgu") - .withRegion("pchwa") - .withExistingDnsResolverPolicy("lkb", "wpfaj") - .withPriority(1732227907) + .define("rmffeyc") + .withRegion("prtujwsawdd") + .withExistingDnsResolverPolicy("lxunsmjbnkppxy", "enlsvxeizzgwkln") + .withPriority(625773403) .withAction(new DnsSecurityRuleAction().withActionType(ActionType.ALERT)) - .withDnsResolverDomainLists(Arrays.asList(new SubResource().withId("oaimlnw"), - new SubResource().withId("aomylwea"), new SubResource().withId("lcsethwwnpj"))) - .withTags(mapOf("wlyxgncxyk", "ousnfepgfewe", "h", "hdjhlimmbcx")) + .withTags(mapOf("itvtzeexavo", "abxvi", "dmdqb", "tfgle", "cbslhhx", "pypqtgsfj")) + .withDnsResolverDomainLists(Arrays.asList(new SubResource().withId("merteeammxqiek"), + new SubResource().withId("zddrt"), new SubResource().withId("doj"), new SubResource().withId("xv"))) + .withManagedDomainLists( + Arrays.asList(ManagedDomainList.AZURE_DNS_THREAT_INTEL, ManagedDomainList.AZURE_DNS_THREAT_INTEL)) .withDnsSecurityRuleState(DnsSecurityRuleState.ENABLED) - .withIfMatch("r") - .withIfNoneMatch("jcivmmg") + .withIfMatch("m") + .withIfNoneMatch("es") .create(); - Assertions.assertEquals("oxgsgbpfgzdjtx", response.location()); - Assertions.assertEquals("lbqvgaqvlgafcqu", response.tags().get("rdve")); - Assertions.assertEquals(437881905, response.priority()); + Assertions.assertEquals("izvy", response.location()); + Assertions.assertEquals("zvulj", response.tags().get("aaeranokqgukk")); + Assertions.assertEquals(1080480185, response.priority()); Assertions.assertEquals(ActionType.BLOCK, response.action().actionType()); - Assertions.assertEquals("neuvyinzqod", response.dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals("zrcxfailcfxwmdbo", response.dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals(ManagedDomainList.AZURE_DNS_THREAT_INTEL, response.managedDomainLists().get(0)); Assertions.assertEquals(DnsSecurityRuleState.DISABLED, response.dnsSecurityRuleState()); } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesGetWithResponseMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesGetWithResponseMockTests.java index d94e8ce93867..227c1ea9353e 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesGetWithResponseMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -13,6 +13,7 @@ import com.azure.resourcemanager.dnsresolver.models.ActionType; import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRule; import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; +import com.azure.resourcemanager.dnsresolver.models.ManagedDomainList; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -23,7 +24,7 @@ public final class DnsSecurityRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"etag\":\"s\",\"properties\":{\"priority\":432176032,\"action\":{\"actionType\":\"Allow\"},\"dnsResolverDomainLists\":[{\"id\":\"kb\"},{\"id\":\"rj\"},{\"id\":\"to\"},{\"id\":\"mi\"}],\"dnsSecurityRuleState\":\"Disabled\",\"provisioningState\":\"Deleting\"},\"location\":\"pe\",\"tags\":{\"hihihlhzdsqtzbsr\":\"yqdhcuplcplcw\"},\"id\":\"nowc\",\"name\":\"hfgmvecactxm\",\"type\":\"oteyowc\"}"; + = "{\"properties\":{\"priority\":2092951767,\"action\":{\"actionType\":\"Allow\"},\"dnsResolverDomainLists\":[{\"id\":\"nygq\"},{\"id\":\"fwqzdz\"},{\"id\":\"ilaxhn\"},{\"id\":\"qlyvijo\"}],\"managedDomainLists\":[\"AzureDnsThreatIntel\"],\"dnsSecurityRuleState\":\"Disabled\",\"provisioningState\":\"Creating\"},\"etag\":\"un\",\"location\":\"xxrtikvc\",\"tags\":{\"tso\":\"gclrci\",\"pdnqqskawaoqvmmb\":\"frkenxpmyyefrp\"},\"id\":\"pqfrtqlkz\",\"name\":\"egnitg\",\"type\":\"kxlzyqdrfeg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +34,15 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DnsSecurityRule response = manager.dnsSecurityRules() - .getWithResponse("ocqwogfnzjvus", "zldmozuxy", "fsbtkad", com.azure.core.util.Context.NONE) + .getWithResponse("yihsasbhudypohyu", "ms", "ynsqyrpfoobr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("pe", response.location()); - Assertions.assertEquals("yqdhcuplcplcw", response.tags().get("hihihlhzdsqtzbsr")); - Assertions.assertEquals(432176032, response.priority()); + Assertions.assertEquals("xxrtikvc", response.location()); + Assertions.assertEquals("gclrci", response.tags().get("tso")); + Assertions.assertEquals(2092951767, response.priority()); Assertions.assertEquals(ActionType.ALLOW, response.action().actionType()); - Assertions.assertEquals("kb", response.dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals("nygq", response.dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals(ManagedDomainList.AZURE_DNS_THREAT_INTEL, response.managedDomainLists().get(0)); Assertions.assertEquals(DnsSecurityRuleState.DISABLED, response.dnsSecurityRuleState()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesListMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesListMockTests.java index 5f1ce85d6b5c..550eaf5d3870 100644 --- a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesListMockTests.java +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/DnsSecurityRulesListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -14,6 +14,7 @@ import com.azure.resourcemanager.dnsresolver.models.ActionType; import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRule; import com.azure.resourcemanager.dnsresolver.models.DnsSecurityRuleState; +import com.azure.resourcemanager.dnsresolver.models.ManagedDomainList; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -24,7 +25,7 @@ public final class DnsSecurityRulesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"qikfxcv\",\"properties\":{\"priority\":467957195,\"action\":{\"actionType\":\"Block\"},\"dnsResolverDomainLists\":[{\"id\":\"uagrttikteusqc\"},{\"id\":\"vyklxuby\"},{\"id\":\"ff\"},{\"id\":\"fblcq\"}],\"dnsSecurityRuleState\":\"Enabled\",\"provisioningState\":\"Canceled\"},\"location\":\"ibrta\",\"tags\":{\"rmooizqse\":\"tttwgdslqxih\",\"apzhyrpetoge\":\"pxiutc\",\"rqnkkzjcjbtr\":\"joxslhvnhla\",\"eitpkxztmo\":\"aehvvibrxjjstoq\"},\"id\":\"bklftidgfcwqmpim\",\"name\":\"qxzhem\",\"type\":\"yhohujswtwkozzwc\"}]}"; + = "{\"value\":[{\"properties\":{\"priority\":446076724,\"action\":{\"actionType\":\"Alert\"},\"dnsResolverDomainLists\":[{\"id\":\"asqvd\"},{\"id\":\"y\"}],\"managedDomainLists\":[\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\",\"AzureDnsThreatIntel\"],\"dnsSecurityRuleState\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"etag\":\"bezkgimsidxasic\",\"location\":\"yvvjskgfmo\",\"tags\":{\"hnakzyb\":\"hpqgatjeaahhvj\"},\"id\":\"jjidjk\",\"name\":\"yxkyxvx\",\"type\":\"vblbjednljlageua\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +34,16 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.dnsSecurityRules().list("uqovekqvgqouwif", "mpjw", 594381501, com.azure.core.util.Context.NONE); + PagedIterable response = manager.dnsSecurityRules() + .list("ealzxwhcansymoyq", "lwigdivbkbx", 1149593653, com.azure.core.util.Context.NONE); - Assertions.assertEquals("ibrta", response.iterator().next().location()); - Assertions.assertEquals("tttwgdslqxih", response.iterator().next().tags().get("rmooizqse")); - Assertions.assertEquals(467957195, response.iterator().next().priority()); - Assertions.assertEquals(ActionType.BLOCK, response.iterator().next().action().actionType()); - Assertions.assertEquals("uagrttikteusqc", response.iterator().next().dnsResolverDomainLists().get(0).id()); - Assertions.assertEquals(DnsSecurityRuleState.ENABLED, response.iterator().next().dnsSecurityRuleState()); + Assertions.assertEquals("yvvjskgfmo", response.iterator().next().location()); + Assertions.assertEquals("hpqgatjeaahhvj", response.iterator().next().tags().get("hnakzyb")); + Assertions.assertEquals(446076724, response.iterator().next().priority()); + Assertions.assertEquals(ActionType.ALERT, response.iterator().next().action().actionType()); + Assertions.assertEquals("asqvd", response.iterator().next().dnsResolverDomainLists().get(0).id()); + Assertions.assertEquals(ManagedDomainList.AZURE_DNS_THREAT_INTEL, + response.iterator().next().managedDomainLists().get(0)); + Assertions.assertEquals(DnsSecurityRuleState.DISABLED, response.iterator().next().dnsSecurityRuleState()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRuleInnerTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRuleInnerTests.java new file mode 100644 index 000000000000..14f61fdbb9cb --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRuleInnerTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.fluent.models.ForwardingRuleInner; +import com.azure.resourcemanager.dnsresolver.models.ForwardingRuleState; +import com.azure.resourcemanager.dnsresolver.models.TargetDnsServer; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ForwardingRuleInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ForwardingRuleInner model = BinaryData.fromString( + "{\"properties\":{\"domainName\":\"ffeii\",\"targetDnsServers\":[{\"ipAddress\":\"lvmezyvshxmzsbbz\",\"port\":852408036}],\"metadata\":{\"xxjnspydptk\":\"rxwburv\",\"iukbldngkpoci\":\"enkouknvudw\"},\"forwardingRuleState\":\"Enabled\",\"provisioningState\":\"Failed\"},\"etag\":\"egukgjnpiucg\",\"id\":\"evqzntypmrbp\",\"name\":\"zcdrqjsdpydnfyhx\",\"type\":\"eoejzic\"}") + .toObject(ForwardingRuleInner.class); + Assertions.assertEquals("ffeii", model.domainName()); + Assertions.assertEquals("lvmezyvshxmzsbbz", model.targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(852408036, model.targetDnsServers().get(0).port()); + Assertions.assertEquals("rxwburv", model.metadata().get("xxjnspydptk")); + Assertions.assertEquals(ForwardingRuleState.ENABLED, model.forwardingRuleState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ForwardingRuleInner model = new ForwardingRuleInner().withDomainName("ffeii") + .withTargetDnsServers( + Arrays.asList(new TargetDnsServer().withIpAddress("lvmezyvshxmzsbbz").withPort(852408036))) + .withMetadata(mapOf("xxjnspydptk", "rxwburv", "iukbldngkpoci", "enkouknvudw")) + .withForwardingRuleState(ForwardingRuleState.ENABLED); + model = BinaryData.fromObject(model).toObject(ForwardingRuleInner.class); + Assertions.assertEquals("ffeii", model.domainName()); + Assertions.assertEquals("lvmezyvshxmzsbbz", model.targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(852408036, model.targetDnsServers().get(0).port()); + Assertions.assertEquals("rxwburv", model.metadata().get("xxjnspydptk")); + Assertions.assertEquals(ForwardingRuleState.ENABLED, model.forwardingRuleState()); + } + + // 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/ForwardingRuleListResultTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRuleListResultTests.java new file mode 100644 index 000000000000..63627f9e5e6f --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRuleListResultTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.implementation.models.ForwardingRuleListResult; +import com.azure.resourcemanager.dnsresolver.models.ForwardingRuleState; +import org.junit.jupiter.api.Assertions; + +public final class ForwardingRuleListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ForwardingRuleListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"domainName\":\"ujqgidok\",\"targetDnsServers\":[{\"ipAddress\":\"ljyoxgvcltb\",\"port\":1745548413},{\"ipAddress\":\"c\",\"port\":1435851366}],\"metadata\":{\"mxnehmp\":\"szzhbijhtxfvgxbf\"},\"forwardingRuleState\":\"Enabled\",\"provisioningState\":\"Succeeded\"},\"etag\":\"debfqkkrbmpukgri\",\"id\":\"lzlfbxzpuz\",\"name\":\"cispnqzahmgkbr\",\"type\":\"yydhibnuqqk\"},{\"properties\":{\"domainName\":\"ik\",\"targetDnsServers\":[{\"ipAddress\":\"rgvtqag\",\"port\":1873718862},{\"ipAddress\":\"ynhijggme\",\"port\":983171059},{\"ipAddress\":\"iarbutrcvpna\",\"port\":1681681951}],\"metadata\":{\"ttdbhrbnl\":\"runmp\",\"xywnytnrsynlqidy\":\"nkxmyskpbhenbtk\",\"axdbabph\":\"yxczfclh\"},\"forwardingRuleState\":\"Disabled\",\"provisioningState\":\"Deleting\"},\"etag\":\"ktsthsucocmny\",\"id\":\"zt\",\"name\":\"bt\",\"type\":\"wrqpue\"},{\"properties\":{\"domainName\":\"ckzywbiexzfeyue\",\"targetDnsServers\":[{\"ipAddress\":\"ibx\",\"port\":1757218598},{\"ipAddress\":\"bhqwalmuzyoxa\",\"port\":556709719},{\"ipAddress\":\"kzjancuxrhdwbav\",\"port\":1767161087},{\"ipAddress\":\"iwdjswztsdbpgn\",\"port\":862771413}],\"metadata\":{\"fzab\":\"pzxbz\",\"ovplw\":\"lcuhxwtctyqiklb\",\"gu\":\"bhvgy\"},\"forwardingRuleState\":\"Disabled\",\"provisioningState\":\"Deleting\"},\"etag\":\"ss\",\"id\":\"ukkfplgmgs\",\"name\":\"nkjzkdeslpvlop\",\"type\":\"i\"},{\"properties\":{\"domainName\":\"ighxpk\",\"targetDnsServers\":[{\"ipAddress\":\"zb\",\"port\":823200813},{\"ipAddress\":\"ebb\",\"port\":6362345}],\"metadata\":{\"khsmtxpsiebt\":\"qupedeojnab\",\"jjdhtld\":\"hvpesapskrdqm\",\"cwscwsvlx\":\"kyzxuutk\",\"rupqsxvnmicy\":\"togt\"},\"forwardingRuleState\":\"Disabled\",\"provisioningState\":\"Deleting\"},\"etag\":\"eil\",\"id\":\"notyfjfcnjbkcn\",\"name\":\"dhbt\",\"type\":\"kphywpnvjto\"}],\"nextLink\":\"ermclfplphoxuscr\"}") + .toObject(ForwardingRuleListResult.class); + Assertions.assertEquals("ujqgidok", model.value().get(0).domainName()); + Assertions.assertEquals("ljyoxgvcltb", model.value().get(0).targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(1745548413, model.value().get(0).targetDnsServers().get(0).port()); + Assertions.assertEquals("szzhbijhtxfvgxbf", model.value().get(0).metadata().get("mxnehmp")); + Assertions.assertEquals(ForwardingRuleState.ENABLED, model.value().get(0).forwardingRuleState()); + Assertions.assertEquals("ermclfplphoxuscr", model.nextLink()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulePatchPropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulePatchPropertiesTests.java new file mode 100644 index 000000000000..764a8b069697 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulePatchPropertiesTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.fluent.models.ForwardingRulePatchProperties; +import com.azure.resourcemanager.dnsresolver.models.ForwardingRuleState; +import com.azure.resourcemanager.dnsresolver.models.TargetDnsServer; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ForwardingRulePatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ForwardingRulePatchProperties model = BinaryData.fromString( + "{\"targetDnsServers\":[{\"ipAddress\":\"aetcktvfcivfs\",\"port\":1486569340}],\"metadata\":{\"jf\":\"ctq\",\"fuwutttxf\":\"ebrjcxe\",\"hfnljkyq\":\"jrbirphxepcyv\"},\"forwardingRuleState\":\"Enabled\"}") + .toObject(ForwardingRulePatchProperties.class); + Assertions.assertEquals("aetcktvfcivfs", model.targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(1486569340, model.targetDnsServers().get(0).port()); + Assertions.assertEquals("ctq", model.metadata().get("jf")); + Assertions.assertEquals(ForwardingRuleState.ENABLED, model.forwardingRuleState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ForwardingRulePatchProperties model = new ForwardingRulePatchProperties() + .withTargetDnsServers( + Arrays.asList(new TargetDnsServer().withIpAddress("aetcktvfcivfs").withPort(1486569340))) + .withMetadata(mapOf("jf", "ctq", "fuwutttxf", "ebrjcxe", "hfnljkyq", "jrbirphxepcyv")) + .withForwardingRuleState(ForwardingRuleState.ENABLED); + model = BinaryData.fromObject(model).toObject(ForwardingRulePatchProperties.class); + Assertions.assertEquals("aetcktvfcivfs", model.targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(1486569340, model.targetDnsServers().get(0).port()); + Assertions.assertEquals("ctq", model.metadata().get("jf")); + Assertions.assertEquals(ForwardingRuleState.ENABLED, model.forwardingRuleState()); + } + + // 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/ForwardingRulePatchTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulePatchTests.java new file mode 100644 index 000000000000..0cc9b40e5879 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulePatchTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.models.ForwardingRulePatch; +import com.azure.resourcemanager.dnsresolver.models.ForwardingRuleState; +import com.azure.resourcemanager.dnsresolver.models.TargetDnsServer; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ForwardingRulePatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ForwardingRulePatch model = BinaryData.fromString( + "{\"properties\":{\"targetDnsServers\":[{\"ipAddress\":\"yav\",\"port\":989865410},{\"ipAddress\":\"eun\",\"port\":1861834573},{\"ipAddress\":\"hgyxzkonoc\",\"port\":820959200},{\"ipAddress\":\"klyaxuconu\",\"port\":447504444}],\"metadata\":{\"vjektcxsenh\":\"beypewrmjmw\",\"rzpwvlqdqgbiq\":\"lrsf\"},\"forwardingRuleState\":\"Disabled\"}}") + .toObject(ForwardingRulePatch.class); + Assertions.assertEquals("yav", model.targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(989865410, model.targetDnsServers().get(0).port()); + Assertions.assertEquals("beypewrmjmw", model.metadata().get("vjektcxsenh")); + Assertions.assertEquals(ForwardingRuleState.DISABLED, model.forwardingRuleState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ForwardingRulePatch model = new ForwardingRulePatch() + .withTargetDnsServers(Arrays.asList(new TargetDnsServer().withIpAddress("yav").withPort(989865410), + new TargetDnsServer().withIpAddress("eun").withPort(1861834573), + new TargetDnsServer().withIpAddress("hgyxzkonoc").withPort(820959200), + new TargetDnsServer().withIpAddress("klyaxuconu").withPort(447504444))) + .withMetadata(mapOf("vjektcxsenh", "beypewrmjmw", "rzpwvlqdqgbiq", "lrsf")) + .withForwardingRuleState(ForwardingRuleState.DISABLED); + model = BinaryData.fromObject(model).toObject(ForwardingRulePatch.class); + Assertions.assertEquals("yav", model.targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(989865410, model.targetDnsServers().get(0).port()); + Assertions.assertEquals("beypewrmjmw", model.metadata().get("vjektcxsenh")); + Assertions.assertEquals(ForwardingRuleState.DISABLED, model.forwardingRuleState()); + } + + // 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/ForwardingRulePropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulePropertiesTests.java new file mode 100644 index 000000000000..65fafc808903 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulePropertiesTests.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.fluent.models.ForwardingRuleProperties; +import com.azure.resourcemanager.dnsresolver.models.ForwardingRuleState; +import com.azure.resourcemanager.dnsresolver.models.TargetDnsServer; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ForwardingRulePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ForwardingRuleProperties model = BinaryData.fromString( + "{\"domainName\":\"ifsjttgzfbishcb\",\"targetDnsServers\":[{\"ipAddress\":\"ajdeyeamdphaga\",\"port\":1821646506},{\"ipAddress\":\"uxwgipwho\",\"port\":1833977837},{\"ipAddress\":\"kgshwa\",\"port\":2111638773},{\"ipAddress\":\"xzbinjeputt\",\"port\":1846682482}],\"metadata\":{\"yqzrnkcqvyxlw\":\"uzoqft\"},\"forwardingRuleState\":\"Disabled\",\"provisioningState\":\"Creating\"}") + .toObject(ForwardingRuleProperties.class); + Assertions.assertEquals("ifsjttgzfbishcb", model.domainName()); + Assertions.assertEquals("ajdeyeamdphaga", model.targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(1821646506, model.targetDnsServers().get(0).port()); + Assertions.assertEquals("uzoqft", model.metadata().get("yqzrnkcqvyxlw")); + Assertions.assertEquals(ForwardingRuleState.DISABLED, model.forwardingRuleState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ForwardingRuleProperties model = new ForwardingRuleProperties().withDomainName("ifsjttgzfbishcb") + .withTargetDnsServers( + Arrays.asList(new TargetDnsServer().withIpAddress("ajdeyeamdphaga").withPort(1821646506), + new TargetDnsServer().withIpAddress("uxwgipwho").withPort(1833977837), + new TargetDnsServer().withIpAddress("kgshwa").withPort(2111638773), + new TargetDnsServer().withIpAddress("xzbinjeputt").withPort(1846682482))) + .withMetadata(mapOf("yqzrnkcqvyxlw", "uzoqft")) + .withForwardingRuleState(ForwardingRuleState.DISABLED); + model = BinaryData.fromObject(model).toObject(ForwardingRuleProperties.class); + Assertions.assertEquals("ifsjttgzfbishcb", model.domainName()); + Assertions.assertEquals("ajdeyeamdphaga", model.targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(1821646506, model.targetDnsServers().get(0).port()); + Assertions.assertEquals("uzoqft", model.metadata().get("yqzrnkcqvyxlw")); + Assertions.assertEquals(ForwardingRuleState.DISABLED, model.forwardingRuleState()); + } + + // 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/ForwardingRulesCreateOrUpdateWithResponseMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/ForwardingRulesCreateOrUpdateWithResponseMockTests.java index bd5e0c2e4868..11ca25f25d9d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -26,7 +26,7 @@ public final class ForwardingRulesCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"etag\":\"ao\",\"properties\":{\"domainName\":\"jchvcyy\",\"targetDnsServers\":[{\"ipAddress\":\"fgdo\",\"port\":1738680873}],\"metadata\":{\"ipwoqonmacjek\":\"ip\",\"vcimpev\":\"izsh\",\"bywdxsmicc\":\"gmblrri\"},\"forwardingRuleState\":\"Enabled\",\"provisioningState\":\"Updating\"},\"id\":\"jfnynszqujizdvoq\",\"name\":\"tiby\",\"type\":\"wb\"}"; + = "{\"properties\":{\"domainName\":\"g\",\"targetDnsServers\":[{\"ipAddress\":\"drihpfhoqcaaewda\",\"port\":1360898265},{\"ipAddress\":\"jvlpjxxkzbr\",\"port\":1373073585}],\"metadata\":{\"zoggculapz\":\"vsiykzkdncjdxon\",\"pgogtqxepny\":\"y\"},\"forwardingRuleState\":\"Enabled\",\"provisioningState\":\"Creating\"},\"etag\":\"lyjt\",\"id\":\"of\",\"name\":\"zhvfcibyfmowuxr\",\"type\":\"jpvd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,21 +36,24 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ForwardingRule response = manager.forwardingRules() - .define("d") - .withExistingDnsForwardingRuleset("kulfg", "lqubkwdlen") - .withDomainName("hminyflnorwmduv") - .withTargetDnsServers(Arrays.asList(new TargetDnsServer().withIpAddress("klvxwmyg").withPort(1521698279), - new TargetDnsServer().withIpAddress("gpqch").withPort(1044665061))) - .withMetadata(mapOf("rxgibbd", "nnbj", "kokwbqplhlvnu", "xconfozauors")) + .define("t") + .withExistingDnsForwardingRuleset("il", "yw") + .withDomainName("gkxnyedabg") + .withTargetDnsServers(Arrays.asList(new TargetDnsServer().withIpAddress("udtjuewbc").withPort(1871891438), + new TargetDnsServer().withIpAddress("uuwhcjyxcc").withPort(970870399), + new TargetDnsServer().withIpAddress("payakkud").withPort(1773964666), + new TargetDnsServer().withIpAddress("gwjplmag").withPort(1164278403))) + .withMetadata( + mapOf("gsj", "hpfkyrkdbdgi", "obaiyhddviaceg", "mnwqj", "ntfpmvmemfnc", "n", "xlllchp", "dwvvba")) .withForwardingRuleState(ForwardingRuleState.ENABLED) - .withIfMatch("wjhhgdnhxmsivf") - .withIfNoneMatch("miloxggdufiqndie") + .withIfMatch("widf") + .withIfNoneMatch("xsspuunnoxyhk") .create(); - Assertions.assertEquals("jchvcyy", response.domainName()); - Assertions.assertEquals("fgdo", response.targetDnsServers().get(0).ipAddress()); - Assertions.assertEquals(1738680873, response.targetDnsServers().get(0).port()); - Assertions.assertEquals("ip", response.metadata().get("ipwoqonmacjek")); + Assertions.assertEquals("g", response.domainName()); + Assertions.assertEquals("drihpfhoqcaaewda", response.targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(1360898265, response.targetDnsServers().get(0).port()); + Assertions.assertEquals("vsiykzkdncjdxon", response.metadata().get("zoggculapz")); Assertions.assertEquals(ForwardingRuleState.ENABLED, response.forwardingRuleState()); } 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 f57a4e14c177..19c1693e19c1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.forwardingRules() - .deleteWithResponse("zuo", "ejwcwwqiok", "ssxmojms", "p", com.azure.core.util.Context.NONE); + .deleteWithResponse("fgcviz", "zdwlvwlyoupfgfb", "jub", "yhgk", 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 e355f267b047..df0ed074958b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class ForwardingRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"etag\":\"x\",\"properties\":{\"domainName\":\"tczheydbsdshmkx\",\"targetDnsServers\":[{\"ipAddress\":\"ehvbbxurip\",\"port\":1041302406},{\"ipAddress\":\"n\",\"port\":895803414},{\"ipAddress\":\"axkgx\",\"port\":338199100}],\"metadata\":{\"dlgzibthostgkt\":\"pyklyhpluodpvru\",\"vh\":\"tvdxeclzedqb\"},\"forwardingRuleState\":\"Enabled\",\"provisioningState\":\"Updating\"},\"id\":\"dqkdlwwqfbu\",\"name\":\"lkxt\",\"type\":\"qjfsmlmbtxhw\"}"; + = "{\"properties\":{\"domainName\":\"p\",\"targetDnsServers\":[{\"ipAddress\":\"pwoqo\",\"port\":1863787560},{\"ipAddress\":\"cje\",\"port\":863821322},{\"ipAddress\":\"zshq\",\"port\":1591499316},{\"ipAddress\":\"m\",\"port\":1050222716}],\"metadata\":{\"smiccwrwfscj\":\"mblrrilbywd\",\"nszqujiz\":\"n\"},\"forwardingRuleState\":\"Disabled\",\"provisioningState\":\"Failed\"},\"etag\":\"ibyowbblgyavutp\",\"id\":\"joxoism\",\"name\":\"ksbpimlqoljx\",\"type\":\"cgxxlxs\"}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ForwardingRule response = manager.forwardingRules() - .getWithResponse("jpr", "kwcf", "ql", com.azure.core.util.Context.NONE) + .getWithResponse("iqndieuzaofj", "hvcyyysfg", "otcubi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("tczheydbsdshmkx", response.domainName()); - Assertions.assertEquals("ehvbbxurip", response.targetDnsServers().get(0).ipAddress()); - Assertions.assertEquals(1041302406, response.targetDnsServers().get(0).port()); - Assertions.assertEquals("pyklyhpluodpvru", response.metadata().get("dlgzibthostgkt")); - Assertions.assertEquals(ForwardingRuleState.ENABLED, response.forwardingRuleState()); + Assertions.assertEquals("p", response.domainName()); + Assertions.assertEquals("pwoqo", response.targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(1863787560, response.targetDnsServers().get(0).port()); + Assertions.assertEquals("mblrrilbywd", response.metadata().get("smiccwrwfscj")); + 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 9f804ea1fcdb..a7ab113267e3 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -23,7 +23,7 @@ public final class ForwardingRulesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"goo\",\"properties\":{\"domainName\":\"kkqfqjbvle\",\"targetDnsServers\":[{\"ipAddress\":\"fmluiqtqzfavyvn\",\"port\":951173892},{\"ipAddress\":\"bar\",\"port\":1877295480},{\"ipAddress\":\"ayjkqa\",\"port\":2002865497}],\"metadata\":{\"n\":\"lesjcbhe\",\"vbquwr\":\"tiewdj\",\"uffkmrqemvvh\":\"ehwagoh\",\"futacoebjvewzc\":\"xtdr\"},\"forwardingRuleState\":\"Enabled\",\"provisioningState\":\"Failed\"},\"id\":\"pmguaadraufac\",\"name\":\"kahzo\",\"type\":\"ajjziuxxpshne\"}]}"; + = "{\"value\":[{\"properties\":{\"domainName\":\"tx\",\"targetDnsServers\":[{\"ipAddress\":\"zukxitmmqtgqq\",\"port\":1748959674},{\"ipAddress\":\"rnxrxcpj\",\"port\":58328549},{\"ipAddress\":\"av\",\"port\":2065255812}],\"metadata\":{\"lkatnwxyiopidkqq\":\"fvazivjlfrqttba\",\"igovi\":\"kuvscxkdm\"},\"forwardingRuleState\":\"Enabled\",\"provisioningState\":\"Failed\"},\"etag\":\"loazuruocbgoo\",\"id\":\"te\",\"name\":\"ybfhjxa\",\"type\":\"vvjgslor\"}]}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.forwardingRules().list("fwsrtawcoezbrhu", "skh", 547871572, com.azure.core.util.Context.NONE); + = manager.forwardingRules().list("minsgowzf", "tsttktlahbq", 520028629, com.azure.core.util.Context.NONE); - Assertions.assertEquals("kkqfqjbvle", response.iterator().next().domainName()); - Assertions.assertEquals("fmluiqtqzfavyvn", response.iterator().next().targetDnsServers().get(0).ipAddress()); - Assertions.assertEquals(951173892, response.iterator().next().targetDnsServers().get(0).port()); - Assertions.assertEquals("lesjcbhe", response.iterator().next().metadata().get("n")); + Assertions.assertEquals("tx", response.iterator().next().domainName()); + Assertions.assertEquals("zukxitmmqtgqq", response.iterator().next().targetDnsServers().get(0).ipAddress()); + Assertions.assertEquals(1748959674, response.iterator().next().targetDnsServers().get(0).port()); + Assertions.assertEquals("fvazivjlfrqttba", response.iterator().next().metadata().get("lkatnwxyiopidkqq")); Assertions.assertEquals(ForwardingRuleState.ENABLED, response.iterator().next().forwardingRuleState()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointInnerTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointInnerTests.java new file mode 100644 index 000000000000..2c8d765b9b81 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointInnerTests.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.InboundEndpointInner; +import com.azure.resourcemanager.dnsresolver.models.IpAllocationMethod; +import com.azure.resourcemanager.dnsresolver.models.IpConfiguration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class InboundEndpointInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InboundEndpointInner model = BinaryData.fromString( + "{\"properties\":{\"ipConfigurations\":[{\"subnet\":{\"id\":\"xth\"},\"privateIpAddress\":\"tusivyevcciqihn\",\"privateIpAllocationMethod\":\"Static\"},{\"subnet\":{\"id\":\"bwjzr\"},\"privateIpAddress\":\"ygxgispemvtz\",\"privateIpAllocationMethod\":\"Static\"}],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"ljofxqeofjaeqjh\"},\"etag\":\"b\",\"location\":\"v\",\"tags\":{\"gsntnbybkzgcwr\":\"jqul\",\"skcqvkocrcjd\":\"clxxwrljdo\",\"lssai\":\"wtnhxbnjbiksqr\"},\"id\":\"qpjwnzlljfm\",\"name\":\"pee\",\"type\":\"vmgxsab\"}") + .toObject(InboundEndpointInner.class); + Assertions.assertEquals("v", model.location()); + Assertions.assertEquals("jqul", model.tags().get("gsntnbybkzgcwr")); + Assertions.assertEquals("xth", model.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals("tusivyevcciqihn", model.ipConfigurations().get(0).privateIpAddress()); + Assertions.assertEquals(IpAllocationMethod.STATIC, model.ipConfigurations().get(0).privateIpAllocationMethod()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InboundEndpointInner model = new InboundEndpointInner().withLocation("v") + .withTags(mapOf("gsntnbybkzgcwr", "jqul", "skcqvkocrcjd", "clxxwrljdo", "lssai", "wtnhxbnjbiksqr")) + .withIpConfigurations(Arrays.asList( + new IpConfiguration().withSubnet(new SubResource().withId("xth")) + .withPrivateIpAddress("tusivyevcciqihn") + .withPrivateIpAllocationMethod(IpAllocationMethod.STATIC), + new IpConfiguration().withSubnet(new SubResource().withId("bwjzr")) + .withPrivateIpAddress("ygxgispemvtz") + .withPrivateIpAllocationMethod(IpAllocationMethod.STATIC))); + model = BinaryData.fromObject(model).toObject(InboundEndpointInner.class); + Assertions.assertEquals("v", model.location()); + Assertions.assertEquals("jqul", model.tags().get("gsntnbybkzgcwr")); + Assertions.assertEquals("xth", model.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals("tusivyevcciqihn", model.ipConfigurations().get(0).privateIpAddress()); + Assertions.assertEquals(IpAllocationMethod.STATIC, model.ipConfigurations().get(0).privateIpAllocationMethod()); + } + + // 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/InboundEndpointListResultTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointListResultTests.java new file mode 100644 index 000000000000..b572959bb892 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointListResultTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.implementation.models.InboundEndpointListResult; +import com.azure.resourcemanager.dnsresolver.models.IpAllocationMethod; +import org.junit.jupiter.api.Assertions; + +public final class InboundEndpointListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InboundEndpointListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"ipConfigurations\":[{\"subnet\":{},\"privateIpAddress\":\"ddhsgcbacphe\",\"privateIpAllocationMethod\":\"Static\"},{\"subnet\":{},\"privateIpAddress\":\"ynqgoulzndlikwyq\",\"privateIpAllocationMethod\":\"Dynamic\"},{\"subnet\":{},\"privateIpAddress\":\"ibmadgakeqsrxy\",\"privateIpAllocationMethod\":\"Dynamic\"},{\"subnet\":{},\"privateIpAddress\":\"e\",\"privateIpAllocationMethod\":\"Static\"}],\"provisioningState\":\"Canceled\",\"resourceGuid\":\"iqfouflmmnkz\"},\"etag\":\"odmgl\",\"location\":\"gpbkwtmut\",\"tags\":{\"kdosvqw\":\"ktapspwgcuertu\",\"bjf\":\"bmdg\",\"bexppb\":\"dgmb\",\"rolfpfp\":\"tq\"},\"id\":\"algbquxigjyjg\",\"name\":\"jaoyfhrtx\",\"type\":\"lnerkujysvleju\"},{\"properties\":{\"ipConfigurations\":[{\"subnet\":{},\"privateIpAddress\":\"awrlyx\",\"privateIpAllocationMethod\":\"Static\"},{\"subnet\":{},\"privateIpAddress\":\"prbnwbxgjvtbv\",\"privateIpAllocationMethod\":\"Static\"},{\"subnet\":{},\"privateIpAddress\":\"zdn\",\"privateIpAllocationMethod\":\"Static\"}],\"provisioningState\":\"Failed\",\"resourceGuid\":\"hmuouqfprwzwbn\"},\"etag\":\"itnwuizgazxufi\",\"location\":\"ckyfih\",\"tags\":{\"wisdkft\":\"dfvzwdzuhty\"},\"id\":\"wxmnteiwao\",\"name\":\"vkmijcmmxdcuf\",\"type\":\"fsrpymzidnse\"},{\"properties\":{\"ipConfigurations\":[{\"subnet\":{},\"privateIpAddress\":\"tbzsgfyccs\",\"privateIpAllocationMethod\":\"Dynamic\"},{\"subnet\":{},\"privateIpAddress\":\"dwzjeiach\",\"privateIpAllocationMethod\":\"Static\"}],\"provisioningState\":\"Deleting\",\"resourceGuid\":\"nrosfqpte\"},\"etag\":\"zzvypyqrimzinp\",\"location\":\"wjdk\",\"tags\":{\"ohjtckw\":\"oodqxhcrm\",\"sqwpgrjb\":\"dsoifiyipj\",\"mocpc\":\"norcjxvsnbyxqab\",\"c\":\"shurzafbljjgpbto\"},\"id\":\"mkljavb\",\"name\":\"idtqajzyu\",\"type\":\"pku\"}],\"nextLink\":\"krlkhbzhfepg\"}") + .toObject(InboundEndpointListResult.class); + Assertions.assertEquals("gpbkwtmut", model.value().get(0).location()); + Assertions.assertEquals("ktapspwgcuertu", model.value().get(0).tags().get("kdosvqw")); + Assertions.assertEquals("ddhsgcbacphe", model.value().get(0).ipConfigurations().get(0).privateIpAddress()); + Assertions.assertEquals(IpAllocationMethod.STATIC, + model.value().get(0).ipConfigurations().get(0).privateIpAllocationMethod()); + Assertions.assertEquals("krlkhbzhfepg", model.nextLink()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointPatchTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointPatchTests.java new file mode 100644 index 000000000000..0fa339e94d02 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointPatchTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.models.InboundEndpointPatch; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class InboundEndpointPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InboundEndpointPatch model = BinaryData.fromString( + "{\"tags\":{\"dgeablgphu\":\"atqxho\",\"xhurok\":\"icndvkaozwyifty\",\"kjfkg\":\"tyxolniwpwc\",\"plwckbas\":\"awxklr\"}}") + .toObject(InboundEndpointPatch.class); + Assertions.assertEquals("atqxho", model.tags().get("dgeablgphu")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InboundEndpointPatch model = new InboundEndpointPatch().withTags( + mapOf("dgeablgphu", "atqxho", "xhurok", "icndvkaozwyifty", "kjfkg", "tyxolniwpwc", "plwckbas", "awxklr")); + model = BinaryData.fromObject(model).toObject(InboundEndpointPatch.class); + Assertions.assertEquals("atqxho", model.tags().get("dgeablgphu")); + } + + // 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/InboundEndpointPropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointPropertiesTests.java new file mode 100644 index 000000000000..c27338922a69 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointPropertiesTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.InboundEndpointProperties; +import com.azure.resourcemanager.dnsresolver.models.IpAllocationMethod; +import com.azure.resourcemanager.dnsresolver.models.IpConfiguration; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class InboundEndpointPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + InboundEndpointProperties model = BinaryData.fromString( + "{\"ipConfigurations\":[{\"subnet\":{\"id\":\"duuji\"},\"privateIpAddress\":\"jczdzevndh\",\"privateIpAllocationMethod\":\"Dynamic\"},{\"subnet\":{\"id\":\"d\"},\"privateIpAddress\":\"p\",\"privateIpAllocationMethod\":\"Dynamic\"}],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"wrwjfeu\"}") + .toObject(InboundEndpointProperties.class); + Assertions.assertEquals("duuji", model.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals("jczdzevndh", model.ipConfigurations().get(0).privateIpAddress()); + Assertions.assertEquals(IpAllocationMethod.DYNAMIC, + model.ipConfigurations().get(0).privateIpAllocationMethod()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + InboundEndpointProperties model = new InboundEndpointProperties().withIpConfigurations(Arrays.asList( + new IpConfiguration().withSubnet(new SubResource().withId("duuji")) + .withPrivateIpAddress("jczdzevndh") + .withPrivateIpAllocationMethod(IpAllocationMethod.DYNAMIC), + new IpConfiguration().withSubnet(new SubResource().withId("d")) + .withPrivateIpAddress("p") + .withPrivateIpAllocationMethod(IpAllocationMethod.DYNAMIC))); + model = BinaryData.fromObject(model).toObject(InboundEndpointProperties.class); + Assertions.assertEquals("duuji", model.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals("jczdzevndh", model.ipConfigurations().get(0).privateIpAddress()); + Assertions.assertEquals(IpAllocationMethod.DYNAMIC, + model.ipConfigurations().get(0).privateIpAllocationMethod()); + } +} 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 d23f26b4947e..af3be804f2c6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -27,7 +27,7 @@ public final class InboundEndpointsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"neuyow\",\"properties\":{\"ipConfigurations\":[{\"subnet\":{\"id\":\"wyt\"},\"privateIpAddress\":\"ib\",\"privateIpAllocationMethod\":\"Static\"}],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"kpzi\"},\"location\":\"j\",\"tags\":{\"rjqc\":\"lfzxiavrmbzonoki\",\"frl\":\"rgz\",\"jylwbtlhflsj\":\"zszrnwoiindfpw\"},\"id\":\"dhszfjv\",\"name\":\"bgofeljag\",\"type\":\"qmqhldvriii\"}"; + = "{\"properties\":{\"ipConfigurations\":[{\"subnet\":{\"id\":\"zywkb\"},\"privateIpAddress\":\"ryuzh\",\"privateIpAllocationMethod\":\"Static\"},{\"subnet\":{\"id\":\"oqrvqqaatjin\"},\"privateIpAddress\":\"goupmfiibfg\",\"privateIpAllocationMethod\":\"Dynamic\"}],\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"vrwxkv\"},\"etag\":\"k\",\"location\":\"lqwjygvjayvblm\",\"tags\":{\"rqufegxuvwz\":\"zuhbxvvyhgsopb\"},\"id\":\"bnhlmc\",\"name\":\"l\",\"type\":\"dn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,21 +37,21 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InboundEndpoint response = manager.inboundEndpoints() - .define("kghv") - .withRegion("bibsystawfsdjpvk") - .withExistingDnsResolver("ibdeibq", "p") - .withIpConfigurations(Arrays.asList(new IpConfiguration().withSubnet(new SubResource().withId("kqnyh")) - .withPrivateIpAddress("ij") + .define("vvsccyajguq") + .withRegion("elvezrypq") + .withExistingDnsResolver("tnvyqiatkzwp", "npwzcjaes") + .withIpConfigurations(Arrays.asList(new IpConfiguration().withSubnet(new SubResource().withId("ygz")) + .withPrivateIpAddress("dnkfx") .withPrivateIpAllocationMethod(IpAllocationMethod.DYNAMIC))) - .withTags(mapOf("jabudurgkakmo", "jxbkzbzkdvn", "gzrf", "zhjjklffhmouwq", "ikayuhqlbjbsybb", "eeyebi")) - .withIfMatch("x") - .withIfNoneMatch("smwutwbdsrezpd") + .withTags(mapOf("edkowepbqpcrfk", "eokerqwkyhkobopg")) + .withIfMatch("fq") + .withIfNoneMatch("tmtdhtmdvypgik") .create(); - Assertions.assertEquals("j", response.location()); - Assertions.assertEquals("lfzxiavrmbzonoki", response.tags().get("rjqc")); - Assertions.assertEquals("wyt", response.ipConfigurations().get(0).subnet().id()); - Assertions.assertEquals("ib", response.ipConfigurations().get(0).privateIpAddress()); + Assertions.assertEquals("lqwjygvjayvblm", response.location()); + Assertions.assertEquals("zuhbxvvyhgsopb", response.tags().get("rqufegxuvwz")); + Assertions.assertEquals("zywkb", response.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals("ryuzh", 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/InboundEndpointsDeleteMockTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/InboundEndpointsDeleteMockTests.java index 3c96907a9a58..c99f6914c8a8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.inboundEndpoints() - .delete("dlhewp", "sdsttwvog", "bbejdcngqqm", "akufgmjz", com.azure.core.util.Context.NONE); + .delete("iavrm", "zonokixrjqci", "gzpfrla", "szrnwo", 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 6556bfb26b24..363916268180 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class InboundEndpointsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"etag\":\"kopbminrf\",\"properties\":{\"ipConfigurations\":[{\"subnet\":{\"id\":\"yuhhziu\"},\"privateIpAddress\":\"fozbhdmsmlmzqhof\",\"privateIpAllocationMethod\":\"Dynamic\"},{\"subnet\":{\"id\":\"equi\"},\"privateIpAddress\":\"xicslfao\",\"privateIpAllocationMethod\":\"Dynamic\"},{\"subnet\":{\"id\":\"yylhalnswhccsp\"},\"privateIpAddress\":\"aivwitqscywu\",\"privateIpAllocationMethod\":\"Dynamic\"}],\"provisioningState\":\"Creating\",\"resourceGuid\":\"h\"},\"location\":\"bwemhairs\",\"tags\":{\"wmsweypqwd\":\"z\"},\"id\":\"ggicccnxqhue\",\"name\":\"mkttlstvlzywem\",\"type\":\"zrncsdt\"}"; + = "{\"properties\":{\"ipConfigurations\":[{\"subnet\":{\"id\":\"vtldgmfpgvmpip\"},\"privateIpAddress\":\"ltha\",\"privateIpAllocationMethod\":\"Static\"}],\"provisioningState\":\"Deleting\",\"resourceGuid\":\"wutwbdsre\"},\"etag\":\"drhneuyow\",\"location\":\"d\",\"tags\":{\"ib\":\"i\"},\"id\":\"rcgp\",\"name\":\"kpzi\",\"type\":\"ejzanlfz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InboundEndpoint response = manager.inboundEndpoints() - .getWithResponse("wr", "grtwae", "u", com.azure.core.util.Context.NONE) + .getWithResponse("gzrf", "eeyebi", "ikayuhqlbjbsybb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("bwemhairs", response.location()); - Assertions.assertEquals("z", response.tags().get("wmsweypqwd")); - Assertions.assertEquals("yuhhziu", response.ipConfigurations().get(0).subnet().id()); - Assertions.assertEquals("fozbhdmsmlmzqhof", response.ipConfigurations().get(0).privateIpAddress()); - Assertions.assertEquals(IpAllocationMethod.DYNAMIC, + Assertions.assertEquals("d", response.location()); + Assertions.assertEquals("i", response.tags().get("ib")); + Assertions.assertEquals("vtldgmfpgvmpip", response.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals("ltha", 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 9e0f26d92741..9d49e0f4c6a4 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -23,7 +23,7 @@ public final class InboundEndpointsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"gq\",\"properties\":{\"ipConfigurations\":[{\"subnet\":{\"id\":\"hejhzisx\"},\"privateIpAddress\":\"pelol\",\"privateIpAllocationMethod\":\"Static\"},{\"subnet\":{\"id\":\"srp\"},\"privateIpAddress\":\"ujzra\",\"privateIpAllocationMethod\":\"Static\"},{\"subnet\":{\"id\":\"dw\"},\"privateIpAddress\":\"tswiby\",\"privateIpAllocationMethod\":\"Static\"}],\"provisioningState\":\"Updating\",\"resourceGuid\":\"shfwpracstwity\"},\"location\":\"evxccedcp\",\"tags\":{\"vnhltiugcx\":\"yodnwzxltj\",\"y\":\"avvwxqi\",\"djrkvfgbvfvpd\":\"unyowxwl\"},\"id\":\"odacizs\",\"name\":\"q\",\"type\":\"hkr\"}]}"; + = "{\"value\":[{\"properties\":{\"ipConfigurations\":[{\"subnet\":{\"id\":\"sj\"},\"privateIpAddress\":\"hszfjvfb\",\"privateIpAllocationMethod\":\"Dynamic\"},{\"subnet\":{\"id\":\"ljagrqmqhl\"},\"privateIpAddress\":\"riiiojnalghfkv\",\"privateIpAllocationMethod\":\"Static\"}],\"provisioningState\":\"Creating\",\"resourceGuid\":\"owueluqh\"},\"etag\":\"hhxvrhmzkwpj\",\"location\":\"wspughftqsxhqx\",\"tags\":{\"fzdm\":\"ukndxdigrjgu\",\"otzi\":\"yqtfihwh\",\"phoszqz\":\"gamv\"},\"id\":\"dphqamv\",\"name\":\"kfwynw\",\"type\":\"vtbvkayh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.inboundEndpoints().list("lusiy", "bsfgytguslfea", 489676883, com.azure.core.util.Context.NONE); + = manager.inboundEndpoints().list("indfpwpjyl", "bt", 85653434, com.azure.core.util.Context.NONE); - Assertions.assertEquals("evxccedcp", response.iterator().next().location()); - Assertions.assertEquals("yodnwzxltj", response.iterator().next().tags().get("vnhltiugcx")); - Assertions.assertEquals("hejhzisx", response.iterator().next().ipConfigurations().get(0).subnet().id()); - Assertions.assertEquals("pelol", response.iterator().next().ipConfigurations().get(0).privateIpAddress()); - Assertions.assertEquals(IpAllocationMethod.STATIC, + Assertions.assertEquals("wspughftqsxhqx", response.iterator().next().location()); + Assertions.assertEquals("ukndxdigrjgu", response.iterator().next().tags().get("fzdm")); + Assertions.assertEquals("sj", response.iterator().next().ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals("hszfjvfb", response.iterator().next().ipConfigurations().get(0).privateIpAddress()); + Assertions.assertEquals(IpAllocationMethod.DYNAMIC, response.iterator().next().ipConfigurations().get(0).privateIpAllocationMethod()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/IpConfigurationTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/IpConfigurationTests.java new file mode 100644 index 000000000000..846f77b3c74f --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/IpConfigurationTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.models.IpAllocationMethod; +import com.azure.resourcemanager.dnsresolver.models.IpConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class IpConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IpConfiguration model = BinaryData.fromString( + "{\"subnet\":{\"id\":\"hutje\"},\"privateIpAddress\":\"mrldhu\",\"privateIpAllocationMethod\":\"Static\"}") + .toObject(IpConfiguration.class); + Assertions.assertEquals("hutje", model.subnet().id()); + Assertions.assertEquals("mrldhu", model.privateIpAddress()); + Assertions.assertEquals(IpAllocationMethod.STATIC, model.privateIpAllocationMethod()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IpConfiguration model = new IpConfiguration().withSubnet(new SubResource().withId("hutje")) + .withPrivateIpAddress("mrldhu") + .withPrivateIpAllocationMethod(IpAllocationMethod.STATIC); + model = BinaryData.fromObject(model).toObject(IpConfiguration.class); + Assertions.assertEquals("hutje", model.subnet().id()); + Assertions.assertEquals("mrldhu", model.privateIpAddress()); + Assertions.assertEquals(IpAllocationMethod.STATIC, model.privateIpAllocationMethod()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointInnerTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointInnerTests.java new file mode 100644 index 000000000000..2b7d65b4276c --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointInnerTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.OutboundEndpointInner; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class OutboundEndpointInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OutboundEndpointInner model = BinaryData.fromString( + "{\"properties\":{\"subnet\":{\"id\":\"qex\"},\"provisioningState\":\"Updating\",\"resourceGuid\":\"xscpaierhhbc\"},\"etag\":\"l\",\"location\":\"majtjaod\",\"tags\":{\"pxokajionp\":\"nbdxk\",\"dg\":\"mexgstxgcp\",\"djwzrlov\":\"aajrm\",\"qsqsy\":\"clwhijcoejctbz\"},\"id\":\"bkbfkgukdkex\",\"name\":\"ppofmxaxcfjpgdd\",\"type\":\"ocjjxhvpmouexh\"}") + .toObject(OutboundEndpointInner.class); + Assertions.assertEquals("majtjaod", model.location()); + Assertions.assertEquals("nbdxk", model.tags().get("pxokajionp")); + Assertions.assertEquals("qex", model.subnet().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OutboundEndpointInner model = new OutboundEndpointInner().withLocation("majtjaod") + .withTags(mapOf("pxokajionp", "nbdxk", "dg", "mexgstxgcp", "djwzrlov", "aajrm", "qsqsy", "clwhijcoejctbz")) + .withSubnet(new SubResource().withId("qex")); + model = BinaryData.fromObject(model).toObject(OutboundEndpointInner.class); + Assertions.assertEquals("majtjaod", model.location()); + Assertions.assertEquals("nbdxk", model.tags().get("pxokajionp")); + Assertions.assertEquals("qex", model.subnet().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/OutboundEndpointListResultTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointListResultTests.java new file mode 100644 index 000000000000..f4352b0b6bda --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointListResultTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.implementation.models.OutboundEndpointListResult; +import org.junit.jupiter.api.Assertions; + +public final class OutboundEndpointListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OutboundEndpointListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"subnet\":{\"id\":\"w\"},\"provisioningState\":\"Deleting\",\"resourceGuid\":\"uhrzayvvt\"},\"etag\":\"vdfgiotk\",\"location\":\"utqxlngx\",\"tags\":{\"xkrxdqmi\":\"gug\",\"abhjybi\":\"tthzrvqd\",\"ktzlcuiywg\":\"ehoqfbowskan\",\"nhzgpphrcgyn\":\"ywgndrv\"},\"id\":\"ocpecfvmmco\",\"name\":\"fsxlzevgbmqjqa\",\"type\":\"c\"}],\"nextLink\":\"mivkwlzuvcc\"}") + .toObject(OutboundEndpointListResult.class); + Assertions.assertEquals("utqxlngx", model.value().get(0).location()); + Assertions.assertEquals("gug", model.value().get(0).tags().get("xkrxdqmi")); + Assertions.assertEquals("w", model.value().get(0).subnet().id()); + Assertions.assertEquals("mivkwlzuvcc", model.nextLink()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointPatchTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointPatchTests.java new file mode 100644 index 000000000000..9e4787f0f843 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointPatchTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.models.OutboundEndpointPatch; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class OutboundEndpointPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OutboundEndpointPatch model = BinaryData.fromString( + "{\"tags\":{\"pzaoqvuhr\":\"w\",\"hjq\":\"cffcyddglmj\",\"hix\":\"wpyeicxmqciwqvh\",\"og\":\"igdtopbob\"}}") + .toObject(OutboundEndpointPatch.class); + Assertions.assertEquals("w", model.tags().get("pzaoqvuhr")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OutboundEndpointPatch model = new OutboundEndpointPatch() + .withTags(mapOf("pzaoqvuhr", "w", "hjq", "cffcyddglmj", "hix", "wpyeicxmqciwqvh", "og", "igdtopbob")); + model = BinaryData.fromObject(model).toObject(OutboundEndpointPatch.class); + Assertions.assertEquals("w", model.tags().get("pzaoqvuhr")); + } + + // 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/OutboundEndpointPropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointPropertiesTests.java new file mode 100644 index 000000000000..6e3c6a9de816 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/OutboundEndpointPropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.OutboundEndpointProperties; +import org.junit.jupiter.api.Assertions; + +public final class OutboundEndpointPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OutboundEndpointProperties model = BinaryData + .fromString( + "{\"subnet\":{\"id\":\"xibqeojnx\"},\"provisioningState\":\"Canceled\",\"resourceGuid\":\"ddntwndei\"}") + .toObject(OutboundEndpointProperties.class); + Assertions.assertEquals("xibqeojnx", model.subnet().id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OutboundEndpointProperties model + = new OutboundEndpointProperties().withSubnet(new SubResource().withId("xibqeojnx")); + model = BinaryData.fromObject(model).toObject(OutboundEndpointProperties.class); + Assertions.assertEquals("xibqeojnx", model.subnet().id()); + } +} 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 01552b3c1456..7e41828f8162 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -24,7 +24,7 @@ public final class OutboundEndpointsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"vuzlm\",\"properties\":{\"subnet\":{\"id\":\"elfk\"},\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"crpw\"},\"location\":\"eznoig\",\"tags\":{\"zejjoqk\":\"jwmwkpnbs\",\"aa\":\"gfhsxttaugzxn\",\"jlwuenvrkp\":\"pxdtnkdmkq\",\"ibreb\":\"ou\"},\"id\":\"aays\",\"name\":\"kixqtnqtt\",\"type\":\"zlwfffiakp\"}"; + = "{\"properties\":{\"subnet\":{\"id\":\"wesgogczh\"},\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"krlgnyhm\"},\"etag\":\"sxkkg\",\"location\":\"rrghxjbdhqxvcxgf\",\"tags\":{\"vbuswd\":\"sofbshrn\",\"ybycnunvj\":\"z\",\"ikyzirtxdy\":\"rtkfawnopq\"},\"id\":\"x\",\"name\":\"ejnt\",\"type\":\"sewgioilqukr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,19 +34,18 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); OutboundEndpoint response = manager.outboundEndpoints() - .define("uhbxvvy") - .withRegion("mctlpdngitv") - .withExistingDnsResolver("ioolvrwxkvtkkgll", "wjygvjayvblmhvk") - .withSubnet(new SubResource().withId("byrqufeg")) - .withTags(mapOf("jejveg", "hrixkwmy", "eaxhcexdrrvqahqk", "hbpnaixexccbd", "hyjsvfycx", "htpwij", "t", - "bfvoowvrv")) - .withIfMatch("fxtsgum") - .withIfNoneMatch("jglikkxwslolb") + .define("bfpncurdo") + .withRegion("fdlwg") + .withExistingDnsResolver("ttpkiwkkbnujrywv", "y") + .withSubnet(new SubResource().withId("iithtywu")) + .withTags(mapOf("tov", "sb", "irgne", "tgseinqfiufxqkn", "fcdmqnrojlpijn", "ttwqmsni")) + .withIfMatch("zq") + .withIfNoneMatch("zh") .create(); - Assertions.assertEquals("eznoig", response.location()); - Assertions.assertEquals("jwmwkpnbs", response.tags().get("zejjoqk")); - Assertions.assertEquals("elfk", response.subnet().id()); + Assertions.assertEquals("rrghxjbdhqxvcxgf", response.location()); + Assertions.assertEquals("sofbshrn", response.tags().get("vbuswd")); + Assertions.assertEquals("wesgogczh", 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 e9ac6ed04982..df1469222b6c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.outboundEndpoints() - .delete("jnalghf", "vtvsexsowueluq", "hahhxvrhmzkwpj", "wws", com.azure.core.util.Context.NONE); + manager.outboundEndpoints().delete("olbq", "vuzlm", "felfktg", "lcrpw", 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 d151131cfceb..ab9a15250866 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -21,7 +21,7 @@ public final class OutboundEndpointsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"etag\":\"yqtfihwh\",\"properties\":{\"subnet\":{\"id\":\"tzingamvpph\"},\"provisioningState\":\"Deleting\",\"resourceGuid\":\"zudphqamvdkfw\"},\"location\":\"wcvtbvkayhmtnvyq\",\"tags\":{\"cjaesgvvs\":\"kzwpcnpw\",\"wygzlvdnkfxusem\":\"cyajguqf\",\"pfcqdp\":\"wzrmuh\"},\"id\":\"qxqvpsvuoymgc\",\"name\":\"elvezrypq\",\"type\":\"mfe\"}"; + = "{\"properties\":{\"subnet\":{\"id\":\"reaxhcexdr\"},\"provisioningState\":\"Canceled\",\"resourceGuid\":\"hqk\"},\"etag\":\"tpwijnh\",\"location\":\"svfycxzbfv\",\"tags\":{\"on\":\"vrvmtgjqppyost\",\"a\":\"myhgfipnsxkmc\"},\"id\":\"krrjrea\",\"name\":\"xt\",\"type\":\"gumhjglikkxws\"}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); OutboundEndpoint response = manager.outboundEndpoints() - .getWithResponse("ughftqsx", "qxujxukndxd", "grjguufzd", com.azure.core.util.Context.NONE) + .getWithResponse("itvgbmhrixkwm", "ijejvegrhbpn", "ixexcc", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wcvtbvkayhmtnvyq", response.location()); - Assertions.assertEquals("kzwpcnpw", response.tags().get("cjaesgvvs")); - Assertions.assertEquals("tzingamvpph", response.subnet().id()); + Assertions.assertEquals("svfycxzbfv", response.location()); + Assertions.assertEquals("vrvmtgjqppyost", response.tags().get("on")); + Assertions.assertEquals("reaxhcexdr", 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 ae9c1647feae..460802549985 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class OutboundEndpointsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"xedk\",\"properties\":{\"subnet\":{\"id\":\"epbqpcrfkbw\"},\"provisioningState\":\"Deleting\",\"resourceGuid\":\"jvcdwxlpqekf\"},\"location\":\"khtj\",\"tags\":{\"dhtmdvypgikd\":\"ngwfqatm\"},\"id\":\"szywkbirryu\",\"name\":\"hlhkjoqrvqqaatj\",\"type\":\"nrvgoupmfiibfgg\"}]}"; + = "{\"value\":[{\"properties\":{\"subnet\":{\"id\":\"bsazejjoqka\"},\"provisioningState\":\"Succeeded\",\"resourceGuid\":\"xttaugzxnfaaz\"},\"etag\":\"dtnkdmkq\",\"location\":\"lwuenvrkp\",\"tags\":{\"nqttezl\":\"aibrebqaaysjkixq\",\"jpqqmted\":\"fffiak\",\"wau\":\"tmmjihyeozph\",\"mdscwxqupev\":\"qncygupkvi\"},\"id\":\"hfstotxhojujbyp\",\"name\":\"lmcuvhixb\",\"type\":\"xyfwnylrcool\"}]}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.outboundEndpoints().list("kerqwkyh", "ob", 503673017, com.azure.core.util.Context.NONE); + = manager.outboundEndpoints().list("xeznoi", "brnjwmw", 490713776, com.azure.core.util.Context.NONE); - Assertions.assertEquals("khtj", response.iterator().next().location()); - Assertions.assertEquals("ngwfqatm", response.iterator().next().tags().get("dhtmdvypgikd")); - Assertions.assertEquals("epbqpcrfkbw", response.iterator().next().subnet().id()); + Assertions.assertEquals("lwuenvrkp", response.iterator().next().location()); + Assertions.assertEquals("aibrebqaaysjkixq", response.iterator().next().tags().get("nqttezl")); + Assertions.assertEquals("bsazejjoqka", response.iterator().next().subnet().id()); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/SubResourceListResultTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/SubResourceListResultTests.java new file mode 100644 index 000000000000..53fa8277d4e8 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/SubResourceListResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.implementation.models.SubResourceListResult; +import org.junit.jupiter.api.Assertions; + +public final class SubResourceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SubResourceListResult model = BinaryData + .fromString( + "{\"value\":[{\"id\":\"pdvhpfxxypin\"},{\"id\":\"mayhuybbkpodepoo\"}],\"nextLink\":\"nuvamiheogna\"}") + .toObject(SubResourceListResult.class); + Assertions.assertEquals("pdvhpfxxypin", model.value().get(0).id()); + Assertions.assertEquals("nuvamiheogna", model.nextLink()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/TargetDnsServerTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/TargetDnsServerTests.java new file mode 100644 index 000000000000..bc522b1ad533 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/TargetDnsServerTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.models.TargetDnsServer; +import org.junit.jupiter.api.Assertions; + +public final class TargetDnsServerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TargetDnsServer model + = BinaryData.fromString("{\"ipAddress\":\"cohoq\",\"port\":774520942}").toObject(TargetDnsServer.class); + Assertions.assertEquals("cohoq", model.ipAddress()); + Assertions.assertEquals(774520942, model.port()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TargetDnsServer model = new TargetDnsServer().withIpAddress("cohoq").withPort(774520942); + model = BinaryData.fromObject(model).toObject(TargetDnsServer.class); + Assertions.assertEquals("cohoq", model.ipAddress()); + Assertions.assertEquals(774520942, model.port()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkDnsForwardingRulesetInnerTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkDnsForwardingRulesetInnerTests.java new file mode 100644 index 000000000000..0ac256ff88eb --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkDnsForwardingRulesetInnerTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkDnsForwardingRulesetInner; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkDnsForwardingRulesetInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkDnsForwardingRulesetInner model = BinaryData + .fromString("{\"id\":\"aos\",\"properties\":{\"virtualNetworkLink\":{\"id\":\"sonpclhocohs\"}}}") + .toObject(VirtualNetworkDnsForwardingRulesetInner.class); + Assertions.assertEquals("aos", model.id()); + Assertions.assertEquals("sonpclhocohs", model.virtualNetworkLink().id()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkDnsForwardingRulesetListResultTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkDnsForwardingRulesetListResultTests.java new file mode 100644 index 000000000000..3357ff2c9fcb --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkDnsForwardingRulesetListResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.implementation.models.VirtualNetworkDnsForwardingRulesetListResult; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkDnsForwardingRulesetListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkDnsForwardingRulesetListResult model = BinaryData.fromString( + "{\"value\":[{\"id\":\"ajiwkuo\",\"properties\":{\"virtualNetworkLink\":{\"id\":\"ghsauuimjmvxied\"}}}],\"nextLink\":\"gidyjrrf\"}") + .toObject(VirtualNetworkDnsForwardingRulesetListResult.class); + Assertions.assertEquals("ajiwkuo", model.value().get(0).id()); + Assertions.assertEquals("ghsauuimjmvxied", model.value().get(0).virtualNetworkLink().id()); + Assertions.assertEquals("gidyjrrf", model.nextLink()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkInnerTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkInnerTests.java new file mode 100644 index 000000000000..ae335f4f5c65 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkInnerTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.VirtualNetworkLinkInner; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkLinkInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkLinkInner model = BinaryData.fromString( + "{\"properties\":{\"virtualNetwork\":{\"id\":\"bgyepsbj\"},\"metadata\":{\"kqujidsuyono\":\"qugxywpmueefjzwf\"},\"provisioningState\":\"Creating\"},\"etag\":\"ocqxtccmg\",\"id\":\"dxyt\",\"name\":\"moyrxvwfudwpz\",\"type\":\"txhdzh\"}") + .toObject(VirtualNetworkLinkInner.class); + Assertions.assertEquals("bgyepsbj", model.virtualNetwork().id()); + Assertions.assertEquals("qugxywpmueefjzwf", model.metadata().get("kqujidsuyono")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkLinkInner model + = new VirtualNetworkLinkInner().withVirtualNetwork(new SubResource().withId("bgyepsbj")) + .withMetadata(mapOf("kqujidsuyono", "qugxywpmueefjzwf")); + model = BinaryData.fromObject(model).toObject(VirtualNetworkLinkInner.class); + Assertions.assertEquals("bgyepsbj", model.virtualNetwork().id()); + Assertions.assertEquals("qugxywpmueefjzwf", model.metadata().get("kqujidsuyono")); + } + + // 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/VirtualNetworkLinkListResultTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkListResultTests.java new file mode 100644 index 000000000000..747a137bba11 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkListResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.implementation.models.VirtualNetworkLinkListResult; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkLinkListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkLinkListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"virtualNetwork\":{\"id\":\"isgwbnbbeldawkz\"},\"metadata\":{\"rqhakauha\":\"io\",\"cjooxdjebwpucwwf\":\"hsfwxosowzxcug\",\"hzceuojgjrwjue\":\"ovbvmeueciv\"},\"provisioningState\":\"Deleting\"},\"etag\":\"mcdytdxwitxnrj\",\"id\":\"gqwgxhniskxfbkp\",\"name\":\"cg\",\"type\":\"lwn\"},{\"properties\":{\"virtualNetwork\":{\"id\":\"hjdauwhvylwz\"},\"metadata\":{\"ujznb\":\"h\",\"wpr\":\"pow\",\"xobbcswsrt\":\"qlveualupjmkh\"},\"provisioningState\":\"Succeeded\"},\"etag\":\"lrbpbewtghfgbl\",\"id\":\"wxzvlvqhjkb\",\"name\":\"gibtnm\",\"type\":\"iebwwaloayqcgwrt\"}],\"nextLink\":\"uzgwyzmhtx\"}") + .toObject(VirtualNetworkLinkListResult.class); + Assertions.assertEquals("isgwbnbbeldawkz", model.value().get(0).virtualNetwork().id()); + Assertions.assertEquals("io", model.value().get(0).metadata().get("rqhakauha")); + Assertions.assertEquals("uzgwyzmhtx", model.nextLink()); + } +} diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkPatchPropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkPatchPropertiesTests.java new file mode 100644 index 000000000000..3c03fe3dca3f --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkPatchPropertiesTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkLinkPatchProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkLinkPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkLinkPatchProperties model = BinaryData.fromString("{\"metadata\":{\"vxpvgomz\":\"pvfadmwsrcr\"}}") + .toObject(VirtualNetworkLinkPatchProperties.class); + Assertions.assertEquals("pvfadmwsrcr", model.metadata().get("vxpvgomz")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkLinkPatchProperties model + = new VirtualNetworkLinkPatchProperties().withMetadata(mapOf("vxpvgomz", "pvfadmwsrcr")); + model = BinaryData.fromObject(model).toObject(VirtualNetworkLinkPatchProperties.class); + Assertions.assertEquals("pvfadmwsrcr", model.metadata().get("vxpvgomz")); + } + + // 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/VirtualNetworkLinkPatchTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkPatchTests.java new file mode 100644 index 000000000000..4fe472c566b7 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkPatchTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.models.VirtualNetworkLinkPatch; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkLinkPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkLinkPatch model = BinaryData.fromString( + "{\"properties\":{\"metadata\":{\"rnwb\":\"b\",\"hspkdeemao\":\"ehhseyvjusrts\",\"gkvtmelmqkrhah\":\"mx\",\"duala\":\"ljuahaquhcdh\"}}}") + .toObject(VirtualNetworkLinkPatch.class); + Assertions.assertEquals("b", model.metadata().get("rnwb")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkLinkPatch model = new VirtualNetworkLinkPatch().withMetadata( + mapOf("rnwb", "b", "hspkdeemao", "ehhseyvjusrts", "gkvtmelmqkrhah", "mx", "duala", "ljuahaquhcdh")); + model = BinaryData.fromObject(model).toObject(VirtualNetworkLinkPatch.class); + Assertions.assertEquals("b", model.metadata().get("rnwb")); + } + + // 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/VirtualNetworkLinkPropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkPropertiesTests.java new file mode 100644 index 000000000000..dff411549293 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkPropertiesTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.VirtualNetworkLinkProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkLinkPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkLinkProperties model = BinaryData.fromString( + "{\"virtualNetwork\":{\"id\":\"qj\"},\"metadata\":{\"pycanuzbpz\":\"kfrlhrxsbky\"},\"provisioningState\":\"Deleting\"}") + .toObject(VirtualNetworkLinkProperties.class); + Assertions.assertEquals("qj", model.virtualNetwork().id()); + Assertions.assertEquals("kfrlhrxsbky", model.metadata().get("pycanuzbpz")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkLinkProperties model + = new VirtualNetworkLinkProperties().withVirtualNetwork(new SubResource().withId("qj")) + .withMetadata(mapOf("pycanuzbpz", "kfrlhrxsbky")); + model = BinaryData.fromObject(model).toObject(VirtualNetworkLinkProperties.class); + Assertions.assertEquals("qj", model.virtualNetwork().id()); + Assertions.assertEquals("kfrlhrxsbky", model.metadata().get("pycanuzbpz")); + } + + // 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/VirtualNetworkLinkSubResourcePropertiesTests.java b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkSubResourcePropertiesTests.java new file mode 100644 index 000000000000..126628dd9603 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/test/java/com/azure/resourcemanager/dnsresolver/generated/VirtualNetworkLinkSubResourcePropertiesTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.dnsresolver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkLinkSubResourceProperties; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkLinkSubResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkLinkSubResourceProperties model + = BinaryData.fromString("{\"virtualNetworkLink\":{\"id\":\"vleggzfbuhfmvfax\"}}") + .toObject(VirtualNetworkLinkSubResourceProperties.class); + Assertions.assertEquals("vleggzfbuhfmvfax", model.virtualNetworkLink().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 a6a764b18bbf..3e2771afbd15 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -24,7 +24,7 @@ public final class VirtualNetworkLinksCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"etag\":\"qcaaewdaomdjvl\",\"properties\":{\"virtualNetwork\":{\"id\":\"x\"},\"metadata\":{\"geivsiykzkdncj\":\"brm\"},\"provisioningState\":\"Succeeded\"},\"id\":\"bzo\",\"name\":\"gculap\",\"type\":\"wyrpgogtqxepnyl\"}"; + = "{\"properties\":{\"virtualNetwork\":{\"id\":\"m\"},\"metadata\":{\"ocxvdfffwafqr\":\"ysuxmprafwgck\",\"vkbunzozudh\":\"udaspavehh\",\"moy\":\"xg\",\"f\":\"cdyuibhmfdnbzyd\"},\"provisioningState\":\"Succeeded\"},\"etag\":\"naeo\",\"id\":\"rvhmgor\",\"name\":\"fukiscvwmzhw\",\"type\":\"lefaxvxilcbtgn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,16 +34,16 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VirtualNetworkLink response = manager.virtualNetworkLinks() - .define("iogsjkmnwq") - .withExistingDnsForwardingRuleset("wjplma", "stcyohpfkyrkdbd") - .withVirtualNetwork(new SubResource().withId("m")) - .withMetadata(mapOf("alxlllchp", "pmvmemfnczdwvv", "evwrdnhfuk", "db", "fcvlerch", "vsjcswsmystuluqy")) - .withIfMatch("g") - .withIfNoneMatch("ddrihpf") + .define("ikvylauya") + .withExistingDnsForwardingRuleset("iqyuvvfo", "kphhq") + .withVirtualNetwork(new SubResource().withId("uwmncs")) + .withMetadata(mapOf("huzqgn", "jfybvpoekrsgsgb")) + .withIfMatch("hlfkqojpy") + .withIfNoneMatch("vgtrdcnifmzzs") .create(); - Assertions.assertEquals("x", response.virtualNetwork().id()); - Assertions.assertEquals("brm", response.metadata().get("geivsiykzkdncj")); + Assertions.assertEquals("m", response.virtualNetwork().id()); + Assertions.assertEquals("ysuxmprafwgck", response.metadata().get("ocxvdfffwafqr")); } // 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 3e43dc322e7b..5638b141932c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -27,7 +27,8 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.virtualNetworkLinks().delete("lgy", "vutpthjoxo", "smsks", "pi", com.azure.core.util.Context.NONE); + manager.virtualNetworkLinks() + .delete("zgkrvqe", "vtoepryutnw", "tpzdmovzvfvaawzq", "dflgzuri", 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 54da8b073b4a..be42abb0894a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -21,7 +21,7 @@ public final class VirtualNetworkLinksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"etag\":\"fbkjubdyhgkfmi\",\"properties\":{\"virtualNetwork\":{\"id\":\"g\"},\"metadata\":{\"lahb\":\"fttsttk\",\"qtgqqqxhrnxr\":\"actxtgzukxitm\",\"okqdzfvaz\":\"cpjuisa\",\"ajlkatnw\":\"vjlfrqtt\"},\"provisioningState\":\"Creating\"},\"id\":\"pidkqqfkuvscxkdm\",\"name\":\"igovi\",\"type\":\"rxkpmloazuruoc\"}"; + = "{\"properties\":{\"virtualNetwork\":{\"id\":\"btrnegvm\"},\"metadata\":{\"qvldspastjbkkd\":\"q\",\"apeewchpxlkt\":\"flvestmjlxrrilo\"},\"provisioningState\":\"Creating\"},\"etag\":\"iycslevuf\",\"id\":\"tcktyhjtqedcgzu\",\"name\":\"wmmrq\",\"type\":\"zrrjvpgly\"}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VirtualNetworkLink response = manager.virtualNetworkLinks() - .getWithResponse("lqol", "xkcgxxlxsffgcvi", "qzdwlvwlyoup", com.azure.core.util.Context.NONE) + .getWithResponse("xfzwi", "vwzjbhyz", "xjrk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("g", response.virtualNetwork().id()); - Assertions.assertEquals("fttsttk", response.metadata().get("lahb")); + Assertions.assertEquals("btrnegvm", response.virtualNetwork().id()); + Assertions.assertEquals("q", response.metadata().get("qvldspastjbkkd")); } } 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 ddfddb62e398..335c9fe5d357 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.dnsresolver.generated; @@ -22,7 +22,7 @@ public final class VirtualNetworkLinksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"etag\":\"il\",\"properties\":{\"virtualNetwork\":{\"id\":\"wwtkg\"},\"metadata\":{\"ewbcihxuuw\":\"yedabgyvudtj\"},\"provisioningState\":\"Deleting\"},\"id\":\"xccybvpa\",\"name\":\"akkud\",\"type\":\"px\"}]}"; + = "{\"value\":[{\"properties\":{\"virtualNetwork\":{\"id\":\"mldgxobfirc\"},\"metadata\":{\"khyawfvjlboxqv\":\"kciayzri\"},\"provisioningState\":\"Canceled\"},\"etag\":\"xhom\",\"id\":\"nhdwdigumbnra\",\"name\":\"uzzptjazysdz\",\"type\":\"ezwwv\"}]}"; 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("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.virtualNetworkLinks() - .list("goorbteo", "bfhjxakvvjgsl", 36886384, com.azure.core.util.Context.NONE); + PagedIterable response + = manager.virtualNetworkLinks().list("laecxndticok", "vzm", 2090573911, com.azure.core.util.Context.NONE); - Assertions.assertEquals("wwtkg", response.iterator().next().virtualNetwork().id()); - Assertions.assertEquals("yedabgyvudtj", response.iterator().next().metadata().get("ewbcihxuuw")); + Assertions.assertEquals("mldgxobfirc", response.iterator().next().virtualNetwork().id()); + Assertions.assertEquals("kciayzri", response.iterator().next().metadata().get("khyawfvjlboxqv")); } } diff --git a/sdk/dnsresolver/azure-resourcemanager-dnsresolver/tsp-location.yaml b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/tsp-location.yaml new file mode 100644 index 000000000000..e96ff17ee7d4 --- /dev/null +++ b/sdk/dnsresolver/azure-resourcemanager-dnsresolver/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/dnsresolver/resource-manager/Microsoft.Network/DnsResolver +commit: 3ec630fc62ebc03e9adf238cb2fb0b538d93ead4 +repo: Azure/azure-rest-api-specs +additionalDirectories: