diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkManagementClient.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkManagementClient.cs
index 298c0aa86ca1c..8f770cfc31cb2 100644
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkManagementClient.cs
+++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkManagementClient.cs
@@ -575,11 +575,6 @@ public partial interface INetworkManagementClient : System.IDisposable
///
IHubRouteTablesOperations HubRouteTables { get; }
- ///
- /// Gets the IWebApplicationFirewallPoliciesOperations.
- ///
- IWebApplicationFirewallPoliciesOperations WebApplicationFirewallPolicies { get; }
-
///
/// Creates a Bastion Shareable Links for all the VMs specified in the
/// request.
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPrivateLinkServicesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPrivateLinkServicesOperations.cs
index 25fa80d544caa..2ba2f466d411e 100644
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPrivateLinkServicesOperations.cs
+++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPrivateLinkServicesOperations.cs
@@ -445,6 +445,60 @@ public partial interface IPrivateLinkServicesOperations
///
Task BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string serviceName, string peConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Checks whether the subscription is visible to private link service.
+ ///
+ ///
+ /// The location of the domain name.
+ ///
+ ///
+ /// The request body of CheckPrivateLinkService API call.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCheckPrivateLinkServiceVisibilityWithHttpMessagesAsync(string location, CheckPrivateLinkServiceVisibilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Checks whether the subscription is visible to private link service
+ /// in the specified resource group.
+ ///
+ ///
+ /// The location of the domain name.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The request body of CheckPrivateLinkService API call.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCheckPrivateLinkServiceVisibilityByResourceGroupWithHttpMessagesAsync(string location, string resourceGroupName, CheckPrivateLinkServiceVisibilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Gets all private link services in a resource group.
///
///
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPublicIpAddressesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPublicIPAddressesOperations.cs
similarity index 99%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPublicIpAddressesOperations.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPublicIPAddressesOperations.cs
index 3f34cd5d07c60..8fda8a2ea5942 100644
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPublicIpAddressesOperations.cs
+++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPublicIPAddressesOperations.cs
@@ -30,7 +30,7 @@ public partial interface IPublicIPAddressesOperations
/// The name of the resource group.
///
///
- /// The name of the subnet.
+ /// The name of the public IP address.
///
///
/// The headers that will be added to request.
@@ -52,7 +52,7 @@ public partial interface IPublicIPAddressesOperations
/// The name of the resource group.
///
///
- /// The name of the subnet.
+ /// The name of the public IP address.
///
///
/// Expands referenced resources.
@@ -279,7 +279,7 @@ public partial interface IPublicIPAddressesOperations
/// The name of the resource group.
///
///
- /// The name of the subnet.
+ /// The name of the public IP address.
///
///
/// The headers that will be added to request.
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVirtualWANsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVirtualWansOperations.cs
similarity index 100%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVirtualWANsOperations.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVirtualWansOperations.cs
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IWebApplicationFirewallPoliciesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IWebApplicationFirewallPoliciesOperations.cs
deleted file mode 100644
index beb301402d7a8..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IWebApplicationFirewallPoliciesOperations.cs
+++ /dev/null
@@ -1,211 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// WebApplicationFirewallPoliciesOperations operations.
- ///
- public partial interface IWebApplicationFirewallPoliciesOperations
- {
- ///
- /// Lists all of the protection policies within a resource group.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets all the WAF policies in a subscription.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Retrieve protection policy with specified name within a resource
- /// group.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the policy.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Creates or update policy with specified rule set name within a
- /// resource group.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the policy.
- ///
- ///
- /// Policy to be created.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string policyName, WebApplicationFirewallPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Deletes Policy.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the policy.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task DeleteWithHttpMessagesAsync(string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Deletes Policy.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the policy.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists all of the protection policies within a resource group.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets all the WAF policies in a subscription.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayFrontendIpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.cs
similarity index 100%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayFrontendIpConfiguration.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.cs
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayIpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.cs
similarity index 100%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayIpConfiguration.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.cs
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationRule.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationRule.cs
index 894f75e7943c1..bd82acb16ce80 100644
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationRule.cs
+++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationRule.cs
@@ -38,25 +38,19 @@ public ApplicationRule()
/// List of destination IP addresses
/// or Service Tags.
/// Array of Application Protocols.
- /// List of Urls for this rule
- /// condition.
/// List of FQDNs for this rule.
/// List of FQDN Tags for this rule.
/// List of source IpGroups for this
/// rule.
- /// Terminate TLS connections for this
- /// rule.
- public ApplicationRule(string name = default(string), string description = default(string), IList sourceAddresses = default(IList), IList destinationAddresses = default(IList), IList protocols = default(IList), IList targetUrls = default(IList), IList targetFqdns = default(IList), IList fqdnTags = default(IList), IList sourceIpGroups = default(IList), bool? terminateTLS = default(bool?))
+ public ApplicationRule(string name = default(string), string description = default(string), IList sourceAddresses = default(IList), IList destinationAddresses = default(IList), IList protocols = default(IList), IList targetFqdns = default(IList), IList fqdnTags = default(IList), IList sourceIpGroups = default(IList))
: base(name, description)
{
SourceAddresses = sourceAddresses;
DestinationAddresses = destinationAddresses;
Protocols = protocols;
- TargetUrls = targetUrls;
TargetFqdns = targetFqdns;
FqdnTags = fqdnTags;
SourceIpGroups = sourceIpGroups;
- TerminateTLS = terminateTLS;
CustomInit();
}
@@ -83,12 +77,6 @@ public ApplicationRule()
[JsonProperty(PropertyName = "protocols")]
public IList Protocols { get; set; }
- ///
- /// Gets or sets list of Urls for this rule condition.
- ///
- [JsonProperty(PropertyName = "targetUrls")]
- public IList TargetUrls { get; set; }
-
///
/// Gets or sets list of FQDNs for this rule.
///
@@ -107,11 +95,5 @@ public ApplicationRule()
[JsonProperty(PropertyName = "sourceIpGroups")]
public IList SourceIpGroups { get; set; }
- ///
- /// Gets or sets terminate TLS connections for this rule.
- ///
- [JsonProperty(PropertyName = "terminateTLS")]
- public bool? TerminateTLS { get; set; }
-
}
}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/BackendAddressPool.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/BackendAddressPool.cs
index 3033c55a9030e..209df4980c321 100644
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/BackendAddressPool.cs
+++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/BackendAddressPool.cs
@@ -35,10 +35,10 @@ public BackendAddressPool()
/// Initializes a new instance of the BackendAddressPool class.
///
/// Resource ID.
- /// An array of references to IP
- /// addresses defined in network interfaces.
/// An array of backend
/// addresses.
+ /// An array of references to IP
+ /// addresses defined in network interfaces.
/// An array of references to load
/// balancing rules that use this backend address pool.
/// A reference to an outbound rule that
@@ -54,11 +54,11 @@ public BackendAddressPool()
/// A unique read-only string that changes whenever
/// the resource is updated.
/// Type of the resource.
- public BackendAddressPool(string id = default(string), IList backendIPConfigurations = default(IList), IList loadBalancerBackendAddresses = default(IList), IList loadBalancingRules = default(IList), SubResource outboundRule = default(SubResource), IList outboundRules = default(IList), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string))
+ public BackendAddressPool(string id = default(string), IList loadBalancerBackendAddresses = default(IList), IList backendIPConfigurations = default(IList), IList loadBalancingRules = default(IList), SubResource outboundRule = default(SubResource), IList outboundRules = default(IList), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string))
: base(id)
{
- BackendIPConfigurations = backendIPConfigurations;
LoadBalancerBackendAddresses = loadBalancerBackendAddresses;
+ BackendIPConfigurations = backendIPConfigurations;
LoadBalancingRules = loadBalancingRules;
OutboundRule = outboundRule;
OutboundRules = outboundRules;
@@ -74,6 +74,12 @@ public BackendAddressPool()
///
partial void CustomInit();
+ ///
+ /// Gets or sets an array of backend addresses.
+ ///
+ [JsonProperty(PropertyName = "properties.loadBalancerBackendAddresses")]
+ public IList LoadBalancerBackendAddresses { get; set; }
+
///
/// Gets an array of references to IP addresses defined in network
/// interfaces.
@@ -81,12 +87,6 @@ public BackendAddressPool()
[JsonProperty(PropertyName = "properties.backendIPConfigurations")]
public IList BackendIPConfigurations { get; private set; }
- ///
- /// Gets or sets an array of backend addresses.
- ///
- [JsonProperty(PropertyName = "properties.loadBalancerBackendAddresses")]
- public IList LoadBalancerBackendAddresses { get; set; }
-
///
/// Gets an array of references to load balancing rules that use this
/// backend address pool.
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicy.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicy.cs
index 5bf107041100f..0f1629ae771c3 100644
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicy.cs
+++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicy.cs
@@ -55,15 +55,10 @@ public FirewallPolicy()
/// 'Off'
/// ThreatIntel Whitelist for
/// Firewall Policy.
- /// The operation mode for Intrusion
- /// system. Possible values include: 'Enabled', 'Disabled'
- /// TLS Configuration
- /// definition.
/// DNS Proxy Settings definition.
/// A unique read-only string that changes whenever
/// the resource is updated.
- /// The identity of the firewall policy.
- public FirewallPolicy(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), IList ruleCollectionGroups = default(IList), string provisioningState = default(string), SubResource basePolicy = default(SubResource), IList firewalls = default(IList), IList childPolicies = default(IList), string threatIntelMode = default(string), FirewallPolicyThreatIntelWhitelist threatIntelWhitelist = default(FirewallPolicyThreatIntelWhitelist), string intrusionSystemMode = default(string), FirewallPolicyTransportSecurity transportSecurity = default(FirewallPolicyTransportSecurity), DnsSettings dnsSettings = default(DnsSettings), string etag = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity))
+ public FirewallPolicy(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), IList ruleCollectionGroups = default(IList), string provisioningState = default(string), SubResource basePolicy = default(SubResource), IList firewalls = default(IList), IList childPolicies = default(IList), string threatIntelMode = default(string), FirewallPolicyThreatIntelWhitelist threatIntelWhitelist = default(FirewallPolicyThreatIntelWhitelist), DnsSettings dnsSettings = default(DnsSettings), string etag = default(string))
: base(id, name, type, location, tags)
{
RuleCollectionGroups = ruleCollectionGroups;
@@ -73,11 +68,8 @@ public FirewallPolicy()
ChildPolicies = childPolicies;
ThreatIntelMode = threatIntelMode;
ThreatIntelWhitelist = threatIntelWhitelist;
- IntrusionSystemMode = intrusionSystemMode;
- TransportSecurity = transportSecurity;
DnsSettings = dnsSettings;
Etag = etag;
- Identity = identity;
CustomInit();
}
@@ -133,19 +125,6 @@ public FirewallPolicy()
[JsonProperty(PropertyName = "properties.threatIntelWhitelist")]
public FirewallPolicyThreatIntelWhitelist ThreatIntelWhitelist { get; set; }
- ///
- /// Gets or sets the operation mode for Intrusion system. Possible
- /// values include: 'Enabled', 'Disabled'
- ///
- [JsonProperty(PropertyName = "properties.intrusionSystemMode")]
- public string IntrusionSystemMode { get; set; }
-
- ///
- /// Gets or sets TLS Configuration definition.
- ///
- [JsonProperty(PropertyName = "properties.transportSecurity")]
- public FirewallPolicyTransportSecurity TransportSecurity { get; set; }
-
///
/// Gets or sets DNS Proxy Settings definition.
///
@@ -159,11 +138,5 @@ public FirewallPolicy()
[JsonProperty(PropertyName = "etag")]
public string Etag { get; private set; }
- ///
- /// Gets or sets the identity of the firewall policy.
- ///
- [JsonProperty(PropertyName = "identity")]
- public ManagedServiceIdentity Identity { get; set; }
-
}
}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.cs
deleted file mode 100644
index f0b22ccced8c8..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Trusted Root certificates properties for tls.
- ///
- [Rest.Serialization.JsonTransformation]
- public partial class FirewallPolicyCertificateAuthority
- {
- ///
- /// Initializes a new instance of the
- /// FirewallPolicyCertificateAuthority class.
- ///
- public FirewallPolicyCertificateAuthority()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// FirewallPolicyCertificateAuthority class.
- ///
- /// Secret Id of (base-64 encoded
- /// unencrypted pfx) 'Secret' or 'Certificate' object stored in
- /// KeyVault.
- /// Name of the CA certificate.
- public FirewallPolicyCertificateAuthority(string keyVaultSecretId = default(string), string name = default(string))
- {
- KeyVaultSecretId = keyVaultSecretId;
- Name = name;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets secret Id of (base-64 encoded unencrypted pfx)
- /// 'Secret' or 'Certificate' object stored in KeyVault.
- ///
- [JsonProperty(PropertyName = "properties.keyVaultSecretId")]
- public string KeyVaultSecretId { get; set; }
-
- ///
- /// Gets or sets name of the CA certificate.
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
-
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyIntrusionSystemMode.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyIntrusionSystemMode.cs
deleted file mode 100644
index 859b77200b7d7..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyIntrusionSystemMode.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
-
- ///
- /// Defines values for FirewallPolicyIntrusionSystemMode.
- ///
- public static class FirewallPolicyIntrusionSystemMode
- {
- public const string Enabled = "Enabled";
- public const string Disabled = "Disabled";
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyTransportSecurity.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyTransportSecurity.cs
deleted file mode 100644
index c2c9c17860969..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyTransportSecurity.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Configuration needed to perform TLS termination & initiation.
- ///
- public partial class FirewallPolicyTransportSecurity
- {
- ///
- /// Initializes a new instance of the FirewallPolicyTransportSecurity
- /// class.
- ///
- public FirewallPolicyTransportSecurity()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the FirewallPolicyTransportSecurity
- /// class.
- ///
- /// The CA used for intermediate CA
- /// generation.
- /// List of domains which are excluded
- /// from TLS termination.
- /// Certificates which are to be
- /// trusted by the firewall.
- public FirewallPolicyTransportSecurity(FirewallPolicyCertificateAuthority certificateAuthority = default(FirewallPolicyCertificateAuthority), IList excludedDomains = default(IList), IList trustedRootCertificates = default(IList))
- {
- CertificateAuthority = certificateAuthority;
- ExcludedDomains = excludedDomains;
- TrustedRootCertificates = trustedRootCertificates;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the CA used for intermediate CA generation.
- ///
- [JsonProperty(PropertyName = "certificateAuthority")]
- public FirewallPolicyCertificateAuthority CertificateAuthority { get; set; }
-
- ///
- /// Gets or sets list of domains which are excluded from TLS
- /// termination.
- ///
- [JsonProperty(PropertyName = "excludedDomains")]
- public IList ExcludedDomains { get; set; }
-
- ///
- /// Gets or sets certificates which are to be trusted by the firewall.
- ///
- [JsonProperty(PropertyName = "trustedRootCertificates")]
- public IList TrustedRootCertificates { get; set; }
-
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyTrustedRootCertificate.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyTrustedRootCertificate.cs
deleted file mode 100644
index 25b51b59cdfa7..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyTrustedRootCertificate.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Trusted Root certificates of a firewall policy.
- ///
- [Rest.Serialization.JsonTransformation]
- public partial class FirewallPolicyTrustedRootCertificate
- {
- ///
- /// Initializes a new instance of the
- /// FirewallPolicyTrustedRootCertificate class.
- ///
- public FirewallPolicyTrustedRootCertificate()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// FirewallPolicyTrustedRootCertificate class.
- ///
- /// Secret Id of (base-64 encoded
- /// unencrypted pfx) the public certificate data stored in
- /// KeyVault.
- /// Name of the trusted root certificate that is
- /// unique within a firewall policy.
- public FirewallPolicyTrustedRootCertificate(string keyVaultSecretId = default(string), string name = default(string))
- {
- KeyVaultSecretId = keyVaultSecretId;
- Name = name;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets secret Id of (base-64 encoded unencrypted pfx) the
- /// public certificate data stored in KeyVault.
- ///
- [JsonProperty(PropertyName = "properties.keyVaultSecretId")]
- public string KeyVaultSecretId { get; set; }
-
- ///
- /// Gets or sets name of the trusted root certificate that is unique
- /// within a firewall policy.
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
-
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FrontendIpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FrontendIPConfiguration.cs
similarity index 100%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FrontendIpConfiguration.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FrontendIPConfiguration.cs
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/IpAllocationMethod.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/IPAllocationMethod.cs
similarity index 100%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/IpAllocationMethod.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/IPAllocationMethod.cs
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRuleEnabledState.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRuleEnabledState.cs
deleted file mode 100644
index d313260bd1e2a..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRuleEnabledState.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
-
- ///
- /// Defines values for ManagedRuleEnabledState.
- ///
- public static class ManagedRuleEnabledState
- {
- public const string Disabled = "Disabled";
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRuleGroupOverride.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRuleGroupOverride.cs
deleted file mode 100644
index 567730e5ab226..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRuleGroupOverride.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
- using Microsoft.Rest;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Defines a managed rule group override setting.
- ///
- public partial class ManagedRuleGroupOverride
- {
- ///
- /// Initializes a new instance of the ManagedRuleGroupOverride class.
- ///
- public ManagedRuleGroupOverride()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ManagedRuleGroupOverride class.
- ///
- /// The managed rule group to
- /// override.
- /// List of rules that will be disabled. If none
- /// specified, all rules in the group will be disabled.
- public ManagedRuleGroupOverride(string ruleGroupName, IList rules = default(IList))
- {
- RuleGroupName = ruleGroupName;
- Rules = rules;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the managed rule group to override.
- ///
- [JsonProperty(PropertyName = "ruleGroupName")]
- public string RuleGroupName { get; set; }
-
- ///
- /// Gets or sets list of rules that will be disabled. If none
- /// specified, all rules in the group will be disabled.
- ///
- [JsonProperty(PropertyName = "rules")]
- public IList Rules { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (RuleGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "RuleGroupName");
- }
- if (Rules != null)
- {
- foreach (var element in Rules)
- {
- if (element != null)
- {
- element.Validate();
- }
- }
- }
- }
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRuleOverride.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRuleOverride.cs
deleted file mode 100644
index 179730940bad0..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRuleOverride.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
- using Microsoft.Rest;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Defines a managed rule group override setting.
- ///
- public partial class ManagedRuleOverride
- {
- ///
- /// Initializes a new instance of the ManagedRuleOverride class.
- ///
- public ManagedRuleOverride()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ManagedRuleOverride class.
- ///
- /// Identifier for the managed rule.
- /// The state of the managed rule. Defaults to
- /// Disabled if not specified. Possible values include:
- /// 'Disabled'
- public ManagedRuleOverride(string ruleId, string state = default(string))
- {
- RuleId = ruleId;
- State = state;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets identifier for the managed rule.
- ///
- [JsonProperty(PropertyName = "ruleId")]
- public string RuleId { get; set; }
-
- ///
- /// Gets or sets the state of the managed rule. Defaults to Disabled if
- /// not specified. Possible values include: 'Disabled'
- ///
- [JsonProperty(PropertyName = "state")]
- public string State { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (RuleId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "RuleId");
- }
- }
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRuleSet.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRuleSet.cs
deleted file mode 100644
index da73bd1b4299e..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRuleSet.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
- using Microsoft.Rest;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Defines a managed rule set.
- ///
- public partial class ManagedRuleSet
- {
- ///
- /// Initializes a new instance of the ManagedRuleSet class.
- ///
- public ManagedRuleSet()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ManagedRuleSet class.
- ///
- /// Defines the rule set type to use.
- /// Defines the version of the rule set to
- /// use.
- /// Defines the rule group overrides
- /// to apply to the rule set.
- public ManagedRuleSet(string ruleSetType, string ruleSetVersion, IList ruleGroupOverrides = default(IList))
- {
- RuleSetType = ruleSetType;
- RuleSetVersion = ruleSetVersion;
- RuleGroupOverrides = ruleGroupOverrides;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets defines the rule set type to use.
- ///
- [JsonProperty(PropertyName = "ruleSetType")]
- public string RuleSetType { get; set; }
-
- ///
- /// Gets or sets defines the version of the rule set to use.
- ///
- [JsonProperty(PropertyName = "ruleSetVersion")]
- public string RuleSetVersion { get; set; }
-
- ///
- /// Gets or sets defines the rule group overrides to apply to the rule
- /// set.
- ///
- [JsonProperty(PropertyName = "ruleGroupOverrides")]
- public IList RuleGroupOverrides { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (RuleSetType == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "RuleSetType");
- }
- if (RuleSetVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "RuleSetVersion");
- }
- if (RuleGroupOverrides != null)
- {
- foreach (var element in RuleGroupOverrides)
- {
- if (element != null)
- {
- element.Validate();
- }
- }
- }
- }
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRulesDefinition.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRulesDefinition.cs
deleted file mode 100644
index 434e935a2a470..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ManagedRulesDefinition.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
- using Microsoft.Rest;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Allow to exclude some variable satisfy the condition for the WAF check.
- ///
- public partial class ManagedRulesDefinition
- {
- ///
- /// Initializes a new instance of the ManagedRulesDefinition class.
- ///
- public ManagedRulesDefinition()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ManagedRulesDefinition class.
- ///
- /// The managed rule sets that are
- /// associated with the policy.
- /// The Exclusions that are applied on the
- /// policy.
- public ManagedRulesDefinition(IList managedRuleSets, IList exclusions = default(IList))
- {
- Exclusions = exclusions;
- ManagedRuleSets = managedRuleSets;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the Exclusions that are applied on the policy.
- ///
- [JsonProperty(PropertyName = "exclusions")]
- public IList Exclusions { get; set; }
-
- ///
- /// Gets or sets the managed rule sets that are associated with the
- /// policy.
- ///
- [JsonProperty(PropertyName = "managedRuleSets")]
- public IList ManagedRuleSets { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (ManagedRuleSets == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "ManagedRuleSets");
- }
- if (Exclusions != null)
- {
- foreach (var element in Exclusions)
- {
- if (element != null)
- {
- element.Validate();
- }
- }
- }
- if (ManagedRuleSets != null)
- {
- foreach (var element1 in ManagedRuleSets)
- {
- if (element1 != null)
- {
- element1.Validate();
- }
- }
- }
- }
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/MatchCondition.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/MatchCondition.cs
deleted file mode 100644
index fddaf2c3c02ba..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/MatchCondition.cs
+++ /dev/null
@@ -1,124 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
- using Microsoft.Rest;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Define match conditions.
- ///
- public partial class MatchCondition
- {
- ///
- /// Initializes a new instance of the MatchCondition class.
- ///
- public MatchCondition()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the MatchCondition class.
- ///
- /// List of match variables.
- /// The operator to be matched. Possible
- /// values include: 'IPMatch', 'Equal', 'Contains', 'LessThan',
- /// 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual',
- /// 'BeginsWith', 'EndsWith', 'Regex', 'GeoMatch'
- /// Match value.
- /// Whether this is negate condition or
- /// not.
- /// List of transforms.
- public MatchCondition(IList matchVariables, string operatorProperty, IList matchValues, bool? negationConditon = default(bool?), IList transforms = default(IList))
- {
- MatchVariables = matchVariables;
- OperatorProperty = operatorProperty;
- NegationConditon = negationConditon;
- MatchValues = matchValues;
- Transforms = transforms;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets list of match variables.
- ///
- [JsonProperty(PropertyName = "matchVariables")]
- public IList MatchVariables { get; set; }
-
- ///
- /// Gets or sets the operator to be matched. Possible values include:
- /// 'IPMatch', 'Equal', 'Contains', 'LessThan', 'GreaterThan',
- /// 'LessThanOrEqual', 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith',
- /// 'Regex', 'GeoMatch'
- ///
- [JsonProperty(PropertyName = "operator")]
- public string OperatorProperty { get; set; }
-
- ///
- /// Gets or sets whether this is negate condition or not.
- ///
- [JsonProperty(PropertyName = "negationConditon")]
- public bool? NegationConditon { get; set; }
-
- ///
- /// Gets or sets match value.
- ///
- [JsonProperty(PropertyName = "matchValues")]
- public IList MatchValues { get; set; }
-
- ///
- /// Gets or sets list of transforms.
- ///
- [JsonProperty(PropertyName = "transforms")]
- public IList Transforms { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (MatchVariables == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "MatchVariables");
- }
- if (OperatorProperty == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty");
- }
- if (MatchValues == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "MatchValues");
- }
- if (MatchVariables != null)
- {
- foreach (var element in MatchVariables)
- {
- if (element != null)
- {
- element.Validate();
- }
- }
- }
- }
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/MatchVariable.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/MatchVariable.cs
deleted file mode 100644
index 9a72bef650cc6..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/MatchVariable.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
- using Microsoft.Rest;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Define match variables.
- ///
- public partial class MatchVariable
- {
- ///
- /// Initializes a new instance of the MatchVariable class.
- ///
- public MatchVariable()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the MatchVariable class.
- ///
- /// Match Variable. Possible values include:
- /// 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs',
- /// 'RequestUri', 'RequestHeaders', 'RequestBody',
- /// 'RequestCookies'
- /// The selector of match variable.
- public MatchVariable(string variableName, string selector = default(string))
- {
- VariableName = variableName;
- Selector = selector;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets match Variable. Possible values include: 'RemoteAddr',
- /// 'RequestMethod', 'QueryString', 'PostArgs', 'RequestUri',
- /// 'RequestHeaders', 'RequestBody', 'RequestCookies'
- ///
- [JsonProperty(PropertyName = "variableName")]
- public string VariableName { get; set; }
-
- ///
- /// Gets or sets the selector of match variable.
- ///
- [JsonProperty(PropertyName = "selector")]
- public string Selector { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (VariableName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "VariableName");
- }
- }
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkInterfaceIpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkInterfaceIPConfiguration.cs
similarity index 100%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkInterfaceIpConfiguration.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkInterfaceIPConfiguration.cs
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/OwaspCrsExclusionEntry.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/OwaspCrsExclusionEntry.cs
deleted file mode 100644
index 8a1e4415a02eb..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/OwaspCrsExclusionEntry.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
- using Microsoft.Rest;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Allow to exclude some variable satisfy the condition for the WAF check.
- ///
- public partial class OwaspCrsExclusionEntry
- {
- ///
- /// Initializes a new instance of the OwaspCrsExclusionEntry class.
- ///
- public OwaspCrsExclusionEntry()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the OwaspCrsExclusionEntry class.
- ///
- /// The variable to be excluded. Possible
- /// values include: 'RequestHeaderNames', 'RequestCookieNames',
- /// 'RequestArgNames'
- /// When matchVariable is a
- /// collection, operate on the selector to specify which elements in
- /// the collection this exclusion applies to. Possible values include:
- /// 'Equals', 'Contains', 'StartsWith', 'EndsWith', 'EqualsAny'
- /// When matchVariable is a collection, operator
- /// used to specify which elements in the collection this exclusion
- /// applies to.
- public OwaspCrsExclusionEntry(string matchVariable, string selectorMatchOperator, string selector)
- {
- MatchVariable = matchVariable;
- SelectorMatchOperator = selectorMatchOperator;
- Selector = selector;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the variable to be excluded. Possible values include:
- /// 'RequestHeaderNames', 'RequestCookieNames', 'RequestArgNames'
- ///
- [JsonProperty(PropertyName = "matchVariable")]
- public string MatchVariable { get; set; }
-
- ///
- /// Gets or sets when matchVariable is a collection, operate on the
- /// selector to specify which elements in the collection this exclusion
- /// applies to. Possible values include: 'Equals', 'Contains',
- /// 'StartsWith', 'EndsWith', 'EqualsAny'
- ///
- [JsonProperty(PropertyName = "selectorMatchOperator")]
- public string SelectorMatchOperator { get; set; }
-
- ///
- /// Gets or sets when matchVariable is a collection, operator used to
- /// specify which elements in the collection this exclusion applies to.
- ///
- [JsonProperty(PropertyName = "selector")]
- public string Selector { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (MatchVariable == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "MatchVariable");
- }
- if (SelectorMatchOperator == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "SelectorMatchOperator");
- }
- if (Selector == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "Selector");
- }
- }
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/OwaspCrsExclusionEntryMatchVariable.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/OwaspCrsExclusionEntryMatchVariable.cs
deleted file mode 100644
index 683d19bafe039..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/OwaspCrsExclusionEntryMatchVariable.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
-
- ///
- /// Defines values for OwaspCrsExclusionEntryMatchVariable.
- ///
- public static class OwaspCrsExclusionEntryMatchVariable
- {
- public const string RequestHeaderNames = "RequestHeaderNames";
- public const string RequestCookieNames = "RequestCookieNames";
- public const string RequestArgNames = "RequestArgNames";
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/OwaspCrsExclusionEntrySelectorMatchOperator.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/OwaspCrsExclusionEntrySelectorMatchOperator.cs
deleted file mode 100644
index 0f0da5522c0d0..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/OwaspCrsExclusionEntrySelectorMatchOperator.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
-
- ///
- /// Defines values for OwaspCrsExclusionEntrySelectorMatchOperator.
- ///
- public static class OwaspCrsExclusionEntrySelectorMatchOperator
- {
- public const string Equals = "Equals";
- public const string Contains = "Contains";
- public const string StartsWith = "StartsWith";
- public const string EndsWith = "EndsWith";
- public const string EqualsAny = "EqualsAny";
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PolicySettings.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PolicySettings.cs
deleted file mode 100644
index 69188a8004887..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PolicySettings.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
- using Microsoft.Rest;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Defines contents of a web application firewall global configuration.
- ///
- public partial class PolicySettings
- {
- ///
- /// Initializes a new instance of the PolicySettings class.
- ///
- public PolicySettings()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the PolicySettings class.
- ///
- /// The state of the policy. Possible values
- /// include: 'Disabled', 'Enabled'
- /// The mode of the policy. Possible values include:
- /// 'Prevention', 'Detection'
- /// Whether to allow WAF to check
- /// request Body.
- /// Maximum request body size in
- /// Kb for WAF.
- /// Maximum file upload size in Mb
- /// for WAF.
- public PolicySettings(string state = default(string), string mode = default(string), bool? requestBodyCheck = default(bool?), int? maxRequestBodySizeInKb = default(int?), int? fileUploadLimitInMb = default(int?))
- {
- State = state;
- Mode = mode;
- RequestBodyCheck = requestBodyCheck;
- MaxRequestBodySizeInKb = maxRequestBodySizeInKb;
- FileUploadLimitInMb = fileUploadLimitInMb;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the state of the policy. Possible values include:
- /// 'Disabled', 'Enabled'
- ///
- [JsonProperty(PropertyName = "state")]
- public string State { get; set; }
-
- ///
- /// Gets or sets the mode of the policy. Possible values include:
- /// 'Prevention', 'Detection'
- ///
- [JsonProperty(PropertyName = "mode")]
- public string Mode { get; set; }
-
- ///
- /// Gets or sets whether to allow WAF to check request Body.
- ///
- [JsonProperty(PropertyName = "requestBodyCheck")]
- public bool? RequestBodyCheck { get; set; }
-
- ///
- /// Gets or sets maximum request body size in Kb for WAF.
- ///
- [JsonProperty(PropertyName = "maxRequestBodySizeInKb")]
- public int? MaxRequestBodySizeInKb { get; set; }
-
- ///
- /// Gets or sets maximum file upload size in Mb for WAF.
- ///
- [JsonProperty(PropertyName = "fileUploadLimitInMb")]
- public int? FileUploadLimitInMb { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (MaxRequestBodySizeInKb > 128)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "MaxRequestBodySizeInKb", 128);
- }
- if (MaxRequestBodySizeInKb < 8)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "MaxRequestBodySizeInKb", 8);
- }
- if (FileUploadLimitInMb < 0)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "FileUploadLimitInMb", 0);
- }
- }
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIpAddress.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIPAddress.cs
similarity index 100%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIpAddress.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIPAddress.cs
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIpAddressDnsSettings.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIPAddressDnsSettings.cs
similarity index 100%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIpAddressDnsSettings.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIPAddressDnsSettings.cs
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkGatewayIpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.cs
similarity index 100%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkGatewayIpConfiguration.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.cs
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallAction.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallAction.cs
deleted file mode 100644
index ad71740c4c586..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallAction.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
-
- ///
- /// Defines values for WebApplicationFirewallAction.
- ///
- public static class WebApplicationFirewallAction
- {
- public const string Allow = "Allow";
- public const string Block = "Block";
- public const string Log = "Log";
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallCustomRule.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallCustomRule.cs
deleted file mode 100644
index de545296509b6..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallCustomRule.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
- using Microsoft.Rest;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Defines contents of a web application rule.
- ///
- public partial class WebApplicationFirewallCustomRule
- {
- ///
- /// Initializes a new instance of the WebApplicationFirewallCustomRule
- /// class.
- ///
- public WebApplicationFirewallCustomRule()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the WebApplicationFirewallCustomRule
- /// class.
- ///
- /// Priority of the rule. Rules with a lower
- /// value will be evaluated before rules with a higher value.
- /// The rule type. Possible values include:
- /// 'MatchRule', 'Invalid'
- /// List of match conditions.
- /// Type of Actions. Possible values include:
- /// 'Allow', 'Block', 'Log'
- /// The name of the resource that is unique within a
- /// policy. This name can be used to access the resource.
- /// A unique read-only string that changes whenever
- /// the resource is updated.
- public WebApplicationFirewallCustomRule(int priority, string ruleType, IList matchConditions, string action, string name = default(string), string etag = default(string))
- {
- Name = name;
- Etag = etag;
- Priority = priority;
- RuleType = ruleType;
- MatchConditions = matchConditions;
- Action = action;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the name of the resource that is unique within a
- /// policy. This name can be used to access the resource.
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
-
- ///
- /// Gets a unique read-only string that changes whenever the resource
- /// is updated.
- ///
- [JsonProperty(PropertyName = "etag")]
- public string Etag { get; private set; }
-
- ///
- /// Gets or sets priority of the rule. Rules with a lower value will be
- /// evaluated before rules with a higher value.
- ///
- [JsonProperty(PropertyName = "priority")]
- public int Priority { get; set; }
-
- ///
- /// Gets or sets the rule type. Possible values include: 'MatchRule',
- /// 'Invalid'
- ///
- [JsonProperty(PropertyName = "ruleType")]
- public string RuleType { get; set; }
-
- ///
- /// Gets or sets list of match conditions.
- ///
- [JsonProperty(PropertyName = "matchConditions")]
- public IList MatchConditions { get; set; }
-
- ///
- /// Gets or sets type of Actions. Possible values include: 'Allow',
- /// 'Block', 'Log'
- ///
- [JsonProperty(PropertyName = "action")]
- public string Action { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (RuleType == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "RuleType");
- }
- if (MatchConditions == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "MatchConditions");
- }
- if (Action == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "Action");
- }
- if (Name != null)
- {
- if (Name.Length > 128)
- {
- throw new ValidationException(ValidationRules.MaxLength, "Name", 128);
- }
- }
- if (MatchConditions != null)
- {
- foreach (var element in MatchConditions)
- {
- if (element != null)
- {
- element.Validate();
- }
- }
- }
- }
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallEnabledState.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallEnabledState.cs
deleted file mode 100644
index 1d9e974d35754..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallEnabledState.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
-
- ///
- /// Defines values for WebApplicationFirewallEnabledState.
- ///
- public static class WebApplicationFirewallEnabledState
- {
- public const string Disabled = "Disabled";
- public const string Enabled = "Enabled";
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallMatchVariable.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallMatchVariable.cs
deleted file mode 100644
index f84a785261dd6..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallMatchVariable.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
-
- ///
- /// Defines values for WebApplicationFirewallMatchVariable.
- ///
- public static class WebApplicationFirewallMatchVariable
- {
- public const string RemoteAddr = "RemoteAddr";
- public const string RequestMethod = "RequestMethod";
- public const string QueryString = "QueryString";
- public const string PostArgs = "PostArgs";
- public const string RequestUri = "RequestUri";
- public const string RequestHeaders = "RequestHeaders";
- public const string RequestBody = "RequestBody";
- public const string RequestCookies = "RequestCookies";
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallMode.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallMode.cs
deleted file mode 100644
index 75f8e00b224d4..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallMode.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
-
- ///
- /// Defines values for WebApplicationFirewallMode.
- ///
- public static class WebApplicationFirewallMode
- {
- public const string Prevention = "Prevention";
- public const string Detection = "Detection";
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallOperator.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallOperator.cs
deleted file mode 100644
index b2cb0e1ac8275..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallOperator.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
-
- ///
- /// Defines values for WebApplicationFirewallOperator.
- ///
- public static class WebApplicationFirewallOperator
- {
- public const string IPMatch = "IPMatch";
- public const string Equal = "Equal";
- public const string Contains = "Contains";
- public const string LessThan = "LessThan";
- public const string GreaterThan = "GreaterThan";
- public const string LessThanOrEqual = "LessThanOrEqual";
- public const string GreaterThanOrEqual = "GreaterThanOrEqual";
- public const string BeginsWith = "BeginsWith";
- public const string EndsWith = "EndsWith";
- public const string Regex = "Regex";
- public const string GeoMatch = "GeoMatch";
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallPolicy.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallPolicy.cs
deleted file mode 100644
index be96c86f8e8e5..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallPolicy.cs
+++ /dev/null
@@ -1,185 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Defines web application firewall policy.
- ///
- [Rest.Serialization.JsonTransformation]
- public partial class WebApplicationFirewallPolicy : Resource
- {
- ///
- /// Initializes a new instance of the WebApplicationFirewallPolicy
- /// class.
- ///
- public WebApplicationFirewallPolicy()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the WebApplicationFirewallPolicy
- /// class.
- ///
- /// Describes the managedRules
- /// structure.
- /// Resource ID.
- /// Resource name.
- /// Resource type.
- /// Resource location.
- /// Resource tags.
- /// The PolicySettings for policy.
- /// The custom rules inside the
- /// policy.
- /// A collection of references to
- /// application gateways.
- /// The provisioning state of the web
- /// application firewall policy resource. Possible values include:
- /// 'Succeeded', 'Updating', 'Deleting', 'Failed'
- /// Resource status of the policy.
- /// A collection of references to
- /// application gateway http listeners.
- /// A collection of references to
- /// application gateway path rules.
- /// A unique read-only string that changes whenever
- /// the resource is updated.
- public WebApplicationFirewallPolicy(ManagedRulesDefinition managedRules, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), PolicySettings policySettings = default(PolicySettings), IList customRules = default(IList), IList applicationGateways = default(IList), string provisioningState = default(string), string resourceState = default(string), IList httpListeners = default(IList), IList pathBasedRules = default(IList), string etag = default(string))
- : base(id, name, type, location, tags)
- {
- PolicySettings = policySettings;
- CustomRules = customRules;
- ApplicationGateways = applicationGateways;
- ProvisioningState = provisioningState;
- ResourceState = resourceState;
- ManagedRules = managedRules;
- HttpListeners = httpListeners;
- PathBasedRules = pathBasedRules;
- Etag = etag;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the PolicySettings for policy.
- ///
- [JsonProperty(PropertyName = "properties.policySettings")]
- public PolicySettings PolicySettings { get; set; }
-
- ///
- /// Gets or sets the custom rules inside the policy.
- ///
- [JsonProperty(PropertyName = "properties.customRules")]
- public IList CustomRules { get; set; }
-
- ///
- /// Gets a collection of references to application gateways.
- ///
- [JsonProperty(PropertyName = "properties.applicationGateways")]
- public IList ApplicationGateways { get; private set; }
-
- ///
- /// Gets the provisioning state of the web application firewall policy
- /// resource. Possible values include: 'Succeeded', 'Updating',
- /// 'Deleting', 'Failed'
- ///
- [JsonProperty(PropertyName = "properties.provisioningState")]
- public string ProvisioningState { get; private set; }
-
- ///
- /// Gets resource status of the policy.
- ///
- ///
- /// Resource status of the policy. Possible values include: 'Creating',
- /// 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting'
- ///
- [JsonProperty(PropertyName = "properties.resourceState")]
- public string ResourceState { get; private set; }
-
- ///
- /// Gets or sets describes the managedRules structure.
- ///
- [JsonProperty(PropertyName = "properties.managedRules")]
- public ManagedRulesDefinition ManagedRules { get; set; }
-
- ///
- /// Gets a collection of references to application gateway http
- /// listeners.
- ///
- [JsonProperty(PropertyName = "properties.httpListeners")]
- public IList HttpListeners { get; private set; }
-
- ///
- /// Gets a collection of references to application gateway path rules.
- ///
- [JsonProperty(PropertyName = "properties.pathBasedRules")]
- public IList PathBasedRules { get; private set; }
-
- ///
- /// Gets a unique read-only string that changes whenever the resource
- /// is updated.
- ///
- [JsonProperty(PropertyName = "etag")]
- public string Etag { get; private set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (ManagedRules == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "ManagedRules");
- }
- if (PolicySettings != null)
- {
- PolicySettings.Validate();
- }
- if (CustomRules != null)
- {
- foreach (var element in CustomRules)
- {
- if (element != null)
- {
- element.Validate();
- }
- }
- }
- if (ApplicationGateways != null)
- {
- foreach (var element1 in ApplicationGateways)
- {
- if (element1 != null)
- {
- element1.Validate();
- }
- }
- }
- if (ManagedRules != null)
- {
- ManagedRules.Validate();
- }
- }
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallPolicyResourceState.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallPolicyResourceState.cs
deleted file mode 100644
index 284af4104102f..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallPolicyResourceState.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
-
- ///
- /// Defines values for WebApplicationFirewallPolicyResourceState.
- ///
- public static class WebApplicationFirewallPolicyResourceState
- {
- public const string Creating = "Creating";
- public const string Enabling = "Enabling";
- public const string Enabled = "Enabled";
- public const string Disabling = "Disabling";
- public const string Disabled = "Disabled";
- public const string Deleting = "Deleting";
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallRuleType.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallRuleType.cs
deleted file mode 100644
index bfff0efe51192..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallRuleType.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
-
- ///
- /// Defines values for WebApplicationFirewallRuleType.
- ///
- public static class WebApplicationFirewallRuleType
- {
- public const string MatchRule = "MatchRule";
- public const string Invalid = "Invalid";
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallTransform.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallTransform.cs
deleted file mode 100644
index 890cfeec59516..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/WebApplicationFirewallTransform.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network.Models
-{
-
- ///
- /// Defines values for WebApplicationFirewallTransform.
- ///
- public static class WebApplicationFirewallTransform
- {
- public const string Lowercase = "Lowercase";
- public const string Trim = "Trim";
- public const string UrlDecode = "UrlDecode";
- public const string UrlEncode = "UrlEncode";
- public const string RemoveNulls = "RemoveNulls";
- public const string HtmlEntityDecode = "HtmlEntityDecode";
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkManagementClient.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkManagementClient.cs
index 7a6b9a48e4b39..3d99becc08655 100644
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkManagementClient.cs
+++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkManagementClient.cs
@@ -578,11 +578,6 @@ public partial class NetworkManagementClient : ServiceClient
public virtual IHubRouteTablesOperations HubRouteTables { get; private set; }
- ///
- /// Gets the IWebApplicationFirewallPoliciesOperations.
- ///
- public virtual IWebApplicationFirewallPoliciesOperations WebApplicationFirewallPolicies { get; private set; }
-
///
/// Initializes a new instance of the NetworkManagementClient class.
///
@@ -924,7 +919,6 @@ private void Initialize()
VirtualHubBgpConnections = new VirtualHubBgpConnectionsOperations(this);
VirtualHubIpConfiguration = new VirtualHubIpConfigurationOperations(this);
HubRouteTables = new HubRouteTablesOperations(this);
- WebApplicationFirewallPolicies = new WebApplicationFirewallPoliciesOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperations.cs
index 8cf71fa7b50f6..017f71d1a1e11 100644
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperations.cs
+++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperations.cs
@@ -1290,6 +1290,52 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
/// The request body of CheckPrivateLinkService API call.
///
///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CheckPrivateLinkServiceVisibilityWithHttpMessagesAsync(string location, CheckPrivateLinkServiceVisibilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginCheckPrivateLinkServiceVisibilityWithHttpMessagesAsync(location, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Checks whether the subscription is visible to private link service in the
+ /// specified resource group.
+ ///
+ ///
+ /// The location of the domain name.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The request body of CheckPrivateLinkService API call.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CheckPrivateLinkServiceVisibilityByResourceGroupWithHttpMessagesAsync(string location, string resourceGroupName, CheckPrivateLinkServiceVisibilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginCheckPrivateLinkServiceVisibilityByResourceGroupWithHttpMessagesAsync(location, resourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Returns all of the private link service ids that can be linked to a Private
+ /// Endpoint with auto approved in this subscription in this region.
+ ///
+ ///
+ /// The location of the domain name.
+ ///
+ ///
/// Headers that will be added to request.
///
///
@@ -1310,16 +1356,12 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> CheckPrivateLinkServiceVisibilityWithHttpMessagesAsync(string location, CheckPrivateLinkServiceVisibilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListAutoApprovedPrivateLinkServicesWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (location == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "location");
}
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -1333,14 +1375,13 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("location", location);
- tracingParameters.Add("parameters", parameters);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CheckPrivateLinkServiceVisibility", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListAutoApprovedPrivateLinkServices", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices").ToString();
_url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
@@ -1355,7 +1396,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1386,12 +1427,6 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
// Serialize Request
string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
// Set Credentials
if (Client.Credentials != null)
{
@@ -1447,7 +1482,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -1460,7 +1495,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -1480,8 +1515,8 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
}
///
- /// Checks whether the subscription is visible to private link service in the
- /// specified resource group.
+ /// Returns all of the private link service ids that can be linked to a Private
+ /// Endpoint with auto approved in this subscription in this region.
///
///
/// The location of the domain name.
@@ -1489,9 +1524,6 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
///
/// The name of the resource group.
///
- ///
- /// The request body of CheckPrivateLinkService API call.
- ///
///
/// Headers that will be added to request.
///
@@ -1513,7 +1545,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> CheckPrivateLinkServiceVisibilityByResourceGroupWithHttpMessagesAsync(string location, string resourceGroupName, CheckPrivateLinkServiceVisibilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListAutoApprovedPrivateLinkServicesByResourceGroupWithHttpMessagesAsync(string location, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (location == null)
{
@@ -1523,10 +1555,6 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -1541,14 +1569,13 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("location", location);
tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("parameters", parameters);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CheckPrivateLinkServiceVisibilityByResourceGroup", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListAutoApprovedPrivateLinkServicesByResourceGroup", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices").ToString();
_url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
@@ -1564,7 +1591,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1595,12 +1622,6 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
// Serialize Request
string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
// Set Credentials
if (Client.Credentials != null)
{
@@ -1656,7 +1677,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -1669,7 +1690,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -1689,11 +1710,13 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
}
///
- /// Returns all of the private link service ids that can be linked to a Private
- /// Endpoint with auto approved in this subscription in this region.
+ /// Deletes the specified private link service.
///
- ///
- /// The location of the domain name.
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the private link service.
///
///
/// Headers that will be added to request.
@@ -1701,12 +1724,9 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
@@ -1716,11 +1736,15 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListAutoApprovedPrivateLinkServicesWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (location == null)
+ if (resourceGroupName == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "location");
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (serviceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "serviceName");
}
if (Client.SubscriptionId == null)
{
@@ -1734,15 +1758,17 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("location", location);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serviceName", serviceName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListAutoApprovedPrivateLinkServices", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices").ToString();
- _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
if (apiVersion != null)
@@ -1756,7 +1782,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1807,16 +1833,15 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1826,10 +1851,6 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
ServiceClientTracing.Error(_invocationId, ex);
@@ -1842,31 +1863,13 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
@@ -1875,22 +1878,24 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
}
///
- /// Returns all of the private link service ids that can be linked to a Private
- /// Endpoint with auto approved in this subscription in this region.
+ /// Creates or updates an private link service in the specified resource group.
///
- ///
- /// The location of the domain name.
- ///
///
/// The name of the resource group.
///
+ ///
+ /// The name of the private link service.
+ ///
+ ///
+ /// Parameters supplied to the create or update private link service operation.
+ ///
///
/// Headers that will be added to request.
///
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1905,16 +1910,20 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListAutoApprovedPrivateLinkServicesByResourceGroupWithHttpMessagesAsync(string location, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, PrivateLinkService parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (location == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "location");
- }
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ if (serviceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "serviceName");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -1927,17 +1936,18 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("location", location);
tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("serviceName", serviceName);
+ tracingParameters.Add("parameters", parameters);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListAutoApprovedPrivateLinkServicesByResourceGroup", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices").ToString();
- _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
if (apiVersion != null)
@@ -1951,7 +1961,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1982,6 +1992,12 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
// Serialize Request
string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
// Set Credentials
if (Client.Credentials != null)
{
@@ -2002,16 +2018,15 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -2021,10 +2036,6 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
ServiceClientTracing.Error(_invocationId, ex);
@@ -2037,7 +2048,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -2050,7 +2061,25 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -2070,7 +2099,8 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
}
///
- /// Deletes the specified private link service.
+ /// Delete private end point connection for a private link service in a
+ /// subscription.
///
///
/// The name of the resource group.
@@ -2078,6 +2108,9 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
///
/// The name of the private link service.
///
+ ///
+ /// The name of the private end point connection.
+ ///
///
/// Headers that will be added to request.
///
@@ -2096,7 +2129,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serviceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string serviceName, string peConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -2106,6 +2139,10 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "serviceName");
}
+ if (peConnectionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "peConnectionName");
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -2120,15 +2157,17 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("serviceName", serviceName);
+ tracingParameters.Add("peConnectionName", peConnectionName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnection", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName));
+ _url = _url.Replace("{peConnectionName}", System.Uri.EscapeDataString(peConnectionName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
if (apiVersion != null)
@@ -2238,16 +2277,13 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
}
///
- /// Creates or updates an private link service in the specified resource group.
+ /// Checks whether the subscription is visible to private link service.
///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the private link service.
+ ///
+ /// The location of the domain name.
///
///
- /// Parameters supplied to the create or update private link service operation.
+ /// The request body of CheckPrivateLinkService API call.
///
///
/// Headers that will be added to request.
@@ -2255,7 +2291,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -2270,15 +2306,11 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serviceName, PrivateLinkService parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginCheckPrivateLinkServiceVisibilityWithHttpMessagesAsync(string location, CheckPrivateLinkServiceVisibilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (serviceName == null)
+ if (location == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "serviceName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "location");
}
if (parameters == null)
{
@@ -2296,18 +2328,16 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("serviceName", serviceName);
+ tracingParameters.Add("location", location);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCheckPrivateLinkServiceVisibility", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName));
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility").ToString();
+ _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
if (apiVersion != null)
@@ -2321,7 +2351,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.Method = new HttpMethod("POST");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -2378,15 +2408,16 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
- var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -2396,6 +2427,10 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
if (_shouldTrace)
{
ServiceClientTracing.Error(_invocationId, ex);
@@ -2408,7 +2443,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -2421,25 +2456,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- // Deserialize Response
- if ((int)_statusCode == 201)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -2459,17 +2476,17 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
}
///
- /// Delete private end point connection for a private link service in a
- /// subscription.
+ /// Checks whether the subscription is visible to private link service in the
+ /// specified resource group.
///
+ ///
+ /// The location of the domain name.
+ ///
///
/// The name of the resource group.
///
- ///
- /// The name of the private link service.
- ///
- ///
- /// The name of the private end point connection.
+ ///
+ /// The request body of CheckPrivateLinkService API call.
///
///
/// Headers that will be added to request.
@@ -2477,9 +2494,12 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
@@ -2489,19 +2509,19 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string serviceName, string peConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginCheckPrivateLinkServiceVisibilityByResourceGroupWithHttpMessagesAsync(string location, string resourceGroupName, CheckPrivateLinkServiceVisibilityRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (resourceGroupName == null)
+ if (location == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "location");
}
- if (serviceName == null)
+ if (resourceGroupName == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "serviceName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
- if (peConnectionName == null)
+ if (parameters == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "peConnectionName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
if (Client.SubscriptionId == null)
{
@@ -2515,19 +2535,18 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("location", location);
tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("serviceName", serviceName);
- tracingParameters.Add("peConnectionName", peConnectionName);
+ tracingParameters.Add("parameters", parameters);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnection", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCheckPrivateLinkServiceVisibilityByResourceGroup", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility").ToString();
+ _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{serviceName}", System.Uri.EscapeDataString(serviceName));
- _url = _url.Replace("{peConnectionName}", System.Uri.EscapeDataString(peConnectionName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
List _queryParameters = new List();
if (apiVersion != null)
@@ -2541,7 +2560,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.Method = new HttpMethod("POST");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -2572,6 +2591,12 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
// Serialize Request
string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
// Set Credentials
if (Client.Credentials != null)
{
@@ -2592,15 +2617,16 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
- var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -2610,6 +2636,10 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
if (_shouldTrace)
{
ServiceClientTracing.Error(_invocationId, ex);
@@ -2622,13 +2652,31 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
if (_shouldTrace)
{
ServiceClientTracing.Exit(_invocationId, _result);
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperationsExtensions.cs
index 9da1243c72e36..38c4e39742272 100644
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperationsExtensions.cs
+++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperationsExtensions.cs
@@ -699,6 +699,94 @@ public static void BeginDeletePrivateEndpointConnection(this IPrivateLinkService
(await operations.BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, serviceName, peConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// Checks whether the subscription is visible to private link service.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The location of the domain name.
+ ///
+ ///
+ /// The request body of CheckPrivateLinkService API call.
+ ///
+ public static PrivateLinkServiceVisibility BeginCheckPrivateLinkServiceVisibility(this IPrivateLinkServicesOperations operations, string location, CheckPrivateLinkServiceVisibilityRequest parameters)
+ {
+ return operations.BeginCheckPrivateLinkServiceVisibilityAsync(location, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Checks whether the subscription is visible to private link service.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The location of the domain name.
+ ///
+ ///
+ /// The request body of CheckPrivateLinkService API call.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCheckPrivateLinkServiceVisibilityAsync(this IPrivateLinkServicesOperations operations, string location, CheckPrivateLinkServiceVisibilityRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCheckPrivateLinkServiceVisibilityWithHttpMessagesAsync(location, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Checks whether the subscription is visible to private link service in the
+ /// specified resource group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The location of the domain name.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The request body of CheckPrivateLinkService API call.
+ ///
+ public static PrivateLinkServiceVisibility BeginCheckPrivateLinkServiceVisibilityByResourceGroup(this IPrivateLinkServicesOperations operations, string location, string resourceGroupName, CheckPrivateLinkServiceVisibilityRequest parameters)
+ {
+ return operations.BeginCheckPrivateLinkServiceVisibilityByResourceGroupAsync(location, resourceGroupName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Checks whether the subscription is visible to private link service in the
+ /// specified resource group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The location of the domain name.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The request body of CheckPrivateLinkService API call.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCheckPrivateLinkServiceVisibilityByResourceGroupAsync(this IPrivateLinkServicesOperations operations, string location, string resourceGroupName, CheckPrivateLinkServiceVisibilityRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCheckPrivateLinkServiceVisibilityByResourceGroupWithHttpMessagesAsync(location, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Gets all private link services in a resource group.
///
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPAddressesOperations.cs
similarity index 99%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperations.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPAddressesOperations.cs
index fb75b145c3d6a..fbd4eb11683e9 100644
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperations.cs
+++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPAddressesOperations.cs
@@ -57,7 +57,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client)
/// The name of the resource group.
///
///
- /// The name of the subnet.
+ /// The name of the public IP address.
///
///
/// The headers that will be added to request.
@@ -79,7 +79,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client)
/// The name of the resource group.
///
///
- /// The name of the subnet.
+ /// The name of the public IP address.
///
///
/// Expands referenced resources.
@@ -1530,7 +1530,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client)
/// The name of the resource group.
///
///
- /// The name of the subnet.
+ /// The name of the public IP address.
///
///
/// Headers that will be added to request.
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPAddressesOperationsExtensions.cs
similarity index 99%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperationsExtensions.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPAddressesOperationsExtensions.cs
index fff1a3acb3221..97b23fe331d7e 100644
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperationsExtensions.cs
+++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPAddressesOperationsExtensions.cs
@@ -31,7 +31,7 @@ public static partial class PublicIPAddressesOperationsExtensions
/// The name of the resource group.
///
///
- /// The name of the subnet.
+ /// The name of the public IP address.
///
public static void Delete(this IPublicIPAddressesOperations operations, string resourceGroupName, string publicIpAddressName)
{
@@ -48,7 +48,7 @@ public static void Delete(this IPublicIPAddressesOperations operations, string r
/// The name of the resource group.
///
///
- /// The name of the subnet.
+ /// The name of the public IP address.
///
///
/// The cancellation token.
@@ -68,7 +68,7 @@ public static void Delete(this IPublicIPAddressesOperations operations, string r
/// The name of the resource group.
///
///
- /// The name of the subnet.
+ /// The name of the public IP address.
///
///
/// Expands referenced resources.
@@ -88,7 +88,7 @@ public static void Delete(this IPublicIPAddressesOperations operations, string r
/// The name of the resource group.
///
///
- /// The name of the subnet.
+ /// The name of the public IP address.
///
///
/// Expands referenced resources.
@@ -440,7 +440,7 @@ public static IPage ListVirtualMachineScaleSetVMPublicIPAddress
/// The name of the resource group.
///
///
- /// The name of the subnet.
+ /// The name of the public IP address.
///
public static void BeginDelete(this IPublicIPAddressesOperations operations, string resourceGroupName, string publicIpAddressName)
{
@@ -457,7 +457,7 @@ public static void BeginDelete(this IPublicIPAddressesOperations operations, str
/// The name of the resource group.
///
///
- /// The name of the subnet.
+ /// The name of the public IP address.
///
///
/// The cancellation token.
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SdkInfo_NetworkManagementClient.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SdkInfo_NetworkManagementClient.cs
index 9a90046aad0f7..1f5c5b1bec244 100644
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SdkInfo_NetworkManagementClient.cs
+++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SdkInfo_NetworkManagementClient.cs
@@ -128,21 +128,9 @@ public static IEnumerable> ApiInfo_NetworkManageme
new Tuple("Network", "VpnSiteLinks", "2020-05-01"),
new Tuple("Network", "VpnSites", "2020-05-01"),
new Tuple("Network", "VpnSitesConfiguration", "2020-05-01"),
- new Tuple("Network", "WebApplicationFirewallPolicies", "2020-05-01"),
new Tuple("Network", "generatevirtualwanvpnserverconfigurationvpnprofile", "2020-05-01"),
}.AsEnumerable();
}
}
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "v2";
- public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/network/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\git\\azure-sdk-for-net\\sdk";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "4b2aa12fe415caa4ea0148372466fc15d006d37e";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWansOperations.cs
similarity index 100%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperations.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWansOperations.cs
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWansOperationsExtensions.cs
similarity index 100%
rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperationsExtensions.cs
rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWansOperationsExtensions.cs
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperations.cs
deleted file mode 100644
index c34cf8f4756a0..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperations.cs
+++ /dev/null
@@ -1,1402 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// WebApplicationFirewallPoliciesOperations operations.
- ///
- internal partial class WebApplicationFirewallPoliciesOperations : IServiceOperations, IWebApplicationFirewallPoliciesOperations
- {
- ///
- /// Initializes a new instance of the WebApplicationFirewallPoliciesOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal WebApplicationFirewallPoliciesOperations(NetworkManagementClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the NetworkManagementClient
- ///
- public NetworkManagementClient Client { get; private set; }
-
- ///
- /// Lists all of the protection policies within a resource group.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2020-05-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Gets all the WAF policies in a subscription.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2020-05-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListAll", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Retrieve protection policy with specified name within a resource group.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the policy.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (policyName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "policyName");
- }
- if (policyName != null)
- {
- if (policyName.Length > 128)
- {
- throw new ValidationException(ValidationRules.MaxLength, "policyName", 128);
- }
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2020-05-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("policyName", policyName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Creates or update policy with specified rule set name within a resource
- /// group.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the policy.
- ///
- ///
- /// Policy to be created.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string policyName, WebApplicationFirewallPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (policyName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "policyName");
- }
- if (policyName != null)
- {
- if (policyName.Length > 128)
- {
- throw new ValidationException(ValidationRules.MaxLength, "policyName", 128);
- }
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
- if (parameters != null)
- {
- parameters.Validate();
- }
- string apiVersion = "2020-05-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("policyName", policyName);
- tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- // Deserialize Response
- if ((int)_statusCode == 201)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Deletes Policy.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the policy.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, policyName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Deletes Policy.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the policy.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (policyName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "policyName");
- }
- if (policyName != null)
- {
- if (policyName.Length > 128)
- {
- throw new ValidationException(ValidationRules.MaxLength, "policyName", 128);
- }
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2020-05-01";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("policyName", policyName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("DELETE");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Lists all of the protection policies within a resource group.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (nextPageLink == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("nextPageLink", nextPageLink);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
- }
- // Construct URL
- string _url = "{nextLink}";
- _url = _url.Replace("{nextLink}", nextPageLink);
- List _queryParameters = new List();
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Gets all the WAF policies in a subscription.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (nextPageLink == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("nextPageLink", nextPageLink);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListAllNext", tracingParameters);
- }
- // Construct URL
- string _url = "{nextLink}";
- _url = _url.Replace("{nextLink}", nextPageLink);
- List _queryParameters = new List();
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperationsExtensions.cs
deleted file mode 100644
index 45c7d5263cf7f..0000000000000
--- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperationsExtensions.cs
+++ /dev/null
@@ -1,317 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.Network
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for WebApplicationFirewallPoliciesOperations.
- ///
- public static partial class WebApplicationFirewallPoliciesOperationsExtensions
- {
- ///
- /// Lists all of the protection policies within a resource group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- public static IPage List(this IWebApplicationFirewallPoliciesOperations operations, string resourceGroupName)
- {
- return operations.ListAsync(resourceGroupName).GetAwaiter().GetResult();
- }
-
- ///
- /// Lists all of the protection policies within a resource group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListAsync(this IWebApplicationFirewallPoliciesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Gets all the WAF policies in a subscription.
- ///
- ///
- /// The operations group for this extension method.
- ///
- public static IPage ListAll(this IWebApplicationFirewallPoliciesOperations operations)
- {
- return operations.ListAllAsync().GetAwaiter().GetResult();
- }
-
- ///
- /// Gets all the WAF policies in a subscription.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListAllAsync(this IWebApplicationFirewallPoliciesOperations operations, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Retrieve protection policy with specified name within a resource group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the policy.
- ///
- public static WebApplicationFirewallPolicy Get(this IWebApplicationFirewallPoliciesOperations operations, string resourceGroupName, string policyName)
- {
- return operations.GetAsync(resourceGroupName, policyName).GetAwaiter().GetResult();
- }
-
- ///
- /// Retrieve protection policy with specified name within a resource group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the policy.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetAsync(this IWebApplicationFirewallPoliciesOperations operations, string resourceGroupName, string policyName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, policyName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Creates or update policy with specified rule set name within a resource
- /// group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the policy.
- ///
- ///
- /// Policy to be created.
- ///
- public static WebApplicationFirewallPolicy CreateOrUpdate(this IWebApplicationFirewallPoliciesOperations operations, string resourceGroupName, string policyName, WebApplicationFirewallPolicy parameters)
- {
- return operations.CreateOrUpdateAsync(resourceGroupName, policyName, parameters).GetAwaiter().GetResult();
- }
-
- ///
- /// Creates or update policy with specified rule set name within a resource
- /// group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The name of the policy.
- ///
- ///
- /// Policy to be created.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task CreateOrUpdateAsync(this IWebApplicationFirewallPoliciesOperations operations, string resourceGroupName, string policyName, WebApplicationFirewallPolicy parameters, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, policyName, parameters, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///